Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Contributions to ELOG, Page 2 of 6  Not logged in ELOG logo
ID Date Author Author Emailup Category Subject Status Last Revision
  153   Tue Dec 7 01:38:23 2021 Anthony J Krishockajkrishock@gmail.comTheme/SkinAstronomical logbook using ElogStableTue Dec 7 01:44:25 2021 by Anthony J Krishock

Hello all,

I became aware of the usefulness of Elog while working at Brookhaven National Lab. Since that time, I have developed a version of Elog that can be used as a log book for observations in Astronomy (my longtime hobby). Attached is my default.css theme and replacement icon files that match the theme. The color scheme is chosen to minimize bright lights and preserve night vision

To install, just place the default.css file in the default theme directory and copy over the icon files into the default theme directory and replace the default ones. 

Comments and suggestions welcome!

Thank you

Attachment 1: theme.zip
Attachment 2: elog.PNG
elog.PNG
  13   Thu Apr 28 15:45:58 2005 Alex Halexsynergie-infcomTheme/SkinBubble for pleasure by L'ange noirStableMon Aug 1 09:35:26 2005 by Alex H
The original theme is from Francois Cukier but I have change a some color 
and font.

Francois Cukier  said : "Uncompress "Bubble.zip" in your Elog default 
folder if you want to replace the original elog theme. Otherwise, if you 
decompress it in another folder, you will need to modify your elogd.cfg 
file as described at this adress: http://midas.psi.ch/elog/config.html"

Do it at the same ;o)

I want to thanks Francois Cukier and Stephan Ritt for their works, so 
THANKS a lot !

I wait your comments :o).


-UPDATE------------------------------------------------------------------------
2005/08/1 : Alexander Sheremet correct CSS bug thanks to it, archive re-uploaded
Attachment 1: bubble2-1.gif
bubble2-1.gif
Attachment 2: bubble2-2.gif
bubble2-2.gif
Attachment 3: Bubble.zip
  38   Fri Sep 9 12:08:26 2011 Andreas Luedekeandreas.luedeke@psi.chScriptcreate incremental daily backups of logbooks for Unix/LinuxBeta 
A very simple backup utility for elog logbooks.
If you want to recover your logbook from corrupted entries, an incremental backup comes in handy:
you can just replace the corrupted files with the previous versions.
Below is a very simple wrapper to create backups of the logbook into some local directory (/logbooks_backup in
the example script). The second wrapper lists the files in a given ".tar" archive.

You would run the backup from a cron job with the line:
1 0 * * * /usr/local/elog/elog_backup_daily

This will create daily backups of modified logbook and config files and a weekly backup of the password file
/usr/local/elog/passwd.txt (if you wonder why: our passwd.txt file has more than 1 MByte and of course it
changes with every login).

elog_backup_daily (copy to /usr/local/elog) script to create tar file and remove tar files older than 90 days
exclude-logbooks  (copy to /usr/local/elog) list of files to be excluded in backup (thumbnails, etc.) 
elog_backup_listfiles (copy to /usr/local/bin) shows content of a given tar file (omits directories in list)
Attachment 1: elog_backup_daily
#!/bin/sh
# source file directory
srcd=/usr/local/elog/

# backup all files newer than 25 hours
date=$(date -d "-25hours" "+%Y%m%d %H:%M")
# backup file directory
tard=/logbooks_backup
# backup tar file name
tarf=$tard/$(date +%Y%m%d_%a.tar)
# do not backup files that match patterns in this file
excf=/usr/local/elog/exclude-logbooks
# create backup
cd $srcd
tar --ignore-case -X $excf --newer "$date" -cf $tarf . logbooks/*

# copy passwd.txt
if [ "$(date +%u)" -eq 1 ]
then
	passwd=$tard/passwd_$(date +%Y%m%d_%a.txt)
	cp $srcd/passwd.txt $passwd
	gzip -9 $passwd
fi
# delete all backups older than 90 days
find $tard -mtime +90 -name "*_???.tar"           -exec rm -f {} +
find $tard -mtime +90 -name "passwd_*_???.txt.gz" -exec rm -f {} +
Attachment 2: exclude-logbooks
*.png.png
*.gif.png
*.jpg.png
*.pdf.png
oldLogbooks/*
logbooks/elog.log
passwd.txt
ssl/*
logbooks/Backup/*
logbooks/old/*

Attachment 3: elog_backup_listfiles
tar -tf $1|grep -v "^.*/$"
  52   Fri Sep 15 17:19:47 2017 Andreas Luedekeandreas.luedeke@psi.chScriptCheck logbook files for wrong referencesStableFri Sep 15 17:41:41 2017 by Andreas Luedeke
You can run this little script to check if all entries referenced "In reply to:" do actually exist.
To use it, you first need to "cd" to your logbook directory ("cd /usr/local/elog/logbooks") and then run it without arguments "logcheck".
If it finds references pointing to a missing entry, it'll print the path to the file with the offending reference and some lines. For example:
### error: reference to entry 146, that exists 0 times. Reference is:
### Proscan/2012/120507a.log-<p>[...].</p>
### Proscan/2012/120507a.log-$ @ MID @ $: 147
### Proscan/2012/120507a.log-Date: Mon, 07 May 2012 13:44:03 +0200
### Proscan/2012/120507a.log:In reply to: 146
### Proscan/2012/120507a.log-Wann: 1336373261
### Proscan/2012/120507a.log-Autor: [...]
### Proscan/2012/120507a.log-Eintrag: Problem
[...]-

Very often this happens if an entry is deleted AFTER someone already replied to it. Normally that is no problem, but in some cases you might get infinite loops and that causes ELOG to hang. The script is not checking for loops, but wrong references might give you a hint where to look.

The script will print duplicate entries as well, if the referenced entry exist more than once.

Cheers, Andreas

PS: never include the string "$ @ MID @ $:" without spaces in an ELOG entry: apparently ELOG cuts off all text from that token on.

Attachment 1: logcheck
#!/usr/bin/perl
$cmd=q/find * -noleaf -maxdepth 0 -wholename Backup -prune -o -wholename en -prune -o -type d -exec printf '%s:' {} + /;
#print $cmd;
$logf=q/*\/[0-9][0-9][01][0-9][0-3][0-9]a.log/;
open(INP,$cmd . "2>/dev/null |") || die "can't open " . $cmd . ": $!";
$list=<INP>;
close(INP);
#print "list=" . $list ."\n";
foreach $dir (split(":",$list)) {
    chomp $dir;
    if (length($dir) > 1) {
        print "Check \"" . $dir . "\"\n";
        $files=$dir . "/" . $logf;
        $cmd="grep ^In.reply.to: " . $files . " 2>/dev/null | cut -d \" \" -f 4 | sort -nu |";
        open(INPB,$cmd) || die "can't open " . $cmd . ": $!";
        while (<INPB>) {
            chomp;
            $id=$_;
            $cmd="grep '[\$\]\@MID\@[\$\]:.$id\$' $files |";
            open(INPC,$cmd) || die "can't open " . $cmd . ": $!";
            $c=0;
            while (<INPC>) {$c++};
            close(INPC);
            if ($c != 1) {
                print "### error: reference to entry $id, that exists $c times. Reference is:\n";
                $cmd="grep -C 3 '^In.reply.to:.$id\$' $files |";
                #print $cmd;
                open(INPD,$cmd) || die "can't open " . $cmd . ": $!";
                while (<INPD>) {
                    print "### ".$_;
                }
                close(INPD);
            }
        }
        close(INPB);
    }
}
  31   Tue Dec 15 20:11:27 2009 Michel Boveybovey (a) slf chDocumentationSorting dates before and after "Sun Sep 9 > 03:46:39 CEST 2001"Alpha 
BACKGROUNG

ELOG is storage date and time in unix time: seconds after epoch (Thu Jan  1 00:00:00 UTC 1970).

    date -u -d @0

On "Sun Sep  9 03:46:39 CEST 2001" the unix time counter is passing from a presentation of 9 digits to 10 digits.

    date -d @999999999
 

ISSUE

For sorting dates ELOG is using the character representation of the unix time. When ELOG contains dates on both
side of this 9 - 10 digits border sorting get confused.

 
WORKAROUND

in adding a leading 0 (zero) to the internal storage of dates in ELOG files we get over this problem.

On unix based system in can be easily achived with a sed command against the .log files:

    sed -i 's/modification: 9/modification: 09/g' *.log
  43   Mon Jun 30 15:00:05 2014 Branislav Gardonbranislav.gardon@gmail.comTheme/Skinblue-gray themeStable 

I`ve edited-prepared new default.css
It`s very simple but maybe will for someone useful.

Have a nice day.

regards
Branislav

Attachment 1: default.css
/* default formatting */
body {
  margin:3px;
  color:black;
  background-color:white;
  font-family:verdana,tahoma,sans-serif;
  /* background-image:url(elog.gif); */
}

