Commit graph

1,219 commits

Author SHA1 Message Date
Samuel Loury
bd7891f202 Allow ResultsCondition to compare timedelta
The user may now use conditions on durations (from the audio and the video
capabilities) in repl applications.

The documentation has been updated to take this change into account.
2014-11-28 14:55:55 +01:00
Laurent Bachelier
88df613a53 Fix English: "childs" into "children"
refs #1675
2014-11-22 16:36:03 +01:00
Bezleputh
faa3891f86 remove wconio dependency 2014-11-22 16:32:11 +01:00
Vincent Paredes
76555238dc fixing month replacing twice 2014-11-05 16:17:29 +01:00
Vincent Paredes
4d2ff7b094 supporting french month abbreviation without dot 2014-11-04 13:58:10 +01:00
Romain Bignon
eaf6b15a08 dump of tiles: save full image too 2014-10-21 17:56:18 +02:00
smurail
ab15874754 fix not logical arguments order 2014-10-21 10:28:18 +02:00
Florent
d6da9843db Set copyright in applications 2014-10-17 17:57:42 +02:00
Florent
feb1405813 bump to 1.1 2014-10-17 14:10:38 +02:00
Laurent Bachelier
d500abf336 We have so many tests we make nose crash!
We raise the recursion limit, as the recursion here is normal.
This happens with nose 1.3.4.
2014-10-14 12:25:43 +02:00
Laurent Bachelier
db1618e86f pep8: Various manual fixes 2014-10-13 23:03:51 +02:00
Oleg Plakhotniuk
d7acf211bd American amount to decimal conversion; PDF decompression function; regexp-based tokenizer. Part of #1641 2014-10-13 04:23:05 -05:00
Laurent Bachelier
f4c17cdc9d pep8: Fix E303 too many blank lines 2014-10-11 02:15:28 +02:00
Laurent Bachelier
4f897a8675 pep8: Fix object comparisons 2014-10-11 01:46:25 +02:00
Laurent Bachelier
7aeb3e942e pep8: Fix indentation is not a multiple of four
autopep8 -a -r -i --select E111 .

Manual check.
2014-10-11 01:41:00 +02:00
Laurent Bachelier
21e8f82fd7 pep8: Use "X not in Y" instead of "not X in Y"
flake8 --select E713, semi-manual fixing
2014-10-11 01:27:24 +02:00
Laurent Bachelier
448c06d125 pep8 blank lines fixes
flake8 --select W391,E302,E301,E304

autopep8 can't fix W391 even though it claims it can.
Fixed using a simple custom script.
2014-10-10 23:41:44 +02:00
Laurent Bachelier
e783f2c821 Remove tuple method parameters
They can be found through autopep8 (W690) or python-modernize.
Variables manually renamed.

This is because Python 3 does not support tuple unpacking:
http://legacy.python.org/dev/peps/pep-3113/
2014-10-10 23:41:44 +02:00
Laurent Bachelier
6161a0aacd pep8 fixes, modernizations
autopep8 -a -r -i --select E711,E712,W601,W602,W603,W604,W690,E304,E401,E502 .
Also includes some manual reindentations (many are left after the print()
changes).
Manually checked, some modernizations not commited here.
2014-10-10 23:41:43 +02:00
Laurent Bachelier
e2ac8687c6 Always raise instances of NotImplementedError 2014-10-10 23:41:43 +02:00
Romain Bignon
b1f20b5489 fix bcall to to new behavior of do(), and fix QtDo too, and all Qt applications... 2014-10-10 17:34:48 +02:00
Florent
628c63f899 Remove backend for do() calls 2014-10-10 14:11:45 +02:00
Florent
2d5bd37756 Documentation on -dd 2014-10-09 13:33:43 +02:00
Florent
4f33f914ad Allow to load a module with config=None 2014-10-09 13:24:52 +02:00
Laurent Bachelier
e52e85022a logging: Restore more discreet DEBUG color 2014-10-08 15:52:12 +02:00
Laurent Bachelier
72819cdb67 html2text: Use the class if possible 2014-10-08 15:45:40 +02:00
Laurent Bachelier
362b441445 newsfeed: No need for workaround with feedparser>=5.1 2014-10-08 15:45:40 +02:00
Bezleputh
d73c6b2245 Add a " LIMIT " keyword in conditions 2014-10-08 13:05:40 +02:00
Laurent Bachelier
7be9a6468b logging: Create a new level DEBUG_FILTERS
This is a cleaner approach that requires less configuration
in other applications.
This also easily allows us to have another color.

