Usage¶
To use harvst as a library in a project:
import statsbiblioteket.harvest
Harvest command Line¶
Backups all harvest data from your harvest domain to a SQL database
usage: harvest_synch [-h] --domain HARVESTDOMAIN [--user HARVESTUSER]
[--password HARVESTPASSWORD] [--sql DBCONNECTSTRING]
[--from FROMDATE] [--to TODATE] [--logConf LOGCONFFILE]
- optional arguments
--domain The Harvest domain to backup --user The harvest user to connect as --password The harvest password. If not specified, the username and password is read from the file ~/.harvest The format of this file is “username=value password=value” --sql="sqlite:///data.db" The sql connect string (default: “sqlite:///data.db”) The string form of the URL is dialect[+driver]://user:password@host/dbname[?key=value..], where dialect is a database name such as mysql, oracle, postgresql, etc., and driver the name of a DBAPI, such as psycopg2, pyodbc, cx_oracle, etc. --from="1970-01-01" Get timesheets starting from this date, format YYYY-MM-DD (default: “1970-01-01”) --to="2017-02-13" Get timesheets until this date, format YYYY-MM-DD (default: “2017-02-13”) --logConf="/home/docs/checkouts/readthedocs.org/user_builds/python-harvest/checkouts/latest/statsbiblioteket/harvest/synch/default_log.ini" the log file (default: “/home/docs/checkouts/readthedocs.org/user_builds/python-harvest/checkouts/latest/statsbiblioteket/harvest/synch/default_log.ini”)