-
-
Notifications
You must be signed in to change notification settings - Fork 18
Saving to a Tiddlyhost site with a command line script
Simon Baird edited this page Jan 24, 2023
·
2 revisions
It's possible to save to a Tiddlyhost site from a script using curl commands. thost-uploader is a bash script that shows how to do it.
# Download the script and make it executable
curl -sO https://raw.githubusercontent.com/simonbaird/tiddlyhost/main/examples/thost-uploader
chmod 755 ./thost-uploader
# Assuming you want to upload mytiddlywikifile.html to mysite
./thost-uploader mysite mytiddlywikifile.html youremail@example.com yourpassword
# Or...
./thost-uploader mysite mytiddlywikifile.html youremail@example.com $(cat filewithpassword)
- It's generally not a good idea to type your password directly on the command line. See the comments in the script for a suggestion on how avoid doing that.
- This should work on Mac or Linux. It might work on Windows if you're able to run bash and curl.
- It should be possible to adapt this technique for use with other scripting languages or anything that can make the required http requests.
- See also the thost-downloader script which can be used to to script downloads of a private site.