- timeout increased to 15 s
- if a query fail, it's retried up to 5 times
- foreign key PRAGMA is executed on every new connection object (should fix non working foreign keys)
those are Q&D workarounds for issues with Sqlite, before switching to a higher level module to handle it correctly.
- main profile (i.e. the one specified on command line when invocating "jp shell") was not used. It is now added to arguments if the value is not overriden on command line or in use
- EOF (i.e. when user press C-d) is now understood as "quit" command
those methods are added in pubsub directly instead of being subcommands of pubsub/subscription to make them more easy/natural to use. The node owner versions are in pubsub/node/subscriptions though.
- type of discovery can now be specified (can be "infos", "items", or "both" which is the default)
- a complex output is now used
- default output has been improved by the use of colors an tables
- added "none" state to Subscription, it is needed to remove existing subscription
- implemented subscriptionsGet and subscriptionsSet
- replaced "nodeOrEmpty" by "node" for affiliationsGet, affiliationsSet and subscriptionsGet as node is mandatory for these commands
- adapted to new behaviour (keys which are names in lower case en stripped are now used)
- added --syntax so force a specific syntax. If not used, profile's default syntax will be used
- syntaxes and default_syntax are now class attribute instead of members of params_data
- removed local exception UnknownSyntax in favor of exceptions.NotFound
- syntaxes are now saved with a key which is name in lower case and stripped, unmodified name is put in syntax's data
- new getSyntax (syntaxGet in bridge) method to get syntax key and raise an error if not found. Can be used by frontends to check that a syntax is known.
search is a kind of "grep for Pubsub". It's a powerful command which allows to look for specific data in a pubsub node, recurse sub nodes if requested, and execute an action on the result.
search allows to look for items with following filter:
- simple text search
- regex
- xpath
- python code
filters are read an applied in the order in which they appear on the command line.
Then flags can be used to modify behaviour, currently there are:
- ignore-case to specify if search must be case sensitive or not
- invert to invert result of the search (i.e. don't match instead of match)
- dot-all which is specific for regex, cf. re module
- only-matching which return the matching part instead of the full item
Once a item match filters, an action is applied to it, currenlty there are:
- print, which do a simple output of the full item (default)
- exec, which run a jp command, specifying the service, node and item corresponding to the match
- exteral, which run a external command, sending the full item on stdin
By default search is only done on requested node, but if max-depth is more than 0, sub nodes will be searched too.
when a command is calling host.quit() in a D-Bus callback, GLib mainloop is exiting and quit the whole process without (apparently?) any way to block it. Couldn't find a good way to avoid that, so subprocess are now used as a workaround, instead of launching commands in the same process. When we'll get rid of python-dbus, there may be an other way.
Execuring external commands is now possible through the shell/! command.
This command launch jp in REPL mode, allowing do normal jp commands with some facilities.
Command can be selected with "cmd" (e.g. "cmd blog").
An argument can be fixed with "use" (e.g. "use output fancy").
Command is launched with "do", or directly with its name if it doesn't conflict with a shell command.
Arguments completion is still TODO (only shell commands are completed so far).