Andreas Luedeke wrote: |
Alan Grant wrote: |
I have searched the Elog forum and docs at length for actual examples of how to use the Elog client and I apologize if I missed it somehwere but could someone please provide some actual examples of how the parmeters are used? I haven't had much success setting it up just going by the Elog command syntax quide.
What I intend to do is load a raw text file into an active logbook directly, either one line at at time or batched from a text file ("m" option).
Also, I saw a Perl script contribution somewhere on the site which appears to offer the same functionality as the above util. Just wondering why there would be two methods, and which might be the best for me to use? Thank you.
|
I suppose you have your demon "elogd" running and you can connect to your logbook via the web interface?
Then you can use the "elog" command to upload a text file as one entry.
If you want to split the text file to one-entry-per-line, you need to write a batch script to do that.
The usage of the "elog" command is descibed in the ELOG User's Guide: https://midas.psi.ch/elog/userguide.html#misc
The command line for "elog" has to define all "Required attributes" with "-a ..."
elog -h <host> -p <port> -l <logbook> -u <user> <password> -a <attribute>=<value> -n 1 -m <text-file>
<port> can be omitted if port 80 is used, "-u <user> <password>" can be omitted if anonymous entry creation is allowed.
Here's an example to write to the demo logbook at midas (local text file /tmp/hello.txt contains "hello world")
elog -h midas.psi.ch -l Linux+Demo -d elogs -a Author=nobody -a Type=Other -a Category=test -a "Subject=hello" -m /tmp/hello.txt
I hope this helps.
PS: please never refer to a location as "somewhere on the site".
|
It seems straight forward enough but I must be missing something in my elog command string. I run the client utiltiy but it always hangs after pressing Enter from the cmd window. It could be the way I specifying the host or subdir but I'm not sure. I tried multiple variations.
Some more info: For the prototype I'm just running Elog locally. I installed it to my XP in "c:\program files\elog". I verified tht elogd process is running. With the Elog page already open (ref my attached cfg file) I typed the following, observing case sensitivity, then press enter and at this point it just hangs:
elog -h localhost -p 8080 -l Tartan+Tow+Log -d elog -a Ticket+date="Jul26/11"
Note since all attributes are optional I only included "Ticket Date" for now until I can get this cmd working.
Please bear with me as I don't have an extensive technical background but I would be very grateful for any help as it's for a project at work. Soonest response would be greatly appreciated.
Thanks.
Alan
|
[global]
port = 8080
SMTP host = citygw
Display mode = summary
Self register = 1
[Tartan Tow Log]
Theme = default
Entries per page = 30
List Menu commands = New, Find, <a href=?cmd=Find>Print</a>
Menu commands = List, Edit, Duplicate, Delete, Back
Attributes = Ticket Date, Ticket Time, System Rec'd Date, System Rec'd Time, Ticket, Plate, Make, VIN, Pick Up Location, Officer, Violation, Work Type, Pick Up Date, Pick Up Time, Tow Unit, Drop Date, Drop Time, Drop Location, GOA, Cancel
List Display = ID, Ticket Date, Ticket Time, Ticket, Plate, VIN, Pick Up Location, Work Type, Pick Up Time, Drop Time, Drop Location, GOA
Summary lines = 0
Options Work Type = Rush Hour AM, Rush Hour PM, Street Work, Snow Route, ROPB, General
Options GOA = boolean
Options Cancel = boolean
Page Title = ELOG - $subject
Reverse sort = 1
Quick filter = Date, ID, Ticket Date, Ticket, Plate, VIN, Pick Up Location, Work Type, Drop Location, Subtext
|