Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Contributions to ELOG, Page 6 of 6  Not logged in ELOG logo
ID Date Author Author Email Category Subject Status Last Revision
  9   Wed Jul 7 18:19:10 2004 Steve Jonessteve.jones@freescale.comScriptGeneric Unix elogd init scriptStableWed Jul 7 18:19:38 2004 by Steve Jones
The elogd.init script that ships in the elog distribution is Linux centric.
 This script is written to work in a generic Unix environment under 'sh' -
no frills!
Attachment 1: elogd.init
#!/bin/sh

# description: Start elog
# elog can have multiple instances run on the same server, pointing to different logbook areas.  This start
# script should be run from the root of each different elog area.

ELOGD="/_TOOLS_/dist/gnu-elog-2.5.3/sparc-sun-solaris2.8/bin/elogd"
ELOGDIR="/proj/sysadmin/ess/www/elog"
HOSTNAME=`hostname`

# Check for the config file
if [ ! -f $ELOGDIR/elogd.cfg ]; then
    exit 0
fi


# See how we were called.
case "$1" in
  start)
        if [ -f $ELOGDIR/elogd-$HOSTNAME.pid ] ; then
	   pid=`cat ./elogd-$HOSTNAME.pid`
	   if [ -d /proc/$pid ] ; then
	     echo "elogd already running"
	     exit 1
	   fi
	fi
####################################
# The full path *must* be specified
	echo "Starting elogd: "
	$ELOGD -f $ELOGDIR/elogd-$HOSTNAME.pid -c $ELOGDIR/elogd.cfg -D  > /dev/null 2>&1 &
	RETVAL=$?
        if [ $RETVAL -eq 0  ] ; then 
          echo "elog started" 
        else
          echo "Failed to start elog"
        fi
	echo
	;;
  stop)
     echo ""
      if [ -f $ELOGDIR/elogd-$HOSTNAME.pid ] ; then
        echo "Stopping elogd: "
        kill `cat $ELOGDIR/elogd-$HOSTNAME.pid`
	rm -f $ELOGDIR/elogd-$HOSTNAME.pid
        echo "elog stopped"
        echo
     else
        echo "No elogd running?"
	echo "Failed to start elog"
	echo
     fi
     
	;;
  restart|reload)
	$0 stop
	$0 start
	;;
  *)
	echo "Usage: $0 {start|stop|restart}"
	exit 1
esac

exit 0

  8   Wed Feb 4 11:24:14 2004 Fred Hooperfhooper@sushisoft.comScriptJavascript for Bookmark Link for one-click submission to elogAlphaFebruary 04, 2004 by Stefan Ritt
I have created a javascript to be used as a browser link that allows a one
step cut and paste from a web browser into a elog logbook. 

The intended application is allow a user to do a text selection in a web
browser, then click on a bookmark that automagically pastes the selected
text, the current browser page url, and the current browser page title into
a pre-defined elog logbook.   I do some research where I would like to save
some text from a webpage, but also have a record of where the webpage came
from.  However, you should find that you can extend this script in a varity
of ways for your own application.  

The script is a simple one: it uses javascript in a saved bookmark to get
your selected text, title, and url, and then creates a new browser window
with a elog form, and print the document variables into the form, and then
submits the form to elog.   The key advantage to this approach is that you
can use the "post" command, rather than "get", to submit to the text section
of an elog logbook.  The only way I found now to submit to elog via a
bookmark is using the "get" command, and it doesn't allow entry of the
"text" field, only attribute fields.    

The second major advantage to using POST is that you can submit a much 
large quanity of information ; However, some checking on this leads me to 
believe that the limit is browser and server depended, so YMMV.  However, a 
great discussion on the limits of browsers can be found here: 
http://www.squarefree.com/bookmarklets/browsers.html .

One of the major limits is that IE6.0 browsers have a maxium of 508 bytes
per bookmark - This book runs over 800 bytes, so I suspect tha IE6+ will 
not allow it. I tested the link with Mozilla and Firebird 0.7.

This script will need to edited for you to use with your elog logbook.
The script should be fairly self-explainitory, if you are used to html 
forms and have some exposure to javascript.

You will need to modifiy the following fields:

1) in form action = http://<your_domain.com>/elog/<logbook>/?cmd=New
   
   change the link to point to your specific logbook to be used for entry.

