Package: things3-api
CLI, API, Web Service and Kanban for Things 3This repository contains a simple read-only CLI, API and Web Service forThings3. It further includes an example web application to create a visual task-level overview (Kanban) of what is on your plate.InstallationTo safe time and to support the development, consider to buy the pre-compiled binary from the AppStore:Besides this, you've different options:Download arelease.Install the library and command line tools:pip3 install things3-apiStar, fork and contribute to the lastest code:git clone https://github.com/AlexanderWillner/KanbanView.gitConfigurationWhile everything should work out of the box, you might want to change some configuration aspects. To have a GUI for this isFeature Request #19. For the time being, the following default values are shown here and you can change them by creating the file~/.kanbanviewrc(self compiled version) /~/Library/Containers/ws.willner.kanbanview/Data/~/.kanbanviewrc(AppStore version) or setting them as environment variables. Note that plain integer tags (such as5,15, or60) are being used to calculate the estimated time of task durations for today:[DATABASE]THINGSDB=/Users/myname/Library/Group Containers/JLMPQHK86H.com.culturedcode.ThingsMac/Things Database.thingsdatabase/main.sqliteTAG_WAITING=WaitingTAG_MIT=MITTAG_CLEANUP=CleanupApplicationThe Kanban Application allows you to visualize the Things3 database following the Kanban approach (focused on tasks or on projects). It also includes some visualizations. There are different implementations of the application available.Thestaticversion creates a snapshot of the current status and writes an HTML file tokanban-static.html:make run.Thedynamicversion runs a web application athttp://localhost:15000/kanban.htmland updates the GUI via JavaScript automatically using theWeb Service:make run-api.Theappversion runs a macOS application viamake run-app. You can also create a compiled bundleKanbanView.appversion that encapsulates the scripts into an easy to use standalone macOS application.Dark mode with project mode enabled:Types of tasks:History of task actions:Universe view on the projects:How many minutes are scheduled for today (tags with plain numbers such as5,15,30are counted) and view tasks in an Eisenhower matrix (tagsA,B,C,Dare used):Remote control via iPad:CommandsAfter downloading the command line tools or downloading the sources and executingmake install, you've the toolsthings-cli,things-apiandthings-kanbanin your path. Other availablemakecommands are listed by executingmake:$make
CLI,APIandWebServiceforThings3.

Configuration:*StaticKanban:kanban-static.html*DynamicKanban:http://localhost:15000/kanban.html

Avaliableenvironmentvariables:*THINGSDB-Pathtodatabase*TAG_WAITING-Tagfortasksyouarewaitingfor*TAG_MIT-Tagformostimportanttassk

Availablecommands:*run-Runcodeinstaticmode.*open-OpenGUIinstaticmode.*run-api-Runcodeinapimode.*open-api-OpenGUIinapimodeinthebrowser.*kill-api-Killcodeinapimode.*run-app-Runcodeinappmode.*cli-Runcodeinclimode(use'args'forarguments).*app-CreateKanbanViewApp.*install-Installthelibraryandcommandlinetools.*uninstall-Removethelibraryandcommandlinetools.*test-Rununittestsandtestcoverage.*doc-Documentcode(pydoc).*clean-Cleanup(e.g.pycfiles).*auto-style-Automatiallystylecode(autopep8).*code-style-Checkcodestyle(pycodestyle).*code-lint-Checkcodelints(pyflakes,pyline,flake8).*css-lint-CheckCSSstykelints(csslint).*js-lint-CheckJScodelints(jslint).*html-lint-CheckHTMLfilelints(tidy).*code-count-Countcodelines(cloc).*deps-install-Installdependencies(seerequirements.txt).*feedback-CreateaGitHubissue.Command Line Interface (CLI)The CLI allows you to access the Things3 database via the comand line:$things-cliinbox-InboxTodo(None)It is also possible to get the information formatted asjsonstrings:$things-cli--jsonnext|jq[{"uuid":"9CD92553-95D7-4CF2-B554-F1DE9F563018","title":"Due Todo","context":"Next Project","context_uuid":"DED787E0-874A-4783-8F0F-0A02F87F8419","due":"2152-08-28"},{"uuid":"4C5D620C-165C-41D2-BC5B-A34065348D92","title":"Today Project Todo","context":"Today Project","context_uuid":"52ADBAB5-A0EC-4D3F-BF83-2D578DAE3AF3","due":null},{"uuid":"2ECBE4AA-2E3F-49CC-AA38-CBFFBFD2B1FD","title":"Todo with Checklist","context":"Next Project","context_uuid":"DED787E0-874A-4783-8F0F-0A02F87F8419","due":null},{"uuid":"709794DA-EB89-4A1B-BBE5-2BF8424BBA28","title":"Waiting for Todo","context":"Next Project","context_uuid":"DED787E0-874A-4783-8F0F-0A02F87F8419","due":null}]Further, you can export data ascsvvia$ things-cli --csv all > tasks.csvand import the file intoExcelviaFile > Import > CSV file > Delimited / UTF-8 > Comma:However, the CLI is only in a beginning state. The originalbashbased version can be found atanother GitHub repo. Overall commands are:$things-cli-h
usage:things3_cli.py[-h][-j][-c][--version]command...

Simpleread-onlyThing3CLI.

positionalarguments:commandOneofthefollowingcommands:inboxShowsallinboxtaskstodayShowsalltodaystasksupcomingShowsallupcomingtasksnextShowsallnexttaskssomedayShowsallsomedaytaskscompletedShowsallcompletedtaskscancelledShowsallcancelledtaskstrashedShowsalltrashedtasksfeedbackGivefeedbackallShowsalltaskscsvExportsalltasksasCSVdueShowsalltaskswithduedatesheadingsShowsallheadingshoursShowshowmanyhourshavebeenplannedtodayicalShowsalltasksorderedbyduedateasiCallogbookShowsalltaskscompletedtodaymostClosedShowsdaysonwhichmosttaskswereclosedmostCancelledShowsdaysonwhichmosttaskswerecancelledmostTrashedShowsdaysonwhichmosttasksweretrashedmostCreatedShowsdaysonwhichmosttaskswerecreatedmostTasksShowsprojectsthathavemosttasksmostCharactersShowstasksthathavemostcharactersnextishShowsallnextishtasksoldShowsalloldtasksprojectsShowsallprojectsrepeatingShowsallrepeatingtasksscheduleSchedulesaneventusingatemplatesearchSearchesforaspecifictaskstatProvidesanumberofstatisticsstatcsvExportssomestatisticsasCSVsubtasksShowsallsubtaskstagShowsalltaskswiththewaitingfortagtagsShowsalltagsorderedbytheirusagewaitingShowsalltaskswiththewaitingfortag

optionalarguments:-h,--helpshowthishelpmessageandexit-j,--jsonoutputasJSON-c,--csvoutputasCSV--versionshowprogram'sversionnumberandexitApplication Programming Interface  (API)The API allows you to access the Things3 todos within other Python scripts:$makedoc
...
classThings3(builtins.object)|Things3()||Simpleread-onlyAPIforThings3.||Methodsdefinedhere:||get_anytime(self)|Getanytimetasks.||get_inbox(self)|Getalltasksfromtheinbox.
...Web ServiceThe web service allows you to access the Things3 database via a web service:$makerun-server
Startingup...
ServingAPIathttp://localhost:15000/api/{command}Viacurlyou can browse thejsondata via command line:$curl-shttp://localhost:15000/api/today|jq[{"uuid":"D7D879D2-5A2D-48AA-AF8A-AADCEC228D2B","title":"Today Todo","context":"Today Project","context_uuid":"52ADBAB5-A0EC-4D3F-BF83-2D578DAE3AF3","due":null}]