$ show TiddlyWiki/TiddlyDesktop
TiddlyDesktop is a desktop application that serves as a custom web browser for working with locally stored TiddlyWiki files and folders. Built on nw.js (formerly node-webkit), it provides a native windowing system to open, edit, save, and manage multiple TiddlyWiki instances. The application includes a backstage configuration wiki for managing settings, a wiki list window for organizing wikis, and support for both single-file HTML wikis (TiddlyWiki 5 and Classic) and wiki folder formats. It implements file saving via a TiddlyFox-like protocol, automatic backups, and drag-and-drop wiki registration. The architecture is modular, with separate window classes for wiki files, wiki folders, and backstage tiddlers, all managed by a central window list. The codebase is well-structured and demonstrates solid engineering practices for an nw.js application.
The LLM identified 3 files worth highlighting for reuse:
Implements the core saving and backup mechanism for TiddlyWiki files. It handles both TiddlyWiki 5 and Classic by injecting a script into Classic pages, listens for TiddlyFox save events, performs file backups with timestamped filenames, and writes content to disk. The backup path is configurable via a tiddler. This module is self-contained and could be extracted for any nw.js application needing file saving with backup support.
Provides a simple, non-cryptographic hash function that converts a string to a 32-bit integer and then to a base-36 string. Used for generating unique window identifiers. The implementation is clean, dependency-free, and easily reusable in any JavaScript project requiring a lightweight hash.
A custom TiddlyWiki widget that extends the core dropzone widget to handle file drops by extracting file paths and dispatching a custom message to add wikis. It demonstrates non-obvious skill in extending TiddlyWiki's widget system and could be reused in other TiddlyWiki plugins that need to handle file drops with path information.