33 Commits

Author SHA1 Message Date
Fabien C. Y. Benureau
2ad04e4d13
Merge branch 'master' into pr-191 2019-05-06 00:18:23 +09:00
Olivier Mangin
07c002503b
Minor: removes todo comment about implemented case 2019-03-19 22:27:57 -07:00
Amlesh Sivanantham (zamlz)
4a61f91cb5
Created a doc add/rm event 2019-03-05 11:33:35 -08:00
Amlesh Sivanantham (zamlz)
b411bd16d8
Setup PaperEvent class. Git plugin only listens to this class 2019-02-28 09:35:57 -08:00
Amlesh Sivanantham (zamlz)
7f1d839568
Added placeholders for more events. Updated repo.py to use some of the
new events.
2019-01-24 18:13:49 -08:00
Fabien C. Y. Benureau
3fee6b9403
valid_citekey function in bibstruct 2019-01-05 20:57:03 +09:00
Fabien C. Y. Benureau
a484bab67d
cleanup PR 2019-01-05 00:49:42 +09:00
Fabien C. Y. Benureau
b99c5b43fa
handle / in citekeys 2019-01-04 23:17:54 +09:00
Fabien C. Y. Benureau
4b1717b7fd
dialog after editing paper 2018-06-10 19:09:49 +09:00
Olivier Mangin
81f2661593 Cosmit 2017-07-22 13:35:13 -04:00
Olivier Mangin
4ffd62fe9f [notes] Allow different file extension for note file (see #70). 2017-07-12 10:41:51 -04:00
Dennis Wilson
fbff9cd94c default message for errors bugfix 2017-05-24 14:18:39 +02:00
Fabien C. Y. Benureau
0f84268ebf Honor custom pubsdoc in config 2016-06-06 00:25:27 +02:00
Fabien Benureau
e5b898c5c2 Cache implemented
The implementation is designed to be robust to filesystems having integers
or nanosecond stat time.

Added a requirements.txt file for the tests:
`pip install -r tests/requirements.txt` to install the necessary packages
to run the tests.

Fix #13, Fix #14
2016-01-23 02:03:02 +01:00
Olivier Mangin
ed2bbb4498 Removes generic handling of errors from commands.
The default behavior for commands is now to only catch exceptions that
must be handled specifically. This includes outputting a context
dependant message, cleaning up, etc. All other exceptions will be
handled by the ui.
2016-01-15 19:02:56 -05:00
Olivier Mangin
6366f4bd01 Uses exception __string__, not __repr__ to carry message. 2016-01-15 19:02:56 -05:00
Olivier Mangin
b12c6297f0 Adds exception catching in main command. 2016-01-15 19:02:56 -05:00
73
a926c4c654 adds a *doc add|remove|export|open* command; depricates commands *open* and *attach*; fixed typos in readme.md and uis; 2015-12-13 21:34:48 +01:00
Fabien Benureau
93c54939b3 Rewritten config 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
2015-12-04 20:49:05 +01:00
Olivier Mangin
de2a50eeb2 Fix tests and terminology.
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.
2015-05-07 13:17:44 +02:00
Fabien Benureau
dd0475db46 added implicit autocompletion for open and edit cmds 2015-01-23 12:06:59 +01:00
Olivier Mangin
89bf370902 Fails to add with existing citekey.
Also adds add usecase test and improves repository __contains__.
2014-04-28 20:08:05 +02:00
Olivier Mangin
39b2e4f912 Factorizes code for adding document.
- 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).
2014-04-28 19:45:06 +02:00
Olivier Mangin
c45b64506a Merge branch 'develop' into feat/python3 2014-04-19 22:18:51 +02:00
Fabien Benureau
071730a49b fix #5 and achieve method parity between databroker and datacache 2014-04-19 21:11:02 +02:00
Olivier Mangin
01fd368c97 Fix import and except syntax for python3. 2014-04-19 16:56:31 +02:00
Olivier Mangin
ad29b27412 FIX bugs witth added time.
Actually implement set of added time in repository.
Changes storage of added time (now as datetime.datetime).
2014-04-17 19:15:04 +02:00
Olivier Mangin
07cb6f696c Adds back edit command.
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.
2014-04-16 18:47:14 +02:00
Olivier Mangin
e4a25abcfb FIXES test_repo.
Removes 'id' entry from bibdata.
Fixes bug introduced in repo.
2014-04-15 21:09:10 +02:00
Olivier Mangin
de3dda85d1 FIX inconsistent error on push for existing paper.
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.
2014-04-15 19:32:29 +02:00
Olivier Mangin
2f1a8ae42a Adds possibility to create repo when instance initialized.
This avoids having to manually call _create on filebroker.
2014-04-15 19:28:12 +02:00
Fabien Benureau
d3736e257b moving from pybtex to bibtextparser, fixed major regressions.
* 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.
2014-04-13 15:10:40 +02:00
Fabien Benureau
8d91545472 papers renamed 'pubs' 2013-11-14 04:40:29 +01:00