379 Commits

Author SHA1 Message Date
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
Olivier Mangin
d0a1d64720 Fix warning about deprecated SafeConfigParser. 2015-05-07 10:58:29 +02:00
Olivier Mangin
45fc257575 Fixes #32.
Use key depending on bibtexparser version in endecoder.
2015-04-28 11:56:50 +02:00
Fabien Benureau
f7dcc60fbc made formatting more robust 2015-03-29 03:49:53 +02:00
Fabien Benureau
1319ebb828 added some doc in readme 2015-03-29 03:45:04 +02:00
Fabien Benureau
0aaf094fa1 temporary fix for TypeError exception at init 2015-03-29 00:23:55 +01:00
Fabien Benureau
825966d34e fixed typo in oneliner 2015-01-24 01:20:14 +01:00
Fabien Benureau
526dc6418f updated add cmds with isbn support, improved dialog, replaced -c and -C by single --link option 2015-01-24 01:01:31 +01:00
Fabien Benureau
3989a13359 updated oneliner and colors 2015-01-24 01:01:30 +01:00
Fabien Benureau
9fe568805c fixed bug in attach cmds 2015-01-24 01:01:30 +01:00
Fabien Benureau
67abfdd97a Update readme.md with link to website. 2015-01-23 19:14:51 +01:00
Fabien Benureau
27a3058bee improved dialogs 2015-01-23 16:47:50 +01:00
Fabien Benureau
dd0475db46 added implicit autocompletion for open and edit cmds 2015-01-23 12:06:59 +01:00
Fabien Benureau
bb45eee96d update gitignore 2015-01-23 12:00:31 +01:00
Fabien Benureau
4c678b6a8f fixed occasional ZipImportError at install 2015-01-23 11:58:30 +01:00
Fabien Benureau
2aba477e84 downplaying colors, authors are just bold 2015-01-22 04:09:15 +01:00
Fabien Benureau
2cabdf4703 add dialog to delete the original docfile if copied 2015-01-22 04:08:35 +01:00
Fabien Benureau
540b2c3113 more robust parsing of bash commands. added remove_file method stub. 2015-01-22 04:07:30 +01:00
Fabien Benureau
69a045c203 remove more verbose, report action taken. 2015-01-22 04:06:03 +01:00
Fabien Benureau
2dc1b9ea4f fix input() 2015-01-22 04:03:19 +01:00
Fabien Benureau
97a0d15ca2 fix graceful exit when DOI is not recognized 2015-01-20 11:06:52 +01:00
Fabien Benureau
96d0ea6218 Update readme.md
Correct example, add doi example.
2015-01-09 00:18:02 +01:00
Fabien Benureau
0c51c5f36b fix UI interactions for Python 2.x 2015-01-08 15:00:18 +01:00
Fabien Benureau
adb0158c3d experimental support for adding from DOIs 2015-01-08 14:58:41 +01:00
Fabien Benureau
2e5defeb52 improved setup for pypi submission 2014-10-28 13:22:11 +01:00
Olivier Mangin
921c54f535 Closes issue #21.
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.
2014-09-11 19:05:59 +02:00
Olivier Mangin
d37b15dc3d Merge branch 'feat/python3' into develop 2014-09-11 18:50:23 +02:00
Olivier Mangin
adb0caa3ed Use default python in executable. 2014-09-11 18:47:54 +02:00
Olivier Mangin
f2125b4c19 Tags have to be printed in alphabetical order. 2014-09-11 18:47:11 +02:00
Olivier Mangin
0479636393 Fix issues with stdout and updates tests.
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.
2014-09-11 18:35:07 +02:00
Olivier Mangin
52813439dd Removes useless beets_ui and FIX input issue between python 2 and 3. 2014-09-11 18:35:07 +02:00
Olivier Mangin
fd49c3acf2 Removes unappropriate encoding of string. 2014-09-11 18:35:07 +02:00
Olivier Mangin
136b8f83dc Fix fake_env, fix configparser issues, uniform 'open'.
- 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).
2014-09-11 18:35:07 +02:00
Olivier Mangin
d758df2ac9 A few python3 fixes.
- Fix one implicit relative import.
- Fix call to file builtin in test_env.
- Fix deprecated lambda syntax.
2014-09-11 18:35:07 +02:00
Olivier Mangin
cac73d251c Removes unused paper number in bib_oneliner and filers. 2014-09-11 18:33:55 +02:00
Fabien Benureau
e1fd34a1ea alphabetical option for list command 2014-07-27 20:14:29 +02:00
Olivier Mangin
4df972821c DOC: papers <- pubs. 2014-05-28 15:25:19 +02:00
Olivier Mangin
47103058d6 FIX bug in query introduced by d3736e25.
Author name equlity to query is tested instead of query inclusion.
2014-05-28 15:10:51 +02:00
Olivier Mangin
4fd2e964b3 FIX bug in tag command (multiple line printed instead of one). 2014-05-22 18:41:26 +02:00
Olivier Mangin
0b64bf086e Update for latest bibtexparser (>= 0.5.3).
Breaks compatibility with previous versions. Also fixes the UnicodeWarning.
2014-04-28 20:53:49 +02: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
53a0f0a86e Fixes path conversion for add_doc.
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.
2014-04-28 18:20:45 +02:00
Olivier Mangin
506bb24e50 Many cleanup in unicode encoding.
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.
2014-04-23 21:28:20 +02:00
Olivier Mangin
3a149f655f Fix bug introduced by 78437acb4aab80f7c6cd5fa0f58de5ffd94d8ec5. 2014-04-23 16:52:31 +02:00
Fabien Benureau
48ad7e9b69 fix bug when calling 2014-04-21 19:17:39 +02:00
Fabien Benureau
84fd5d7649 fix #17 2014-04-20 02:41:30 +02:00
Olivier Mangin
78437acb4a Merge several steps towards python3 compatibility.
(From branch 'feat/python3' into develop.)
2014-04-19 22:38:18 +02:00
Olivier Mangin
6e6aa8b3ef Adds missing dateutil dependency. 2014-04-19 22:36:05 +02:00
Olivier Mangin
c45b64506a Merge branch 'develop' into feat/python3 2014-04-19 22:18:51 +02:00