Commit graph

839 commits

Author SHA1 Message Date
souliane
63bf55d69f plugin XEP_0277: fix encode/decode errors 2014-02-12 15:24:03 +01:00
souliane
a3e2beeeae plugin XEP_0277: check for XHTML namespace and decapsulate the content from the main div container 2014-02-12 15:23:15 +01:00
souliane
c2e4e9f8f9 plugin text_syntaxes: rstrip the conversion result to avoid new lines systematically added by converters (e.g. html2text do this) 2014-02-12 15:21:00 +01:00
souliane
ba1800cc61 tools: composition RICH_FORMATS constant has been renamed to RICH_SYNTAXES 2014-02-12 15:19:48 +01:00
souliane
d0fccd5195 core: bug fix at connection time 2014-02-07 22:17:06 +01:00
souliane
7ea4dca1b0 memory: bug fix to not register twice frontends parameters + added some tests for param update 2014-02-07 17:10:24 +01:00
souliane
ff81f76184 plugin groupblog, XEP-0071, XEP-0277, text_syntaxes: manage raw/rich/xhtml data for content/title:
Implementation should follow the following formal specification:

"title" and "content" data can be passed in raw, xhtml or rich format.
When we receive from a frontend a new/updated microblog item:

- keys "title" or "content" have to be escaped (disable HTML tags)
- keys "title_rich" or "content_rich" have to be converted from the current syntax to XHTML
- keys "title_xhtml" or "content_xhtml" have to be cleaned from unwanted XHTML content

Rules to deal with concurrent keys:

- existence of both  "*_xhtml" and "*_rich" keys must raise an exception
- existence of both raw and ("*_xhtml" or "*_rich") is OK

As the storage always need raw data, if it is not given by the user it can be
extracted from the "*_rich" or "*_xhtml" data (remove the XHTML tags).

When a frontend wants to edit a blog post that contains XHTML title or content,
the conversion is made from XHTML to the current user-defined syntax.

- plugin text_syntaxes: added "text" syntax (using lxml)
2014-02-05 16:36:51 +01:00
souliane
5aa76d7d23 plugin groupblog: added method getLastGroupBlogsAtom returns the Atom feed of blog posts 2014-01-22 17:10:28 +01:00
souliane
0698b69344 test radiocol: added a full scenario test 2014-01-15 23:24:22 +01:00
souliane
cf8f9330b4 test: improvements for the helpers classes:
- simplification for retrieving the sent messages
- an expected bridge call which is already set can no more be
  overwritten with new arguments for the same method name. The
  new arguments are stored in a FIFO list instead, and each call
  of the method also registers the arguments for the next call.
2014-01-15 23:22:07 +01:00
souliane
30dfdf1025 plugins room_games, radiocol, libervia: small changes like refactorization to ease the maintenance 2014-01-17 15:02:46 +01:00
souliane
4818da04fc plugin radiocol: sync data includes a "jump to time" info 2014-01-16 11:44:14 +01:00
souliane
8b700a6d48 plugins radiocol_tarot: do not process received messages for MUC users that are actually not playing the game + fix for testing purpose 2014-01-15 23:09:39 +01:00
souliane
9e6845472d plugins room_games, radiocol: better synchronization after a user joins a running game 2014-01-15 23:01:23 +01:00
Goffi
2b51a340d4 jp: added ad-hoc subcommand with a remote sub-subcommand to create a D-Bus remote 2014-02-17 18:57:53 +01:00
Goffi
f31dd1adc0 jp: short option for progress is now -P instead of -g, so -g can be used for groups 2014-02-17 18:57:09 +01:00
Goffi
b1f91fe568 plugin Ad-Hoc D-Bus: first draft:
this plugin allow to easily use D-Bus with Ad-Hoc command. This first draft only allow to create a D-Bus remote for now.
2014-02-17 18:57:06 +01:00
Goffi
5d29ffbdda plugin XEP-0050: fixed UnknownGroupError management + "@ALL@" profile for status command 2014-02-13 18:50:56 +01:00
Goffi
fa6e44507c core(XMLUI): empty options in ListWidget now just show a warning message, no more assert 2014-02-13 18:50:49 +01:00
Goffi
a2ba38c6da core: fixed UnknownGroupError exception in getJidsFromGroup 2014-02-13 18:50:41 +01:00
Goffi
2fcf405370 jp: zsh completion, first draft (added in a new /misc directory):
- completion automatically parse jp --help for the subcommand being completed to find optional and mandatory arguments
    - profiles are asked to jp himself (through jp profile list)
    - complete jp and jp_dev
2014-02-10 13:53:46 +01:00
Goffi
7ca3c657f4 jp: refactoring:
- imports from sat_frontends.jp instead of local imports
    - added __init__.py
    - commands now inherits from a base class: each base.CommandBase instance is a subcommand
    - new arguments are added in CommandBase.add_parser_options methods, starting point si CommandBase.run or CommandBase.connected if a profile connection is needed
    - commands are exported using a __commands__ variable at the top of the module
    - sub-subcommand are easily added by using an other CommandBase instance as parent instead of using a Jp instance. In this case, the parent subcommand must be the one exported, and have a subcommands iterable (see cmd_file or cmd_pipe for examples).
    - options which are often used (like --profile) are automatically added on demand (use_profile=True, use_progress=True)
    - commands are automatically loaded when there are in a module named cmd_XXX
    - restored --connect option
    - restored progress bar
    - restored getVersion bridge call on jp --version
    - fixed file and pipe commands
    - fixed forgotten translations
    - fixed non SàT compliant docstrings
    - better about/version dialog
