WebSubmit: file stamper option to copy metadata

* Introduces the "--skip-metadata" option to the file stamper.
  If enabled, the file stamper will not copy the PDF metadata from the input
  file to the (stamped) output file. Otherwise, the file stamper will attempt
  to copy all PDF metadata.  (closes #1569)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Acked-by: Tibor Simko <tibor.simko@cern.ch>
WebSession: Python-2.4 combatibility issue fix

* In Python-2.4 tuples don't have the index attribute. Converting a tuple to a
  list will provide that attribute.

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
installation: README.rst with build status badges

* Adds new documentation file README.rst which is essentially
  identical to README, plus contains extra links to Travis build
  status badges, bringing them onto the GitHub home page.

  This is done because apparently GitHub only recognises file
  formats by extensions, so badges cannot be easily introduced
  into plain README files (that we still keep as per GNU autotools
  practices).

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
installation: GnuPG key server location update

* Updates location from where to get the GnuPG keys; the old
  location was not working anymore since quite a while.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-1.0' into maint-1.1

* maint-1.0:
  installation: GnuPG key server location update
  installation: README.rst with build status badges

* Merge note: amended README.rst badge to use maint-1.1.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-1.1'

* maint-1.1:
  installation: GnuPG key server location update
  installation: README.rst with build status badges
  WebSession: Python-2.4 combatibility issue fix
  WebSubmit: file stamper option to copy metadata

* Merge note: amended README.rst badge to use master,
  and removed Python-2.4 compatibiity fix that is not
  needed since master requires Python-2.6 at least.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
textutils: translate_to_ascii() unknown chars fix

* translate_to_ascii() checks the characters one by one in order to
  make sure unrecognized values are ignored ("" instead of
  printing "[?]").  (closes #1754)

* Adds unit test for this case.

Signed-off-by: Federico Poli <federico.poli@cern.ch>
Tested-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebSearch: faster collection children cache

* Improves performace for collection children cache
  by minimizing the number of database calls.  (closes #1739)

Signed-off-by: Ludmila Marian <ludmila.marian@gmail.com>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebMessage: English corrections in output messages

* Fixes English in output messages.  (closes #1849)

Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
BibFormat: plot file identification improvements

* Identify (and hide) "Plots" on the basis of their doctype,
  not based on file extension or caption. (closes #1514)

* Some CERN-specific handling of the files for the display.

Signed-off-by: Jerome Caffaro <jerome.caffaro@cern.ch>
Reviewed-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
WebStyle: fix gotoadmin CLI parmeters parsing

* Fixed parsing of gotoadmin CLI '--json-parameters' and
  '--parameter' options. (closes #1427)

Co-authored-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reviewed-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
testutils: wait for element to be displayed/hidden

* Adds methods 'wait_element_displayed_with_timeout' and
  'wait_element_hidden_with_timeout' to wait for an element to
  be displayed, or hidden, before proceeding.

Tested-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
WebSubmit: DEMOART uses bibdocfile_managedocfile

* Use bibdocfile_managedocfile interface (in response element
  DEMOART_FILE) to upload files in DEMOART submission, instead
  of file upload field + FFT.

Tested-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
WebSubmit: web tests for DEMOART and DEMOPIC

* Test file upload within the DEMOART (SBI) submission, using
  the bibdocfile_managedocfile interface in asynchronous mode.

* Test file upload within DEMOPIC (SRV) submission, using the
  WebSubmit Create_Upload_Files_Interface.py function.

Tested-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
BibDocFile: new web tests

* Test addition, revision and deletion of files via
  the BibDocFile web interface.

Acked-by: Tibor Simko <tibor.simko@cern.ch>
WebSubmit: rotate created icons according to EXIF

* When creating icons, rotate the created icons according to
  the Exif "Orientation" metadata of the original photo. (closes #1516)

Signed-off-by: Jerome Caffaro <jerome.caffaro@cern.ch>
Reviewed-by: Ludmila Marian <ludmila.marian@gmail.com>
WebSearch: anyfield in CFG_WEBSEARCH_SYNONYM_KBRS

* CFG_WEBSEARCH_SYNONYM_KBRS can use the keyword 'anyfield' to
  match a given knowledge base when searching without a particular
  field. (closes #1493)

Signed-off-by: Jerome Caffaro <jerome.caffaro@cern.ch>
Reviewed-by: Ludmila Marian <ludmila.marian@cern.ch>
WebSubmit: guests support improved in /direct URL

* When accessing a /submit/direct URL as guest user, check
  if access is granted. If not, ask the user to log in
  prior to redirecting to the submission interface (and avoid
  an 'access denied' message). (closes #1240)

Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Signed-off-by: Ludmila Marian <ludmila.marian@gmail.com>
WebSearch: resolve (internal) DOIs

* When accessing "CFG_SITE_URL/doi/foo/bar", try to resolve 'foo/bar'
  as DOI and return corresponding record (0247__a:'foo/bar'). In this
  initial release the 'source' field (0247__2:doi) is not considered.
  (closes #1322)

Signed-off-by: Jerome Caffaro <jerome.caffaro@cern.ch>
Reviewed-by: Ludmila Marian <ludmila.marian@gmail.com>
BibFormat: new bfe_date parsing/formatting options

* Adds parameters to customize the parsing of the date (format,
  source).
  Source format can also be guessed provided that mx.DateTime
  module is installed.

* Special output of year-only dates.

Signed-off-by: Jerome Caffaro <jerome.caffaro@cern.ch>
Tested-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>