popthings
iOS and command line tool to import a TaskPaper template with placeholders into Things by Cultured Code
Installation
On macOS
Run popthings directly with uv, without installing it first:
uvx popthings template.taskpaper
Alternatively, install popthings using pip:
pip install popthings
On iOS
Use
Pythonista
to execute the script. Download the popthings.py
file to the "This iPhone/iPad" location. The script cannot be on iCloud
if you want to use the Share Sheet Extension. To add popthings to
the Share Extension shortcut, add the popthings.py script as
a new shortcut in the Pythonista settings. See the Pythonista
Documentation
for more details.
To add a button on the Today Widget, use the following entry for the
SHORTCUT variable in the Examples/Widget/Launcher.py file:
{
'title': 'PopThings',
'url': 'pythonista3://popthings.py?action=run',
'color': '#5e96ff',
'icon': 'iow:checkmark_24'
},
Usage
popthings supports placeholder replacement, headers and checklist items.
Date parsing is done by Things itself, so anything Things supports is also
supported here.
- The indentation must be done with Tabs, which is the normal TaskPaper behavior.
- Placeholders must be defined on the second line of the file. They must have
a
$prefix and be space-separated. - The
@startand@duetags expect a value and will be used for the "when" and "deadline" attributes of a project or task. All other tags are passed through and their values are ignored. - A project under a project is a considered a heading. It can't have notes. Tasks under it can be indented or not, which is more flexible than the TaskPaper format.
- A task under a task is a checklist item.
Here is a packing list template with 3 placeholders:
Prepare luggage for trip to $destination: @start($start)
$start $due $destination
Before leaving:
- Find good place for dinner @research
Don't forget to check NYT's "36 hours in ..."
Packing:
- Passport @due($due)
- Clothes @due($due)
- Pants
- T-shirts
Last minute: @due($due)
- Set thermostat to travel mode @due($due) @home
- Water plants @due($due) @home
To import the template on the Mac, pass the TaskPaper filename to the
popthings executable. If there are any placeholders, you'll be prompted for
their value.
uvx popthings templatex-travel.taskpaper
Start value? 2018-09-01
Due value? 2018-09-10
Destination value? Paris
Here's the result of parsing the template above.
On iOS, you can use popthings via:
- The Share Sheet to share the content of a TaskPaper document from any application.
- From Pythonista or from the Today Widget where you'll be prompted to pick a file using the File picker.
In both cases, Pythonista will prompt you for the placeholder values if there are any.
Known limitations
- The TaskPaper file must start with a project.
- If a header has a comment, the previous task or project is going to end up with that comment.
Making a Release
- Bump the version in
popthings.py - Update the changelog, link the versions.
- Commit and tag with version number. Push tags. Update the release on GitHub.
- Build the source and wheel distributions with
uv build - Test upload to PyPI test with
twine upload --repository-url https://test.pypi.org/legacy/ dist/* - Create a temporary environment
mktmpenvand test install withpip install --index-url https://test.pypi.org/simple/ popthings - If everything looks good, upload for real with
twine upload dist/*
Metadata
Release files for popthings 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| popthings-1.2.0.tar.gz | 11.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| popthings-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.1 kB
Release files / popthings-1.2.0.tar.gz
| Download URL | popthings-1.2.0.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1608b072a0fc17c0f085f5b017de3f833f65a376cbf59b835cdb6abe48614ca5
|
|
BLAKE2b-256 checksum How to use checksums |
7033f3dcf1c7c7c5f42e8cdc508540a14c2641e5f0ffd1eb4f506fe4f2c305dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / popthings-1.2.0-py3-none-any.whl
| Download URL | popthings-1.2.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b43da6ee3f31f686ee23370c77e572e47a4811560f8aee6eeac823bf79465bcf
|
|
BLAKE2b-256 checksum How to use checksums |
509a3d6581873d4fc6fcc55803f3cae12ac17f37882a2a6f7d6928adc2024a16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|