Commit graph libervia-backend/frontends/src
Author SHA1 Message Date
Goffi
3fe93a1b45 frontends (xmlui): added ValueGetter.keys 2017-10-20 08:39:58 +02:00
Goffi
d78aa6f922 frontends (xmlui): new _xmlui_for_name attribute:
_xmlui_for_name is an attribute which can be set to Label widgets to indicate the name of the linked widget.
This attribute is set automatically for LabelContainer.
data argument in _parseChilds is now a dict (or None)
2017-10-16 07:21:44 +02:00
Goffi
5a34d090b3 frontends (xmlui): new widget_value dict to get first value of widget by name 2017-10-16 07:18:07 +02:00
Goffi
d1a44e1501 jp (file): typo 2017-10-16 07:16:11 +02:00
Goffi
151faf6a73 jp (ticket): ticket command first draft:
only has an "import" subcommand for now
2017-10-06 10:55:54 +02:00
Goffi
1bcdca4a2f plugin import: node can now be specified + added a "session" dict to keep import session data:
import session data are data that can be used by importer to store anything which can be useful to keep between import methods.
2017-10-06 08:52:51 +02:00
Goffi
3c79544cc4 jp (base): fixed CommandAnswering and progress bar 2017-10-01 12:21:23 +02:00
Goffi
83aa722103 frontends (xmlui): a dict of named widgets is kept, so they can be easily be retrieved 2017-10-01 12:21:23 +02:00
Goffi
506f948214 core, frontends (xmlui): new LabelContainer:
LabelContainer is like a PairContainer where first widget can only be LabelWidget or EmptyWidget. This case is the most common, and allow to generate better code when label can be associated to widget (e.g. in HTML).
2017-09-24 16:36:11 +02:00
Goffi
c7ccdde0c9 jp (pubsub/node/schema): check that a schema exists before parsing it (fix issue on new schema edition) 2017-09-24 16:29:18 +02:00
Goffi
dcb60b3709 jp (shell): changed prompt colour 2017-09-08 07:58:10 +02:00
Goffi
15ff6aedf4 jp (shell): fixed use of profile + added EOF handling:
- 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
2017-09-08 07:58:10 +02:00
Goffi
e33d68bcf1 jp (pubsub): added subscribe, unsubscribe and subscriptions methods:
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.
2017-09-08 07:58:08 +02:00
Goffi
e9c0f5e127 jp (pubsub/node): added schema (set/edit/get) commands to manipulate PubSub node schema 2017-09-06 07:39:10 +02:00
Goffi
c9c34550df jp (output/template): check if there is a template before initializing Renderer 2017-08-24 01:11:47 +02:00
Goffi
2801c01eca jp (info/disco): fixed headers order for items table 2017-08-23 00:52:36 +02:00
Goffi
c46bd004fc jp (info/disco): type selection + output improvments:
- 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
2017-08-23 00:14:15 +02:00
Goffi
f4761fb1cc jp (common): added use_buffer argument in Table:
when use_buffer is True, the Table is not printed but put in a buffer. A unicode string can then be computed when string property is used.
2017-08-23 00:10:09 +02:00
Goffi
40fa0ed846 jp (common): fixed empty table display when headers are specified 2017-08-23 00:08:30 +02:00
Goffi
caa64d5118 jp (info/disco): added --no-cache option 2017-08-22 22:13:22 +02:00
Goffi
9f30634f14 core (memory/disco): added use_cache parameter to discoInfos/discoItems (set to False to ignore cache) 2017-08-22 22:12:57 +02:00
Goffi
2964a74dda jp (info): fixed help for version and session 2017-08-20 15:01:35 +02:00
Goffi
1d07c6bdd7 jp (pubsub/node): added subscriptions subcommand:
added subscriptions commands for node owner, with get/set subcommands (work in a similar way as affiliations)
2017-08-20 10:33:33 +02:00
Goffi
eebf6e50e7 jp (profile): added disconnect command 2017-08-20 10:26:10 +02:00
Goffi
4dea715ec5 primitivus(chat): fixed scroll down (was broken when Primitivus had not the focus and was receiving messages) 2017-07-17 16:20:55 +02:00
Goffi
b4312f210a jp (common): fixed decode error when item is not specified 2017-07-14 09:06:03 +02:00
Goffi
50ff24cc64 primitivus (chat): added "GOTO_BOTTOM" ("G") shortcut to scroll down to last message in history 2017-07-14 08:34:10 +02:00
Goffi
252e0e29f4 primitivus (chat): only scroll down if we are at the bottom of the discussion 2017-07-14 08:32:49 +02:00
Goffi
60700377b8 jp (blog/edit): avoid call to syntaxConvert if syntax is already XHTML 2017-07-13 22:49:37 +02:00
Goffi
bd6ac76b45 jp (blog/edit): pretty format XHTML before editing it 2017-07-13 21:54:15 +02:00
Goffi
5c7d273ebc jp (common): fixed encoding issue in URLs 2017-07-13 21:45:26 +02:00
Goffi
c05a0028b6 jp (blog/get): added "url" key, which compute xmpp: URL of items 2017-07-13 21:13:35 +02:00
Goffi
da6bf7123a jp (blog/edit): syntax modifications:
- 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
2017-07-13 20:55:35 +02:00
Goffi
72ba9316f2 jp (event/attendee/list): added --missing to show missing people (ones who didn't replied) and --no-rsvp to hide ones who answered 2017-07-09 16:17:16 +02:00
Goffi
1d3680445d jp (pubsub/search): fixed encoding for stdin in external commands 2017-07-09 15:20:31 +02:00
Goffi
90550ef38b jp (pubsub/search): profile is transmited to subcommand for "exec" action 2017-07-08 22:50:25 +02:00
Goffi
23416b5d12 jp (arg_tools): args is not modified anymore in get_use_args + fixed args returned + parser_args are returned separatly (return is now a tuple) 2017-07-08 22:49:55 +02:00
Goffi
367bb66a01 jp (pubsub): new search command:
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.
2017-07-08 21:54:24 +02:00
Goffi
4331a03562 jp (arg_tools): moved get_cmd_choices, get_use_args and escape to a new arg_tools module, so they can be used in other commands than shell 2017-07-08 21:45:14 +02:00
Goffi
62c17395bd jp (shell): use of subprocess instead of running commands in the same process:
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.
2017-07-07 22:33:55 +02:00
Goffi
783d14bfc7 jp (base): typo 2017-07-07 12:45:28 +02:00
Goffi
04b274a87b jp (shell): added "whoami" command to print currently used profile 2017-07-06 20:35:21 +02:00
Goffi
cee44aadbf jp (shell): don't print header if a command is specified in help 2017-07-06 20:31:31 +02:00
Goffi
6672bfc57b jp (shell): shell command (REPL mode), first draft:
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).
2017-07-06 20:28:25 +02:00
Goffi
73ed5094b9 jp (pubsub/hook): added create/delete/list hook command to handle new Pubsub hook feature 2017-07-05 15:05:49 +02:00
Goffi
702c5e78e9 jp (common): fixed the use of --last-item when "-n [node]" is used 2017-07-05 15:04:45 +02:00
Goffi
3b8aa22931 jp (event/invitee/list): don't add a space after nick and jid when a table is displayed 2017-07-05 14:50:13 +02:00
Goffi
eaa420fb03 jp (event/invitee): added list command to get R.S.V.P. :
RSVP are gotten for invitees node, and R.S.V.P. are displayed. Then a summary display the number of yes, maybe and no, and the expected number of guests.
2017-07-02 20:09:25 +02:00
Goffi
40220c3d7d jp (event): added checkURI to InviteeGet and InviteeSet 2017-07-02 20:09:24 +02:00
Goffi
3cc90179b5 jp (common): new ansi_ljust, ansi_rjust and ansi_center command + table:
- ansi_ljust, ansi_rjust and ansi_center are equivalent to string.ljust, rjust and center, but handle strings with ANSI escape codes
    - new Table class to handle tabular data and display them with ASCII borders/separations.
    - Table is quite flexible, filters can be applied to data, header can be shown or not, columns/headers can be left/right aligned.
    - table can be displayed without decoration to align text data, using display_blank helping method
2017-07-02 20:09:21 +02:00