Commit graph

2,302 commits

Author SHA1 Message Date
Goffi
3d7e11cd8f core (memory/persistent): fixed calls to delPrivateValue 2017-07-05 14:50:39 +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
Goffi
828d1564fb core (tools/common/regex): new ansiRemove method to remove ANSI escape codes from a string 2017-07-02 19:53:44 +02:00
Goffi
09c40742d1 jp (standard output): added simple, json and json_raw for OUTPUT_DICT_DICT 2017-07-02 19:52:21 +02:00
Goffi
178a8311ca jp (constants): added OUTPUT_DICT_DICT for dictionaries of nested dictionaries 2017-07-02 19:51:00 +02:00
Goffi
8b21f69945 plugin events: added eventInviteesList method to get all R.S.V.P. at once. 2017-07-02 19:47:25 +02:00
Goffi
394f7b85c2 jp (input/csv): fixed encoding issue in debug mode 2017-06-30 01:08:13 +02:00
Goffi
7ea19a5ca6 jp (pubsub/node/affiliations/set): call checkURI 2017-06-30 00:54:37 +02:00
Goffi
d07083bff6 plugin events, invitations + jp (event/create, invitation/invitee/invite): several emails addresses can now be specified for a single invitation:
if several addresses are specified, the same invitation (same ID and data) is sent to all the addresses
2017-06-30 00:04:47 +02:00
Goffi
1540936d12 jp (pubsub/node/set): added checkURI to handle xmpp: URIs 2017-06-30 00:02:16 +02:00
Goffi
cbeb350bd5 plugin XEP-0277: max_items fix (last "fix" about it was actually bad) 2017-06-29 23:40:12 +02:00
Goffi
4c82adce82 jp (event/invitee/invite): command to use new eventInvite backend method 2017-06-29 20:57:14 +02:00
Goffi
b1b39a636e plugin events: added eventInvite command as a helper for the complex invitation workflow:
when this command is used:
    - an email invitation is sent with the event node set
    - invitee's jid is affiliated to event
    - invitee's jid is affiliated to invitee's node as a publisher
    - invitee's jid is affiliated to blog's node as a member
    - invitee's jid is affiliated to every blog's item's comments node as a publisher
last affiliation complex operation is currently needed because of the way blogs and comments are handled, but this need to be changed in the future with XEP proposal.
2017-06-29 20:57:12 +02:00
Goffi
80afa4654c plugin XEP-0277: change affiliations for comments + fixes:
- mbGet now use client instead of profile_key
    - fixed max_items handling
    - for whitelist access model, if a comments node is created, "member" affiliations are transformed to "publisher"
      This is because most of time we want that somebody is able to read a private blog but not write on it, and be able to write a comment.
2017-06-29 20:45:54 +02:00
Goffi
47cc5f737c jp (invitation/create): typo 2017-06-29 20:37:06 +02:00
Goffi
efbefbb276 jp (blog, event): added checkURI to some command to be able to enter a xmpp: uri as argument 2017-06-29 20:36:35 +02:00
Goffi
706fddbd9e jp (pubsub/get): renamed --id option to --item for consistency with other commands 2017-06-29 20:35:07 +02:00
Goffi
b983d39069 jp (input): log improvments + empty filter:
- more colors in debug logs
    - read values are printed if verbosity is >= 2
    - stdout and stderr of each command can be written in files using --log and --log-err
    - --empty option allow to ignore arguments if its value is empty, or skip the whole row
2017-06-28 23:49:55 +02:00
Goffi
2795935703 jp (pubsub/delete): delete command implementation (to delete an item) 2017-06-28 20:28:58 +02:00
Goffi
364130bcbe jp (pubsub, common): fixed last item edition (keep item id instead of creating a new one) 2017-06-28 20:28:24 +02:00
Goffi
c2ae6579c3 jp (cmd_pubsub): xmpp: uri handling, first draft 2017-06-28 19:19:08 +02:00
Goffi
9322d617d4 jp (input): input command first draft:
this is an experimental command to use external data as input arguments.
A series of data is used (only CSV is implemented so far), and it is used to fill argument of a command according to a sequence.
The sequence is given using input arguments, with types corresponding to the data found (short option, long option, stdin).
e.g. if a CSV file has row with 3 columns, we can say that column 1 is subject (long option), column 2 is body (stdin), and column 3 is language (short option -l).
A filter can be used after each option type, to transform read value.
Finally a static part is used to have the main command and non dynamic arguments to use.
2017-06-28 01:28:41 +02:00
Goffi
e8409b13e6 jp (base): added no_lf in disp() to avoid printing a line feed 2017-06-28 01:21:49 +02:00
Goffi
be2bb0ff3f jp (common): added --last-item to take last item when no item id is found/given 2017-06-28 01:20:44 +02:00
Goffi
7f13ed15fd jp (pubsub/edit): new edit subcommand, which work in a same way as for blog 2017-06-27 19:38:22 +02:00
Goffi
5af5b344e5 jp (pubsub): psItemGet has been renamed to psItemsGet as several items are gotten 2017-06-27 19:38:22 +02:00
Goffi
2449721982 jp (blog, common): various fixes in common and blog:
- parse_args has been moved to common
    - cat_dir is converted to str on BaseEdit init, so it can be use to make str path for files manipulation
    - fixed use of EDITOR_ARGS_MAGIC when use_metadata is False
    - fixed unlink of metadata files when use_metadata is False
