Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 235 of 801  Not logged in ELOG logo
ID Datedown Icon Author Author Email Category OS ELOG Version Subject
  67894   Mon May 11 22:42:44 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionWindows310.3Re: Preloading Options or Moptions from a text file or CSV
> > > Title says all :)
> > > 
> > > Is it possible to preload Options or Moptions from a text file or CSV instead of being load from the elogd.conf ?
> > > 
> 
> So basically, I have a list of 5-10 workers. I'll have to choose one for each entry I make into the logbook. But these workers will change from time to time 
> (students) and I don't want the staff to manipulate the config file manually..("Extendable options" is not an option as I will get to many "Darth Vader" entry for 
> sure..)
> 
> I asked if I could populate that option box from another logbook attribute and Andreas told me only possible via external scripts. 
> https://midas.psi.ch/elogs/Forum/67877

Hi Francois. 
if those worker lists do change rather infrequently, then I would have an idea how to do it:

You could have an application that updates the Options or MOptions lists in the elogd.cfg file at midnight, 
and in case they actually did change the application restarts the elogd process afterwards.

I use such a mechanism to update my user list from our companies LDAP service every second Monday of a month at midnight.
This avoids misspelled user names or wrong email addresses and takes care that all employees (~2000) can log-in to our ELOG.
The passwords are handled anyway by kerberos authentication.

But I admit that it would be a cool feature to have "includes" in the configuration file for dynamic data sources. 
Shell scripts of course are useless for "Option" definitions: they would only be executed at start-up anyway,
and that can be accomplished as well by the above mentioned automatic changes to the config file.

Kind Regards
Andreas
  67893   Mon May 11 13:15:54 2015 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux3.1Re: Remote entries with empty messages possible?

The "command does not respond" means that the program starts reading in the main message text from the console. You can type several lines of text, and finish it off by hitting Ctrl-D (Ctrl-Z under Windows).

I see your point of having empty texts. Indeed the "" on the command line does not work presently, so you have to add a space as a workaround. I modified the elog code (committeed to bitbucket repository) to accept "" as empty text to suit your needs.

/Stefan

 

Edmund Hertle wrote:

Hey,

I want to submit an entry to elog remotley using the "elog" command. For example:

elog -h elog-server-adress -l EO -a Fill=111

But this does not generate a new entry. Instead the terminal jumps to an empty new line and the command does not respond to any further inputs anymore (CTRL+C to get out). I have to add a message:

elog -h elog-server-adress -l EO -a Fill=111 "test"

also using an empty string does not work:

elog -h elog-server-adress -l EO -a Fill=111 ""

I could add a whitespace as a work-around, but I'm not sure if this is a bug or a feature.

To put this in some context: I want to create entries for certain measurements automatically, where all relevant parameters are already attribute fields. In the usual case the actual message will be empty but might be used if the operator wants to add a note after the meausrement has been done.

 

  67892   Fri May 8 17:45:24 2015 Question Edmund Hertleedmund.hertle@kit.eduQuestionLinux3.1Remote entries with empty messages possible?

Hey,

I want to submit an entry to elog remotley using the "elog" command. For example:

elog -h elog-server-adress -l EO -a Fill=111

But this does not generate a new entry. Instead the terminal jumps to an empty new line and the command does not respond to any further inputs anymore (CTRL+C to get out). I have to add a message:

elog -h elog-server-adress -l EO -a Fill=111 "test"

also using an empty string does not work:

elog -h elog-server-adress -l EO -a Fill=111 ""

I could add a whitespace as a work-around, but I'm not sure if this is a bug or a feature.

To put this in some context: I want to create entries for certain measurements automatically, where all relevant parameters are already attribute fields. In the usual case the actual message will be empty but might be used if the operator wants to add a note after the meausrement has been done.

  67891   Fri May 8 00:18:12 2015 Question Kamen Nikolovkanikolov@gmail.comQuestionWindowsV2.9.0-239RSS Feed Not Providing Time Stamps For datetime Attributes

Hello,

I am using the RSS feed feature of Elog (V2.9.0-2396). I have a couple of attributes of type "datetime" (Start Time and Stop Time). I don't have a "Time Format" statement, so just using the default format. I am passing the Start Time and Stop Time attributes to the RSS Title with $Start Time and $Stop Time, but when looking at the RSS title in IE11 browser, I only see the date and not the time. Is there any way I can see the time as well?

Additional info:

I'm also passing the creation time of the Elog with $entry time and this is displaying correctly (both date and time).

Please let me know if I am doing something incorrectly?

Thanks

  67890   Thu May 7 14:37:39 2015 Reply Francois CloutierFrancois@fcmail.caQuestionWindows310.3Re: Preloading Options or Moptions from a text file or CSV
Not really...
The thing is I have to let some users the capacity of changing the content of that option list.. I was hoping there could be a different way for 
them then to edit the cfg file...

That why I came up at first ask if it could be possible to load an Option list from the content of another logbook... that way I could have made 
up some sort of "worker" logbook that would have feed the main logbook Attribute "workers" options list.