2) the attribute fields need match up with the ones in your logbook.

   The ones listed in the template are Author, Email, Title, and URL.

   If you have fixed fields (like Author and Email), then you can
   predefine these fields as shown.  

   I have the page title used as the entry for Title, and the page url is
   use as the URL attribute.

   Finally, I have the text selection used as the entry for the Text field.

   You can add additional fields by creating a new <input ...>  segment
   in the script.  For those more clever than me, you can concatinate the
   title, url and selection to paste into the Text area as well.  

3) once you have a edited version of the script (make sure you keep it as a
single line), you can then create a new bookmark in your browser, and then
paste the script into the properties->location field (for Mozilla/Firebird)
or the properites->url field (IE). Give it a good name like "post to elog"

4) once saved, you can then go a web page, select some text, and then go to
your bookmarks and click on the bookmark. It should then create a new
window in elog with a completed logbook entry.


some notes:

1) again, this may not work on IE6+ browsers due to M$ limitations.

2) You may have to be logged in already to elog for this work - I have not
tested the interaction using a password protected elog

3) You can only post to a single elog logbook - You'll need to have 
multiple bookmarks for multiple logbooks.

__________________________
Note added by Stefan Ritt:

I zipped the attached JavaScript, since our email router does not allow .js 
file name extensions.
Attachment 1: elogsubmit-template.zip
  7   Wed Jan 14 18:30:34 2004 Francois CukierFrancois.Cukier@Umontreal.caTheme/SkinBubble for pleasure 1 -- still under developpement but working ;)Beta 
Uncompress "Bubbleforpleasure1.zip" in your Themes\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
Attachment 1: Bubbleforpleasure1.zip
Attachment 2: BubbleForPleasure1-theme.GIF
BubbleForPleasure1-theme.GIF
  6   Wed Sep 17 11:43:44 2003 R. Beekmanrbeekman@hiscom.nl ELOG v2.3.9 CSS cross-reference (used for skins)BetaSeptember 17, 2003 by R. Beekman
For all you guys (and girls;-) who want to add skins to ELOG, it is 
important to know what will be affected if you change a style.
So I made a cross reference of styles vs. html pages.

In the attached ZIP file you will find:
--> "ELOG CSS xref.xls" (Microsoft Excel spreadsheet)
--> "ELOG CSS xref.pdf" (PDF file for those who do not have Excel)
--> A directory containing the html pages I documented and the ELOG 
stylesheet (.css-file) that you need when you want to see the html files. 
Images are not included: they are not needed for this purpose.

I know that not all pages are documented, but Stefan told me that there is 
no complete list of all pages because they are generated. So I documented 
only the pages I need at this moment.

Please feel free to mail me when you have comments, corrections or 
additions.
Attachment 1: ELOG CSS xref.zip
  5   Thu Jul 3 17:04:58 2003 Fred Hooperfhooper@sushisoft.com elog2sql - version 0.99 - scripts to convert an elog logbook to a MySQL database  
Announcing:  elog2sql

elog2sql was created to help translate logbooks created by the program
``elog'' from the native elog flat file format to a MySQL database.  I had a
need to have the elog data in a database, and it appears from the forum that
several others had a similar need.

 I created a set of perl scripts that will allow the translation of elog
logbooks into a MySQL database. The design and implementation of these
scripts are a simple one, and allow the one-time copying of a set of logbooks.

The elog2sql toolkit consists of two scripts. The first script, parsecfg.pl,
reads a elogd.cfg, and creates a sql file that will create a set of db
tables corresponding to elog logbooks. The second script, parselog.pl, takes
a set of elog logfiles, and creates a sql file that will enter the logbook
data into the database. The result is a copy of the elog logbook that can
used as desired inside the framework of MySQL. Attachments are handled by
inserting an entry of the attachment name into an seperate attachment table.
This allows multiple attachments per entry.

You can download the elog2sql program archive at
http://www.davidfannin.com/elog2sql/elog2sql.tar.gz . It contains the
scripts and basic documentation.  You can read the man page at
http://www.davidfannin.com/elog2sql/index.html 


I have also uploaded a copy of the archive here.


email me for questions or comments.
Attachment 1: elog2sql.tar.gz
  4   Fri Jun 13 17:10:48 2003 Sridhar Anandakrishnansak@essc.psu.edu submit emails to elog (along with MIME attachments)  
Attached is a perl script to which you can pipe a message (or a
single-message file) to submit that message to `elog'.  The `elog'
distribution includes two programs `elogd', which is the main daemon that is
accessed via the browser, and `elog', which is a command-line interface to
elogd.

