Package: cmddocs
.. image:: https://travis-ci.org/noqqe/cmddocs.svg?branch=master:target: https://travis-ci.org/noqqe/cmddocs.. image:: https://codecov.io/gh/noqqe/cmddocs/branch/master/graph/badge.svg:target: https://codecov.io/gh/noqqe/cmddocscmddocs=======``cmddocs`` is an interactive commandline wiki. Itlets you easily maintain your docs/cheetsheets/notes using:- Plain Text Files- Write ``markdown`` in your local Editor- View in your local Pager- Versioning with ``git``cmddocs is like a framework around your plaintext files.Why ?-----I kind of started ``cmddocs`` because I couldn't find something likethis on the internet. Here's my usecase. Im working as a DevOps guybeing in touch with various types of software, languages, tools,operating systems and databases. To remember all those things I need aplace to store commands, workflows and short howtos.Most of the software I use (and love) runs on a OpenBSD Box on theinternet and are commandline-based. These are`mutt <http://www.mutt.org>`__,`taskwarrior <http://taskwarrior.org>`__,`jrnl <http://maebert.github.io/jrnl/>`__,`weechat <http://weechat.org>`__ and so on...But i was missing a toolfor documentation.After switching to just plaintext files using``vim`` and ``git`` it was also a bit annoying. So I wrote``cmddocs`` to make it easier for me to handle my plaintext files.Markdown Rendering------------------``cmddocs`` uses the `mistune <https://github.com/lepture/mistune>`__ lexer towrap markdown with ansi control sequences instead of html tags.It looks something like this... image:: https://raw.github.com/noqqe/cmddocs/master/cmddocs-md2ascii.pngDemo----To give you an idea what it looks/feels like I created a short terminalrecording.`asciinema cmddocs demo <https://asciinema.org/a/15168>`__Installation------------::pip install cmddocsAlso make sure you have `tree` installed.Configuration-------------Create ``.cmddocsrc`` file in your $HOME with the following content(adjust to your needs):::[General]Datadir = /home/noqqe/DocsDefault_Commit_Message = small changesExcludedir = .git/Editor = /usr/local/bin/vim# EditorFlags = -CPager = /usr/bin/lessPagerFlags = -frPrompt = cmddocs>Promptcolor = 37Intro_Message = cmddocs - press ? for helpMail = mail@example.orgDefault_Extension = md[Colors]Header12 = 37Header345 = 37Codeblock = 92The only required option is "Datadir", everything else will be guessedor defaults to a sane default value. Once you start cmddocs.py the CLIwill be shown. Use ``help`` for commands.Quick Start-----------At first, create a very minimal config, like::[General]Datadir = /home/noqqe/DocsEditor = /usr/local/bin/vimPager = /usr/bin/lessThen you can start using cmddocs.::$ cmddocscmddocs - press ? for helpcmddocs> helpDocumented commands (type help <topic>):========================================EOF  delete  e     help  list  mail  pwd     search  undocd   diff    edit  info  log   move  revert  stats   versiond    dirs    exit  l     ls    mv    rm      status  viewcmddocs> help lShow files in current working dircmddocs> help logShow git logs of your docs.Usage: log                      # default loglines: 10)log 20                   # show 20 loglineslog 20 article           # show log for specific articlelog databases/mongodb 3  # sameCommand Documentation---------------------``cd``------Change directory::Usage:cd Programming/cd``delete``, ``rm``------------------Delete an article::Usage:delete databases/mongodbrm databases/mssql``dirs``, ``d``---------------Show directories in current working dir::Usage:dirsddirs Databases/``e``, ``edit``---------------Edit or create new article.::Usage:edit databases/mongodbedit intro``list``, ``l``, ``ls``-----------------------Show files in current working dir::Usage:listllist Databases/``move``, ``mv``----------------Move an article to a new location::Usage:move databases/mongodb databases/MongoDBmove life/foo notes/foomv life/foo notes/foo``view``--------View an article. Creates temporary file with converted markdown toansi colored output. Opens your PAGER. (Only less supported atm)::Usage:view databases/mongodbview intro``mail``--------Mail an article to a friend::Usage:mail databases/mongodbRecipient: mail@example.netmail programming/r/loopsmail intro``pwd``-------Show current directory::Usage:pwd``search``----------Search for keyword in current directory::Usage:search mongodbsearch foo``undo``, ``revert``-------------------You can revert your changes (use revert from git)::Usage:undo HEADundo 355f375Will ask for confirmation.``diff``--------Show git diffs between files and commits::Usage:diff 7                   # show diff for last 7 changesdiff 1 article           # show diff for last change to articlediff                     # show last 5 diffs``info``--------Show infos for an article::Usage:info articleinfo Databases/mongodbCreated: 2014-01-18 11:18:03 +0100Updated: 2015-10-23 14:14:44 +0200Commits: 26Lines: 116Words: 356Characters: 2438``log``--------Show git logs of your docs.::Usage:log                      # default loglines: 10)log 20                   # show 20 loglineslog 20 article           # show log for specific articlelog databases/mongodb 3  # same``status``----------Show git repo status of your docs::Usage:status``stats``---------Calculate some statistics on your docs::Usage:stats``exit``, ``EOF``-----------------Exit cmddocs::Usage:exit``help``--------List available commands with "help" or detailed help with "help cmd".``version``-----------Show version of cmddocs::Usage:versionChangelog---------See Changelog_... _Changelog: https://github.com/noqqe/cmddocs/blob/master/CHANGELOG.rstLicense-------See License_... _License: https://github.com/noqqe/cmddocs/blob/master/License.txt