> Forget scripting under Windows, this is painful and not really working. Wrong OS for that.
> 
> But have you considered conditional attributes? With this you can load different option lists straight from the elogd.cf file. Use something 
like this:
> 
> Attributes ..., List, Person
> 
> Options List = List A{1}, List B{2}
> {1} Options Person = Person a1, Person a2, ...
> {2} Options Person = Person b1, Person b2, ...
> 
> So if you choose either "List A" or "List B", you get a different set of persons. Is it that what you want?
> 
> /Stefan
> 
> 
> > a) I couldn't make shell command to execute while elogd was running as a service (I'm running windows and $shell was just returning weird 
stuff ); shell script was 
> > working only when I launch elogd.exe from a command line:
> > 
> > -elogd as a Service running the following : Subst Infographiste = $shell(dir c:\) 
> > will return : Shell execution not enabled via -x flag
> > 
> > -modifying the Windows Service to add "-X" and running the following :Subst Infographiste = $shell(dir c:\) 
> > will return : a empty attribute
> > 
> > -running elogd "-x" from a command line, the following : Subst Infographiste = $shell(dir c:\) 
> > will return : the dir result..
> > 
> > (I also tried to change under witch user the service was running..)
> > 
> > b) I just couldn't figure how to build that script....
> > 
> > But that would be so nice ! I can see so many situations where I could use such a scenario (loading options from another logbook or from a 
txt/csv file 
> > somewhere...)
> > 
> > Thanks,
> > 
> > :)
  67889   Thu May 7 09:48:32 2015 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows310.3Re: Preloading Options or Moptions from a text file or CSV
Forget scripting under Windows, this is painful and not really working. Wrong OS for that.

But have you considered conditional attributes? With this you can load different option lists straight from the elogd.cf file. Use something like this:

Attributes ..., List, Person

Options List = List A{1}, List B{2}
{1} Options Person = Person a1, Person a2, ...
{2} Options Person = Person b1, Person b2, ...

So if you choose either "List A" or "List B", you get a different set of persons. Is it that what you want?

/Stefan


> a) I couldn't make shell command to execute while elogd was running as a service (I'm running windows and $shell was just returning weird stuff ); shell script was 
> working only when I launch elogd.exe from a command line:
> 
> -elogd as a Service running the following : Subst Infographiste = $shell(dir c:\) 
> will return : Shell execution not enabled via -x flag
> 
> -modifying the Windows Service to add "-X" and running the following :Subst Infographiste = $shell(dir c:\) 
> will return : a empty attribute
> 
> -running elogd "-x" from a command line, the following : Subst Infographiste = $shell(dir c:\) 
> will return : the dir result..
> 
> (I also tried to change under witch user the service was running..)
> 
> b) I just couldn't figure how to build that script....
> 
> But that would be so nice ! I can see so many situations where I could use such a scenario (loading options from another logbook or from a txt/csv file 
> somewhere...)
> 
> Thanks,
> 
> :)
  67888   Thu May 7 02:25:16 2015 Reply Francois CloutierFrancois@fcmail.caQuestionWindows310.3Re: Preloading Options or Moptions from a text file or CSV
> > Title says all :)
> > 
> > Is it possible to preload Options or Moptions from a text file or CSV instead of being load from the elogd.conf ?
> > 
> > Thanks :)
> 
> Quick and simple answer: No.
> 
> But please explain me what your case is. Maybe this can be done differently.

That's clear :)

So basically, I have a list of 5-10 workers. I'll have to choose one for each entry I make into the logbook. But these workers will change from time to time 
(students) and I don't want the staff to manipulate the config file manually..("Extendable options" is not an option as I will get to many "Darth Vader" entry for 
sure..)

I asked if I could populate that option box from another logbook attribute and Andreas told me only possible via external scripts. 
https://midas.psi.ch/elogs/Forum/67877

I investigate a little but I found that :

a) I couldn't make shell command to execute while elogd was running as a service (I'm running windows and $shell was just returning weird stuff ); shell script was 
working only when I launch elogd.exe from a command line:

-elogd as a Service running the following : Subst Infographiste = $shell(dir c:\) 
will return : Shell execution not enabled via -x flag

-modifying the Windows Service to add "-X" and running the following :Subst Infographiste = $shell(dir c:\) 
will return : a empty attribute

-running elogd "-x" from a command line, the following : Subst Infographiste = $shell(dir c:\) 
will return : the dir result..

(I also tried to change under witch user the service was running..)

b) I just couldn't figure how to build that script....

But that would be so nice ! I can see so many situations where I could use such a scenario (loading options from another logbook or from a txt/csv file 
somewhere...)

Thanks,

:)
  67887   Wed May 6 21:30:13 2015 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows310.3Re: Preloading Options or Moptions from a text file or CSV
> Title says all :)
> 
> Is it possible to preload Options or Moptions from a text file or CSV instead of being load from the elogd.conf ?
> 
> Thanks :)

Quick and simple answer: No.

But please explain me what your case is. Maybe this can be done differently.
ELOG V3.1.5-3fb85fa6