Skip to content

mboskamp/addison-oneclick-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ADDISON OneClick payslip downloader

This tool uses Selenium and Python to download the latest payslip from ADDISON OneClick.

It works by using starting a Google Chrome instance through Selenium and automatically navigating through the page to find the last payslip.

Prerequisites

How to use it?

  1. In properties.ini, provide login credentials and output directory.
  2. Run python downloader.py from a command line or terminal.
  3. The script downloads the latest payslip for the last month and copies it into the configured output directory.

Configuration

You can configure the script using the properties.ini file. The following properties are supported

category property name type required default description
login url string yes - The URL to ADDISON OneClick
login client_number string yes - The client number for the login form
login username string yes - The username for the login form
login password string yes - The password for the login form
file rename bool no True The script can rename the downloaded payslip file.
See file.file_destination for details.
file search_period string yes '7' There are two filter options available. The script will download all available documents within the filter period. By default, all documents from the last 7 days are downloaded. Available options:
  • 7 (one week)
  • 31 (one month)
file file_destination string yes - The script can parse the original file name and use the encoded information to format the file following a user-defined pattern.
To define a pattern, use placeholders and format codes A placeholder needs to be surrounded by curly brackets ({}) and directly followed by a set of format codes.You can use the following placeholders:
  • accounting_period
  • create_date
The following example will move the file to something like ~output/2023/09/09 September (20231005).pdf (depending on the original file):
file_destination = ~/output/{accounting_period%Y}/{accounting_period%m} {accounting_period%B} ({create_date%Y%m%d}).pdf
settings wait_timeout int no 10 Amount of seconds to wait for a web component to render
settings download_timeout int no 10 Amount of seconds to wait for the download to finish.
settings headless bool no True When set to True the browser used to automate the download is hidden. Setting this to False will show all browser interaction.
debug dry_run bool no False Set this to True if you want to run the script right up to the download page but skip the actual download
debug logging_enabled bool no True When enabled, log output from the script will be written to the logs folder
debug log_level string no INFO Set the log level the scripts logger. Valid options are:
  • CRITICAL
  • ERROR
  • WARNING
  • INFO
  • DEBUG
debug selenium_logging_enabled bool no False When enabled, log output from Selenium will be written to the logs folder
debug selenium_log_level string no DEBUG Set the log level the selenium logger. Valid options are:
  • CRITICAL
  • ERROR
  • WARNING
  • INFO
  • DEBUG
debug log_folder string no logs The output folder for log files

Example configuration

[login]
url = https://url-to-one-click.com
client_number = 42
username = MyUser
password = MyPassword
[file]
file_destination = ~/output/{accounting_period%Y}/{accounting_period%m} {accounting_period%B} ({create_date%Y%m%d}).pdf

About

Python script to download documents from Addison OneClick using Selenium and Chrome.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages