things.py icon indicating copy to clipboard operation
things.py copied to clipboard

Ask others to use (and extend) this library

Open AlexanderWillner opened this issue 4 years ago • 4 comments

Goal

  • As a things.py developer
  • I want others to use this library
  • so that it can be improved and to have some impact

Suggested approach In order to achieve this goal I suggest to

  • create a list of potential projects and in get in contact with the developers
  • create a list of relevant communities and advertise the use of the library

Additional context The list that we might want to extend within this ticket or within the wiki:

  • [x] KanbanView
  • [ ] Reddit Thingsapp
  • [x] https://github.com/lmgibson/ThingsStats/blob/main/src/ThingsData.py
  • [x] https://github.com/bboc/things3-export/blob/master/export_things.py
  • [x] https://github.com/visini/timebox/blob/master/main.py
  • [x] https://things3byculturedcode.slack.com
  • [x] https://news.ycombinator.com/item?id=27441880

Non-Python

  • [x] https://github.com/liamcain/obsidian-things-logbook/blob/main/src/things.ts
  • [x] https://github.com/KalebHawkins/Things3-2-Project/blob/main/Sources/things3/ThingsDB.swift#L197
  • [ ] https://github.com/systemist/dotfiles/blob/master/bin/print-things
  • [ ] https://github.com/rberenguel/hweekly/blob/master/src/Main.hs#L39
  • [ ] https://github.com/tschoffelen/things-stats/search?q=db.query+SELECT
  • [ ] https://mostlymaths.net/2020/11/url-pdf-kindle.html/#shell-section
  • [ ] https://github.com/m1guelpf/things-server/blob/master/index.php
  • [ ] https://github.com/xilopaint/alfred-things/blob/master/src/things.applescript
  • [ ] https://github.com/vmitchell85/things (PHP, Laravel)

AlexanderWillner avatar Apr 01 '21 18:04 AlexanderWillner

I think we're at a stage where we could write a short note at Reddit. Quick draft, please edit directly in this update:

Where: https://www.reddit.com/r/thingsapp/ Title: Python API and CLI for read-only access of the Things database Content:

Hi all,

we've been busy writing a Python API and CLI for read-only access of the Things database. It might come in handy for your projects, so have a look at test it via our Github Organization ThingsAPI.

Best regards, Alex & Michael

AlexanderWillner avatar Apr 15 '21 16:04 AlexanderWillner

@AlexanderWillner Good idea. Another strategy might be to answer people directly on queries they have and show how things.py solves this.

For example, to get the SQL query for Today, you can do

pip install things.py

and then

import things
things.today(print_sql=True)

And then you could add:

However, since the Things database structure might change in the future and break your code, a more convenient way might be to work directly with the Things API. If the database structure changes, we can all benefit from each others solutions.

mikez avatar Apr 18 '21 21:04 mikez

Suggestion:

With respect to your query to the things database, using things.py might help to figure out how to achieve your goal:

$ pip3 install things.py && python3 -c "import things ; things.today(print_sql=True)"

AlexanderWillner avatar Apr 21 '21 09:04 AlexanderWillner

Template for reddit:

We've developed a (read-only) API and CLI library for accessing the Things database at https://github.com/thingsapi. This might might be handy if you're already accessing the database programmatically or want to access it from the command line.

For example, as a user, to get the tasks for today, you can run

    $ things-cli today
    ...

For example, as a programmer, to get the SQL query for Today, you can execute

    $ pip3 install things.py && python3 -c "import things ; things.today(print_sql=True)"
    ...

However, since the Things database structure might change in the future and break your code, a more convenient way might be to work directly with the Things API. If the database structure changes, we can all benefit from each others solutions.

AlexanderWillner avatar Jun 07 '21 20:06 AlexanderWillner

Closing; feel free to reopen if you want to keep doing marketing.

mikez avatar Jun 07 '24 20:06 mikez