Our reporting workflow for Eawag publications in 2016
This is collection of tools used for the reporting of Eawag publications in 2016. The code and workflow are obsolete, insofar as the reporting will be done through our Islandora-based institutional repository DORA Eawag in the future. We placed them here so that parts can more easily be recycled.
NOTE: This repository will not be maintained!
THIS IS SERIOUSLY OUTDATED WORK!!! AT THE BEGINNING OF 2017, IT SEEMED TO HAVE DONE ITS JOB FOR US, BUT IT IS NOT ALWAYS CODED IN THE CORRECT WAY. DUE TO A SYSTEM CHANGE, THIS EVALUATION CODE WAS TO BE USED ONLY ONCE, AND IT WILL NOT EVER BE UPDATED. YOU SHOULD PROBABLY NOT USE THIS CODE YOURSELF, AS IT MIGHT NOT WORK FOR YOU OR EVEN BREAK YOUR SYSTEM (SEE ALSO 'LICENSE'). UNDER NO CIRCUMSTANCES WHATSOEVER ARE WE TO BE HELD LIABLE FOR ANYTHING. YOU HAVE BEEN WARNED.
This software was successfully run on x86_64 GNU/Linux using
python
(2.7.9)- the following additional packages from the repositories:
iconv
python-pip
zip
unzip
- the following python packages (install with
pip install
packagedocx
- possibly other tools not present in a default installation
It is assumed, that all the scripts are placed together with the data in one working directory.
- Create a working directory.
- Place all the scripts in the
scripts
subfolder in this working directory. - (IMPORTANT) In
scripts/dora_lookup.py
, replace "localhost
" in the definition ofbase_url
by the server running DORA's Solr instance. - Follow the instructions in
doc/2016_EawagReporting_MiniHowTo.md
.
If the instructions in doc/2016_EawagReporting_MiniHowTo.md
are followed, the subdirectory 2016_reports
will contain a series of docx
and txt
files. Of each type, there will be one for each organisational unit, in addition to one containing the full list for Eawag (*ALL*
). The txt
files are tab separated lists, whereas each of the docx
files contains a list of citations that can be assessed by the people responsible for the corresponding unit.
Note: Most scripts will accept the -h
switch for short usage help.
The file is such that the repository only contains the generic files, as well as itself. Specifically, it contains
/*
!/doc/
/doc/*
!/scripts/
/scripts/*
!/templates/
/templates/*
!/.gitignore
!/LICENSE
!/README.md
!/doc/2016_EawagReporting_MiniHowTo.md
!/scripts/amend_docx_styles.sh
!/scripts/compare_old_and_new.py
!/scripts/dora_lookup.py
!/scripts/make_2016.sh
!/scripts/nuke_newlines.sed
!/scripts/prepare_reports.py
!/scripts/preprocess_exports.sh
!/templates/ArticlesTemplate_IF.xlsx
The license under which the toolchain is distributed:
Copyright (c) 2016, 2017 d-r-p (Lib4RI) <[email protected]>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
This file...
The documentation of the workflow.
Changes the styles for hyperlinks inside the resulting docx
files.
Compares this year's data to last year's data (it's logic partially stems from the reporting 2015 having been done differently), then try to alert inconsistencies.
Fetches the DORA PID from the RefWorks ID. Processes a tab delimited file with first column the RefID. Returns the same file, but with a column containing the DORA PID, inserted after the first column.
NOTE: It is absolutely indispensable to adjust the base_url
variable, replacing "localhost
" with the Solr server that is to be queried!
Crude script that runs the whole workflow. Assumes all files are named as in doc/2016_EawagReporting_MiniHowTo.md
, and does not perform any check in this regard.
Removes newlines inside fields of tab separated data, as well as empty lines. Note that this could have been avoided with proper quoting.
Prepares the reports from pre-processed data.
Converts the raw data into a usable format.
A template to be filled with tab separated output data ("Raw Data" tab). In the "Reporting" tab, the most important information is re-displayed.
This document is Copyright © 2017 by d-r-p (Lib4RI)
<[email protected]>
and licensed under CC BY 4.0.