noqqe / cmddocs Goto Github PK
View Code? Open in Web Editor NEWAn interactive commandline interface for your personal docs using python, Cmd, git and markdown
License: MIT License
An interactive commandline interface for your personal docs using python, Cmd, git and markdown
License: MIT License
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''
Using the Quick Start Config from the readme results in an error:
The Section "Colors" is needed.
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
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
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...
It could be useful to have the option to append a file-extension to the filenames.
Benefits:
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.
Also allow flags for editor
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
Steps to reproduce:
To be able to simply mail a specific article to someone.
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
termcolor is a library which does all the pretty printing and stuff. Instead of doing it myself.
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:
Line 162 in c35d41e
With
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.