#!/bin/sh
GIT_URL="http://git.auf.org/?p=progfou.git;a=blob_plain;f=wcs/"
-SCRIPTS="update-wcs-scripts wcs-extract wcs-extract-all"
-[ "`id -un`" = "root" ] && cd /usr/local/sbin
-for script in $SCRIPTS ; do
- if wget -q -O "tmp.${script}" "${GIT_URL}$script" ; then
- if ! cmp -s "tmp.${script}" "${script}" ; then
- echo "Mise à jour de '${script}'..."
- cat "tmp.${script}" > "${script}"
+update_script() {
+ url="$1" ; shift
+ dir="$2" ; shift
+ scripts="$@"
+ [ "`id -un`" = "root" ] && cd "${dir}"
+ for script in ${scripts} ; do
+ if wget -q -O "tmp.${script}" "${url}${script}" ; then
+ if ! cmp -s "tmp.${script}" "${script}" ; then
+ echo "Mise à jour de '${script}'..."
+ cat "tmp.${script}" > "${script}"
+ fi
+ else
+ echo "Script '${script}' indisponible !?"
fi
- else
- echo "Script '${script}' indisponible !?"
- fi
- rm -f "tmp.${script}"
-done
+ rm -f "tmp.${script}"
+ done
+}
+
+update_script "$GIT_URL" /usr/local/sbin update-wcs-scripts wcs-extract wcs-extract-all
+update_script "$GIT_URL" /usr/local/lib list2form.py wcs-dynexport
" On ignore...", object.id)
continue
+ try:
+ workflow_status = object.status.startswith('wf-') and \
+ object.get_workflow_status().name or None
+ except:
+ workflow_status = None
+
result = {
'num_dossier': object.id,
'wcs_status': object.status,
- 'wcs_workflow_status': (object.status.startswith('wf-') and \
- object.get_workflow_status().name or None),
+ 'wcs_workflow_status': workflow_status,
'wcs_user_email': object.user.email,
'wcs_user_display_name': object.user.display_name,
#'wcs_last_modified': time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(object.last_modified())),