Re: field selections persist across new log entries?, posted by Sebastian Schenk on Tue Sep 8 16:35:14 2020
|
As far as I know, it is not possible, if you make a "new" entry.
You could configure the elog, to always PRESET an atribute, but then it is always the same, not the last.
I think the "duplicate" entry function could provide you partly with the functionality you want, as it copies all old values into a new entry.
Regards,
Sebastian
Anthony Krishock wrote: |
All,
I am using elog as an observation log for amateur astronomy. I have a form configured, but I would like to know if it is possible to make certain fields persist across new entries.
What I mean is this:
When I make an new observation, I select a value for sky conditions (say.. "1"). When I make another observation, "1" is already selected.
Is this possible? If so, how?
Thanks
|
|
Re: field selections persist across new log entries?, posted by Andreas Luedeke on Wed Sep 9 10:33:58 2020
|
It is probably possible, but requires a big of a hack.
Whenever you save a new entry or edit an old one, you run a little shell script to write the value of this field into a file.
Whenever you create a new entry you read the PRESET value with a shell script from that file.
Here are the relevant excepts from the documentation:
Subst <attribute> = <string>
When submitting logbook entries, attribute values can be substituted by some text. This text can contain arbitrary fixed text and following values:
- $<attribute>: The entered value of the attribute itself
- $host: The host name where
elogd is running
- $remote_host: The host name of the host from with the entry was submitted
- $short_name: The login name (if password file is present)
- $long_name: The full name from the password file for the current user
- $user_email: The email address from the password file for the current user
- $logbook: The name of the current logbook
- $date: The current date, formatted via "Date format"
- $utcdate: The current UTC date (GMT) and time, formatted via "Date format"
- $version: The version of the ELOG server in the form x.y.z
- $revision: The Subversion reversion of the ELOG server as an integer number
- $shell(<command>): <command> gets passed to the operating system shell and the result is taken for substitution.
Execute new | edit | delete = <command>
It is possible to execute a shell command on the server side after a new message has been submitted, edited or deleted. This feature has been used in the past for SMS notifications over a telephone system and for synchrnonization of the ELOG database with an external SQL database. The <command> can contain substitutions similar to the Subst command. In addition the list of all attachments can be referred to via $<attachments> . The text body of the entry can be referred to with $text . It should be noted that only the first 1500 characters of the text can be used, in order not to exceed the limits of the shell. Following (Unix) command writes a notification into some file:
Execute new = echo "New message wiht ID $message id of type $type from $long_name on $remote_host" >> /tmp/elog.log
It should be noted that this feature can impose a security problem. If someone can edit the elogd.cfg through the Config command of elogd, that person can put malicious code into elogd.cfg and execute it. This is even more severe if elogd runs with root privileges. To avoid such problems, the execute facility is disabled in elogd by default and has to be enabled explicitly with the "-x" command line flag. The administrator has to ensure then of course that only trusted people can edit elogd.cfg.
Have fun!
Andreas
Anthony Krishock wrote: |
All,
I am using elog as an observation log for amateur astronomy. I have a form configured, but I would like to know if it is possible to make certain fields persist across new entries.
What I mean is this:
When I make an new observation, I select a value for sky conditions (say.. "1"). When I make another observation, "1" is already selected.
Is this possible? If so, how?
Thanks
|
|
Field values dependent on other selections, posted by Anthony Krishock on Tue Oct 20 02:34:46 2020
|
All,
I would like to know if there is a way in elog to populate a field based on the value of another field. What I want to do is have a field with a few selections (a menu) and another text field that populates based on what I select from the menu.
Is this possible? |
Re: Field values dependent on other selections, posted by Stefan Ritt on Tue Oct 20 08:24:20 2020
|
Look in the manual under "conditional attributes"
Stefan
Anthony Krishock wrote: |
All,
I would like to know if there is a way in elog to populate a field based on the value of another field. What I want to do is have a field with a few selections (a menu) and another text field that populates based on what I select from the menu.
Is this possible?
|
|
Re: Field values dependent on other selections, posted by Anthony Krishock on Wed Oct 21 02:26:32 2020
|
Thanks for your suggestion.. Is it possible to, once
Stefan Ritt wrote: |
Look in the manual under "conditional attributes"
Stefan
Anthony Krishock wrote: |
All,
I would like to know if there is a way in elog to populate a field based on the value of another field. What I want to do is have a field with a few selections (a menu) and another text field that populates based on what I select from the menu.
Is this possible?
|
|
|
Re: Field values dependent on other selections, posted by Anthony Krishock on Wed Oct 21 02:27:43 2020
|
Thanks for your suggestion. Right now, my log is configured as follows:
Options Eyepiece = Pentax{a}, TeleVue{b}, Meade{c}
{a} Options Pentax = 5mm, 20mm, 30mm
{b} Options TeleVue = 7mm Nagler, 10mm Radian, 24mm Panoptic
{c} Options Meade = 8.8mm UWA, 14mm UWA, 26mm QX
If I select "Pentax", I would like the other two options to be unavailable. Instead, all three options are shown. Can I mask the other unused options?
Stefan Ritt wrote: |
Look in the manual under "conditional attributes"
Stefan
Anthony Krishock wrote: |
All,
I would like to know if there is a way in elog to populate a field based on the value of another field. What I want to do is have a field with a few selections (a menu) and another text field that populates based on what I select from the menu.
Is this possible?
|
|
|
Re: Field values dependent on other selections, posted by Andreas Luedeke on Fri Oct 23 15:10:54 2020
|
Instead of using three different options you could use the same:
Options Eyepiece = Pentax{a}, TeleVue{b}, Meade{c}
{a} Options Form = 5mm, 20mm, 30mm
{b} Options Form = 7mm Nagler, 10mm Radian, 24mm Panoptic
{c} Options Form = 8.8mm UWA, 14mm UWA, 26mm QX
It makes more sense.
But it is as well possible to supress attributed in the edit from. See
Show Attributes = <list>
Attributes present in this list are shown in the single entry page. Omitting attributes can make sense for attributes which are automatically derived from other attributes via the Change <attribute> command.
Show Attributes Edit = <list>
The same as Show Attributes , but for the entry form.
You just have a different <list> for each conditional case {a} {b} {c}.
Anthony Krishock wrote: |
Thanks for your suggestion. Right now, my log is configured as follows:
Options Eyepiece = Pentax{a}, TeleVue{b}, Meade{c}
{a} Options Pentax = 5mm, 20mm, 30mm
{b} Options TeleVue = 7mm Nagler, 10mm Radian, 24mm Panoptic
{c} Options Meade = 8.8mm UWA, 14mm UWA, 26mm QX
If I select "Pentax", I would like the other two options to be unavailable. Instead, all three options are shown. Can I mask the other unused options?
Stefan Ritt wrote: |
Look in the manual under "conditional attributes"
Stefan
Anthony Krishock wrote: |
All,
I would like to know if there is a way in elog to populate a field based on the value of another field. What I want to do is have a field with a few selections (a menu) and another text field that populates based on what I select from the menu.
Is this possible?
|
|
|
|
Dump screenshot to new elog entry, posted by Anthony J Krishock on Sun Dec 12 01:18:46 2021
|
Hello,
I am interested in finding a preferrably single-click way to capture a screenshot and posting it automatically to a new elog entry . I would be doing this from Windows. Is this possible?
Thanks |
|