command line micro wiki written in Python
Paul Wolf
paulwolf333 at gmail.com
Tue Jan 31 05:33:31 EST 2017
I've created a command line utility for managing text files. It's written in Python:
https://github.com/paul-wolf/yewdoc-client
It makes heavy use of the fantastic Click module by Armin Ronacher: http://click.pocoo.org/5/
This can be thought of in different ways:
* A micro-wiki
* A note-taking application
* A file manager
The key aspects are
* Entirely command-line driven
* Text documents only with a slight preference for Markdown
* Make it easy to operate on documents without having to remember where they are or the exact names
* Editor agnostic (vim, emacs, Sublime, Atom, etc.)
Here's how to create a document:
yd edit "shopping list"
After editing, saving, closing, you can find again:
➜ yd ls -l shop
15981278 md 61 2017-01-20 12:15:43 shopping list
While some people might gasp at the idea of a command line wiki, I find using the command line with a text editor like emacs the best workflow. I also like not having to worry about where a file of this kind is located. You can also use it to track configuration files:
yd take ~/.emacs --symlink
Now, I can edit this. Because it's a link to the actual file - having used the `--symlink` option, the configuration file will be updated:
➜ yd ls -l emacs
1c608cd7 md 113 2016-12-16 10:53:24 emacs
ln 183a5b80 txt 5608 2017-01-15 12:59:39 /Users/paul/.emacs
Using the cloud sync options lets me get my current config file wherever I am, completely up-to-date. For a more wiki-like experience, I can load all the documents with a common tag so:
yd browse wolf
This converts all the documents tagged with 'wolf' and loads them in a browser with a simple navigation sidebar.
Convert a Markdown document called "Python3" to .odt:
➜ yd convert Python3 odt
python3.odt
There is an optional cloud syncronisation feature that connects to a specific endpoint, https://doc.yew.io:
➜ yd sync
This requires registration at https://doc.yew.io, which can also be done via command line. But that is entirely optional.
I'd be interested in feedback if there is any interest in using this kind of utility. I'll expose a python API so bulk operations can be done easily on the command line or via scripts.
More information about the Python-list
mailing list