diff options
| author | Teddy Wing | 2018-02-04 08:03:01 +0100 |
|---|---|---|
| committer | Teddy Wing | 2018-02-04 08:03:01 +0100 |
| commit | 34f0e434c6a35f21bec1d95442266986b2a4dafa (patch) | |
| tree | fcfed7db844c7c7cbab0a5f7dfbad3b77185ee46 | |
| parent | faa4d4c0831b70b5e103d0337c816db025ef8a9f (diff) | |
| download | harvester-submit-week-for-approval-34f0e434c6a35f21bec1d95442266986b2a4dafa.tar.bz2 | |
Add README
Give some background, along with installation instructions and license
information.
| -rw-r--r-- | README.md | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..fd03c0c --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +Harvester Submit Week For Approval +================================== + +This program will automatically submit this week's time sheet for approval. It +is intended to be run automatically by `launchd` or `cron`. The time sheet will +only be submitted if at least one time entry has been added for every weekday in +the week. + +By automating the time sheet submission, the program frees human time loggers +from having to remember or worry about doing so. + +This script is implemented with Selenium using Firefox's headless mode (or +another browser, if you prefer). At the time of implementation, no API exists to +submit time sheets for approval, and authenticity tokens made it difficult to +use regular HTTP requests, leaving Selenium the only remaining option. + + +## Install +1. Clone the repository +2. Install dependencies + + $ pipenv install + +3. (OS X only) Modify the + `com.teddywing.harvester-submit-week-for-approval.plist` file: + + a. Change the executable path to the virtualenv's `python3` + b. Use the absolute path to `harvester_submit_week_for_approval.py` + c. Fill in Harvest account details. A developer token can be obtained at + https://id.getharvest.com/developers + d. Put the plist in `~/Library/LaunchAgents/` + e. Load the plist with + + launchctl load /path/to/com.teddywing.harvester-submit-week-for-approval.plist + +4. Download [geckodriver][1] + + a. Replace the `geckodriver` path on [this line][2] with the absolute path + to the executable on your machine. + + +## License +Copyright © 2018 Teddy Wing. Licensed under the GNU GPLv3+ (see the included +COPYING file). + + +[1]: https://github.com/mozilla/geckodriver/releases +[2]: https://github.com/teddywing/harvester-submit-week-for-approval/blob/faa4d4c0831b70b5e103d0337c816db025ef8a9f/harvester_submit_week_for_approval.py#L209 |
