Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 226 of 796  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Versiondown Subject
  68717   Mon Jan 15 16:46:58 2018 Entry Alan Grantagrant@winnipeg.caRequestWindows3.1.2Drop down order

Can you please make a change to have the Quick Filter ComboBox controls reference the field type for ordering purposes?

For example, if attribute Lot Number is Type Numeric then the ComboBox should be listed in numerical order instead of alphanumeric (eg: 1,2,3,11,21 vs 1,11,2,21,3).

Best Regards.

  68718   Tue Jan 16 09:30:55 2018 Question markusmarkus.ries@helmholtz-berlin.deQuestionLinux3.1.2Is there a python3 api to generate logbook entries from python?

Dear elog community,

I wonder whether there is a python3 api or lib to generate and append entries (and attachments) to the logbook using scripts.
However, so far I did not find anything...

At the moment I am thinking about wrapping the "elog" command line tool.

Is there something usable already out there?

Thanks and regards
Markus

  68719   Tue Jan 16 09:46:04 2018 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux3.1.2Re: Is there a python3 api to generate logbook entries from python?

There are two options

  • Wrap the "elog" command line tool 
  • Use "curl". Ther is a PycURL library http://pycurl.io/docs/latest/ which can be used, so you don't have to call any command line tool. The usage of curl is described in elog:68597

Stefan

markus wrote:

Dear elog community,

I wonder whether there is a python3 api or lib to generate and append entries (and attachments) to the logbook using scripts.
However, so far I did not find anything...

At the moment I am thinking about wrapping the "elog" command line tool.

Is there something usable already out there?

Thanks and regards
Markus

 

  68720   Tue Jan 16 10:13:00 2018 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionLinux3.1.2Re: Is there a python3 api to generate logbook entries from python?

Have a look here: https://github.com/paulscherrerinstitute/py_elog

I haven't tried it myself, but it should allow you to add, reply, edit, delete elog entries from python (>= 3.5) via the http elog interface. It's an anaconda package.

markus wrote:

Dear elog community,

I wonder whether there is a python3 api or lib to generate and append entries (and attachments) to the logbook using scripts.
However, so far I did not find anything...

At the moment I am thinking about wrapping the "elog" command line tool.

Is there something usable already out there?

Thanks and regards
Markus

 

  68723   Wed Jan 24 07:54:47 2018 Reply markusmarkus.ries@helmholtz-berlin.deQuestionLinux3.1.2Re: Is there a python3 api to generate logbook entries from python?

Thanks Andreas!
This is more or less exactly what I was looking for...

Regards
Markus

Andreas Luedeke wrote:

Have a look here: https://github.com/paulscherrerinstitute/py_elog

I haven't tried it myself, but it should allow you to add, reply, edit, delete elog entries from python (>= 3.5) via the http elog interface. It's an anaconda package.

markus wrote:

Dear elog community,

I wonder whether there is a python3 api or lib to generate and append entries (and attachments) to the logbook using scripts.
However, so far I did not find anything...

At the moment I am thinking about wrapping the "elog" command line tool.

Is there something usable already out there?

Thanks and regards
Markus

 

 

  68772   Mon Apr 2 23:31:51 2018 Question Michael Hibbardmichael.hibbard@cern.chQuestionWindows3.1.2Create past Elog entry.

Hello, Sorry if this has been addressed elsewhere, but I could not find info.

I am wanting to submit a new elog entry (that should have been) for a past date, to predate log entrys currently in my system.

I assume I must manually create a new .log file. What ID# should I assign to this entry? Should I sub-increment (i.e 33.1)? I presume the correct thing to to would be to automate ID# increments in all sucessive logs with a script (python).

Please advise.

Thank you,

-Michael Hibbard

  68773   Tue Apr 3 09:39:07 2018 Reply David PilgramDavid.Pilgram@epost.org.ukQuestionWindows3.1.2Re: Create past Elog entry.

Hi Michael,

Elog purists, look away now.

There is an "official" way to do this, which is to have fields for entry date (so can be in the past), but the yymmdda.log file will be of the date and time you make the entry.  This is in the offical documentation.

If you are not bothered by the ID number being out of sequence (and elog does not really mind, although it occasionally throws a hissy fit/throws its toys out of the pram, which a restart sorts out), but you are one who wants the date of the entry in the log file to also be in the past, skipping the entry date fields issue, it's perfectly do-able.  So long as you can access the yymmdda.log files.

What I, and some others, do is to create a new entry now (for ease, the first entry of the day, but that's not critical), then go to the log files, and with an editor open today's file, find the entry, and edit the day, date and if necessary time; I always set the time as post 22:00, as code for an edited late entry.  I also then cut-and-paste the entry into the log file for the day it should have been entered in (creating it if necessary, in linux make sure the permissions are correct, specifically the user).

If you have attachments, and want those also to reflect the date, you'll need to edit the Attachments section of the elog entry headers (format is obvious), and also rename the attachment files in the directory.

I've not tried an ID number being other than an integer, I guess it would not work.  ID numbers not being in sequence with the date doesn't seem to matter.  Messing with ID numbers can have a number of consequences, such as elog running away, burning CPU time etc (looking for a previous entry that does not exist), or rogue listings of a entry ID no./# 0 (looking for a later entry that does not exist).

One caveat; I use Linux, and on elog 2.9.2.  Later elogs and Windows may have a different reaction to what I've written above.

 

Elog purists can now look again.

Michael Hibbard wrote:

Hello, Sorry if this has been addressed elsewhere, but I could not find info.

I am wanting to submit a new elog entry (that should have been) for a past date, to predate log entrys currently in my system.

I assume I must manually create a new .log file. What ID# should I assign to this entry? Should I sub-increment (i.e 33.1)? I presume the correct think to to would be to automate ID# increments in all sucessive logs with a script (python).

Please advise.

Thank you,

-Michael Hibbard

 

  68774   Tue Apr 3 10:19:07 2018 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionWindows3.1.2Re: Create past Elog entry.

David answered the question already.

I would distinguish if this is a once-in-a-year event, where you are willing to edit the logfiles as an administrator to fix it -
or if it happens more weekly, and you want to enable the users to fix it themself.
 
If it happens once a year and you don't mind to do it yourself: write a little self "how-to" and do it like David suggested.
If it happens more frequent and you prefer your users to fix it themself: introduce a "when" attribute as described in elog:67712
 
Cheers, Andreas
 
PS: Changing entry IDs $@MID@$ is only for people who know exactly what they are doing. You need to change all references to the IDs as well (Reply to: attributes) and all cross references (like the one elog:67712).
 
Michael Hibbard wrote:

Hello, Sorry if this has been addressed elsewhere, but I could not find info.

I am wanting to submit a new elog entry (that should have been) for a past date, to predate log entrys currently in my system.

I assume I must manually create a new .log file. What ID# should I assign to this entry? Should I sub-increment (i.e 33.1)? I presume the correct think to to would be to automate ID# increments in all sucessive logs with a script (python).

Please advise.

Thank you,

-Michael Hibbard

 

ELOG V3.1.5-2eba886