Commit graph

101 commits

Author SHA1 Message Date
Laurent Bachelier
9c5326c0e4 Make CapCollection a bit more useable
Collections are not stored in replapplication.objects anymore, but in
replapplication.collections. This fixes the IDs issue. There was no gain
from storing them in objects.

Completion right after cd should be faster (and should always have been
like that, it was pretty much a bug).

The display of do_ls() should be much clearer. Collections are always at
the end, have ids/title/backend like objects (but using a formatter
would be better than my current hack).

There are still many issues with the current implementation.
refs #774
closes #785
2012-02-12 15:49:08 +01:00
Laurent Bachelier
bfb3689456 Add object type filtering to iter_resources 2012-02-05 13:30:02 +01:00
Laurent Bachelier
baab16b931 Fix completion with new Collection objects 2012-02-03 00:07:45 +01:00
Laurent Bachelier
682e14c86a Make CapCollection understandable and useable by humans
* Make the declaration of fct and it in the constructor Collection,
 instead of adding them from the outside
* Add a function to flatten a list containing collection (solves the
 radioob search crash)
* Better display of collections in the "ls" command (and display both id
 and title)
* The "cd" command goes to the root of the path (like the UNIX cd)
* Move the Video object of canalplus in a correct path
* Make Collection iterable
* Add comments to CapCollection
* Cache the result of fct in a Collection; it is only called once
* CollectionNotFound errors can be more explicit by providing a path
* Require utf-8 in collection paths
* Code cleanups
2012-02-02 23:44:13 +01:00
Romain Bignon
c009b26864 fix crash when a command doesn't have a docstring 2012-02-02 08:44:00 +01:00
Romain Bignon
3a3bbd377e support XDG Base Directory Specification (closes #765) 2012-01-27 17:34:08 +01:00
Romain Bignon
14a7a1d362 support repositories to manage backends (closes #747) 2012-01-17 17:00:05 +01:00
Romain Bignon
b0d84fff2a fix unicode issue (closes #703) 2011-10-04 08:57:04 +02:00
Romain Bignon
367d996d50 get_object doesn't request the backend name in IDs (dedicated to fucking nigger pankkake) 2011-08-12 15:46:40 +02:00
Romain Bignon
18dd9e2b8f always flush formatter after calling a command 2011-08-12 09:56:30 +02:00
Romain Bignon
9e3b1a049e get_object() method requires an unique backend ID 2011-07-11 22:17:40 +02:00
Romain Bignon
090fb38feb ability to enter the backend name 2011-06-26 23:33:34 +02:00
Romain Bignon
908e32a713 fix command 'inspect' to don't crash if there isn't any browser 2011-05-12 15:02:40 +02:00
Romain Bignon
1dafee2b47 move repl code from ConsoleApplication to ReplApplication 2011-05-08 18:13:05 +02:00
Romain Bignon
daa524d75d 'ls' and 'cd' are now weboob commands 2011-05-08 17:25:32 +02:00
Romain Bignon
c587ce65b0 weboob-config can't be run in interactive mode anymore 2011-05-08 14:38:54 +02:00
Romain Bignon
c159a5d43e command 'ls' always refetch objects 2011-05-07 14:23:47 +02:00
Laurent Bachelier
8075d538f0 Better messages and return codes in applications
Use stderr and return codes >0 when it makes sense.
Loose return code conventions:
* 1 for generic errors
* 2 for user input errors
* 3 for remote errors (not found, etc.)
* 4 for not implemented
2011-05-04 00:44:43 +02:00
Laurent Bachelier
7bf794b7e5 Add missing fillobj() call on get_object
fillobj was only called when getting previously fetched objects in
interactive mode.
This probably wasn't detected because most get_* backend functions
usually fill a lot of fields by themselves.
2011-04-21 22:59:30 +02:00
Romain Bignon
7098e44d9b use CapResources for radios 2011-04-21 12:07:37 +02:00
Romain Bignon
c28d5a99c1 factorize ls and cd in ReplApplication 2011-04-21 11:01:50 +02:00
Romain Bignon
7e2bb91b3b change license to AGPLv3+ 2011-04-08 12:48:07 +02:00
Romain Bignon
d6cb3f78ed fix call to bcall_error_handler() on mother class 2011-03-05 23:56:47 +01:00
Romain Bignon
2ba3f46f3b split ReplApplication to create ConsoleApplication 2011-03-05 21:55:20 +01:00
Romain Bignon
bd7809f22e checks on given backends for 'backends <add|register>' subcommands 2011-03-01 11:06:39 +01:00
Romain Bignon
a84b3ea5a3 remove the useless '--to_file' parameter on boobmsg 2011-02-26 10:27:38 +01:00
Juke
1382b50a7d cleaner solution to output to a file 2011-02-25 18:49:23 +01:00
juke
6a40375b6a boobmsg can export to a file closes #490 2011-02-15 12:31:40 +01:00
juke
23009fe4a9 use stdout in format() closes #469 2011-02-11 18:52:08 +01:00
Juke
73e7d50e7f use stderr closes #470 2011-02-10 17:16:07 +01:00
Christophe Benz
638dc1f466 introduce unique_backend argument for parse_id 2010-12-13 16:43:27 +01:00
Christophe Benz
e9ede31053 fix parse_args conflict 2010-12-13 16:18:23 +01:00
Christophe Benz
5bdd1540fe s/parseargs/parse_args 2010-12-13 15:42:20 +01:00
Romain Bignon
fbf74148a6 reintroduce the 'short' optional parameter for get_command_help() 2010-12-13 11:31:58 +01:00
Romain Bignon
0a4e05e509 do not print weboob commands when application is not REPL 2010-12-09 12:03:21 +01:00
Christophe Benz
3dd50f363d remove unnecessary brackets 2010-12-08 18:10:42 +01:00
Romain Bignon
5dae3e3c92 use specifics OptionParser and OptionFormatter to display commands list 2010-12-08 17:53:05 +01:00
Romain Bignon
30db5a92a2 fix unicode issues 2010-11-29 21:07:28 +01:00
Christophe Benz
560798bf7d implement mandatory fields for custom formatters 2010-11-23 14:46:32 +01:00
Romain Bignon
c83c923e3d moved ICapDating.get_status() and ICapMessagesPost.get_status() into ICapAccount.get_account_status() 2010-11-20 20:52:53 +01:00
Romain Bignon
d1596e0487 ask: if choices are too long, display a list with labels instead of onliner question 2010-11-17 20:44:33 +01:00
Romain Bignon
b6821b0567 fixes related to ModuleLoadError 2010-11-17 19:43:25 +01:00
Christophe Benz
bf5741759a enhance inspect, use browser.location then browser.open as fallback 2010-11-17 16:26:52 +01:00
Christophe Benz
f0c3e6029a introduce ModuleLoadError 2010-11-17 15:05:53 +01:00
Christophe Benz
692caf9453 add a quiet mode for load_module 2010-11-17 14:17:38 +01:00
Christophe Benz
16fe553f51 fix english error, display exception message 2010-11-17 14:17:03 +01:00
Christophe Benz
25b9a48b59 add spaces to slashes for choices 2010-11-17 12:33:26 +01:00
Romain Bignon
c35497e582 load readline history in main() instead of constructor 2010-11-15 22:02:59 +01:00
Christophe Benz
5825b9f304 do not specify white color (37 value) for bold 2010-11-15 11:59:34 +01:00
Romain Bignon
0746942e02 accept backends name with only letters and digits 2010-11-14 22:18:56 +01:00