Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 34 of 806  Not logged in ELOG logo
ID Date Icon Authordown Author Email Category OS ELOG Version Subject
  68174   Mon Nov 2 07:39:07 2015 Reply kenzo Abrahamskenzoabrahams@gmail.comQuestionLinux3.1.1Re: propogating messages through logbooks
 
> Hi Kenzo,
> I think it would help me to understand your problem, if you would provide a minimal configuration file with two
> logbooks.
> 
> There is no ELOG internal feature to propagate data from one logbook to another; 
> using a shell script is the only method I know.
> But you could easily put your script into the background: 
> ELOG can handle multiple parallel request, by handling one request after the other.
> 
> Kind Regards, Andreas

Hi Andreas

Im using python to do the scripting. Everything works fine until it comes to submitting the entry to my logbook.
The extractTable.py file is the one running the command to submit to elog.
I see now that im starting a subprocess in my python script (subprocess.call) and thats why its not finishing.
Could you perhaps suggest how I would go about doing this by putting my scripts in the
background? I might have to look at multiprocessing in python as well. The reason im using python is because im
doing alot of file processing as well. I do have to add that this method works perfectly when i just run the python
on its own. As soon as i run it by submiting an elog entrie from the browser it hangs on the subprocess.call method.

Regards, Kenzo
Attachment 1: elogd.cfg
[global]
Group Ithemba = Configuration, Maintenance
Group Maintenance = C1
port = 8080

[Configuration]
Theme = default
Comment = Current configuration of detectors
Attributes = Author, Subject
Preset Subject = Current Configuration
Required Attributes = Author
Locked Attributes = Author, Subject
Page Title = ELOG - $subject
Reverse sort = 1
Quick filter = Date
Execute new = $shell(echo "$message id" &> /usr/local/elog/logbooks/ID.txt; python /usr/local/elog/logbooks/lookupConfig.py; python /usr/local/elog/logbooks/extractTable.py)

[C1]
theme = default
Comment = Maintenance information for clover detector C1
Attributes = Author, Subject, Type
Options Type = Defects, Routine, Problem Fixed, Maintenance
Preset Author = $long_name 
Required Attributes = Author
Locked Attributes = Author
Page Title = ELOG - $subject
Reverse sort = 1
Quick filter = Date

Attachment 2: extractTable.py
#!/usr/bin/python

from bs4 import BeautifulSoup
import sys
import re
import time
import csv
import subprocess

#time.sleep(2)

counter = 0
DetectorNum = 1
soup = BeautifulSoup(open('/usr/local/elog/logbooks/Table.html'), 'html5lib')

for table in soup.find_all('table'):
	for row in table.find_all('tr'):
		col = row.find_all('td')

		Xia = col[0].string
		module = col[1].string
		channel = col[2].string
		name = col[3].string
		arrayPos = col[4].string
		panel = col[5].string

		if counter == 0:
			titleList = (str(Xia), str(module), str(channel), str(name), str(arrayPos), str(panel))
			counter = counter + 1	
		else:	
			record = (str(Xia), str(module), str(channel), str(name), str(arrayPos), str(panel))

			file = open('/usr/local/elog/logbooks/tableData', 'w')
			for i in range(len(titleList)):
				file.write(str(titleList[i])+" = "+str(record[i])+"\n")
			file.close()

			DetName = "C"+str(DetectorNum)

			subprocess.call(["elog", "-h", "localhost", "-p", "8080", "-l", DetName, "-u", "System", "password", "-a", "Author=System", "-a", "Subject=\"testing the auto writing of detectors\"", "-m", "/usr/local/elog/logbooks/tableData"])
			counter = counter + 1
			DetectorNum = DetectorNum + 1
  68175   Mon Nov 2 08:37:06 2015 Reply kenzo Abrahamskenzoabrahams@gmail.comQuestionLinux3.1.1Re: propogating messages through logbooks
