Commit graph

2,654 commits

Author SHA1 Message Date
Laurent Bachelier
f4dbefb6ef Add some useful properties to Collection 2012-03-13 22:08:46 +01:00
Laurent Bachelier
1430b40bc5 Fix some collecton validation
And add restrict_level helper method.
2012-03-13 22:08:46 +01:00
Laurent Bachelier
e70a125ab9 Make collection validation more powerful
Handle and use exceptions.
An example is provided with the redmine backend (not very useful
though). If you cd into the project title instead of the id, it is
accepted and the path is corrected.
2012-03-13 22:08:46 +01:00
Laurent Bachelier
5578618b06 Friendlier paths in canalplus
Lowercase, replace some separators.
This shows the point of having a path and a title!
Also try to fix the title if it is all uppercase.
2012-03-13 22:08:46 +01:00
Laurent Bachelier
c0121ae6ab Fix crash when entering unicode paths
prompt must be str, not unicode, so we encode it
2012-03-13 22:08:46 +01:00
Laurent Bachelier
ec689b1e7f Move all canalplus pages in one file
There isn't enough code to justify multiple files.
Also includes pep8 fixes.
2012-03-13 22:08:45 +01:00
Laurent Bachelier
b6021d4732 Better path changing support
* Create a get_collection method similar to get_* methods for objects.
* Fix title initialization of a collection
* Remove the hack were both id and title were allowed when CDing.
  That hack only worked with the canalplus module, and failed with
  others like redmine (but they still showed in suggestions).
  Moreover, the canalplus module now has friendlier IDs
  so this is not really needed anymore.
* Allow backends to tell if a path is valid or not.
  For instance, it now allows to cd in a Redmine project with no issues
  in it. It also won't display "404" for invalid project IDs.
  By default, we still use the unreliable method of checking there is at
  least one result in iter_resources().
* Fix cd completion to work with unicode strings (all strings after an
  unicode string were ignored!)
* Do not suggest '..' when completing cd in the root

refs #774
2012-03-13 22:08:45 +01:00
Laurent Bachelier
1a5ece25df Collections are now base objects
So no need for this check anymore.

