Package: tasks-collector
README Tasks CollectorRead The DocsYou can find the documentation including generated API docs athttps://tasks-collector.readthedocs.io/en/latest/BackgroundThe purpose with this project was to address the headache of collecting and organizing the tasks are/have worked with.
These tasks spread across different platforms such as Outlook, Jira, Trello and other platforms and felt like I had to structure and
store these into a database and being able to create some charts based on this.RequirementsAt this moment this application has yet only been tested from MacOS High Sierra and above.
Some parts of the application related to Outlook (trough AppleScript) and CopyQ only available to MacOS.IntroductionThis below is a brief run through how one could use this tool from your terminal and how you can use this package in your own Python applications.Installationbash-4.4$python-mvenvvenv
bash-4.4$sourcevenv/bin/activate(venv)bash-4.4$pipinstalltasks-collectorUsage graphical interfaceThe default entry-point for this application is GUI (based on the great module Gooey) to simplify building a window presenting all options.Usage command-lineTo use command-line you need always supply the--ignore-gooeyflag do disable GUI (graphical interface)
In general you only need to pass the sqlite database where you'd like to store it together with the flag depending which source to use$tasks_collectorcollect--help--ignore-gooey
usage:tasks_collectorcollect[-h][--outlook][--jiraJIRA][--trelloTRELLO][--sqlite_databaseSQLITE_DATABASE][--loglevel{INFO,DEBUG}]optionalarguments:-h,--helpshowthishelpmessageandexit--outlook--jiraJIRAusername@jiraserver--trelloTRELLOapi_key:token:token_secret:my_name--sqlite_databaseSQLITE_DATABASEnameofsqlitetoexport/updateto--loglevel{INFO,DEBUG}CollectOutlookWhen passing --outlook argument you just need to make sure you've selected all Outlook-tasks including those completed.
While using Outlook you can add the following naming convention of Outlooks "Categories"(client1)
(client2)
(client3)
...for giving you possibility to assign clients associated with task.{project1}
{project2}
{project3}
...for assigning the task specific project.JiraThe script will use the username@jiraserver supplied to detect all tasks that are assigned to you and collect their most recent details into the database.
Name of the board will become the representation of "client"TrelloThe script will use an argument structured as 'api-key:token:token_secret:my_name'
You will get api-key, token and token secret fromhttps://trello.com/app-keyThe my_name is the name as your logged in user has, this is to be able to identify "your" tasks amongst others in boards.
The board name will be the representation of "client"CredentialsCurrently use keyring to allow you to store credentials locally not being exposed.
First time you run it will prompt you for password.ReportInstall CopyQ according tohttps://hluk.github.io/CopyQ/if you like to be able to export your report to your clipboard using the --copyq flag.
But you can also get the graph when using the --show$tasks_collectorreport--help--ignore-gooey2019-11-2518:46:09.199|INFO|tasks_collector.__main__:main:79-nogui2019-11-2518:46:09.200|DEBUG|tasks_collector.tasksdb.api:get_default_db_path:48-nolocalconfigdirectory,directorywillbeused/Users/edo/Library/ApplicationSupport/tasks_collector.tasksdb
usage:tasks_collectorreport[-h][--daysnumber_of_days_in_past][--sqlite_databaseSQLITE_DATABASE][--copyq][--show][--default_clientnameofdefaultclient][--loglevel{INFO,DEBUG}]optionalarguments:-h,--helpshowthishelpmessageandexit--daysnumber_of_days_in_pastNumberofdaystocoverinthereport--sqlite_databaseSQLITE_DATABASEnameofsqlitetoexport/updateto--copyqpasteoutputasMIMEtopastebin,goodforsendingbye-mail--showshowganttimage--default_clientnameofdefaultclient--loglevel{INFO,DEBUG}A sample of the output after pasting into e.g. a email for you manager might look like thisCleanupThis is useful if for example ownership changes of tickets in Jira end you'd like to close them in your report.$tasks_collectorcleanup--help--ignore-gooey
usage:tasks_collectorcleanup[-h][--beforeDAYS][--sqlite_databaseSQLITE_DATABASE][--loglevel{INFO,DEBUG}]optionalarguments:-h,--helpshowthishelpmessageandexit--beforeDAYSticketsbeforethisnumberofdaysbacktobeclosed--sqlite_databaseSQLITE_DATABASEnameofsqlitetoexport/updateto--loglevel{INFO,DEBUG}Create sphinx documentationTo create documentation in docs/build/html$cddocs
$sphinx-apidoc-obuild/../tasks_collector
$makehtmlTest the code with coverageThanks to tox this has been automated so all that you need to run "tox" from projects root directory e.g.$tox
...
py3.8.0run-test:commands[0]|pytest--cov=tasks_collectortests/
...........................[100%]----------coverage:platformdarwin,python3.8.0-final-0-----------
NameStmtsMissCover
--------------------------------------------------------------------
tasks_collector/__init__.py10100%
tasks_collector/reportgenerator/__init__.py00100%
tasks_collector/reportgenerator/api.py23411750%
tasks_collector/tasksconverter/__init__.py00100%
tasks_collector/tasksconverter/api.py100694%
tasks_collector/tasksdb/__init__.py00100%
tasks_collector/tasksdb/api.py80890%
tasks_collector/tasksscraper/__init__.py00100%
tasks_collector/tasksscraper/jirascraper.py17382%
tasks_collector/tasksscraper/outlookscraper.py43198%
tasks_collector/tasksscraper/trelloscraper.py371365%
--------------------------------------------------------------------
TOTAL51214871%29passed,4warningsin17.32s
______________________________________________________________________________________________________________________________________________________________________________summary______________________________________________________________________________________________________________________________________________________________________________py3.8.0:commandssucceededcongratulations:)API documentationCould be found athttps://tasks-collector.readthedocs.ioTroubleshootingI get the following message when I run tasks_collector in GUI (not --ignore-gooey) modeThis program needs access to the screen. Please run with a
Framework build of python, and only when you are logged in
on the main display of your Mac.Reasons for this happening on MacOS is that your built of Python3 does not include "framework" (e.g. when you installed through homebrew) rather than fromhttps://www.python.org/downloads/mac-osx/One way around this if you'd be using pyenv (one of my favourites) found athttps://github.com/pyenv/pyenvis to install Python using the followingenvPYTHON_CONFIGURE_OPTS="--enable-framework=$(pyenvroot)/versions/3.8.0 CC=clang --enable-unicode --with-threads"pyenvinstall3.8.0-vContactYou can easiest contact me by my emaildaniel@engvalls.euor my linked-in profilehttps://www.linkedin.com/in/danielengvall/