2014-02-10 13:44:09 +01:00
Goffi
119ce72819 misc (README): updated Link Mauve and Dal contributions, moved Souliane as a main contributor 2014-02-05 14:52:40 +01:00
Goffi
3491335314 jp: added missing license headers 2014-02-05 14:52:38 +01:00
Dal
f4de26e4e8 jp: refactoring using ArgParse 2014-02-05 14:35:26 +01:00
Goffi
eeff94469a core: registerNewAccount partial fix 2014-02-04 18:54:06 +01:00
Goffi
4d14048f8c frontends: fixed /me usage + renamed a couple of "type" parameters to type_ 2014-02-04 18:51:16 +01:00
Goffi
2ca6efd8cc dates update 2014-02-04 18:32:49 +01:00
Goffi
54f9e557e1 core (XMLUI): fixed labels management for lists in _dataFormField2XMLUIData 2014-02-04 18:32:46 +01:00
Goffi
aad6251058 core: security limit in menus 2014-02-04 18:32:39 +01:00
Goffi
d5b255e437 frontends: some modifications to ease the the use of the new sat_frontends.tools.xmlui.XMLUI class in Libervia 2014-02-04 18:32:33 +01:00
Goffi
c6aaaaa297 plugin XEP-0077, plugin XEP-0100, frontends: gateways have been entirely implemented in backend using the new refactored XMLUI and AdvancedListContainer. The now useless code has been removed from frontends. 2014-02-04 18:26:03 +01:00
Goffi
7d313660eb core: added "one_shot" option to registered callback:
when this keyword is used, the callback is automatically removed once it has been called.
2014-02-04 18:24:27 +01:00
Goffi
18aeb3a6aa core (XMLUI), frontends: advancedListContainer part 2: 2014-02-04 18:21:51 +01:00
Goffi
edf3e1bc87 XMLUI (core, frontends): added JidWidget and DividerWidget + popup type + some bugfixes:
- JidWidget is a text container a Jabber ID, this can be used by frontends for special treatment (e.g.: possibility to click on it)
    - DividerWidget is a separator, like a blank or dashed line
    - popup type is similar to normal window, but designed for a smaller popping window
2014-02-04 18:19:32 +01:00
Goffi
9661c1c2c5 core, frontends: implementation of AdvancedListContainer first draft + misc:
/!\ Urwid SàText must be updated as the new TableContainer is used /!\
    - fixed button value in paramsXML2XMLUI
    - new Urwid SàText TabContainer is used in Primitivus for PairsContainer and AdvancedListContainer
    - fixed in core's XMLUI AdvanceListContainer
2014-02-04 18:19:29 +01:00
Goffi
b3fb68cb63 core, frontends: XMLUI refactoring:
- XMLUI now use objects with 2 main classes: widgets (button, label, etc), and container which contain widgets according to a layout
    - widgets and containers classes are found through introspection, thereby it's really easy to add a new one
    - there is still the AddWidgetName helper, for example AddText('jid', 'test@example.net') will add a StringWidget with name "jid" and default value "test@example.net"
    - container can be inside other containers. changeContainer change the first parent container
2014-02-04 18:19:00 +01:00
Goffi
72fd99f679 plugin XEP-0045, primitivus: added MUC configuration 2014-02-04 18:06:12 +01:00
Goffi
3fdca75224 xmlui: added boolean type management in XMLUIResult2DataFormResult 2014-02-04 18:04:32 +01:00
Goffi
8ee9e2529e plugin XEP-0055, Primitivus: Directory search dialogs are now entirely done in plugin XEP-0055, specific code in frontend is not needed anymore 2014-02-04 18:03:53 +01:00
Goffi
67df03f7bf core: XMLUI now use @property for session_id and submit 2014-02-04 18:02:40 +01:00
Goffi
3b86e8b106 primitivus: fixed bad closure, resulting in menus bug. 2014-02-04 18:02:37 +01:00
Goffi
256a110471 core, frontends: XMLUI refactoring:
- now there is a base XMLUI class. Frontends inherits from this class, and add their specific widgets/containers/behaviour
    - wix: param.py has been removed, as the same behaviour has been reimplemented through XMLUI
    - removed "misc" argument in XMLUI.__init__
    - severals things are broken (gateway, directory search), following patches will fix them
    - core: elements names in xml_tools.dataForm2XMLUI now use a construction with category_name/param_name to avoid name conflicts (could happen with 2 parameters of the same name in differents categories).
2014-02-04 18:02:35 +01:00
souliane
41ce40b0e4 test: added tests for the plugin "room game" + rename other test files 2014-01-10 18:20:30 +01:00
souliane
ddcfdd99ac test: make FakeClient profile dependent and add some tools to test MUC 2014-01-10 18:15:02 +01:00
souliane
cd45ede2d2 test: silent info/warning that were polluting the output 2014-01-10 18:19:34 +01:00
souliane
db832c1f6b test: define the constants JIDs and profiles as lists 2014-01-09 11:18:33 +01:00
souliane
f2503f89ae plugins room games, XEP-0045: small fixes, improved docstrings 2014-01-10 18:07:36 +01:00
souliane
9f9ea3acf0 plugin room game: improved docstrings, added '_' as prefix for internal methods names 2014-01-09 10:28:25 +01:00
souliane
6be767ae3b test: use the SatTestCase methods instead of builtin "assert" in tests for memory, plugin xep-0033 2014-01-07 09:27:53 +01:00