massive refactoring to switch from camelCase to snake_case:
historically, Libervia (SàT before) was using camelCase as allowed by PEP8 when using a pre-PEP8 code, to use the same coding style as in Twisted. However, snake_case is more readable and it's better to follow PEP8 best practices, so it has been decided to move on full snake_case. Because Libervia has a huge codebase, this ended with a ugly mix of camelCase and snake_case. To fix that, this patch does a big refactoring by renaming every function and method (including bridge) that are not coming from Twisted or Wokkel, to use fully snake_case. This is a massive change, and may result in some bugs.
This commit is contained in:
parent
d50412c7f7
commit
6a6f15707a
6 changed files with 9945 additions and 9945 deletions
|
|
@ -333,11 +333,11 @@ Get description of ``dotclear`` importer::
|
|||
|
||||
$ li blog import dotclear
|
||||
|
||||
Import a Dotclear blog::
|
||||
import a Dotclear blog::
|
||||
|
||||
$ li blog import dotclear /path/to/dotclear.dump
|
||||
|
||||
Import a Dotclear blog without uploading images::
|
||||
import a Dotclear blog without uploading images::
|
||||
|
||||
$ li blog import --no-images-upload dotclear /path/to/dotclear.dump
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Python arguments as many shell arguments, or put them in a single shell argument
|
|||
You profile is automatically set if the method requires it (using the value of ``-p
|
||||
PROFILE, --profile PROFILE``), so you must not specify it as an extra argument.
|
||||
|
||||
You can refer to `Bridge API documentation`_ to get core methods signatures
|
||||
You can refer to `bridge API documentation`_ to get core methods signatures
|
||||
|
||||
.. _Bridge API documentation: https://wiki.goffi.org/wiki/Bridge_API
|
||||
|
||||
|
|
@ -26,12 +26,12 @@ examples
|
|||
--------
|
||||
|
||||
Send a message using a single shell arguments for all Python arguments. We
|
||||
use first the method name (``messageSend``), then the required arguments (see `Bridge
|
||||
use first the method name (``message_send``), then the required arguments (see `bridge
|
||||
API documentation`_ for details), without the profile as it is automatically set. We
|
||||
specify them as Python in one shell argument, so we use single quote (``\```)first for
|
||||
s hell string, and inside it we use double quote (``"``) for Python strings::
|
||||
|
||||
$ li debug bridge method messageSend '"louise@example.org", {"": "test message"}, {}, "auto", {}'
|
||||
$ li debug bridge method message_send '"louise@example.org", {"": "test message"}, {}, "auto", {}'
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ s hell string, and inside it we use double quote (``"``) for Python strings::
|
|||
|
||||
Get version string of Libervia::
|
||||
|
||||
$ li debug bridge method getVersion
|
||||
$ li debug bridge method version_get
|
||||
|
||||
|
||||
bridge signal
|
||||
|
|
@ -56,7 +56,7 @@ Send a note with ``info`` level and hand written XMLUI. Here me use a shell vari
|
|||
store the level, so we can easily change it if we want to use an other level for tests.
|
||||
Note the use of quotes (to escape both for shell and Python)::
|
||||
|
||||
$ LEVEL='info'; li debug bridge signal -c actionNew '{"xmlui": '"'"'<?xml version="1.0" ?><sat_xmlui title="test title" type="dialog"><dialog level="'$LEVEL'" type="note"><message>test message\non\nseveral\nlines</message></dialog></sat_xmlui>'"'"'}' '""' -1
|
||||
$ LEVEL='info'; li debug bridge signal -c action_new '{"xmlui": '"'"'<?xml version="1.0" ?><sat_xmlui title="test title" type="dialog"><dialog level="'$LEVEL'" type="note"><message>test message\non\nseveral\nlines</message></dialog></sat_xmlui>'"'"'}' '""' -1
|
||||
|
||||
|
||||
monitor
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ Create a new event. You can specify the starting time of the event with ``-S TIM
|
|||
If your organsise an item, the ``--rsvp`` flag should be used: it will use the default
|
||||
RSVP form which ask for attendance. If you want to request more information to your guest,
|
||||
``--rsvp_json JSON`` can be used: the JSON argument is a data dict as described in
|
||||
``dataDict2dataForm`` function where the ``namespace`` key is not necessary (it's set
|
||||
``data_dict_2_data_form`` function where the ``namespace`` key is not necessary (it's set
|
||||
automatically):
|
||||
|
||||
.. autofunction:: sat.tools.xml_tools.dataDict2dataForm
|
||||
.. autofunction:: sat.tools.xml_tools.data_dict_2_data_form
|
||||
|
||||
If the event links to an other one, ``--external JID NODE ITEM`` can be user
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ Delete item with id ``456`` from tickets on PubSub service ``pubsub.example.org`
|
|||
import
|
||||
======
|
||||
|
||||
Import lists from an external source. This works in the same way as
|
||||
import lists from an external source. This works in the same way as
|
||||
:ref:`libervia-cli_blog_import`: you need to specify an importer and a data location. If you let
|
||||
both positional argument empty, you'll get list of importers, if you specify importer but
|
||||
not data location, you'll get a description on how the importer works.
|
||||
|
|
@ -99,7 +99,7 @@ Get description of list importer for Bugzilla::
|
|||
|
||||
$ li list import bugzilla
|
||||
|
||||
Import lists from a Bugzilla XML export file at ``~/bugzilla_export.xml`` to the
|
||||
import lists from a Bugzilla XML export file at ``~/bugzilla_export.xml`` to the
|
||||
``pubsub.example.org`` PubSub service. We use default lists node and want a progression
|
||||
bar::
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ Display details for merge request with id 456::
|
|||
import
|
||||
======
|
||||
|
||||
Import a merge request into your project. You mainly have to be in the project repository
|
||||
import a merge request into your project. You mainly have to be in the project repository
|
||||
(or specify it using ``-r PATH, --repository PATH``) and to specify the id of the patch to
|
||||
import (using ``-i ITEM, --item ITEM``). The behaviour depends of the type of the patch,
|
||||
for Mercurial, the patch will be imported as `MQ`_ patch.
|
||||
|
|
@ -76,6 +76,6 @@ for Mercurial, the patch will be imported as `MQ`_ patch.
|
|||
example
|
||||
-------
|
||||
|
||||
Import the merge request with id 321::
|
||||
import the merge request with id 321::
|
||||
|
||||
$ li merge-request import -i 321
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ Make the ``public_notes`` node accessible to the world::
|
|||
import
|
||||
======
|
||||
|
||||
Import a raw XML containing items to create in the node. The path to the XML file is used
|
||||
import a raw XML containing items to create in the node. The path to the XML file is used
|
||||
as positional argument.
|
||||
|
||||
The XML file must contain full `<item>` element for each item to import. The output of ``pubsub get`` can be used directly.
|
||||
|
|
@ -103,7 +103,7 @@ If you want to change publisher of one or more items (i.e. if you want to use an
|
|||
example
|
||||
-------
|
||||
|
||||
Import a node backup which has previously been saved using ``li blog get -M -1 -n
|
||||
import a node backup which has previously been saved using ``li blog get -M -1 -n
|
||||
some_node > some_node_backup.xml``::
|
||||
|
||||
$ li pubsub node import -n some_node ~/some_node_backup.xml
|
||||
|
|
|
|||
Loading…
Reference in a new issue