mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Initial revision
SVN revision: 553
This commit is contained in:
parent
d6c1b9c8f2
commit
335c701b67
@ -1,4 +1,4 @@
|
||||
Version 2.3.8, released June xxth, 2003
|
||||
Version 2.3.8, released June 4th, 2003
|
||||
======================================
|
||||
|
||||
- remove message lock on "back" button
|
||||
@ -8,6 +8,7 @@ Version 2.3.8, released June xxth, 2003
|
||||
- Added "Guest selection page" option
|
||||
- Added possibility to reference attachment with elog:<id>/<n> with <n> the attachment
|
||||
number starting with 1
|
||||
- elog utility can now read text from stdin (or piped in via "|")
|
||||
|
||||
Version 2.3.7, released May 15th, 2003
|
||||
======================================
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
[Administrator's Guide]
|
||||
[<a class=nav href="faq.html">FAQ</a>]
|
||||
[<a class=nav href="wishlist.html">Wishlist</a>]
|
||||
[<a class=nav href="contrib.html">Contributions</a>]
|
||||
[<a class=nav href="http://midas.psi.ch/elogdemo/">DEMO</a>]
|
||||
[<a class=nav href="download.html">Download</a>]
|
||||
</div>
|
||||
|
||||
54
doc/contrib.html
Executable file
54
doc/contrib.html
Executable file
@ -0,0 +1,54 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>ELOG FAQ</TITLE>
|
||||
<LINK REV="made" HREF="mailto:stefan.ritt@psi.ch">
|
||||
<META NAME="author" CONTENT="Stefan Ritt">
|
||||
<META NAME="description" CONTENT="Home of the Electronic Logbook (ELOG) package">
|
||||
<META NAME="keywords" CONTENT="ELOG MIDAS PSI RITT">
|
||||
<LINK REL="stylesheet" TYPE="text/css" HREF="elog.css">
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
|
||||
|
||||
<div class=title> ELOG Wishlist </div>
|
||||
<p>
|
||||
<div class=menu> Site map :
|
||||
[<a class=nav href="index.html">Home</a>]
|
||||
[<a class=nav href="userguide.html">User's Guide</a>]
|
||||
[<a class=nav href="adminguide.html">Administrator's Guide</a>]
|
||||
[<a class=nav href="faq.html">FAQ</a>]
|
||||
[<a class=nav href="wishlist.html">Wishlist</a>]
|
||||
[Contributions]
|
||||
[<a class=nav href="http://midas.psi.ch/elogdemo/">DEMO</a>]
|
||||
[<a class=nav href="download.html">Download</a>]
|
||||
</div>
|
||||
<p>
|
||||
<div class=Sub><i>ELOG Contributions</i></div>
|
||||
<hr>
|
||||
|
||||
Here are some "<I>contributions</I>" from various ELOG users. In case of questions, please contact
|
||||
them directly<p>
|
||||
|
||||
<UL>
|
||||
|
||||
<LI><h2>Perl program to submit an email to elog</h2>
|
||||
|
||||
<h3>by <a href="mailto:sak@essc.psu.edu">Sridhar Anandakrishnan</a></h3>
|
||||
|
||||
Perl program to split apart an email message and submit each of the mime attachments as an
|
||||
attachment to elog. The <i>-a</i> command line is fixed for now as "subject=subject of the email",
|
||||
so the logbook has to include that.<p>
|
||||
|
||||
<a href="doelog.txt">doelog.txt</a>
|
||||
<p>
|
||||
|
||||
</UL>
|
||||
|
||||
<HR>
|
||||
<div class=footer>
|
||||
Content by <a class=nav href="mailto:Stefan.Ritt@psi.ch">Stefan Ritt</a>,
|
||||
Web pages by <a class=nav href="mailto:fredp@mygale.org">Fred Pacquier</a>
|
||||
- last modified on 31/01/2003
|
||||
</div>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@ -7,6 +7,7 @@
|
||||
[<a target=_top class=nav href="adminguide.html">Administrator's Guide</a>]
|
||||
[<a target=_top class=nav href="faq.html">FAQ</a>]
|
||||
[<a target=_top class=nav href="wishlist.html">Wishlist</a>]
|
||||
[<a class=nav href="contrib.html">Contributions</a>]
|
||||
[<a target=_top class=nav href="http://midas.psi.ch/elogdemo/">DEMO</a>]
|
||||
[Download]
|
||||
</div>
|
||||
|
||||
133
doc/doelog.txt
Executable file
133
doc/doelog.txt
Executable file
@ -0,0 +1,133 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
=head1 NAME
|
||||
|
||||
doelog - save a mime message to elog
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
doelog <mime-msg-file> <mime-msg-file> ...
|
||||
|
||||
someprocess | doelog -
|
||||
|
||||
=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
|
||||
|
||||
|
||||
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);
|
||||
|
||||
use MIME::Parser;
|
||||
use Getopt::Std;
|
||||
|
||||
## these should be options too?
|
||||
## base elog cmd
|
||||
$cmd = "~/elog -h localhost -p 8080 ";
|
||||
|
||||
#------------------------------------------------------------
|
||||
# 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>10);
|
||||
|
||||
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 $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="emails";}
|
||||
$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("/tmp");
|
||||
|
||||
# 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...
|
||||
chomp($subject = $entity->head->get('Subject', 0));
|
||||
$cmd .= "-a subject=\"$subject\" ";
|
||||
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";
|
||||
exec $cmd;
|
||||
}
|
||||
1;
|
||||
}
|
||||
|
||||
exit (&main ? 0 : -1);
|
||||
#------------------------------------------------------------
|
||||
1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
[<a class=nav href="adminguide.html">Administrator's Guide</a>]
|
||||
[FAQ]
|
||||
[<a class=nav href="wishlist.html">Wishlist</a>]
|
||||
[<a class=nav href="contrib.html">Contributions</a>]
|
||||
[<a class=nav href="http://midas.psi.ch/elogdemo/">DEMO</a>]
|
||||
[<a class=nav href="download.html">Download</a>]
|
||||
</div>
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
[<a class=nav href="adminguide.html">Administrator's Guide</a>]
|
||||
[<a class=nav href="faq.html">FAQ</a>]
|
||||
[<a class=nav href="wishlist.html">Wishlist</a>]
|
||||
[<a class=nav href="contrib.html">Contributions</a>]
|
||||
[<a class=nav href="http://midas.psi.ch/elogdemo/">DEMO</a>]
|
||||
[<a class=nav href="download.html">Download</a>]
|
||||
</div>
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
[<a class=nav href="adminguide.html">Administrator's Guide</a>]
|
||||
[<a class=nav href="faq.html">FAQ</a>]
|
||||
[<a class=nav href="wishlist.html">Wishlist</a>]
|
||||
[<a class=nav href="contrib.html">Contributions</a>]
|
||||
[<a class=nav href="http://midas.psi.ch/elogdemo/">DEMO</a>]
|
||||
[<a class=nav href="download.html">Download</a>]
|
||||
</div>
|
||||
|
||||
@ -47,6 +47,7 @@ starting at the items with the most votes. You can vote for a feature, or sugges
|
||||
<tr><td>Edit existing messages with elog utility<td>1</tr>
|
||||
<tr><td>Implement multi-line attributes<td>1</tr>
|
||||
<tr><td>Add more detailed user logging, like $user $date $logbook $ID read/edit/new/delete<td>1</tr>
|
||||
<tr><td>More elaborate attribute formatting, see <a href="http://midas.psi.ch/elogdemo/Forum/346">here</a><td>1</tr>
|
||||
|
||||
</table></center><p>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user