Giter Site home page Giter Site logo

procon-webbot's Introduction

procon-webbot

Webbot for entering timesheets from CSV to ProCon using Selenium written in Python.

Limitations

At the moment it is possible to enter a timesheet for the current month, only. Furthermore it is not possible to divide the hours into several units. The working time is copied to a fixed unit.

Only Firefox is supported.

Prerequisites

Webdriver for Selenium

Download geckodriver and install it for your operating system.

Python packages

pip install -r requirements.txt

Certificate database

If your company is unable to provide a complete certificate chain, you may need to provide intermediate certificates yourself. All certificates from the certs subdirectory are put into a nss database which is used by Firefox then:

./create_cert_db.sh

Usage

Username and password have to be set via environment variables, e. g.

export PROCON_USERNAME=hartarbeiterhar
export PROCON_PASSWORD=ja3kqfJRd2gW

All other parameter can be set via environment variables or command line arguments:

Environment variable Command line argument Description Default
PROCON_URL --url Base URL of ProCon
PROCON_COST_CENTER --costcenter Name of costcenter as displayed in ProCon
PROCON_COLUMN_NAME_DATE --column-name-date Name of date column in CSV file
PROCON_COLUMN_NAME_START --column-name-start Name of start column in CSV file
PROCON_COLUMN_NAME_END --column-name-end Name of end column in CSV file
PROCON_COLUMN_NAME_PAUSE --column-name-pause Name of pause column in CSV file
PROCON_CSV_FORMAT_DATE --csv-format-date Name of pause column in CSV file %d.%m.%Y
PROCON_CSV_FORMAT_TIME --csv-format-time Name of pause column in CSV file %H:%M
PROCON_CSV_DELIMITER --csv-delimiter Name of pause column in CSV file ;
PROCON_CSV_QUOTE_CHAR --csv-quote-char Name of pause column in CSV file "

For example:

export PROCON_URL=https://procon.goetterbote.de/
export PROCON_COST_CENTER="123 SK0815 Migration to Cloud"

Imagine you have a CSV file with the following content:

Datum;Tag;Ein;Aus;Pause;Total;Total (dezimal)
01.03.2021;Mo;08:00;17:00;01:00;08:00;08.00

Then you would set in addition:

export PROCON_COLUMN_NAME_DATE="Datum"
export PROCON_COLUMN_NAME_START="Ein"
export PROCON_COLUMN_NAME_END="Aus"
export PROCON_COLUMN_NAME_PAUSE="Pause"

Finally you can execute the webbot:

./procon-webbot.py timesheet.csv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.