/* standard link colors and decorations */
a:link { color:#000000; text-decoration:none }
a:visited { color:#606060; text-decoration:none }
a:hover { color:#FF0092; text-decoration:underline }
a:active { color:#FF0092; text-decoration:underline }
a:focus { color:#FF0092; text-decoration:underline }

td {
  color:black;
  font-size:12px;
}

/* frame table */
.frame {
  width:100%;
}

/* printable frame table */
.pframe {
  width:600px;
}

/* standard formatting for logbook tabs */
.tabs {
  font-family:sans-serif;
  font-size:10pt;
  background-color:white;
}

/* logbook selection page */
.selframe {
  width:60%;
  background-color:#486090; 
  border:1px solid #486090;
  font-size:10pt;
}

.seltitle {
  border:1px solid #486090;
  border-top:1px solid white;
  border-left:1px solid white;
  background-color:#ffffff;
  color:#486090;
  text-align:center;
}

.selexp {
  border:1px solid #0000FF;
  border-top:1px solid white;
  border-left:1px solid white;
  background-color:#CCCCFF;
  color:#486090;
  text-align:left;
  font-size:10pt;
}

.selspace {
  width:2%;
  border:1px solid #308000;
  border-top:1px solid white;
  border-left:1px solid white;
  background-color:#EEEEEE;
}

.selgroup {
  border:1px solid #308000;
  border-top:1px solid white;
  border-left:1px solid white;
  background-color:#00ffff;
  padding:3px;
  text-align:left;
  font-weight:bold;
  font-size:14pt;
}

.sellogbook {
  border:1px solid #486090;
  border-top:1px solid white;
  border-left:1px solid white;
  background-color:#ffffff;
  padding:3px;
  text-align:left;
  font-weight:normal;
}

.selcomment {
  font-size:8pt;
}

.selentries {
  background-color:#ffffff;
  border:1px solid #486090;
  border-top:1px solid white;
  border-left:1px solid white;
  text-align:center;
  font-size:10pt;
}

/* unselected and selected group tabs */

.gtab a {
  background-color:#B0E0B0;
  padding-left:5px;
  padding-right:5px;
}

.gtab {
  background-color:#B0E0B0;
  border-right:1px solid #409040;
}

.sgtab a {
  color:white;
  padding-left:5px;
  padding-right:5px;
}

.sgtab {
  background-color:#486090;
  color:white;
  border-right:1px solid #084070;
}

.sgtab a:visited { color:white; } /* bug for IE */

/* unselected and selected logbook tabs */

.ltab a {
  background-color:#EEEEEE;
  padding-left:5px;
  padding-right:5px;
}

.ltab {
  background-color:#EEEEEE;
  border-top:1px solid white;
  border-left:1px solid white;
  border-right:1px solid gray;
}

.sltab a {
  background-color:#486090;
  color:white;
  padding-left:5px;
  padding-right:5px;
}

.sltab {
  background-color:#486090;
  color:white;
  border-left:1px solid #EEEEEE;
  border-right:1px solid #084070;
}

.sltab a:visited { color:white; } /* bug for IE */

/* logbook title, left, middle and right cell */

.title1 {
  padding:5px;
  background-color:#486090;
  border-bottom:1px solid black;
  border-left:1px solid #EEEEEE;
  color:#486090;
  font-size:small;
  font-family:sans-serif;
  text-align:left;
}

.title1 a:visited { color:#A0FFA0; }
.title1 a:link { color:#A0FFA0; }

.title2 {
  background-color:#486090;
  border-bottom:1px solid black;
  color:white;
  font-size:xs-small;
  font-family:sans-serif;
  text-align:right;
}

.title3 {
  border-bottom:1px solid black;
  border-right:1px solid black;
  background-color:#486090;
  text-align:right;
  width:100px;
}

/* main menu row */

.menuframe {
  border:1px solid #486090;
  border-top:1px solid white;
  border-left:1px solid white;
  background-color:#EEEEEE;
  height:29px;
}

.menu1 {
  text-align:left;
  font-size:10pt;
  vertical-align:middle;
}

.menu1a {
  text-align:center;
  width:110px;
  font-size:10pt;
  font-weight:bold;
  vertical-align:middle;
}

.menu2a {
  text-align:left;
  font-size:10pt;
}

.menu2b {
  text-align:right;
  font-size:10pt;
}

.menu3 {
  text-align:left;
  font-size:8pt;
  font-weight:bold;
}

.menu4 {
  text-align:right;
  font-size:10pt;
  vertical-align:middle;
}

.menucenter {
  border:1px solid #486090;
  border-top:1px solid white;
  border-left:1px solid white;
  background-color:#EEEEEE;
  text-align:center;
  font-size:10pt;
}

.toolframe {
  border:1px solid #486090;
  border-top:1px solid white;
  border-left:1px solid white;
  background-color:#EEEEEE;
  padding:2px;
}

/* frame table in listings */
.listframe {
  border:1px solid #0000FF;
  border-top:1px solid white;
  border-left:1pc solid white;
  background-color:#486090;
  border:0px;
}

/* title row in listing */
.listtitle {
  border:1px solid #000000;
  border-top:1px solid white;
  border-left:1px solid white;
  background-color:#EEEEEE;
  font-size:10pt;  
  font-weight:normal;
  text-align:center;
  width:0%;
}

.listtitle2 {
  border:1px solid #000000;
  border-top:1px solid white;
  border-left:1px solid white;
  background-color:#EEEEEE;
  font-size:10pt;  
  font-weight:normal;
  text-align:center;
  width:100%;
}

.listtitle3 {
  border:1px solid #000000;
  border-top:1px solid white;
  border-left:1px solid white;
  background-color:#EEEEEE;
  text-align:center;
  width:0%;
... 387 more lines ...
Attachment 2: ScreenShot174.jpg
ScreenShot174.jpg
  40   Mon Jan 7 08:45:10 2013 Bruce Weberbruce.weber@inmarsat.comScriptServer time offsetStable 

Our server runs on local time, however, we require log entries to be in UTC (-0800hrs) - is there a command to achieve this?

Your assistance will be much appreciated

Thanks

  47   Sun Aug 23 21:27:00 2015 Daniel Sajdykdaniel.sajdyk@gmail.comTheme/SkinSimple themeBetaTue Sep 1 07:39:45 2015 by Daniel Sajdyk

Hello. 

I did simple theme for ELOG called "dansaj". 

This is verision which I did for my ELOG, and if you have troubles in other configurations, please let me know, and we will correct it. 

Vectors versions of icons you can find in oryginals folder (if you want to transform it). 

The most current version you can download from my blog - Elog theme, czyli skórka, albo temat.

Regards

Daniel.

Attachment 1: choose_elog.png
choose_elog.png
Attachment 2: entry.png
entry.png
Attachment 3: Full.png
Full.png
Attachment 4: login.png
login.png
Attachment 5: Summary.png
Summary.png
Attachment 6: Threaded_demo_logbook.png
Threaded_demo_logbook.png
Attachment 7: dansaj.7z
Attachment 8: Threaded.png
Threaded.png
  27   Tue Jan 29 23:18:39 2008 Diogo Alvesdiogomiguelalves@gmail.comScriptMultiple file upload for FirefoxStableWed Jan 30 07:56:53 2008 by Stefan Ritt

Here's a firefox extension that works extremely well if one uses drag n'drop to upload several attachment files at once:

 

https://addons.mozilla.org/en-US/firefox/addon/219

 

  35   Tue May 24 22:43:38 2011 JacekKdoctor99@poczta.onet.plScriptJavascript verification of simple attributes with regexpBetaTue May 24 22:46:38 2011 by JacekK

Hi,

I added possibility for a new verification of required fields in generated Javascript "function chkform()". To do this I added new logbook option "ValidPattern", in which you can set regular expression for an attribute, for example

ValidPattern HexDigits=[0-9a-fA-F]+

If there is a pattern set for required field, then in chkform() function is generated additional verification, if value of the field matches validation regexp.

Changes I made should not decrease performance of elogd. Let me know please if you can add it to regular version.

 

Jacek

Attachment 1: JScriptREVerify.patch
Index: elogd.c
===================================================================
--- elogd.c	(revision 2414)
+++ elogd.c	(working copy)
@@ -74,6 +74,8 @@
 char attr_list[MAX_N_ATTR][NAME_LENGTH];
 char attr_options[MAX_N_ATTR][MAX_N_LIST][NAME_LENGTH];
 int attr_flags[MAX_N_ATTR];
+/** Validation pattern for attribute, to test if it contains expected value */
+char attr_valid_pattern[MAX_N_ATTR][NAME_LENGTH];
 
 char attr_list_default[][NAME_LENGTH] = { "Author", "Type", "Category", "Subject", "" };
 
@@ -7033,7 +7035,7 @@
 
 int scan_attributes(char *logbook)
 /* scan configuration file for attributes and fill attr_list, attr_options
- and attr_flags arrays */
+ and attr_flags and attr_valid_pattern arrays */
 {
    char list[10000], str[NAME_LENGTH], str2[NAME_LENGTH], type[NAME_LENGTH],
        tmp_list[MAX_N_ATTR][NAME_LENGTH];
@@ -7062,11 +7064,20 @@
          }
       }
 
-      /* get options lists for attributes */
+      /* get options lists and validation patterns for attributes */
       memset(attr_options, 0, sizeof(attr_options));
+      memset(attr_valid_pattern, 0, sizeof(attr_valid_pattern));
       for (i = 0; i < n; i++) {
          n_options = 0;
 
+         sprintf(str, "ValidPattern %s", attr_list[i]);
+         if (getcfg(logbook, str, list, sizeof(list)))
+         {
+            strncpy(attr_valid_pattern[i], list, sizeof(attr_valid_pattern[i])-1);
+            attr_valid_pattern[i][sizeof(attr_valid_pattern[i])-1] = 0;
+            attr_flags[i] |= AF_HAS_VALID_PATT;
+         }
+
          sprintf(str, "Options %s", attr_list[i]);
          if (getcfg(logbook, str, list, sizeof(list)))
             n_options = strbreak(list, attr_options[i], MAX_N_LIST, ",", FALSE);
@@ -9650,6 +9661,17 @@
             rsprintf("    document.form1.%s.focus();\n", ua);
             rsprintf("    return false;\n");
             rsprintf("  }\n");
+            if (attr_flags[i] & AF_HAS_VALID_PATT) 
+            {
+              sprintf(str, loc("var validPatt=new RegExp(\"%s\");"), attr_valid_pattern[i]);
+              rsprintf("  %s\n", str);
+              rsprintf("  if (!validPatt.test(document.form1.%s.value)) {\n", ua);
+              sprintf(str, loc("Invalid value for attribute '%s'"), attr_list[i]);
+              rsprintf("    alert(\"%s\");\n", str);
+              rsprintf("    document.form1.%s.focus();\n", ua);
+              rsprintf("    return false;\n");
+              rsprintf("  }\n");
+            }
          }
       }
 
Index: elogd.h
===================================================================
--- elogd.h	(revision 2414)
+++ elogd.h	(working copy)
@@ -192,6 +192,7 @@
 #define AF_MUSERLIST         (1<<13)
 #define AF_USEREMAIL         (1<<14)
 #define AF_MUSEREMAIL        (1<<15)
+#define AF_HAS_VALID_PATT    (1<<16)
 
 /* attribute format flags */
 #define AFF_SAME_LINE              1
ELOG V3.1.5-2eba886