refs #774 and reverts a change of 9c5326c0
2012-03-13 22:08:45 +01:00
Laurent Bachelier
b4b7182960 Make Collection more safe and sane
* Remove callbacks in Collection object
  Make Collection a "dumb" object (and also a base object,
  though it isn't very useful for now)
* Rename Path to WorkingPath, because it is more about managing state
  than being a single path.
* Rewrite almost all WorkingPath, because the code was overly
  complicated for no reason (I tried some special cases and it turned
  out that fromstring didn't handle them, and that the
  quote-escape-unquote was just unecessary). I also rewrote it to be
  more pythonic (no more lambdas and maps) and added tests.
* Require the full split path when creating a Collection. Because, come to
  think of it, an object needs an unique identifier; in the case of
  Collections, it is the full path, not only its last part.
  I might even replace the id by the full split path in the future.
* There is now only one way to get items of a Collection: calling
  iter_resources().
* Rewrite flatten_resources to iter_resources_flat(), which just calls
  iter_resources() recursively.
* Rewrite the collection part of the canalplus module. There is no more
  callback or a page calling the browser to check another page!
  The logic is only in iter_resources().
  The resulting code is not very pretty, but it should get better.
  As a bonus, avoid to reload the main XML file when we already have it
  open.
* change_path() now expects a split path and not a string.
* up/home special cases for "cd" are handled in the same place, and
  store the previous place properly (but are not yet exploitable by
  an user command).

This is a big commit but it would be hard to split it in *working*
commits.

If you read this entire commit message, I will buy you a beer.

refs #774
fixes #773
2012-03-13 22:08:45 +01:00
Romain Bignon
1dd26e5ffe update AUTHORS 2012-03-13 22:03:09 +01:00
Florent
c890fe26d7 Search bills on freemobile 2012-03-13 22:01:13 +01:00
Florent
749162188d Add fonction to list bills to download 2012-03-13 22:01:12 +01:00
Florent
7c147cecab Add Bill object 2012-03-13 22:01:11 +01:00
Florent
c4d1cde58c Sort results by date (last call in first position) 2012-03-13 22:01:10 +01:00
Florent
a8e01e7aee First implementation of boobill application
Only few functions are available
2012-03-13 22:01:10 +01:00
Florent
5fac5421eb Add history of calls on freemobile module 2012-03-13 22:01:08 +01:00
Florent
0238392059 Add datetime field to Details 2012-03-13 22:01:06 +01:00
jems
24ab551694 add library capability and backend and application for archimede software aloes http://www.archimed.fr/aloes/presentation-et-avantages-12.html
Signed-off-by: jems <jems@ldjm.fr>
Signed-off-by: Romain Bignon <romain@symlink.me>
2012-03-13 21:57:38 +01:00
Florent
2fbb21db97 Capability changes 2012-03-13 18:19:13 +01:00
Florent
af7e827856 Change capability to iter and download document 2012-03-13 18:18:18 +01:00
Florent
a379396869 pep8 on presseurop module 2012-03-13 17:34:16 +01:00
Florent
b0e8c10499 Pep8 on ecrans module 2012-03-13 17:31:24 +01:00
Florent
871a43b3be Add missing close 2012-03-13 17:25:15 +01:00
Florent
0cf5a2b8c5 Fix refresh of cache in case of empty file 2012-03-13 17:22:43 +01:00
Florent
79912d5d73 Fix encoding 2012-03-13 16:56:11 +01:00
Florent
aff616a149 Add special numbers option 2012-03-13 15:16:35 +01:00
Florent
a0d81b0ae1 Pep8 cleanups for ING module 2012-03-13 14:56:36 +01:00
Florent
dfb66a4fbd Pep8 cleanup on freemobile module 2012-03-13 14:46:55 +01:00
Florent
1ae1f23c85 Make pep8 happy on sachsen module 2012-03-13 14:46:55 +01:00
Florent
09c4733e4b Add a cache_expire option 2012-03-13 13:58:14 +01:00
Romain Bignon
becabad073 fix data regexp 2012-03-13 12:57:27 +01:00
Lord
be94f6ee72 fix empty searches
Signed-off-by: Lord <lord@lordtoniok.com>
Signed-off-by: Romain Bignon <romain@symlink.me>
2012-03-13 12:52:19 +01:00
Laurent Bachelier
062f2c4c3e Fix Python 2.5 support
And fix some PEP8 style issues (mostly about spaces) while I was there.

refs #806
2012-03-13 12:36:02 +01:00
Romain Bignon
db85b651d4 fix regexps 2012-03-13 12:35:07 +01:00
Florent
ca35d4f9cb Update authors 2012-03-12 17:20:51 +01:00
Romain Bignon
ef07a9e795 do not use thumbnail_url anymore (closes #810), use set_empty_fields() method, do not give fields in constructor of BaseVideo anymore 2012-03-12 17:16:42 +01:00
Romain Bignon
56691d7ea7 rename iter_search_results to either search_videos and search_gallery (closes #779) 2012-03-12 16:24:33 +01:00
Romain Bignon
46f94a1d78 update AUTHORS 2012-03-12 16:07:37 +01:00
Romain Bignon
bb06a46abf fix unicode issues 2012-03-12 13:57:20 +01:00
Romain Bignon
69fb2d3aa6 fix test 2012-03-12 13:48:49 +01:00
Romain Bignon
5019e07232 check all empty values possible 2012-03-12 13:44:51 +01:00
Romain Bignon
cc4e8c6266 use CapBaseObject.set_empty_fields() 2012-03-12 13:44:08 +01:00
Romain Bignon
4afac2a0d0 add method CapBaseObject.set_empty_fields()
This method can be used to fill all empty fields with the same value.

A field is empty when is value is None, NotLoaded or NotAvailable.

Example:

     # It will be impossible to get all empty fields, except
     # of 'url' (with a call to fillobj())
     video.set_empty_fields(NotAvailable, ('url',))
2012-03-12 13:42:00 +01:00
Lord
c45cddc337 add module cappedtv
Signed-off-by: Lord <lord@lordtoniok.com>
Signed-off-by: Romain Bignon <romain@symlink.me>
2012-03-12 13:23:27 +01:00
Florent
231b7ea9da Increase RSS size of ecrans module 2012-03-12 11:08:49 +01:00
Laurent Bachelier
bd8d103a8e Remove PAGES hacks from pastebin, cleanups
Using OrderedDict fixes the issue.
Also some pep8 fixes.
2012-03-12 00:24:29 +01:00
Laurent Bachelier
203244868f Better package description 2012-03-11 01:33:27 +01:00
Laurent Bachelier
28859116d9 Include base documentation files in package 2012-03-11 01:33:27 +01:00
Laurent Bachelier
42a1fee141 Fix account types and add account types support to bnporc, for the account types I could get.
Types were taken from KMyMoney, which is for personal tracking, however
some types had no use (cash not something the bank can provide,
maybe credit card but it is usually the "coming" field for us).
Sources: https://en.wikipedia.org/wiki/Bank_account (but not focused on
personal banking) and it's French translation which was more interesting.
Other websites for American and Australian banking almost always mentioned three
accounts: checking/current, savings/deposits, term/fixed deposits.

And some code refactoring.
2012-03-11 01:33:20 +01:00
Romain Bignon
7e414804c8 add required class attributes 2012-03-10 09:23:12 +01:00