Commit graph libervia-backend/src/plugins/plugin_xep_0277.py
Author SHA1 Message Date
Goffi
005ec59a8a core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@' 2014-03-21 16:27:09 +01:00
souliane
7a9fb7f505 plugin XEP-0277: fix pubsub entry parsing using lxml instead of feed.atom 2014-02-23 13:54:41 +01:00
souliane
8335f92c87 plugins groupblog, XEP-0277: attempt to clarify the code for the comments handling:
- add or update some methods docstrings
- add GroupBlog.__fillCommentsElement to factorize the code responsible to build the comments link
- do not mix up attributes names between the item own service/node and the comments service/node
2014-02-14 21:24:31 +01:00
Goffi
80afa4ed37 plugin XEP-0277: last commit was actually a part of the next one 2014-02-23 23:59:02 +01:00
Goffi
b0bbd32038 plugin XEP-0277: added missing docstring 2014-02-23 23:30:35 +01:00
Goffi
cf08f0127a plugin XEP-0277: encoding fix 2014-02-20 13:28:09 +01:00
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
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
Goffi
2ca6efd8cc dates update 2014-02-04 18:32:49 +01:00
Goffi
5a00dc9503 core: i18n refactoring:
- _() is no more installed in __builtin__
    - instead, there is a new sat.core.i18n module
    - added D_() method for deferred translation
    - languageSwitch method allow to dynamically change translation language
    - import gettext is tested against ImportError, and dummy methods are used when not available (mainly useful for Libervia)
2013-12-29 17:06:01 +01:00
souliane
5b623dbb5c plugin groupblog, XEP-0277: store both published and updated timestamps 2013-12-19 13:54:40 +01:00
souliane
481bee01c2 plugins groupblog (xep-0060, xep-0277): added blog item modification/deletion 2013-12-10 09:02:20 +01:00
Goffi
d6e7ec0055 plugin XEP-0277, groupblog: rich text management for receiving microblogs 2013-11-14 18:36:02 +01:00
Goffi
5981926b2b plugin XEP-0277, group blog: rich text management for sending microblogs 2013-11-14 18:35:51 +01:00
Goffi
e23ff9f8d1 plugin XEP-0277, group blogs: proper asynchronous methods for sending blogs. 2013-11-14 17:51:35 +01:00
Goffi
eb60e0ff33 core, plugins: fixed bad use of children instead of elements() for domish.Element instances. 2013-10-15 19:28:34 +02:00
Goffi
91aac2ad4f plugin XEP-0277: RuntimeError is now catched during link parsing (can happen if no service jid is found) 2013-06-20 17:15:21 +02:00
Goffi
c1b5ccf1d2 plugins XEP-0060, XEP-0277, groupblog: comments implementation (first draft, not finished yet):
- PubSub options constants are moved to XEP-0060
    - comments url are generated/parsed according to XEP-0277
    - microblog data can now have the following keys:
        - "comments", with the url as given in the <link> tag
        - "comments_service", with the jid of the PubSub service hosting the comments
        - "comments_node", with the parsed node
    - comments nodes use different access_model according to parent microblog item access
    - publisher is not verified yet, see FIXME warning
    - so far, comments node are automatically subscribed
    - some bug fixes
2013-05-20 23:21:29 +02:00
Goffi
1cd98e8dea fixed licences in docstrings (they are now in comments) 2013-03-08 00:36:22 +01:00
Emmanuel Gil Peyrot
0dca274360 Fix pep8 support in src/plugins. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
88074cd284 Remove every old-style class. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
27b3592e16 Remove trailing whitespaces. 2013-01-18 17:55:34 +01:00
Goffi
def79e44cd dates update 2013-01-07 23:30:13 +01:00
Goffi
8f622601c6 core: presence status + last resource refactored and kept in entitiesCache in memory.py, profile cache is purged on disconnection 2012-08-15 15:50:46 +02:00
Goffi
c5a930b627 Licence modification: the full project is now under AGPL v3+ instead of GPL v3+ 2012-08-01 22:53:02 +02:00
Goffi
3ed55081f6 D-Bus Bridge: use inspection to name attribute + fix asynchronous calls for dynamically added method, it now use deferred return value instead of callback/errback attributes 2012-03-30 09:23:23 +02:00
Goffi
26f59a523e plugin groupblog: added getLastGroupBlogs method 2012-03-24 17:48:12 +01:00
Goffi
21dbb4473a copyleft date update 2012-03-06 09:07:24 +01:00
Goffi
ad29111416 core: plugins refactored according to bridge + updatedValue now use profile 2011-07-06 01:06:18 +02:00
Goffi
5224d71918 plugin xep 0277: added OPT_DELIVER_PAYLOADS OPT_SEND_ITEM_SUBSCRIBE to microblog options when changing access 2011-05-28 20:21:45 +02:00
Goffi
cb8dd04e0c plugin XEP-00277: setMicroblogAccess is now asynchronous 2011-05-26 16:48:23 +02:00
Goffi
e3391fdd80 plugin group blog: group blog now use PEP to take profit of autosubscribe 2011-04-12 20:40:47 +02:00
Goffi
3728cc251b plugin group blog: group blog subscription 2011-04-11 12:47:35 +02:00
Goffi
d7402734e6 plugin xep-0277: fixed bad data check 2011-04-09 13:17:31 +02:00
Goffi
1a579d9087 plugin xep-0277: bridge data is now converted in pubsub item in a separate function 2011-04-07 22:22:41 +02:00
Goffi
9361e8fdcc microblog sending
- Bridge: added sendPersonalEvent to DBus frontend
- plugin XEP_0277: * fixed unicode issue
				   * node options are now changed instead of node being deleted/recreated for setMicroblogAccess
- xml_tools: fixed unicode issue
2011-03-26 17:51:19 +01:00
Goffi
7f918c4c52 plugin XEP_0277: microblog access model can now be changed
plugin XEP_0060: added some method to manage pubsub nodes
2011-03-24 21:15:26 +01:00
Goffi
95b6400f98 plugin xep-0277: added getLastMicroblogs method 2011-02-21 01:38:16 +01:00
Goffi
83151b8b0e plugin XEP 0277: author for in request + author, updated management for out request
- a workaround is now used to parse "nick" tag (Jappix behaviour)
- author and updated can now be used in data when sendind microblog. Is no author is given, user jid is used, if no updated is given, current timestamp is used
2011-02-18 22:32:02 +01:00
Goffi
4ee88b026b Plugin XEP-0277: first draft of microblogging over ip /!\ new dependencies added /!\
- the xe and pyfeed dependencies were added (see setup.py)
2011-02-08 02:16:26 +01:00