Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 339 of 806  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subject
  67099   Tue Aug 2 21:36:20 2011 Reply Alan Grantnetman311@mts.netInfoAll2.9.0Re: Elog client usage

Andreas Luedeke wrote:

Alan Grant wrote:

Andreas Luedeke wrote:

Alan Grant wrote:

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). [...]

[...] The usage of the "elog" command is descibed in the ELOG User's Guide: https://midas.psi.ch/elog/userguide.html#misc

[...] 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"
You wrote you want to upload a text file, then you need to add at the end "-m <file>". E.g. if the text-file is named "C:text.txt", then write:

elog -h localhost -p 8080 -l Tartan+Tow+Log -d elog -a Ticket+date="Jul26/11" -n 1 -m C:text.txt
The "-n 1" is just to tell elog to upload plain text. If you do not specify "-m <file>" then it expects input from a pipe and therefore hangs. If you don't know what "input from a pipe" means then ALWAYS use the "-m <file>" option.
 
PS: if "Ticket date" is of the format "date" then it is sensitive to the formatting of the date string. "Jul26/11" is likely not a legal date format. Better do not specify it for the first test. Write instead:
elog -h localhost -p 8080 -l Tartan+Tow+Log -d elog -n 1 -m C:text.txt
PPS: do you really use a sub-directory "elog" instead of the default location "logbooks" for your ELOG logbook files? If not, then leave out this option, too.
elog -h localhost -p 8080 -l Tartan+Tow+Log -n 1 -m C:text.txt

 Andreas, thank you very much. I was able to get the stand alone function working fine on my site, including a number of add'l attributes and options (SSL, etc).

 

  67098   Tue Aug 2 13:55:06 2011 Question Juergen Lupkejuergen.lupke@computacenter.comQuestionLinuxV2.9.0-241present Text

I have define a MOption  BACKUP = Server, Switch, Router any now i link to use the Status of the Backup Option to display diffrent html file in the Text field, i the a posible way to do this ?

sample:

MOption  BACKUP = Server, Switch, Router

{Server&Switch&Router} Present Text = file1

{Server&Switch} Present Text  = file2

  67097   Wed Jul 27 04:36:40 2011 Cool Andreas Luedekeandreas.luedeke@psi.chInfoAll2.9.0Re: Elog client usage

Alan Grant wrote:

Andreas Luedeke wrote:

Alan Grant wrote:

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). [...]

[...] The usage of the "elog" command is descibed in the ELOG User's Guide: https://midas.psi.ch/elog/userguide.html#misc

[...] 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"
You wrote you want to upload a text file, then you need to add at the end "-m <file>". E.g. if the text-file is named "C:text.txt", then write:

elog -h localhost -p 8080 -l Tartan+Tow+Log -d elog -a Ticket+date="Jul26/11" -n 1 -m C:text.txt
The "-n 1" is just to tell elog to upload plain text. If you do not specify "-m <file>" then it expects input from a pipe and therefore hangs. If you don't know what "input from a pipe" means then ALWAYS use the "-m <file>" option.
 
PS: if "Ticket date" is of the format "date" then it is sensitive to the formatting of the date string. "Jul26/11" is likely not a legal date format. Better do not specify it for the first test. Write instead:
elog -h localhost -p 8080 -l Tartan+Tow+Log -d elog -n 1 -m C:text.txt
PPS: do you really use a sub-directory "elog" instead of the default location "logbooks" for your ELOG logbook files? If not, then leave out this option, too.
elog -h localhost -p 8080 -l Tartan+Tow+Log -n 1 -m C:text.txt
  67096   Tue Jul 26 21:50:05 2011 Cool Alan Grantnetman311@mts.netInfoAll2.9.0Re: Elog client usage

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

 

 

 

  67095   Fri Jul 22 10:31:27 2011 Cool Andreas Luedekeandreas.luedeke@psi.chInfoAll2.9.0Re: Elog client usage

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".
  67094   Fri Jul 22 00:05:02 2011 Question Alan Grantnetman311@mts.netQuestionWindows2.9.0Elog client usage

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.

  67093   Wed Jul 20 17:39:25 2011 Reply Stefan Rittstefan.ritt@psi.chRequestAll2.8.1-1Re: List page displays internal 'Text' attribute header with some alias

Zbigniew Reszela wrote:

I would like to have different header for 'Text' internal attribute: e.g. an alias "Notes". So on the list page header of Text attribute column is Notes.

Is it already possible? I couldn't find it in Administrator's Guide. 

If not is it possible to add this feature?

No, this is not possible. I put this on the wish list. 

  67092   Wed Jul 20 17:38:16 2011 Reply Zbigniew Reszelazreszela@cells.esQuestionAll2.8.1-1Re: changing raw style when empty attribute value

Stefan Ritt wrote:

Zbigniew Reszela wrote:

Dear all,

I wonder if anyone of you already tried to  change raw style in case of empty attribute value.

In my configuration file I have defined attribute "End date" (without quotation marks) and it's type is datetime.

How should I configure extra style for entries where this attribute doesn't have value.

My tries were:

Style End date = background-color:red

Style End date "" = background-color:red

Style End date " " = background-color:red

Style End date - = background-color:red

But they didn't work.

Any ideas?

This functionality was not implemented. I added it in SVN revision #2420, so it will be contained in the next release.

Thanks a lot Stefan

ELOG V3.1.5-3fb85fa6