So previous commit 666941d471 broke the current pip version
of bibtexparser (0.6.2), which does not have a
homegeneize_fields keyword. My bad and fixed!
+ The colors name's are the number 0 through 255.
+ Old names still work.
+ Add `magenta` color, wrongly named `purple` before.
+ Adds `white`, `darkgrey`.
+ grey/gray spelling
Also removed italics as a default option for publisher.
Related: #44
- Fix the previous default to 'None' (the string 'None', not None)
in the config.
- Adds support for using the $EDITOR when none is defined in the condif.
- Use ui.editor instead of content.editor in the add commnand.
Without args.prog, AliasCommand fail. Alias is better documented
in the readme and initial config files.
Update will now only trigger with version bumps. And the plugins
section is not updated. Removes the --upgrade flag.
On Python 3, invoking `pubs` would display a stacktrace, because
the subparser was not required.
This commit also simplifies the parser code by using .set_default()
to specify which command should be run.
This prompted changes in the plugin code. The code is still not
functioning, but many fixes in this commit bring the code closer
to a working state.
Add a theme section in the configuration file to allow users to
set the colors used by different elements of the ui.
Improve the update mechanism so that incremental changes to the
configuration file can be incorporated.
The update is done transparently, and displays a warning message explaining the change.
All the update machinery has been moved to the new update module.
It depends on configobj, is cleaner and simpler than the previous implementation.
It adds comments in the config file, and type verification.
Related: #18
`print_out()` is replaced by `message()`, that redirect the output to
the stdout controlled by the PrintUI instance. Other than that, can be
used the same way as `print()`.
The error was due to python 2 and 3 not playing nice when opening files.
This is probably linked to some botched unicode handling on our part somewhere
else is the package, and needs to be addressed when the `configs` module is
rewritten.
Also addresses some other minor unicode bugs.
Fix#27.
Related #18.
First this brings a change to the paper API: the terminology of bibdata
and bibentry is clarified: now bibentry is a dictionary of the form
{citekey: bibdata} where bibdata corresponds to the actual dictionary of
bibliographic fields and values {author: ..., year: ...}.
Now bibentry is an attribute of the paper object that is generated from
citekey and bibdata.
This commit fixes all tests in particular an issue with citekey in
bibentry not updated.
Also removes prints in tests and deprecated assertEquals.
Usecase tests now fail if the command ask for unexpected inputs.
Removes queries for user input in attach and add commands (for deletion
of a copied document file). The input was not coherent with tests and is
annoying.
0b64bf0 introduced a hack (http://git.io/1ZbMkg) related to an issue
in bibtexparser : sciunto/python-bibtexparser/issues/17.
This has been fixed by sciunto/python-bibtexparser@6beb646 and the hack
can be safely removed.
Pubs should be updated accordingly as soon as the bibtexparser FIX gets to a released version.
Not so clean since trying to change stdout encoding requires accessing
sys.stdout.buffer, so fake_env has to mock this layer also. The basic
differences between p2 and p3 are handled in p3.py.
- Update fake_env for compatibility with io.
- Uniform open (through _my_open in content).
- Fix read issue for config (although still using SafeConfigParser that
is deprecated in py3).
- Document are added through repository method.
- Correct handling of the copy option.
- Does not check if document exists yet.
- Does not bypass copy=False if an url is given. Should it?
- Currently the document is actually pushed twice (not optimal).
Note: in current state the non-copy addition of document is not
implemented. This commit also adds the raise of a NotImplementedError if
the behavior is requested.
Originally intended to fix a bug in edit openning fils with non-ascii
characters.
Now all data is assumed to be manipulated as unicode. Therefore all
values returned by functions from content are unicode. There are a few
exception in order to download non-unicode data without failing to
decode. These exception are marked by the 'byte_' prefix.
The io package is used instead of builtin open for all file
transactions.
The fake_env test helper has to be modified (hacked, to be honnest) since
fake_filesystem does not offer a mock of io.
This is still WIP. Two issues still have to be solved:
- first there is an UnicodeWarning raised by bibparser,
- also config is still directly using builtin open.
- edit command fails correctly on unknown citekey,
- init command and filebroker use content module to check paths,
- fix wrong docfile in testrepo,
- list command does not fail on None added date (unknown add dates are
older than everything else). Also adds relevant test.
Open command was not using system_path to ensure user expansion.
Testrepo was using pubsdir:// instead of docsdir://. Although not
directly used in test this was misleading and incoherent.
Also fixes missing system_path in filebroker.
Paths should be normalized through content.system_path before any actual
operation on files. This is in particular taken care of in content
functions check_file, check_dir, write_file, and read_file.
The Repository rename_paper method has been updated. The citekey update
and syncronization with citekey in the bibdata should be handled in a
sane manner inside the Paper class.
The error raised by Repository.push_paper was different depending on
whether the existence of the paper in the repository was tested directly
through the filebroker (quicker when list of citekeys in not loaded) or
through the regular __contains__ method.
* only bibtex format is supported
* all tests except test_repo.py and edit test pass
* edit and update commands were not updated
* removed --format argument from export, only bibtex is supported.