State Officials and Employees Ethics Act
This is a complete re-write from original sources, but still, would not have been possible without the examples and ideas from those who wrote before me. Kudos. I stand on the shoulders of giants.
- Python >= 3.6
- The following dependencies will be installed by setup.sh
- Grab (https://pypi.python.org/pypi/grab)
- Exchangelib (https://pypi.python.org/pypi/exchangelib/)
This tool can be used in two possible ways: Docker and Python VirtualEnv
curl -o ~/ptr_as_docker.sh https://raw.githubusercontent.com/ncsa/time_reporting/master/docker_run.sh
- Edit
~/ptr_as_docker.sh
to set evnironment variables ~/ptr_as_docker.sh
- Inside docker container
./run.sh --help
./run.sh --list-overdue
./run.sh -n --exch
./run.sh --exch
- git clone https://github.com/ncsa/time_reporting.git
- cd time_reporting
- ./setup.sh
- ./run.sh --help
OpenSSL issues
pycurl: libcurl link-time ssl backend (<library>) is different from compile-time ssl backend (<library> or "none/other")
If you get an error similar to the above, edit setup.sh
to export the specific link-time
backend specified in the error message and try again.
See also: http://stackoverflow.com/questions/21096436/ssl-backend-error-when-using-openssl
See also: http://stackoverflow.com/questions/21487278/ssl-error-installing-pycurl-after-ssl-is-set
- NETRC
- Path to a netrc formatted file
- Default: ~/.netrc
- PYEXCH_REGEX_JSON
- JSON dictionary formatted string with key NOTWORK and value regex string
- No Default. This value is required. An example is below:
export PYEXCH_REGEX_JSON='{"NOTWORK": "(sick|doctor|dr. appt|vacation|PTO|paid time off|personal day)"}'
./run.sh --help
run.sh --list-overdue
run.sh --exch -n
run.sh --exch -o
run.sh --exch
run.sh --csv /path/to/csvfile.csv -n
run.sh --csv /path/to/csvfile.csv
Netrc file should follow standard formatting rules.
- IL_PTR
- User and password to login to the SOEEA (PTR) website
- Required parameters
- login
- password
- EXCH
- Used by pyexch to access Exchange calendar
- Required parameters
- login
- for illinois.edu, format should be user@domain
- other exchange implementations may require the domain\user format
- account
- format should be user@domain
- password
- login
machine IL_PTR
login myptrusername
password myptrpassword
machine EXCH
login myexchusername@illinois.edu
password myexchpasswd
account myexchusername@illinois.edu
Regex matching is always case-insensitive.
There is no default, a value must be provided. A sample is:
PYEXCH_REGEX_JSON='{"NOTWORK":"(sick|doctor|dr. appt|vacation|OOTO|OOO|out of the office|out of office)"}'
Regex is used to match events in Exchange that represent time not worked (such as vacation, out of office, holiday, sick, etc...). Matching is always case-insensitive. The regex searches the event subject.
export PYEXCH_REGEX_JSON='{"NOTWORK":"(sick|vacation)"}'
run.sh --exch --dryrun