Many checks were made on being exactly at the DEBUG level, they were
fixed to also check on being below DEBUG (i.e. DEBUG_FILTERS).
2014-10-07 17:11:09 +02:00
Laurent Bachelier
a330b08262 logging: Better colors
Inspired by https://github.com/borntyping/python-colorlog
INFO had no colors.
You can run weboob/tools/log.py to test them.
2014-10-07 16:44:39 +02:00
Laurent Bachelier
24aea160b1 logging: Output to stderr, not stdout 2014-10-07 16:10:51 +02:00
Romain Bignon
5bd70c564f os.isatty is now forbidden (as stream.fileno() is not implemented by StringIO)
Use stream.isatty() instead.
2014-10-07 09:39:12 +02:00
Romain Bignon
d61e15cf84 rename things related to browsers
weboob.tools.browser -> weboob.deprecated.browser
weboob.tools.parsers -> weboob.deprecated.browser.parsers
weboob.tools.mech -> weboob.deprecated.mech
weboob.browser2 -> weboob.browser
weboob.core.exceptions -> weboob.exceptions

Also, the new tree for browser2 is:

weboob.browser: import weboob.browser.browsers.* and weboob.browser.url.*
weboob.browser.browsers: all browsers (including PagesBrowser and LoginBrowser)
weboob.browser.url: the URL class
weboob.browser.profiles: all Profile classes
weboob.browser.sessions: WeboobSession and FuturesSession
weboob.browser.cookies: that's a cookies thing
weboob.browser.pages: all Page and derivated classes, and Form class
weboob.browser.exceptions: specific browser exceptions
weboob.browser.elements: AbstractElement classes, and 'method' decorator
weboob.browser.filters.*: all filters
2014-10-07 00:30:07 +02:00
Laurent Bachelier
719435c3d7 Force absolute import 2014-10-06 13:56:24 +02:00
Florent
9949bbf919 Move exceptions to weboob.core.exceptions 2014-10-02 11:04:14 +02:00
Florent
a019819f9d Move browser2 from weboob/tools/b2 to weboob/browser2 2014-10-02 11:01:34 +02:00
Florent
990bb056eb Replace -D with -dd 2014-10-02 10:56:11 +02:00
Florent
cba66416b2 Expand html/xml in debug mode 2014-10-02 10:56:11 +02:00
Florent
bdd2be4d4b introduce an incremental id to help the debug reading 2014-10-02 10:56:11 +02:00
Florent
ef9e45a544 Print obj.attr first 2014-10-02 10:56:11 +02:00
Florent
20b5a534c5 Display results in debug only once 2014-10-02 10:56:11 +02:00
Florent
5a4920748d Get objects id and attribut name in debug 2014-10-02 10:56:11 +02:00
Florent
dbc33de235 Use %r and not %s 2014-10-02 10:56:11 +02:00
Florent
a3d8217fb7 Add the type in formatting 2014-10-02 10:56:11 +02:00
Florent
d89ef22772 Make some attribute private 2014-10-02 10:56:11 +02:00
Florent
b84b25db66 Fix formatting and add some black magic to @debug 2014-10-02 10:56:11 +02:00
Florent
5daba0f8ab Add debug on some standards filters 2014-10-02 10:56:11 +02:00
Florent
23aec4046c Add -D option to base applications 2014-10-02 10:56:11 +02:00
Florent
1b0096e6e3 Add a DebugFilter class to weboob/tools/log.py
The browser2 filter debugging is an extra level of "Debug". Since python
logging does not support adding severity levels, we use the Filter class
to remove the lines by default.

Sadly, we cannot pass variable to filters (logging system does not use
the instance passed with addFilter method), so we use to write a filter
for each use case (today: only one...)
2014-10-02 10:56:11 +02:00
Florent
b337d2f655 Add debug pre-processor 2014-10-02 10:56:11 +02:00