>  
> > Hi Kenzo,
> > I think it would help me to understand your problem, if you would provide a minimal configuration file with two
> > logbooks.
> > 
> > There is no ELOG internal feature to propagate data from one logbook to another; 
> > using a shell script is the only method I know.
> > But you could easily put your script into the background: 
> > ELOG can handle multiple parallel request, by handling one request after the other.
> > 
> > Kind Regards, Andreas
> 
> Hi Andreas
> 
> Im using python to do the scripting. Everything works fine until it comes to submitting the entry to my logbook.
> The extractTable.py file is the one running the command to submit to elog.
> I see now that im starting a subprocess in my python script (subprocess.call) and thats why its not finishing.
> Could you perhaps suggest how I would go about doing this by putting my scripts in the
> background? I might have to look at multiprocessing in python as well. The reason im using python is because im
> doing alot of file processing as well. I do have to add that this method works perfectly when i just run the python
> on its own. As soon as i run it by submiting an elog entrie from the browser it hangs on the subprocess.call method.
> 
> Regards, Kenzo

Hi Andreas

I sorted my problem out, I had to use threading in python such that I can time the submissions to the elog server.
Everything works fine now. Thank you for the assistance.

Regards
Kenzo
  1916   Mon Aug 28 15:44:38 2006 Question kcminkcmin@mchsi.comQuestionWindows2.6.2Entry Submission Help
I actually have two questions.

1. When an entry is submitted is it possible to have it return to the submit page instead of a summary of the entry. In the ELog.cfg syntax on the site it mentions something about this. However It says something about a file being present in the resource directory. I am not sure what to do here.

2. When you submit an entry is it possible for the fields to stay set to the value that was selected on submission of the last entry. You would need to still be able to change them though.
  67399   Sat Dec 15 22:37:27 2012 Question juliaalbaagueda@yahoo.comQuestionWindows2.7.0-1953error: "HTML encoding not allowed"

Hi all,

I'm absolutely new with ELOG and have only basic programming skills...

I'd like to use ELOG, so I have installed it in my computer to start playing with it (I installed version 2.7.0-1953 because with the latest one I got an error with the elogd.cfg file). I've been able to open the Demo logbook but wasn't able to submit a new entry into it. I get the following error:

"HTML encoding not allowed"

Could you please explain me how I could solve this problem?

I thank you in advance for your help.

  66376   Thu Jun 4 17:51:50 2009 Entry jon huangjon.huang@ses.comBug reportWindows2.76Memory leak in 2.76 elogd.exe

Hi,

There's seems to be a memory leak with elogd.exe running windows.  I had this problem with older version of elogd.exe, i've just upgrade to the latest and the problems still exist. I've had this issue with earlier versions.  I've just upgrade elog to the latest 2.76 version. The memory leak still persist. I really appreciate if you or anyone here can help me resolve this issue.

Thank!

JH

 

Attachment 1: elogd.jpg
elogd.jpg
  65935   Tue Jul 29 17:50:51 2008 Warning jhjon.huang@ses-americom.comBug reportWindows2.73-1.exeElogd.exe crashes almost everyday

My Elog running on windows 2003 sp1 is crashing with this error "  Faulting application elogd.exe, version 0.0.0.0, faulting module elogd.exe, version 0.0.0.0, fault address 0x00061330."  the version of elogd.exe is  has a built date of 2/22/2008.  Will upgrading to the latest windows binary resolve this issue?    Thanks!!

 

  65789   Thu Mar 27 05:58:40 2008 Cool jeejeepenin@hotmail.comQuestionLinuxV2.7.2-204how to sort entry

hi:

  I have a problem with elog,   if there are many entrys, and i want to find  some useful  entries  which i preseted  before ,like entries with Agree  , how can i configure the command ?

  so i can  find  what i want with Agree

    please give me a help ,thx a lot!

  65793   Thu Mar 27 09:05:05 2008 Reply jeejeepenin@hotmail.comQuestionLinuxV2.7.2-204Re: how to sort entry

Stefan Ritt wrote:

jee wrote:

hi:

  I have a problem with elog,   if there are many entrys, and i want to find  some useful  entries  which i preseted  before ,like entries with Agree  , how can i configure the command ?

  so i can  find  what i want with Agree

    please give me a help ,thx a lot!

Very simple: Click on "Find", select the icon, and click on "Search". Like if you do this for this Forum, it will produce an URL like:

 

https://midas.psi.ch/elogs/Forum/?Icon=icon14.gif

 i mean , is there a button that  when i push  it , then  it only shows  valuable   enties which i preset  before,   the button may  add  in the "List  |  New  |  Edit  |  Reply  |  Duplicate  |  Find  |  Config  |  Logout  |  Help"  

 is that   possible?  pls  show  the command. 

thank you for reply me!

ELOG V3.1.5-3fb85fa6