ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
68439
|
Mon Oct 3 10:01:53 2016 |
| Alex Kühnel | alexander.kuehnel@gmail.com | Question | Linux | 3.1.2 | Re: calculate diff of 2 date(s) | thx!
Stefan Ritt wrote: |
There is the "subst on edit = ..." option you should use in addition.
Stefan
Alex Kühnel wrote: |
is ist possible that subst only works for the initial create of a logbook entry? when I change/edit one of the parameter "Einsatzbegin" or "Einsatzende" the "Einsatzzeit" is not changed.
regards
/alex
Alex Kühnel wrote: |
I found the solution in the forum :-)
subst Einsatzzeit = $shell(/usr/local/elog/diff.sh \"$Einsatzbeginn\" \"$Einsatzende\")
and diff.sh is
#!/bin/sh
#set -x
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/60"|bc -lq)
printf "%.0f Minuten" $d
Alex Kühnel wrote: |
hi
I have an elogsystem for documenting emergency services. I have a starttime and an endtime. Is it possible to calculate the diff between the 2 timestamps and convert it to minutes?
Attributes = Bereitschafts Kalender Woche, Bereitschafts Woche, Einsatzbeginn, Einsatzende, Einsatzzeit, Telefon Nummer, Station, Status, Problem
Options Status= Offen{1}, Erledigt{2}, Geschlossen{3}
......
Type Einsatzbeginn = datetime
Type Einsatzende = datetime
....
Subst Einsatzzeit = $shell(Einsatzende - Einsatzbeginn)
regards
/alex
|
|
|
|
|
Draft
|
Mon Feb 6 15:59:04 2017 |
| sohail bhatti | sohail_bhatti@yahoo.com | Request | Windows | 3.1.2 | Re: calculate diff of 2 date(s) |
Alex Kühnel wrote: |
thx!
Stefan Ritt wrote: |
There is the "subst on edit = ..." option you should use in addition.
Stefan
Alex Kühnel wrote: |
is ist possible that subst only works for the initial create of a logbook entry? when I
change/edit one of the parameter "Einsatzbegin" or "Einsatzende" the "Einsatzzeit" is not changed.
regards
/alex
Alex Kühnel wrote: |
I found the solution in the forum :-)
subst Einsatzzeit = $shell(/usr/local/elog/diff.sh \"$Einsatzbeginn\"
\"$Einsatzende\")
and diff.sh is
#!/bin/sh
#set -x
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/60"|bc -lq)
printf "%.0f Minuten" $d
Alex Kühnel wrote: |
hi
I have an elogsystem for documenting emergency services. I have a
starttime and an endtime. Is it possible to calculate the diff between the 2 timestamps and convert it to minutes?
Attributes = Bereitschafts Kalender Woche, Bereitschafts Woche,
Einsatzbeginn, Einsatzende, Einsatzzeit, Telefon Nummer, Station, Status, Problem
Options Status= Offen{1}, Erledigt{2}, Geschlossen{3}
......
Type Einsatzbeginn = datetime
Type Einsatzende = datetime
....
Subst Einsatzzeit = $shell(Einsatzende - Einsatzbeginn)
regards
/alex
|
|
|
|
|
 |
69168
|
Mon Jul 6 20:19:21 2020 |
| Laurent Jean-Rigaud | lollspam@free.fr | Bug report | Linux | 3.1.4 | Re: bug in elog.spec | Hi,
You rights, CFLAGS should not be in specfile to take care of distrib env.
Btw, I sent in the past an update for build process of Stefan delivery to generate src.rpm file copatible to tarball version. I think Stefan did not have time yet to test and to check.
With the enclosed SPEC file, you can build ELOG with options at rpmbulld command w/o modifying sources. For exemple,
rpm -i elog-.....src.rpm
rpmbuild -bb --with ssl --with pam --with ldap --with krb5 ~/rpmbuild/SPECS/elog.spec
I enclosed also the SRPMS i used for my projects. Be careful, It's maybe not uptodate of last GIT version or PSI releases... but you can test it on your RPM distrib. It should be nice to hare your feedback.
Bye,
Laurent
Janusz Szuba wrote: |
Hi,
in commit 1812e7c, specifying CFLAGS to make command in elog.spec, renders all other settings in Makefile void. That is, if I want to include any of KRB5, LDAP, PAM support, and change makefile accordingly, then when producing rpm they are not taken into account. Anyway, CFLAGS in Makefile are already set to the same defaults, so why it is redefined in spec file?
best
Janusz
|
|
Attachment 1: elog.spec
|
# ELOG weblog application
# rpmbuild -ba --define 'elogver 3.1.4' --define 'elogrel 2' --with ssl --with pam --with ldap --with krb5 --define 'factorydate date'
# define date of build for changelog and default release
%define build_timestamp %(LC_TIME=C date '+%a %b %d %Y')
%{!?factorydate: %define factorydate %build_timestamp}
# default version and release
%{!?elogver: %define elogver 3.1.4 }
%{!?elogrel: %define elogrel 2 }
# default release is build date
%{!?elogrel: %define elogrel %{build_timestamp} }
# Build options :
# Read: If neither macro exists, then add the default definition.
%{?_with_krb5: %define _with_krb5 USEKRB5=1}
%{?_with_ldap: %define _with_ldap USELDAP=1}
%{?_with_pam: %define _with_pam USEPAM=1}
%{?_with_ssl: %define _with_ssl USESSL=1}
# Default build options are with SSL
%{!?_with_ssl: %{!?_without_ssl: %define _with_ssl USESSL=1}}
# builder info
%define whoami %(eval who am i | awk '{print $1}')
%define HOSTNAME %(hostname)
%{!?packager: %define packager %{whoami} %{whoami}@%{HOSTNAME}}
Name: elog
Summary: elog is a standalone electronic web logbook
Version: %elogver
Release: %elogrel%{?customrel}%{?dist}
License: GPL
Group: Applications/Networking
Source: http://elog.psi.ch/elog/download/elog-%{elogver}-%{elogrel}.tar.gz
Vendor: Stefan Ritt <stefan.ritt@psi.ch>
URL: http://elog.psi.ch/elog
BuildRoot: /tmp/%{name}-root
Prefix: /usr/local
# Add build dependencies for pam, ssl and ldap features if enabled.
# Note: Tag tokens must start at beginning-of-line.
#
# Read: If feature is enabled, then add the build dependency.
%{?_with_krb5:BuildRequires: krb5-devel}
%{?_with_krb5:Requires: krb5-libs}
%{?_with_ldap:BuildRequires: openldap-devel >= 2.4.1}
%{?_with_ldap:Requires: openldap >= 2.4.1}
%{?_with_pam:BuildRequires: pam-devel >= 1.1.1}
%{?_with_ssl:BuildRequires: openssl-devel >= 0.9.8e}
# GAIAOPS: set max N limit to 500
Patch1: elog_set_max_list_500.patch
%description
ELOG is part of a family of applications known as weblogs.
Their general purpose is :
1. To make it easy for people to put information online in a chronological
fashion, in the form of short, time-stamped text messages ("entries")
with optional HTML markup for presentation, and optional file attachments
(images, archives, etc.)
2. To make it easy for other people to access this information through a
Web interface, browse entries, search, download files, and optionally add,
update, delete or comment on entries.
ELOG is a remarkable implementation of a weblog in at least two respects :
- Its simplicity of use: you don't need to be a seasoned server operator
and/or an experimented database administrator to run ELOG ; one executable
file (under Unix or Windows), a simple configuration text file, and it works.
No Web server or relational database required. It is also easy to translate
the interface to the appropriate language for your users.
- Its versatility: through its single configuration file, ELOG can be made
to display an infinity of variants of the weblog concept. There are options
for what to display, how to display it, what commands are available and to whom,
access control, etc. Moreover, a single server can host several weblogs, and
each weblog can be totally different from the rest.
%changelog
* %{build_timestamp} %{packager} %{version}-%{release}
- rebuild with option(s): %{?_with_krb5:KRB5 }%{?_with_ldap:LDAP }%{?_with_pam:PAM }%{?_with_ssl:SSL}
- set MAX_N_LIST to 500 (patch1)
* %{factorydate} Stefan Ritt <stefan.ritt@psi.ch> %{version}-%{release}
- Updated from git
* Wed Sep 26 2018 Stefan Ritt <stefan.ritt@psi.ch>
- Made adjustments for new elog server and RH7
* Fri Aug 29 2014 Stefan Ritt <stefan.ritt@psi.ch>
- Added BuildRequires, thanks to Stefan Roiser from CERN
* Fri Oct 21 2005 Stefan Ritt <stefan.ritt@psi.ch>
- Added resources/ directory
* Fri Mar 14 2003 Stefan Ritt <stefan.ritt@psi.ch>
- Added %post to change ownership of elog files
* Thu Jan 30 2003 Stefan Ritt <stefan.ritt@psi.ch>
- Added installation of man pages, thanks to Serge Droz <serge.droz@psi.ch>
* Tue Aug 13 2002 Stefan Ritt <stefan.ritt@psi.ch>
- Added elog group and user, thanks to Nicolas Chuche [nchuche@teaser.fr]
* Tue Jun 18 2002 Stefan Ritt <stefan.ritt@psi.ch>
- Put elogd.init into TAR file, add logbooks directory, put elogd in sbin/
* Tue Jun 18 2002 Serge Droz <serge.droz@psi.ch>
- Update to 2.0.0
* Mon Jun 3 2002 Serge Droz <serge.droz@psi.ch>
- Update to 1.3.6
* Fri May 31 2002 Serge Droz <serge.droz@psi.ch>
- Initial RPM
%prep
%setup -q
%patch1 -p0
%pre
%{_sbindir}/groupadd -r elog 2>/dev/null || :
%{_sbindir}/useradd -d / -s /bin/false \
-g elog -M -r elog 2>/dev/null || :
%build
make %{?_with_ssl} %{?_with_pam} %{?_with_ldap} %{?_with_krb5} CFLAGS='-O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -g'
sed "s#\@PREFIX\@#%{prefix}#g" elogd.init_template > elogd.init
%install
make install ROOT=$RPM_BUILD_ROOT MANDIR=$RPM_BUILD_ROOT%{_mandir}
%post
chown -R elog:elog $RPM_BUILD_ROOT%{prefix}/elog
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/etc/rc.d/init.d/elogd
%{_mandir}/man1/*
%{_mandir}/man8/*
%doc README COPYING doc
%defattr(-,elog,elog)
%prefix/bin/*
%prefix/sbin/elogd
%prefix/elog/resources
%prefix/elog/ssl
%prefix/elog/themes
%prefix/elog/scripts
%prefix/elog/logbooks
%config(noreplace) %prefix/elog/elogd.cfg
|
Attachment 2: elog-3.1.4-2.CNES.el6.src.rpm
|
69169
|
Tue Jul 7 11:22:45 2020 |
| Janusz Szuba | janusz.szuba@xfel.eu | Bug report | Linux | 3.1.4 | Re: bug in elog.spec | Thanks for the answer, I will try with your specfile
best
Janusz
Laurent Jean-Rigaud wrote: |
Hi,
You rights, CFLAGS should not be in specfile to take care of distrib env.
Btw, I sent in the past an update for build process of Stefan delivery to generate src.rpm file copatible to tarball version. I think Stefan did not have time yet to test and to check.
With the enclosed SPEC file, you can build ELOG with options at rpmbulld command w/o modifying sources. For exemple,
rpm -i elog-.....src.rpm
rpmbuild -bb --with ssl --with pam --with ldap --with krb5 ~/rpmbuild/SPECS/elog.spec
I enclosed also the SRPMS i used for my projects. Be careful, It's maybe not uptodate of last GIT version or PSI releases... but you can test it on your RPM distrib. It should be nice to hare your feedback.
Bye,
Laurent
Janusz Szuba wrote: |
Hi,
in commit 1812e7c, specifying CFLAGS to make command in elog.spec, renders all other settings in Makefile void. That is, if I want to include any of KRB5, LDAP, PAM support, and change makefile accordingly, then when producing rpm they are not taken into account. Anyway, CFLAGS in Makefile are already set to the same defaults, so why it is redefined in spec file?
best
Janusz
|
|
|
354
|
Fri May 23 09:12:16 2003 |
| Etienne Van Caillie | etienne.vancaillie@mba.be | Bug report | | | Re: bug in cfg file | > Hello Folks,
>
> Found an interesting problem with 2.3.7 under redhat 9.0 linux.
>
> When you take the elogd.cfg file and the menu commands = <list> and guest
> menu commands = <list>, the config menu for edit the elogd.cfg stops
are you logged
if you have a guest menu there is no access in the admin
access is restricted with
Admin user = 'your login name'
in Global section
> working, yet if I change the URL manually, I can still get to the file
and
> the menus do not change. If I delete all menu commands, then all works
> without errors, yet the menus do not match default.
>
> Also, the self registration function equal to 3 does not always send
email.
it is send to the admin user list
be sure that smtp parameter is ok
>
> Cheers,
> Roberto |
361
|
Tue Jun 3 20:49:27 2003 |
| Stefan Ritt | stefan.ritt@psi.ch | Bug report | | | Re: bug in cfg file | > When you take the elogd.cfg file and the menu commands = <list> and guest
> menu commands = <list>, the config menu for edit the elogd.cfg stops
> working, yet if I change the URL manually, I can still get to the file and
> the menus do not change. If I delete all menu commands, then all works
> without errors, yet the menus do not match default.
There was a recent bug which made "Edit elog.cfg" stop working if the
language is not English. This has been fixed and the update is in CVS. If
you use English, this might be another problem. Can you send me your
complete elogd.cfg so I can try to reproduce your problem?
> Also, the self registration function equal to 3 does not always send email.
"Not always" is hard to understand. Either it works or it does not for a
certain configuration. What you can do is start elogd with the "-v" flag,
which outputs all communication to the console window. Among this
information, you have the communication with the SMTP server when sending an
email. Maybe you see some problem there which only sometimes occurs (like
wrong email addresses or so...) |
368
|
Wed Jun 4 15:26:15 2003 |
| Stefan Ritt | stefan.ritt@psi.ch | Bug report | | 2.3.8 | Re: bug in cfg file | > When you take the elogd.cfg file and the menu commands = <list> and guest
> menu commands = <list>, the config menu for edit the elogd.cfg stops
> working, yet if I change the URL manually, I can still get to the file and
> the menus do not change. If I delete all menu commands, then all works
> without errors, yet the menus do not match default.
Has just been fixed. Available under CVS and soon in 2.3.8. |
65913
|
Fri Jun 27 11:45:09 2008 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 2.7.4 | Re: browse for hyperlink target? |
George Chisholm wrote: |
Just upgraded to v2.7.4 and really like the new editor but I need to be able to browse for the correct file when inserting a hyperlink. I looked into CKfinder but can't see how to use this with ELOG. Can anyone help? We have been using ELOG in our control center for about a year and it is working out great!
|
CKfinder is a tool to browse the server, not the client where the web browser is running if I understand correctly. ELOG only supports attachment and inline images residing on the client side, so you browse with the file selector of your web browser. Or did I understand you incorrectly? |
|