Logbook |
ID |
Date |
Author |
Type |
Category |
Subject |
Linux Demo |
128
|
Thu Apr 24 09:04:03 2025 |
SR | Routine | | | Test

Soso
|
Linux Demo |
1
|
Mon Sep 21 11:01:23 2015 |
SR | Routine | Hardware | Welcome to this ELOG demo | Hello,
welcome to this ELOG demonstration. It contains a logbook for Linux Tips &
Tricks. You can use the arrow buttons on the top right corner to browse
this logbook, use the "Find" link to search for certain entries in the
logbook and the "New" link to enter a new entry. The write access is not
password protected so everybody can submit entries, since this is just a
demonstration. Each submission causes an automatic email notification to
the author.
When submitting entries, attachments can be added just like with email
programs. This entry for example contains a JPG attachment and a text
attachment.
Stefan Ritt <stefan.ritt@psi.ch> |
Attachment 1: psi.png
|
|
Forum |
66658
|
Wed Dec 23 08:47:35 2009 |
pirat sriyotha | | Question | elog start with number of entries are zero (0) for all logbook | hi sirs,
am using freebsd, this morning i started elog and did a few record with no problem.
just this afternoon when i enter firefox3 http://localhost:8000/, i got zero number of records for all of my logbooks.
but the data are not erased though.
any idea would be appreciated.
regards,
jotawski
|
Forum |
1806
|
Wed Apr 12 19:22:34 2006 |
Sridhar Anandakrishnan | | Question | Can a field value be calculated during display? | I have a logbook which is a Calendar/Appointment book with Attributes: "Appointment DateTime", Place, etc.
I would like another Attribute called "When" whose value is calculated from Today's Date - Appointment date (so for example I could display today's appointments in red...). This calculation has to take place each time the logbook is displayed...
Possible? Useful?
Thanks,
Sridhar. |
Contributions |
10
|
Fri Sep 24 23:14:47 2004 |
Sridhar Anandakrishnan | | Script | Perl script to forwar emails to elog | 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. |
Attachment 1: doelog
|
#!/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;
|
Forum |
436
|
Mon Sep 29 15:30:16 2003 |
sridhar G | | | Re: problems by defining the password file | > i work on Windows2000
>
> part of my elog.cfg:
>
> Passwort file = c:\elog\passwd.txt
> Self register = 1
> Guest user commands = config, admin, logout
>
> file system:
>
> - i created an emty file with name passwd.txt
>
> problem:
>
> - if i use the link "Register as new user" on login, it does not work.
> - if i login as guest user and choose the menu config, it only
> display the attributes Login_name, Full_name and Email.
> So i kann not create user.
>
> what should i do ?
> what are my mistakes ?
>
> Can you attache as sample password file ?
Dear Friend!,
Only mistake in your file .cfg is spell mistake "Passwort" in "Passwort
file = c:\elog\passwd.txt" line. It should "Password file" t=d.
try some thing like below,
[Log]
Theme = default
Comment = Financial Accounting Bug posting
Attributes = Resource, Project Name, Task Desc, SDT, EEDT, ACDT, Percent WC,
Status
Options Type = Masters, Transactions, Reports
Options Category = Bug, New Feature, Client Requirement, Change
Required Attributes = Author, Type, Bug
Page Title = ELOG - $subject
Reverse sort = 1
Quick filter = Date, Type
Password file =D:\Program Files\ELOG\logpwd.txt
;Self register = 0
Self register = 1
Admin user =sridhar
Menu commands = Back, Login, New, Edit, config, Delete, Reply, Find, Help,
Logout
Guest user commands = config, admin, Login, logout |
Forum |
380
|
Mon Jun 30 02:12:24 2003 |
Sridhar Anandakrishnan | | Bug fix | Re: runtime error under Mac OS X 10.2 | Joe,
Run the command
`limit' (if you are running tcsh) and `ulimit -a' if you are running bash
(these are command line programs that will tell you the resources you are
allowed to use. Look at filesize, datasize, and stacksize - these need to be
8M or so)
You can increase these by typing, e.g.,
limit filesize unlimited
limit datasize unlimited
limit stacksize unlimited
(the equivalent command for bash are `ulimit -f unlimited', `ulimit -d
unlimited' and `ulimit -s unlimited', without the quotes)
which will increase the limits to the max imposed by the administrator.
If that doesn't increase your limits, you will have to contact the admin to
have them raised system wide.
If you are the administrator/sole user, you can set them to the max in the file:
/etc/rc.common.
I have included the following at the end of the file:
##
# Enable coredumps if requested.
##
if [ "${COREDUMPS:=-NO-}" = "-YES-" ]; then
ulimit -c unlimited
ulimit -d unlimited
ulimit -s unlimited
fi
and I have put this in /etc/hostconfig
COREDUMPS=-YES-
Hope this helps - if that doesn't fix it, sorry!
Sridhar
> I have been trying to build and run elog under Mac OS X 10.2.6, without
sucess. I
> understand that this is not one of the 'supported' platforms, but I hope
that there is someone
> here who might know the work-around to my problem.
>
> I've tried building elog 2.2.5, 2.3.6, 2.3.7, and 2.3.8. I've tried using
the compiler that comes
> in the Mac OS X 10.2 box, as well as the gcc-based compiler supplied in
Apple's Dec 2002
> developer update (gcc 3.1), and the June '03 update as well (gcc 3.3).
>
> elog builds without error in all cases I tried.
>
> When I run it, it will correctly serve the demo notebook. However, when the
user clicks on the
> test message to display it in full, there is a seg fault.
>
> I suspect that the trouble might be with something defined in time.h.
>
> I've run it in gdb, and the result is appended to this message. This is for
gcc 3.3 and elog
> 2.3.8.
>
>
> I would greatly appreciate any hints or suggestions.
>
> Cheers, Joe
>
> ---
>
> [satsuma:~/Documents/elog_build/elog-2.3.8] jgiaime% gdb ./elogd
> GNU gdb 5.3-20030128 (Apple version gdb-282) (Fri Jun 13 03:33:07 GMT 2003)
> Copyright 2003 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "powerpc-apple-darwin".
> Reading symbols for shared libraries .. done
> (gdb) run
> Starting program: /Users/jgiaime/Documents/elog_build/elog-2.3.8/elogd
> Reading symbols for shared libraries . done
> Indexing logbook "demo" ... ok
> Server listening on port 8080...
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> 0x00005870 in el_retrieve (lbs=0x1, message_id=50, date=0xbfff2500 "demo",
> attr_list=0x0, attrib=0x365620, n_attr=1, text=0xbfff2280 "1", textsize=0x1,
> in_reply_to=0x0, reply_to=0x0, attachment=0x0, encoding=0x0, locked_by=0x0)
at src/
> elogd.c:2775
> 2775 {
> (gdb) up
> #1 0x0001d9b4 in interprete (lbook=0x1 <Address 0x1 out of bounds>,
path=0xbfff2280
> "1") at src/elogd.c:12279
> 12279 show_elog_message(lbs, dec_path, command);
> (gdb) up
> #2 0x0001db10 in decode_get (logbook=0xbffff340 "demo", string=0x3a300a
"1") at src/
> elogd.c:12325
> 12325 interprete(logbook, path);
> (gdb) up
> #3 0x00020080 in server_loop (tcp_port=836736, daemon=-1073732640) at src/
> elogd.c:13398
> 13398 decode_get(logbook, p);
> (gdb) up
> #4 0x00021134 in main (argc=1, argv=0xbffff850) at src/elogd.c:13832
> 13832 server_loop(tcp_port, daemon);
> (gdb) up
> Initial frame selected; you cannot go up.
> (gdb) |
Contributions |
4
|
Fri Jun 13 17:10:48 2003 |
Sridhar Anandakrishnan | | | 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;
|
|