The attached perl script `mailelog', will split a multipart MIME message
into its components and submit each as an attachment to elog to create a new
entry in a specified logbook.  The attributes are the subject, from, and cc
of the message.

Usage: mailelog [-|file] [-l logbook]

(if there are no arguments, read from stdin)
(makes a command that looks like this:
elog -p 8080 -h localhost -l emails -a subject=<subject> -a from=<from> -a
cc=<cc> -f attachment-1 -f attachment-2 -f ...

attachment-1 is the body of the message and attachment-2... are the actual
MIME attachments.  Set the elogd configuration to display attachments, so
that the message body is immediately visible.

Defaults: -h localhost -p 8080 -l emails

If no `-l logbook' flag is specified, then the entry is sent to the `emails'
logbook, so make sure that logbook exists.  Save this in, e.g,
~/bin/mailelog, and make sure it is executable (`chmod +x mailelog') and on
your path (bash: `export PATH=$HOME/bin:$PATH' or csh/tcsh: `setenv PATH
$HOME/bin:$PATH')

Bugs: multi-message files don't work.  can't add other attributes.  if the
logbook doesn't have attributes subject, from, cc, they are quietly lost.
Attachment 1: mailelog
#!/usr/bin/perl -w

=head1 NAME

doelog - save a mime message to elog

=head1 SYNOPSIS

    doelog [-l logbook] <mime-msg-file> <mime-msg-file> ...
    
    someprocess | doelog [-l logbook] -

=head1 DESCRIPTION

Takes one or more files from the command line that contain MIME
messages, and explodes their contents out into /tmp.  The parts
are sent to elog as attachments.

Modified mimeexplode of the MIME::Tools in perl, which see.

From mimeexplode:
"This was written as an example of the MIME:: modules in the
MIME-parser package I wrote.  It may prove useful as a quick-and-dirty
way of splitting a MIME message if you need to decode something, and
you don't have a MIME mail reader on hand."

=head1 COMMAND LINE OPTIONS

None yet.  

=head1 AUTHOR

sak@essc.psu.edu

=cut

BEGIN { unshift @INC, ".." }    # to test MIME:: stuff before installing it!

require 5.001;

use strict;
use vars qw($Msgno $cmd $default_logbook $tmpdir);

use MIME::Parser;
use Getopt::Std;
##
## $Id: doelog,v 1.4 2003/06/05 13:08:16 sak Exp sak $
## $Log: doelog,v $
## Revision 1.4  2003/06/05 13:08:16  sak
## Added a kludge to force elog to return if there is nothing piped to
## it.  Now you can use doelog either as a pipe or on a single-message file
##
## Revision 1.3  2003/06/05 12:37:49  sak
## Added "configuration section" to hold config variables like default
## logbook and tmpdir.
##
## Revision 1.2  2003/06/05 12:28:03  sak
## Allow up to 50 attachments
##
## Revision 1.1  2003/06/05 12:26:24  sak
## Initial revision
##

## CONFIGURATION SECTION
## base elog cmd
$cmd = "elog -h localhost -p 8080 ";
$default_logbook="emails";
$tmpdir="/tmp";
## END CONFIGURATION SECTION

#------------------------------------------------------------
# dump_entity - dump an entity's file info
#------------------------------------------------------------
sub dump_entity {
    my $ent = shift;
    my @parts = $ent->parts;
    my $file;
    
    die "too many attachments\n" if ($#parts>50);

    if (@parts) {        # multipart...
	map { dump_entity($_) } @parts;
    }
    else {               # single part...append to elog cmd
	$file = $ent->bodyhandle->path;
	$cmd .= "-f \"$file\" ";
	###print $cmd, "\n";
	###print "    Part: ", $ent->bodyhandle->path, 
	###      " (", scalar($ent->head->mime_type), ")\n";
    }
}

#------------------------------------------------------------
# main
#------------------------------------------------------------
sub main {
    my $file;
    my $entity;
    my $subject;
    my $from;
    my $cc;
    my $logbook;
    our($opt_l);

    # Sanity:
    ## (-w ".") or die "cwd not writable, you naughty boy...";

    ## check if user wants a particular logbook
    ## fix to add host and port?
    getopts('l:');
    if($opt_l) { $logbook=$opt_l;} else {$logbook=$default_logbook;}
    $cmd .= "-l $logbook ";
    
    # Go through messages:
    @ARGV or unshift @ARGV, "-";
    while (defined($file = shift @ARGV)) {


	# Create a new parser object:
	my $parser = new MIME::Parser;
    
	# Optional: set up parameters that will affect how it extracts 
	#   documents from the input stream:
	$parser->output_under($tmpdir);
    
	# Parse an input stream:
	open FILE, $file or die "couldn't open $file";
	$entity = $parser->read(\*FILE) or 
	    print STDERR "Couldn't parse MIME in $file; continuing...\n";
	close FILE;

	## get the subject, assumes all logbooks have a subject 
	## attribute - not necessarily true.  Mine do...
	if($subject = $entity->head->get('Subject', 0)) {
	    chomp($subject);
	    $cmd .= "-a subject=\'$subject\' ";
	}
	if($from = $entity->head->get('From', 0)) {
	    chomp($from);
	    $cmd .= "-a from=\'$from\' ";
	}
	if($cc = $entity->head->get('CC', 0)) {
	    chomp($cc);
	    $cmd .= "-a cc=\'$cc\' ";
	}

	##print $cmd, "\n";

	# Congratulations: you now have a (possibly multipart) MIME entity!
	dump_entity($entity) if $entity;
	### $entity->dump_skeleton if $entity;
	### print $cmd, "\n";
        ### kludge to force elog to return
	exec "$cmd<<EOF
EOF";
    }
    1;
}

exit (&main ? 0 : -1);
#------------------------------------------------------------
1;






  3   Fri Jun 6 18:32:14 2003 Tomas Rudolftomas@mba.be ELOG Syntax highlighting in UltraEdit  
Maybe some of you use UltraEdit code editor (http://www.ultraedit.com/) to 
create/modify your ELOGD.CFG files.

Well, in that case we hope you find useful the attached syntax highlighting 
configuration file.

To intstall this file into UltraEdit :
MENU --> ADVANCED --> CONFIGURATION --> SYNTAX HIGHLIGHTING tab --> OPEN 
WORDLIST

You can also download the latest version from our website :
http://public.mba.be/demo/elog/u-edit-elog-syntax.txt
Attachment 1: u-edit-elog-syntax.txt
/L7"Elog" Line Comment = ; Block Comment On = /* Block Comment Off = */ String Chars = "' File Extensions = cfg
/Delimiters = ~!@%^&*()-+=|\/{}[]:;"'<> ,	.?
/C1"Elog Global functions"
** Logbook tabs
** SMTP host =
** Admin Password
** Admin user =
** Selection page
** Self register
** URL=
** Welcome Title
/C2"Elog Syntax"
** Attributes
** Back
** Bottom text
** Comment
** Config
** Copy to
** CSS
** Data dir
** Date format
** Delete
** Display Email recipients
** Display mode
** Download
** Edit
** edit
** Email
** Email All
** Email message body
** Email notification
** Entries per page
** Filtered browsing
** Find
** Find Menu commands
** Fixed Attributes Edit
** Fixed Attributes Reply
** full
** Group
** Guest find menu commands
** Guest menu commands
** Help
** Help URL
** IOptions
** Icon comment
** Language
** Last day
** Locked Attributes
** Logbook dir
** Logbook Tabs
** Logbook tabs
** Logfile
** Login
** Logout
** Main tab
** Menu commands
** Message Height
** Message Width
** MOptions
** Move to
** New
** Number Attachments
** on 
** Options
** Page Title
** Password file =
** port
** Preset
** Quick filter
** Remove on reply
** Reply
** Required Attributes
** Resource dir
** Restrict edit
** Reverse sort
** ROptions
** Search all logbooks
** Self register
** SMTP host
** Search all logbooks
** Subdir
** Submit Page
** Subst
** Subst on reply subject
** Suppress default
** Suppress Email on edit
** Suppress Email to users
** Tab cellpadding
** Theme
** Thread display
** Thread Icon
** threaded
** Use Email From
** Use Email Subject
/C3"Elog MBA reserved attributes"
** %a %d %m %y
** %%Action
** %%BookName
** %%MessageID
** %%User
AsTo 
Author
By
Categorie
Category
Contract
DateUp
DosL
DosR
Dossier
** Email AdressesEmail
** Email AsTo
** Email Partner
Email1
FollowUp
Forms
Inotifie
Inotifie
Notify
Notify
Origin
Partner
Priorite
Priority
Qualify
ShellLogFile
ShellOnSubmit0
ShellOnSubmit1
ShellParam0
ShellParam1
ShellParamVerboseType
Status
Type
ELOG V3.1.5-fe60aaf