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] [--logLevel LOGLEVEL]
                     [--logFile LOGFILE]
Options:
--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, in the format “username=password”
--sql=sqlite:///data.db
 The sql connect string (default: %(default)s) 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: %(default)s)
--to=2016-01-08
 Get timesheets until this date, format YYYY-MM-DD (default: %(default)s)
--logLevel=DEBUG
 the log level (default: %(default)s)
--logFile=/home/abr/Projects/python-harvest/statsbiblioteket/harvest/synch/default_log.ini
 the log file (default: %(default)s)