BibKnowledge: lxml port get_kbt_items_for_bibedit

* Replaces usage of `libxml2` and `libxslt` with `lxml` in
  `get_kbt_items_for_bibedit` function.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
BibKnowledge: fix get_kbt_items_for_bibedit

* Uses either libxml2 or lxml depending on which library is present.
  (closes #1879) (closes #1895)

Signed-off-by: Yoan Blanc <yoan.blanc@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
installation: lxml recommended

* Recommends lxml now that libxml2 and libxslt1 are fully optional.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
MiscUtil: detect Apache version
Drone: add .drone.yml

* Adds `.drone.yml` for Drone continuous integration.

Signed-off-by: Federico Poli <federico.poli@cern.ch>
Co-authored-by: Alessio Deiana <alessio.deiana@cern.ch>
Merge pull request #76 from fpoli/prod-drone

Drone CI and Updating BibKnowledge to use lxml
BibSched: email-logs-on-error parameter

* Adds a new parameter `email-logs-on-error` available to all BibTasks
  that allows you to activate an e-mail alert to task submitter
  if the task should fail (and only if it fails). E-mail alerts for
  successful tasks are still available through the `email-logs-to`
  option.

* Improves the readability of the standard e-mails sent with
  `--email-logs-on-error` or `--email-logs-to` options.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
BibEdit: only notifications on error

* Uses the new parameter available in BibTask to *only* send e-mail
  alerts if the upload task fails.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
BibEditMulti: only notifications on error

* Uses the new parameter available in BibTask to *only* send e-mail
  alerts if the upload task fails.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Merge pull request #78 from jalavik/bibtask-better-emails

Better e-mail notifications on BibEdit, BibEditMulti
BibAuthorID: concurrency tolerance with bibupload

* Skip records that have been modified by bibupload and not process
  by rabbit yet.
  They will processed next time.
Merge pull request #85 from Osso/bibauthorid-affiliations-cleanup

BibAuthorID: concurrency tolerance with bibupload
general: no INSERT delayed usage

* No longer uses INSERT DELAYED, since, beginning with MySQL 5.5.7,
  INSERT DELAYED is always handled as a simple INSERT (that is,
  without the DELAYED option) whenever the value of binlog_format is
  STATEMENT or MIXED. (In the latter case, the statement no longer
  triggers a switch to row-based logging, and so is logged using the
  statement-based format.)
  (closes #2268)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reported-by: Thorsten Schwander <thorsten.schwander@gmail.com>
Merge pull request #94 from kaplun/2268-no-insert-delayed-prod

general: no INSERT delayed usage
BibCheck: properly reset last_run timestamp

* When using the -a/--all CLI parameter of BibCheck,
  actually performs to reset of the last_run timestamp
  only upon execution of the bibtask and not when it is
  scheduled.

* Improves bibtask verbosity.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibUpload: ingestion_date and creation_date

* Introduces new ingestion_date column to bibrec table, allowing
  independently keeping track of the time when a record is first
  ingested into the repository, from the bibliographic creation date
  that could be used to properly sort the record according to its
  corresponding document date.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>

Conflicts:
	modules/bibupload/lib/bibupload.py
	modules/miscutil/sql/tabcreate.sql
WebSearch: new dateingested logical field

* Introduces new dateingested logical field in the search engine
  syntax, corresponding to bibrec.ingestion_date.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>

Conflicts:
	modules/miscutil/sql/tabfill.sql
	modules/websearch/lib/search_engine_query_parser.py
BibCheck: new creation_date check

* Exploits the BibCheck infrastructure to backdate the creation date of
  a record based on the actual content of its metadata. In this way
  tools such as BibSort will be able to properly sort records according
  to their real creation.
  (closes #1719) (closes #1604)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>

Conflicts:
	modules/bibcheck/lib/plugins/creation_date.py
BibSort: creation date and ingestion order

* Introduces proper sorting by creation date, exploiting
  new bibcheck plugin introduced in previous commit and
  consequently backward compatible "ingestion order"
  sorting.
  (pr #2123)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>

Conflicts:
	modules/miscutil/lib/inveniocfg.py
	modules/websearch/lib/websearch_regression_tests.py
Merge pull request #75 from kaplun/bibsort-on-prod

Bibsort on prod