2017-06-27 19:38:22 +02:00
Goffi
e22336c6f2 plugin XEP-0060: added sendItem and psItemSend bridge method as a way to send directly raw XML for an item + use client instead of profile_key in publish + renamed psItemGet to psItemsGet 2017-06-27 19:38:20 +02:00
Goffi
71d61f372f jp (blog): minor typo fix 2017-06-27 17:02:10 +02:00
Goffi
6025cc4e3b jp (blog, common): added --force-item option to avoid magic and use argument as actual item id:
- creation of new item with item id has been fixed
    - --force-item allow to use url as item id, or keyword
    - pubsub_item can is now returned by getItemPath. If not None, the id is known and must be used
2017-06-27 17:00:52 +02:00
Goffi
5eda63d99e jp (blog, common): moved and improved edit code from blog:
- a new "common" module is there for code commonly used in commands
    - moved code for editing item with $EDITOR there
    - moved code to identify item to edit there
    - aforementioned fontions have been made generic
    - a class BaseEdit is now available to implement edition
    - HTTPS links are handled (only HTTP links were working before)
    - item can be use if all previous methods fail (url, keyword, file path).
2017-06-27 16:23:28 +02:00
Goffi
7edc9c8a3b jp (constants): added exit code for data error. 2017-06-27 16:14:58 +02:00
Goffi
be9de5afc4 jp (blog): added language in managed keys 2017-06-25 09:43:04 +02:00
Goffi
f3a94527b0 tools (common/template): changed blog_date filter to date_days
Instead of returning the whole sentence, date_days only return the number of days between now and the given timestamp.
This way the template author can choose how to use it, and translation can be done template side.
2017-06-24 21:47:06 +02:00
Goffi
92825fc674 tools (common/template): ScriptsHandler fix/improvments:
ScriptsHandler was not used so far, this commit fix it to be usable:
    - script can be imported with "include"
    - generate_scripts is used to generate the <script> elements generation, in base page
    - paths use root_path, so they are adapted to context
    - generate_scripts return a Markup string, so it's not escaped
2017-06-24 20:18:55 +02:00
Goffi
9ae18d4d28 plugin XEP-0277, tools/common/data_objects: language handling 2017-06-22 09:13:28 +02:00
Goffi
98d328ca47 core (stdui): added a FIXME to not use plugin/default_host in the future 2017-06-21 19:47:38 +02:00
Goffi
e30f22ec4c core: check uncatched exceptions during plugin import and stdui init, log error and exit if any found 2017-06-21 19:40:13 +02:00
Goffi
0b1b687ca3 plugin account: print a warning and use "example.net" as default instead or raising an error when xmpp_domain is not set 2017-06-21 19:36:00 +02:00
Goffi
b18523e615 jp (invitation): fixed inconsistency in language handling 2017-06-21 08:00:14 +02:00
Goffi
ffdc55ce2e core: added hosts_dict handling in general config:
A way to force host was already available through hosts_dict, but for Android only in [android] section. It has now be moved in general conf as it can be useful in other cases, and improved to handle port too.

This way if something like this is present in sat.conf:

[DEFAULT]
hosts_dict = {"example.net": {"host": "127.0.0.1", "port": 7777}}

these values will be used and DNS check will be bypassed. A string can also be used for values, in this case only host is changed.
2017-06-19 09:36:55 +02:00
Goffi
acecf724f3 plugin XEP-0054: fixed not transmitted arguments in getAvatar 2017-06-03 22:24:53 +02:00
Goffi
4dee63d105 core (tools/common/data_objects): added classes to handle Identities 2017-05-22 23:58:26 +02:00
Goffi
0b154647e4 plugin invitations: name is now registered as nickname on XMPP server thanks to plugin identity 2017-05-21 20:08:42 +02:00
Goffi
9ce44321cf plugin invitations: doesn't raise an exception anymore if url_template is not set while email is not requested 2017-05-21 20:07:54 +02:00
Goffi
b7a0972237 jp (identity): new identity command to handle the new plugin identity in backend, and maybe other plugins like vcard in the future 2017-05-21 20:06:07 +02:00
Goffi
6180484965 plugin identity: plugin identity first draft:
this new plugin is a high level way to manage profile or entity identities, i.e. informations about them.
It has been created to handle easily data which can be in several location (e.g. roster, vcard-tmp, vcard4, etc.)
For now, only nickname can be gotten/set (set only works for profile's own identity, while get can be used on any jid).
2017-05-21 20:04:57 +02:00