Coder Social home page Coder Social logo

noqqe / cmddocs Goto Github PK

View Code? Open in Web Editor NEW
65.0 65.0 8.0 238 KB

An interactive commandline interface for your personal docs using python, Cmd, git and markdown

License: MIT License

Python 98.37% Shell 1.63%
cmdi command-line docs markdown notes python wiki

cmddocs's Introduction

Hi there ๐Ÿ‘‹

Noqqe's GitHub Stats

cmddocs's People

Contributors

agundy avatar lonetwin avatar noqqe avatar posativ avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cmddocs's Issues

'log' command crashes program if git isn't configured

Error Message:

wiki> log
Last 10 commits
Traceback (most recent call last):
  File "/usr/local/bin/cmddocs", line 9, in <module>
    load_entry_point('cmddocs==0.10.6', 'console_scripts', 'cmddocs')()
  File "/usr/local/lib/python2.7/dist-packages/cmddocs/__init__.py", line 249, in main
    Cmddocs().cmdloop()
  File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "/usr/local/lib/python2.7/dist-packages/cmddocs/__init__.py", line 184, in do_log
    show_log(args,self.repo)
  File "/usr/local/lib/python2.7/dist-packages/cmddocs/articles.py", line 244, in show_log
    print(repo.git.log(pretty=format, n=count,date=dateformat))
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 440, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 834, in _call_process
    return self.execute(make_call(), **_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 627, in execute
    raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git log --date=short --pretty=format:%C(blue)%h %Cgreen%C(bold)%ad %Creset%s -n10' returned with exit code 128
stderr: 'fatal: bad default revision 'HEAD''

Feature Request: Color option for headlines

in view H1 and H2 are shown in light gray. With a bright terminalbackground like white the color formatted headlines are nearly unreadable. Basically a color option only needs only 2 arguments: light or dark. Awesome color option will allow integers 0..255

Replace try,excepts with default config

At the moment i have a huge amount of try and excepts in config parsing phase of cmddcos.

Easier, and a lot more readable, would be to have a default config

(possibly sane) configuration defaults

Currently, you can't use cmddocs without a complete configuration. It should be possible to configure just a few options, such as Datadir and assume a sane fallback unspecified configuration options.

Also, I suggest to use lowercase sections and configuration options. It is (at least for me) very uncommon to have capitalized configuration options.

Edit: sections are case-insensitive, so it doesn't really matter...

Feature Request/Enhancement: add option for file-extensions (i.e. *.md)

It could be useful to have the option to append a file-extension to the filenames.

Benefits:

  • While editing editors can use syntax-highlighting (via syntax)
  • For viewing editors can be used as pager with syntax-highlighting
  • Converting to other formats is easier (i.e. pandoc)
  • Formatted viewing of files is possible with other devices (i.e. on Android with MdReader)

Find a way to store meta data on articles.

Metadata. Metadata kills people.
Anyways.

There should be a way to store tags, dates, headlines or other stuff

In markdown blog engines it most of the time looks something like this


---
tags:
- foo
- bar
title: foo

---

Sadly thats not part of the parser misaka.

Another option would be to implement a separate store for meta data. Like sqlite, a json file, something else serialized on disk. Would be nice to handle, but its not in the concept of the "flat file design" that this projects goal is.

Implement "info" command

That shows something like

            Created: 2014-01-18 11:18:03 +0100
            Updated: 2015-10-23 14:14:44 +0200
            Commits: 26
            Lines: 116
            Words: 356
            Characters: 2438

Pip install fails on Manjaro

Error message below:

[knatterton@desktop ~]$ pip install cmddocs
You are using pip version 7.0.1, however version 7.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting cmddocs
Downloading cmddocs-0.10.5.tar.gz
Collecting gitpython (from cmddocs)
Downloading GitPython-1.0.1.tar.gz (355kB)
100% |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 356kB 867kB/s
Collecting configparser (from cmddocs)
Downloading configparser-3.3.0r2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 3, in
File "/usr/lib/python3.4/site-packages/setuptools/init.py", line 4, in
import distutils.core
File "/usr/lib/python3.4/distutils/core.py", line 18, in
from distutils.config import PyPIRCCommand
File "/usr/lib/python3.4/distutils/config.py", line 7, in
from configparser import ConfigParser
File "/tmp/pip-build-xcfns1yl/configparser/configparser.py", line 397
_KEYCRE = re.compile(ur"%(([^)]+))s")
^
SyntaxError: invalid syntax

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xcfns1yl/configparser

Switch to termcolor

termcolor is a library which does all the pretty printing and stuff. Instead of doing it myself.

{feature-request}{bug}Pager Options

Bug:
If I change the setting Pager in ~/.cmddocsrc to:
Pager = some_prg
then viewing inside cmddocs fails with:
/path/to/some_prg: bad option '-fr'

Related feature request:
Add an option to set Pager_Options in the config-file to override hardcoded -fr-Options in:

subprocess.call([pager, "-fr", tmp.name])

Implement stats

With

  • Overall character/line/word/article/directory/commit count
  • edit graph

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.