Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 63 of 238  Not logged in ELOG logo
icon5.gif   running more then one shell command when new entries is submitted, posted by kenzo Abrahams on Tue Oct 27 11:03:49 2015 
Hi

Im just curious is it possible to run more then one command using Execute new = <command> or will i have to run a script to run muliple
commands.
    icon2.gif   Re: running more then one shell command when new entries is submitted, posted by kenzo Abrahams on Tue Oct 27 11:14:16 2015 
The reason why im asking if it can be done using the Execute option is because I need to have the message id of the entry that was submitted and in an
external script i dont have access to the variable




kenzo
    icon2.gif   Re: running more then one shell command when new entries is submitted, posted by Stefan Ritt on Tue Oct 27 11:19:41 2015 
The command is passed to your shell, and some shells except more than one command. Most Linux shells accept commands separated by ';', which
you can try yourself by entering for example: ls *.c; ls*.h




kenzo
       icon2.gif   Re: running more then one shell command when new entries is submitted, posted by kenzo Abrahams on Tue Oct 27 11:23:36 2015 
If i put the ';' into Execute the rest of the command becomes a comment thats why i was trying to use '&&' instead. If I encapulate
the whole command in "" or '' then both commands are executed but the files im trying to write to gets created but no data is piped into
it. When I use Execute with one command and pipe its output to a file everything works fine though.
          icon2.gif   Re: running more then one shell command when new entries is submitted, posted by Andreas Luedeke on Tue Oct 27 12:20:16 2015 
As far as I know ELOG is recognising a configuration line as a comment only when it starts with a ';'.

I can assure you that
ELOG does not treat the rest of the line as a comment when you use a ';' within a $shell() command: I do it a lot and it works fine. Here's
a simple, generic example using the bash:

Preset Author = $shell(if [ $short_name = "Anonym" ] ;then echo $Author;else echo
             icon2.gif   Re: running more then one shell command when new entries is submitted, posted by kenzo Abrahams on Wed Oct 28 11:11:27 2015 
Hi Andreas

This worked perfectly thank you.




Andreas
icon5.gif   dynamic "preset text" option without remplace text if it has changed, posted by Dani on Tue Oct 27 15:41:57 2015 
Dear all,

Is it possible to have a dynamic "preset text" option without remplace text if it has changed?

I would like to switch the template file depending on the attribute value (Type). 
    icon2.gif   Re: dynamic "preset text" option without remplace text if it has changed, posted by Andreas Luedeke on Wed Oct 28 08:51:17 2015 
I don't think that this is possible.

And it is not clear to me, how you would like it to work: I often use HTML tables in preset text, where the user should fill out columns (e.g.
for checklists). I wouldn't want the tables just to append when switching to another checklist. You could rather add a comment to the Type field, explaining
       icon2.gif   Re: dynamic "preset text" option without remplace text if it has changed, posted by Dani on Wed Oct 28 09:15:52 2015 
thanks Andres for your response!

I was thinking that it cannot be possible, but , I had to try to ask in the forum.

for my question, I think that this could be left on user responsibility to take care about it, and add a comment the the text fied, explaining
icon1.gif   Please advise on how to set up selective email notification on logbooks, posted by Julian Brower on Mon Oct 26 15:20:44 2015 
Please advise on how to set up selective email notification on logbooks; We want to send an email to specific people when an event that involves them
is entered? 

At the moment, we currently get an email entry for every new logbook entry. Thanks
    icon2.gif   Re: Please advise on how to set up selective email notification on logbooks, posted by Andreas Luedeke on Tue Oct 27 11:23:43 2015 
Hi Julian,

there is a whole chapter in the documentation about that: https://midas.psi.ch/elog/config.html#email

If I have
to send email, e.g. for Controls issues entered in the operation logbook, I do send the email to a specific mailman mailing list for that group.

It
is cumbersome to manage email groups in the logbook configuration - in particular if the same lists exists in different logbooks. I only refer to the mailing
       icon2.gif   Re: Please advise on how to set up selective email notification on logbooks, posted by Julian Brower on Tue Oct 27 14:58:20 2015 
Thanks Andreas, I will read that section. Julian




Andreas
Luedeke wrote:



Hi Julian,

there is a whole chapter in the documentation
icon1.gif   How can we calculate and display the difference between two time entries on a log entry, posted by Julian Brower on Mon Oct 26 15:24:44 2015 Log_time_entry.jpg
See drawing below: We have a beam on and a beam off time. We want to fill in the lost time automaticaaly. Please can you help? Julian

 
    icon2.gif   Re: How can we calculate and display the difference between two time entries on a log entry, posted by Stefan Ritt on Mon Oct 26 16:48:51 2015 
Unfortunately elog cannot do calculations based on certain fields. You could however add some Javascript code (via "Bottom text = ..." for
example), which does that. But that requires JavaScript knowledge to do so.




Julian
       icon2.gif   Re: How can we calculate and display the difference between two time entries on a log entry, posted by Julian Brower on Tue Oct 27 09:26:56 2015 
Stefan, I am not an expert in this field so I wondered how one goes about finding someone to write this and how one amends the soruce code? Is that allowed?
 Is it a feature than may be of use for other users? Julian




Stefan
icon5.gif   Logging entries from the command line, posted by kenzo Abrahams on Mon Oct 26 11:06:46 2015 
Good Afternoon

Im trying to automatically post an entry using information saved in a text file. I have followed the example in the users guide but i always
seem to get a error message saying transmission failed. Lets say for instance I have a user named John and his password is Blue and he wants to log into
    icon2.gif   Re: Logging entries from the command line, posted by Stefan Ritt on Mon Oct 26 11:18:57 2015 
Run the elog command with an additional -v flag (verbose output), and you will see what the elogd server return. It's
HTML, but you should be able to see some error message.




kenzo
       icon2.gif   Re: Logging entries from the command line, posted by kenzo Abrahams on Mon Oct 26 11:24:46 2015 
Hi Stephan

The error message I get is "Error: Command Submit not allowed". I dont know if this might be an issue but it says Response Recieved:
HTTP/1.1 404 Not Found in the first line of the servers response
          icon2.gif   Re: Logging entries from the command line, posted by Stefan Ritt on Mon Oct 26 11:32:08 2015 
This indicates that the username/password is not correct. Can you log in to that logbook in your browser with the username "John" and password
"Blue"?




kenzo
             icon2.gif   Re: Logging entries from the command line, posted by kenzo Abrahams on Mon Oct 26 12:17:40 2015 
Yes I can it works perfectly from the browser.




Stefan
Ritt wrote:



This indicates that the username/password is not correct. Can you log
                icon2.gif   Re: Logging entries from the command line, posted by kenzo Abrahams on Mon Oct 26 12:26:03 2015 
Hi Stephan I got it to work for some reason elog was complaining that my encoding of the message wasnt allowed. I allowed the lognook to allow ELcode
and it works perfectly.

Thank you for the help.
icon5.gif   How does one create a html template for an entry, posted by kenzo Abrahams on Thu Oct 15 12:32:19 2015 
Good Day

I am new to elog and have a question. This is best explain with an example. If I have two logbooks named "home" and "work" and I would like all the entries
    icon2.gif   Re: How does one create a html template for an entry, posted by Stefan Ritt on Thu Oct 15 14:34:36 2015 
> Good Day

> I am new to elog and have a question. This is best explain with an example. If I have two logbooks named "home" and "work" and I would like all the entries
       icon2.gif   Re: How does one create a html template for an entry, posted by kenzo Abrahams on Mon Oct 26 11:16:54 2015 
> > Good Day
> > 
> > I am new to elog and have a question. This is best explain with an example. If I have two logbooks named "home" and "work" and I would like all the
icon5.gif   Columns numeric input are added/computed, posted by Dawang on Fri Oct 23 03:36:18 2015 
Hi Stefan,

Good day. I'm thinking if this wishlist is already available in elog. The values in columns we're added or computed according to formula
set in a single separate column.
    icon2.gif   Re: Columns numeric input are added/computed, posted by Stefan Ritt on Fri Oct 23 08:29:33 2015 
No, formulas are not yet implemented. For such things I would use Google Spreadsheets in meantime.

Stefan




Dawang
icon5.gif   Show attachments = 0, posted by Eric Quintero on Wed Aug 12 23:44:16 2015 
I have "Show attachments = 0" set in [global], but attachments are shown in the "Full" view. Is this the intended behavior?
Looking at individual entries correctly hides the attachments. 

We use inline images often, so when an attachement is shown at the bottom of a post it is effectively a duplicate, which clutters things
    icon2.gif   Re: Show attachments = 0, posted by Stefan Ritt on Thu Aug 13 08:41:57 2015 Screen_Shot_2015-08-13_at_8.43.40_.png
That's strange. If you use HTML or ELCode encoding, attachments are automatically hidden if they are used inline. So no "Show
attachments = 0" necessary! I just tried that with the demo logbook and here is how it looks:

       icon2.gif   Re: Show attachments = 0, posted by Eric Quintero on Mon Aug 31 17:14:08 2015 
The automatic hiding behavior is what I'm after, and I've discovered that it is only a problem for PDF attachments.
I have reproduced this on the demo logbook on git revision f828049. 

I've taken a look at the source you mentioned, but as far as I can tell, it is just looking for the opening of the img tag in the
          icon2.gif   Re: Show attachments = 0, posted by Eric Quintero on Fri Oct 16 00:24:50 2015 
Hm, looking through the source, there are many many places where PDF files are treated differently than strictly image filetypes (PNG, etc.). This makes
sense in the context of multi-page documents. 

Still, I like using PDFs for vector plots... I suppose I should also confess to the following modification I've made to my ELOG for treating
ELOG V3.1.5-3fb85fa6