{"id":30112587,"url":"https://github.com/potofcoffee2go/twgist","last_synced_at":"2025-09-07T02:06:09.841Z","repository":{"id":305588872,"uuid":"1023280244","full_name":"PotOfCoffee2Go/twgist","owner":"PotOfCoffee2Go","description":"Use a GitHub Gist as a TiddlyWiki tiddler store","archived":false,"fork":false,"pushed_at":"2025-07-30T18:27:22.000Z","size":146,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T06:48:31.675Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PotOfCoffee2Go.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-20T22:51:15.000Z","updated_at":"2025-07-30T18:27:26.000Z","dependencies_parsed_at":"2025-08-10T06:48:33.115Z","dependency_job_id":"38879728-a189-49de-adaf-f6d4eb160d5f","html_url":"https://github.com/PotOfCoffee2Go/twgist","commit_stats":null,"previous_names":["potofcoffee2go/twgist"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PotOfCoffee2Go/twgist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotOfCoffee2Go%2Ftwgist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotOfCoffee2Go%2Ftwgist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotOfCoffee2Go%2Ftwgist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotOfCoffee2Go%2Ftwgist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PotOfCoffee2Go","download_url":"https://codeload.github.com/PotOfCoffee2Go/twgist/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotOfCoffee2Go%2Ftwgist/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273986629,"owners_count":25202708,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-10T06:48:28.127Z","updated_at":"2025-09-07T02:06:09.824Z","avatar_url":"https://github.com/PotOfCoffee2Go.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# twgist\nStore TiddlyWiki tiddlers in a GitHub Gist\n\n# TiddlyWiki stored in a GitHub Gist\nA GitHub Gist can be used to store a Node.js TiddlyWiki. The Gist can be `git clone` into the 'tiddlers' sub-directory of the Node.js TiddlyWiki. Changes to the wiki can be stored on GitHub by up-streaming changes to the GitHub Gist `git push`.\n\nThese directions assume you have [Git](https://git-scm.com/downloads), [Install TiddlyWiki on Node.js](https://tiddlywiki.com/static/Installing%2520TiddlyWiki%2520on%2520Node.js.html) and a [GitHub account](https://github.com/signup?source=login). It is also assumed that Git and GitHub are already configured for GitHub user authentication. See [Connecting to GitHub with SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh); which is a start - may the authentication Gods smile upon you.\n\nThere are two node scripts `./twgist.js` to help in creating a TiddlyWiki populated with tiddlers from a Gist; and `./twpush.js` that upstreams wiki changes to the Gist.\n\n## Install the scripts\n\n```\nnpm install -g https://github.com/PotOfCoffee2Go/twgist.git\n```\n\n\u003e To uninstall `npm uninstall -g twgist`\n\nLinux users may need to prefix `sudo ` depending on their permission settings.\n\nI will be using `my-wiki` as the directory name of a wiki as an example.\n\n\u003e Do not use spaces in the directory name as different platforms/shells (Windows/Linux/MacOS) handle the spaces differently. No platform issues as long is a valid directory name without spaces. Use underbar or dashes instead.\n\n## Create a Gist\n\nThe Gist-ID is used to pull the tiddlers from the gist into the TiddlyWiki's `tiddlers` sub-directory. This is done when the wiki is created. Will need to create a Gist first in order to get a Gist-ID.\n\n\u003e See [Creating a gist](https://docs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists#creating-a-gist) if you have not created a GitHub Gist before.\n\nGo to [GitHub Gists](https://gist.github.com/mine) and press the top-right '+' sign to create a Gist.\n\nA filename is required to create a Gist - use `#my-wiki.tid`. The hash '#' at the beginning will place this file as the first file in the Gist (files are in alphabetical order) which will also be the name of the Gist on GitHub.\n\nThe content of the `#my-wiki.tid` file contains at least the title of the tiddler, but can be any tiddler in `.tid` format.\n\n```\ntitle: #my-wiki\n```\n\nSave the Gist as public or secret - your choice.\n\n\u003e \"Secret gists aren't private. If you send the URL of a secret gist to a friend, they'll be able to see it. However, if someone you don't know discovers the URL, they'll also be able to see your gist.\"\n\u003e\u003e [GitHub Docs](https://docs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists)\n\n## Gist Id\nOnce saved, the path of the gist will end in a long number displayed in the browser address bar. Copy that number - it is the 'Gist Id' which is needed to create your wiki. Once created you will no longer need the Id unless re-creating or creating/copying on another machine. \n\n## Create a 'server' edition wiki\nFrom the `twgist` directory:\n\n```\nnode ./twgist my-wiki {paste-gist-id-here}\n```\n\nSo will look like:\n```\nnode ./twgist my-wiki 0ff830fa237ff39b7de3942536cb08ab\n```\nbut with your Gist-Id instead.\n\nThe console will display the commands and results that are used to create and populate the wiki with tiddlers.\n\n## Start TiddlyWiki WebServer\n```\ntiddlywiki my-wiki --listen\n```\n\n## Update the wiki\nGo to `http://localhost:8080` and update the wiki - add tiddlers, plugins, settings, as usual. Is handy to make a tiddler with a link to the GitHub Gist.\n\n## Store changes to Gist\nGo back to the terminal window and `cntl-c` to stop the WebServer\n```\nnode ./twpush my-wiki \"optional commit message\"\n```\nCommands and results are displayed that pushed tiddlers to the gist.\n\nRestart the WebServer:\n```\ntiddlywiki my-wiki --listen\n```\n\n\u003e By opening two terminal windows can run the WebServer in one of them and do the `node ./twpush` command from the other. There is no need to stop the WebServer.\n\nYou can create as many wikis/gists as you wish.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotofcoffee2go%2Ftwgist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotofcoffee2go%2Ftwgist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotofcoffee2go%2Ftwgist/lists"}