ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
67095
|
Fri Jul 22 10:31:27 2011 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Info | All | 2.9.0 | Re: 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". |
67097
|
Wed Jul 27 04:36:40 2011 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Info | All | 2.9.0 | Re: 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
|
67105
|
Wed Aug 31 15:00:11 2011 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Question | All | 2.9.0-2411 | Re: Attachments (again) | > In my case the original .pdf file is elsewhere, I've no need to have duplicates scatted in various logbooks, and
> while ideally that would also be true of the thumbnail, it is fair enough for this to be stored in each logbook
> where it is required. This removes the issue of how to have an attachment in a different logbook (other than by
> links, which would get rather tiresome to have to keep making).
>
> Anyone any ideas?
If you just want to show a thumbnail of an attachment in a public logbook, then just add a link to it. like
<img src="https://abk.web.psi.ch/tmp/t.png" alt="" />
or in your example you show the thumbnail in the hidden logbook by adding in the text body:
<img src="<your-host-url>/public/110705_235520_whatthis-0.png" alt="" />
Of course the attachment has to be in the public logbook and the link in the hidden one. |
67115
|
Tue Sep 6 12:00:13 2011 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Question | All | 2.9.0-2411 | Re: Attachments (again) | > I wondered if there had been some flag for the config file whereby the original file for attachment was
> processed by ImageMagick, but not stored, only the .png file(s) stored - or rather, some other way that achieved
> the same end. as there is no such flag at present.
>
> For now, anyway, I can attach the documents/pics I want, then go in and delete the 'originals' as saved in the
> logbook, leaving just the .png files. But maybe something for the wishlist?
At least I now understood your problem :-)
You can have a script in your hidden logbook, that processes your attachments with "execute new", create thumbnails
of them (using ImageMagicks "convert") and submit those thumbnails as one additional entry to your public logbook.
But then you would get thumbnails of all attachments of the hidden logbook in the public one, maybe you don't want
that either? If you want them all, this method is more automated. If you just want some, do it as you suggested it.
In my opinion this is a rather exotic feature request :-)
I wonder if there is a second person in the world who could use it? |
67116
|
Tue Sep 6 12:15:54 2011 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Question | Windows | V2.9.0-241 | Re: Password may not contain blanks |
Stefan Ritt wrote: |
Terry Shuck wrote: |
After setting up email addresses for notifications I noticed that the "Full Name" has part of an email address in it. I've tried several ways to correct this however it keeps sending me to a page that says "Password may not contain blanks" and I've not done anything with the password.
Can you tell me how to correct this issue?
I certainly appreciate your help!!
Terry
|
Have you tried deleting and re-creating the account? Otherwise you could stop elogd, edit the password file with a text editor, and restart elogd.
|
You will not loose your logbook data if you have access rights to the file system where the "elogd" program writes it's data.
The easiest way is to edit there password file directly and then restart "elogd".
But even if you do not dare to edit the files directly, you still can solve the issue from the web interface:
- Create a new account, e.g. user "admin2"
- While logged in as "admin", make this user an administrator: go to "Change config file", add "
Admin user = admin, admin2"
- Now log off and then login as "admin2"
- Check that you can do administration, then remove user "admin"
- Create a new user "admin" with proper "Full name" and "Email"
- Now log off and then login as "admin"
- Check that you can do administration, then remove user "admin2"
That should work. Good luck! |
67122
|
Tue Sep 13 11:54:16 2011 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Bug report | Linux | 2.9.0-2414 | Elog crashes with URL find npp=0 | Some user wanted to modify the URL by hand and succeeded to crash the elogd process with npp=now
It appears that npp=0 crashes elogd with the following error message:
Program received signal SIGFPE, Arithmetic exception.
0x0808eba2 in show_elog_list (lbs=0xab3c770, past_n=0, last_n=0, page_n=1,
default_page=1, info=0x0) at src/elogd.c:20214
20214 sprintf(str + strlen(str), loc("Page %d of %d"), page_n, (n_msg - 1) / n_page + 1);
I guess this bug is not OS dependent: you can crash every logbook that you can search ;-) |
67123
|
Tue Sep 13 13:38:19 2011 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Bug fix | Linux | 2.9.0-2414 | Re: Elog crashes with URL find npp=0 | > [...] It appears that npp=0 crashes elogd [...]
Here's a patch: search for "npp" in src/elogd.c and add the following line:
if (n_page<=0) n_page = 20;
Here's the diff output for version 2.9.0-2414
*** 20092,20096 ****
if (isparam("npp"))
n_page = atoi(getparam("npp"));
+ if (n_page<=0) n_page = 20;
if (page_mid) { |
67138
|
Thu Oct 27 11:29:08 2011 |
| Andreas Luedeke | andreas.luedeke@psi.ch | Bug report | Linux | 2.9.0-2414 | elogd crash for special query | A query to a logbook can crash the demon.
Query:
https://pc8059.psi.ch:444/SwissFEL+Injector/?jcmd=Find&m0a=10&d0a=27&y0a=2011&npp=1&reverse=0
gdb dump:
SSLServer listening on port 444 ...
Program received signal SIGSEGV, Segmentation fault.
show_elog_list (lbs=0xae72618, past_n=0, last_n=0, page_n=0, default_page=1, info=0x0) at src/elogd.c:20797
20797 message_id = msg_list[index].lbs->el_index[msg_list[index].index].message_id; |
|