Commit graph

552 commits

Author SHA1 Message Date
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
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
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
Florent
9949bbf919 Move exceptions to weboob.core.exceptions 2014-10-02 11:04:14 +02:00
Florent
990bb056eb Replace -D with -dd 2014-10-02 10:56:11 +02:00
Florent
23aec4046c Add -D option to base applications 2014-10-02 10:56:11 +02:00
Bezleputh
017c6f7e54 handle datetime in condition argument 2014-10-01 17:43:21 +02:00
Florent
a64c9f2edb Rename BaseApplication to Application 2014-09-26 10:18:12 +02:00
Romain Bignon
d5a43991b6 when getting an object, if at least one is found, display errors but correctly return the found object 2014-09-18 12:51:28 +02:00
Laurent Bachelier
e9c047ce93 applications: Define std* in the proper class
This would make weboob-debug unusable, for example.
2014-09-18 12:49:26 +02:00
Romain Bignon
a4c1acd2f0 fix regression introduced by 19a95dc0d6 2014-09-06 11:08:43 +02:00
Laurent Bachelier
c07e23cafc Use class attributes as much as possible for application output
refs #803
2014-09-04 12:41:25 +02:00
Laurent Bachelier
19a95dc0d6 Centralize encoding guesses, default to UTF-8
This might not be enough for print() and could need a locale.setlocale()
even though it is generally discouraged.

closes #1352
2014-09-04 12:41:25 +02:00
Romain Bignon
f834f63b02 Use fullid parameter and not a local formatting 2014-09-03 16:15:28 +02:00
Florent
030197c738 Remove the 'inspect' command 2014-09-03 15:02:38 +02:00
Florent
fe02de196b Remove the webkit_mechanize_browser import 2014-09-03 14:59:54 +02:00
Florent
c8e568fdd0 Use shortcut of id in interactive mode. Closes #881 2014-09-02 15:41:18 +02:00
Florent
d9730033bb Allows shortcuts for modules. Related to #881 2014-09-02 15:36:59 +02:00
Florent
322616b9e3 Add the default value displayed "upper" in aliases Closes #1319 2014-09-02 12:45:49 +02:00
Florent
ce1a00acce Import of FormFieldConversionWarning can not fail anymore
The test was here for python3 user, to not import browser1.
Since the load of the exception does not need browser1 anymore (see
"Remove import of browser1 in BaseApplication"), this check is useless
2014-07-09 15:53:46 +02:00
Florent
e12485dc84 Introduce local exception for SSL errors
It removes the import of SSL in console applications (SSL -> socket ->
base64 -> ...)
2014-07-09 11:45:55 +02:00
Florent
b8453fb0a8 Do not import Date in results header
Actually, the condition are not widely used. Do not load the datetime
module if we don't run it.
2014-07-09 11:43:48 +02:00
Florent
8a2a1ece5e Do not always import module used only in debug mode 2014-07-09 10:23:24 +02:00
Florent
f7cd0abc3b Remove import of browser1 in BaseApplication 2014-07-08 17:15:39 +02:00
Romain Bignon
e025fb0b20 rename ICap to Cap (closes #1424) 2014-07-05 17:33:44 +02:00
Romain Bignon
51958135cb rename CapBaseObject to BaseObject (refs #1424) 2014-07-05 17:26:05 +02:00
Bezleputh
2e5aa369e0 [repl] in do_ls goes fully back when there is a / in path 2014-07-05 14:24:53 +02:00
Bezleputh
ce60db2e57 [iformatter] move format_dict methods' content from PrettyFormatter to IFormatter 2014-06-27 09:00:07 +02:00
Bezleputh
aeab3fac71 [json] handle format_collection 2014-06-23 09:29:32 +02:00
Bezleputh
7b5ab26d0f [repl] move format_collection from repl to ifromatter 2014-06-23 09:28:26 +02:00
Oleg Plakhotniuk
8875fad439 Table and Json formatters can write output to a file now.
Signed-off-by: Oleg Plakhotniuk <olegus8@gmail.com>

closes #1412
2014-06-22 19:08:28 +02:00
Tanguy Ortolo
c098ac32bc Correct multiple language error
"Information" is always singular in English.
The verb "allows" requires a direct complement ("to allow one to do
something", not "to allow to do something").
2014-06-20 17:39:19 +02:00
Florent
c751b80bb6 Use fullid parameter and not a local formatting 2014-06-18 16:07:11 +02:00
Florent
8fee458824 Add some warnings 2014-06-18 15:45:18 +02:00
Florent
38a8fd00b7 Introduce parse_fields function 2014-06-18 15:45:11 +02:00
Florent
7244665495 Set fields in a consistant way with do() 2014-06-18 15:20:46 +02:00
Florent
020124d5ff Remove the '*' special fields in formatter 2014-06-18 15:19:35 +02:00
Florent
30732318b5 Introduce the DISPLAYED_FIELDS in formatter 2014-06-17 15:45:13 +02:00
Florent
b0349f0e8c Try to guess if we need to change the formatter 2014-06-17 15:43:04 +02:00
Bezleputh
b75d6dafcf [repl] change formatter when it cannot handle all selected fields 2014-06-16 21:43:35 +02:00
Bezleputh
c20e6123fc [repl] allow to browse subfolders with ls 2014-06-01 13:39:25 +02:00
Romain Bignon
5a6cdce345 fix unicode issues for values loaded from 'backends' config file 2014-05-19 09:20:34 +02:00
Romain Bignon
19ae5d6312 add linesep to output content if file is not sys.stdout (closes #1383) 2014-05-17 15:55:03 +02:00
Romain Bignon
15a58d5647 import browser exceptions from weboob.tools.exceptions 2014-05-17 14:56:07 +02:00
Romain Bignon
6fcac89dd5 first step in python3 support 2014-05-17 14:27:55 +02:00
Romain Bignon
7c1e08eb96 move browser exceptions into weboob.tools.exceptions 2014-05-17 14:27:55 +02:00