Package: toggl2pl
toggl2plPython module and tool to simplify time entries export fromTogglintoPL(Project Laboratory).RequirementsUsageInstallationProductionPrecompiled binariesUsing PIPDevelopmentCommand line interfaceConfigurationExamplesSimpleRoundingCustom dateFunctionalCore functionalFeaturesRoadmapInternalsSupported APIsBuild applicationRequirementsThe module is written in pure Python and its work verified with Python>= 3.5.As far as there are no low-level system calls (at least now) the module should
be platform independent, i.e. work on any platform where Python is available.Python2.7(and older) support is not planned since Python2.7will not be
maintained past January 1, 2020.UsageInstallationProductionPrecompiled binariesFor end users the preferable way to install application is to use executable files
statically compiled for Linux and Windows platforms, packaged using ZIP and signed
with GPG key.Example installation steps to execute on Linux:exportTOGGL2PL_VERSION="1.0.6"wgethttps://github.com/pa-yourserveradmin-com/toggl2pl/releases/download/v${TOGGL2PL_VERSION}/toggl2pl-${TOGGL2PL_VERSION}-linux-amd64.zip
unziptoggl2pl-${TOGGL2PL_VERSION}-linux-amd64.zip
install-v-Dtoggl2pl~/.local/bin/toggl2pl

rm-fvtoggl2pl-${TOGGL2PL_VERSION}-linux-amd64.ziptoggl2plVerify application work with your Linux distribution:toggl2pl--helpUsing PIPIn case you need to install the application as a Python module (for example, you
want to use its API in your new awesome module or application), the simplest way
is to usepip:pipinstalltoggl2plDevelopmentObtain the package sources and change working directory to the root of project.
For example, clone the project using Git:gitclonehttps://github.com/pa-yourserveradmin-com/toggl2pl.gitcdtoggl2plThe Pythonvirtualenvmodule is recommended to start using the package in
development mode, i.e. without module installation into the system. Please, seevirtualenvpackage installation instructions for some common used operating
systems below.Fedora 29:sudodnf--assumeyesinstallpython-virtualenvpython3-virtualenvUbuntu 18:sudoapt--assume-yesinstallpython-virtualenvpython3-virtualenvOnce thevirtualenvpackage is installed, just create a new Python virtual
environment anywhere you want. The example below assumes virtual environment is
deployed into the root of the cloned project repository:virtualenvvenvsourcevenv/bin/activate
pipinstall--requirementrequirements.txtIn case if no issues with Python virtual environment setup, now you should be
able to try using the module. In order to check environment, just execute the next
CLI commands:cp-avscripts/toggl2pltoggl2pl.py
./toggl2pl.py--helpIn the output you will see usage instructions and some CLI arguments descriptions.In order to interact with time trackers some additional configuration is needed,
please proceed withConfigurationparagraph to start using the
module in command line mode.Command line interfaceConfigurationBy default CLI uses configuration file stored as~/.toggl2pl/config.yml. Please
execute the next commands to installconfig.yml.exampleas
the default configuration file:install-v-Ddocs/_static/config.yml.example~/.toggl2pl/config.ymlPlease open the newly created configuration file with your preferable text editor,
read comments and update empty fields with your personal information.ExamplesPlease note, that currently all CLI flags can be combined into the single command
and examples below just needed to describe flags purposes.SimpleIn order to post hours for the current day AS IS just call the script without
any arguments:toggl2plIn the output you will see a table with list of projects, tasks and time (real
and rounded) spent on each task. Also you will be prompted to export data to PL
or interrupt export.RoundingBy default, the real number of minutes will be posted to PL. Use rounding or not
depends on your case and team agreement, so please keep this in mind.In order to post rounded number of minutes - just append--roundflag to the
script:toggl2pl--roundThe output will be the same, but after confirmation rounded number of time will
be posted to PL instead of real.Note: The most actual information about the rounding base value can be found in
the CLI help output.Custom dateIn case you need to export Toggl information from the past days, please use the--dateflag with exact date inYYYY-MM-DDformat:toggl2pl--date2016-02-29This will export Toggl time entries dated2016-02-29to PL with the same day
and causedate change request, so please be aware.FunctionalCore functionalThe core (minimal) set of features required to start from something is:ability to synchronize Toggl clients and projects with PL database.ability to export records from Toggl to PL with a minimal human involvement.FeaturesThe list of features is not yet ready, but the next helpers already implemented:all posts use about the same format (for sure, it is impossible to predict all
possible cases, but at least common things can and already partially done).posts time can be optionally rounded by using internally discussed rules.RoadmapThere is a high-level implementation plan which may change with time depending
on external factors and ideas:create a minimal set of logic to implement the core functional.create command line interface to use already implemented logic.tune output format and information to make it useful and easy to understand.compile Python code to statically linked executable file to avoid dependency
on Python itself and its modules.automate build of Linux executable file to start distributing the tool in
acceptable way.automate build of Windows executable file to provide an ability to use the
tool on this platform.document existing code, CLI flags and configuration options with Sphinx.freeze existing functional and tweak code to resolve regressions and improve
quality.use Flask and move logic to centralized server to communicate with it by using
HTTP API with a minimal set of required options. But, at the same time keep ability
to use the module in server-less mode and directly communicate with Toggl and PL API.use Elasticsearch with Kibana to store and visualize data passed through server
to provide flexible reports and analytic mechanisms (for each user and for teams).unit tests and coverage reports for existing minimal set of features.InternalsSupported APIsThe module is designed to work with time trackers over HTTP API, so in case of
any questions, please refer to their official documentation in the first place:Project Laboratory API DocumentationToggl API DocumentationClockify API DocumentationNote: work on Clockify API support is planned, but not started yet.Build applicationPlease, make sure you completed with steps described in theDevelopmentsection before continue with application build, since development environment is
required option on this stage.In order to make the application easy distributable and simple to install, the
project code needs to be compiled into the single executable file with all its
dependencies.While there is a number of tools which may create such kind of distributions,
this project usesPyInstallerwhich does exactly what is needed
almost out of the box:pyinstaller--onefilescripts/toggl2plThe command above will collect all package dependencies and files into the single
executable file which can be distributed to end users without additional actions
on their side (system / Python packages installation).