Skip to main content

rest-uploader

REST API File Uploader for Joplin

API Reference

Joplin client will need Webclipper service enabled.

  • Go to Tools -> Web Clipper Options -> Enable Web Clipper Service

History

2018-09-24 This program was created to upload files from a folder specified in the PATH variable to Joplin. The following resource was helpful in figuring out the logic for Watchdog: https://stackoverflow.com/questions/18599339/python-watchdog-monitoring-file-for-changes

Tested with the following extensions: .md .txt .pdf .png .jpg .url .csv

Caveat: Uploader only triggered upon new file creation, not modification

Tesseract

In order for OCR text recognition to work, you'll need to download and install Tesseract. Windows systems may require that you add a path variable in order for it to work.

Poppler

Poppler is required for PDF processing. For Windows, download x86 binary and add to environment path. https://anaconda.org/conda-forge/poppler

Running application

Launch using the executable rest_uploader, specify the monitoring path as an argument. You'll need your Joplin API key the first time you launch. If your API key changes or gets pasted incorrectly, delete the .api_token.txt file that gets stored to the package.

rest_uploader /path/to/directory

To launch as python module:

python -m rest_uploader.cli /path/to/directory

Languages other than English

Version 0.4.0 added language support via Tesseract (check Tesseract docs). To enable, use the cli -l or --language argument. The following example will OCR text using the German dictionary: rest_uploader /path/to/directory --language ger

Additional Command Line Options added in version 1.8.0

By default notes will be dropped into a notebook called "inbox". Specify a different upload notebook by specifying a destination from the command line using -d or --destination

rest_uploader will fail if the specified notebook does not exist I am guessing if you have two notebooks with the same name, it will dump new notes in the first one it finds.

Default server = 127.0.0.1 To specify a different server, use the -s or --server cli option

Default port = 41184 To specify a different port, use the -p or --port cli option

Default autotagging behavior = yes To turn off autotagging, use the -t or --autotag option Example: rest_uploader /path/to/directory -t no

It doesn't matter if the options are before or after the path. Path is mandatory, though. The following example will upload newly created notes to the Taxes Notebook, and OCR in German: rest_uploader -d "Taxes" -l ger /path/to/directory

Additional Command Line Options added in version 1.11.0

Added autorotation switch to turn off if this behavior is not wanted. By default, after performing OCR, the application will rotate the image according to how the OCR was able to detect text. Turn this off using the -r command line switch: rest_uploader -r no /path/to/directory

Added moveto option to specify a directory in which to place processed files. Use the -o option to specify a moveto directory By default this is off but in the background it uses the operating system's temp directory as a placeholder for the option to indicate "off" since the option requires a valid path. Do not attempt to use the OS temp dir as a moveto directory. Example of using the option: rest_uploader /path/to/directory -o /path/to/moveto/directory

Metadata

Release files for rest-uploader 1.22.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rest-uploader 1.22.0
File Size Uploaded Provenance Actions
rest_uploader-1.22.0.tar.gz 19.8 kB Without provenance Details for rest_uploader-1.22.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rest-uploader 1.22.0
File Interpreter ABI Platform Actions
rest_uploader-1.22.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for rest_uploader-1.22.0-py2.py3-none-any.whl

Total release size: 31.9 kB

Release files / rest_uploader-1.22.0.tar.gz

Download URL rest_uploader-1.22.0.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
62b6c56566e950570d99aa106e10d3cc7adfdd2229f84e8fa1e90884d5156d68
BLAKE2b-256 checksum
How to use checksums
fac0b91da9e7cda0760fa968c6d30e4e2ba11ce1402266541d72887e2c22d32d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Release files / rest_uploader-1.22.0-py2.py3-none-any.whl

Download URL rest_uploader-1.22.0-py2.py3-none-any.whl
Size 12.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
85bcba439bb872de7ee40baa9fe61796ef9a1116abb5e9296c97509fd3cb6e7a
BLAKE2b-256 checksum
How to use checksums
525d19bc1cfa485369c1c43869291d722c537f7da507eb5f26a8455a13d1b038
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Security for rest-uploader 1.22.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page