Commit graph

2,982 commits

Author SHA1 Message Date
Goffi
158d61b84e plugin import ticket, import ticket bugzilla: some normalization in values:
normalization (i.e. recommandations for importer to have similar values) has been done for some values:
- "status" is now one of "queued", "started", "review", "closed"
- "priority" and "severity" must be stripped and lower case
2017-10-16 07:39:54 +02:00
Goffi
b5daa89208 plugin schema: use new "prepend" argument to put "id" widget first. 2017-10-16 07:36:41 +02:00
Goffi
b8839b97e4 core (xmlui): new "prepend" argument for dataForm2Widgets and dataFormResult2XMLUI:
This argument allow to create widgets which will be put first in LabelContainer of generated XMLUI.
An iterable of *args for XMLUI.addWidget must be used.
2017-10-16 07:36:03 +02:00
Goffi
59c6ab9973 template (xmlui): new properties + inheritance fix:
- "values" property in OptionsWidget return selected values.
- "labels" property in OptionsWidget return list of labels
- "for_name" property in LabelWidget return name of associated widget if set, else None
- fixed inheritance for StringWidget and TextBoxWidget
2017-10-16 07:28:36 +02:00
Goffi
f97b08382f plugin schema: deserialise is now the last kw argument 2017-10-16 07:23:09 +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
697bec616c plugin tickets import Bugzilla: Bugzilla tickets importer:
it imports tickets from Bugzilla's XML export format.
2017-10-06 10:55:54 +02:00
Goffi
748eed8ff1 plugin tickets import: specialized importer for tickets, first draft:
import tickets in a node with schema. Comments are not handled yet.
2017-10-06 10:55:54 +02:00
Goffi
9bca9328c3 plugin pubsub schema: values handling:
- "schema" attribute can now be specified directly as a data_form.Form (reparsing it will be avoided in this case)
- new "deserialise" parameter allows deserialisation from unicode strings in sendDataFormItem
- values can now be an iterable or directly the value to use (it will be put in a list automatically in the later case)
- "id" is now put directly in XMLUI's "id" field instea of "_id"
2017-10-06 10:55:51 +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
80eb458024 plugin import: generic data import plugin:
this plugin handle common task for importers. Specialized importers (e.g. blog import) use it as a basic, and specific importers (e.g. Dotclear) register to the specialized one.
Blog importer generic method have been moved to it.
2017-10-01 12:21:23 +02:00
Goffi
3c79544cc4 jp (base): fixed CommandAnswering and progress bar 2017-10-01 12:21:23 +02:00
Goffi
fa1680a119 template (xmlui): added values property to be able to use always values even when there is only one value 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
3ec8f283cb core (xmlui): container now keep a list of children 2017-10-01 12:21:23 +02:00
Goffi
df038ad3d4 core (xmlui): added method to convert data form result to XMLUI:
- former method was misnamed as it was used to convert data form element to XMLUI, so it has been renamed to dataFormEltResult2XMLUI
    - dataFormResult2XMLUI is now use to convert wokkel.data_form.Form instances to XMLUI
2017-10-01 12:21:23 +02:00
Goffi
499f2525cc plugin PubSub Schema: schema helper methods:
3 new methods are introduced by this patch:
- psSchemaUIGet to get XMLUI from node schema
- psItemsFormGet to get items as XMLUI when we know they are data forms
- psItemFormSend to set item from values when we know it's a node with schema. For this method, schema can be specified, and if it is not it will be retrieved from node (which imply an additional XMPP request)
2017-10-01 12:21:21 +02:00
Goffi
04d851c5c5 template: template XMLUI first draft:
this module prepares an object which can be easily used in templates to construct interface from XMLUI.
2017-09-24 16:39:36 +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
3f2c1046eb plugin XEP-0060: use client instead of profile_key in getItems 2017-09-24 16:32:22 +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
3d6cac0403 core (memory/sqlite): typo 2017-09-22 18:04:14 +02:00
Goffi
ab2e625607 core (memory/sqlite): better stability:
- 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.
2017-09-21 21:53:28 +02:00
Goffi
4602edfb4f tmp (wokkel): fixed subscriptions node handling 2017-09-08 07:58:10 +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
b567e87e9b plugin XEP-0060: added/fixed subscribe/unsubscribe and subscriptions methods/bridge methods:
subscriptions now returns Subscription instances, and psSubscriptionsGet return dict with subscription data (node, subscriber, state)
2017-09-08 07:57:57 +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
2f3727b85d plugin schema: PubSub node schema, first draft
node schema is a new SàT Pubsub experimental feature allowing to attach a schema to a node.
2017-09-06 07:38:39 +02:00
Goffi
607138befb tmp(wokkel/pubsub): allows getNodes to return names using tuples(node/names) 2017-08-27 20:14:59 +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
6ad80151f9 plugin XEP-0277: added microblog namespace to disco info 2017-08-20 17:37:43 +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
7e826f6aae plugin XEP-0060: implemented subscriptions management method for node owner:
added getNodeSubscriptions and setNodeSubscriptions and their bridge method (psNodeSubscriptionsGet and psNodeSubscriptionsSet)
2017-08-20 10:31:53 +02:00
Goffi
8e8e619031 tmp (wokkel/pubsub): subscriptions improvments:
- 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
2017-08-20 10:29:26 +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