Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
5592fd6f
Commit
5592fd6f
authored
Apr 09, 2016
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include wlc cli documentation
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
6e3796d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
0 deletions
+137
-0
docs/api.rst
docs/api.rst
+5
-0
docs/index.rst
docs/index.rst
+1
-0
docs/wlc.rst
docs/wlc.rst
+131
-0
No files found.
docs/api.rst
View file @
5592fd6f
...
...
@@ -3,6 +3,10 @@
Weblate's Web API
=================
.. index::
single: REST
single: API
REST API
--------
...
...
@@ -12,6 +16,7 @@ REST API
The API is accessible on the ``/api/`` URL and it is based on
`Django REST framework <http://www.django-rest-framework.org/>`_.
You can use it directly or by :ref:`wlc`.
Authentication and generic parameters
+++++++++++++++++++++++++++++++++++++
...
...
docs/index.rst
View file @
5592fd6f
...
...
@@ -18,6 +18,7 @@ Contents:
faq
formats
api
wlc
changes
contributing
license
...
...
docs/wlc.rst
0 → 100644
View file @
5592fd6f
.. index::
single: wlc
single: API
.. _wlc:
Weblate Client
==============
.. program:: wlc
Synopsis
++++++++
.. code-block:: text
wlc [parameter] <command> [options]
Commands actually indicate which operation should be performed.
Description
+++++++++++
Weblate Client is Python library and command line utility to manage Weblate remotely.
The command line utility can be invoked as :command:`wlc`.
Global options
--------------
The program accepts following global options, which must be entered before subcommand.
.. option:: --format {csv,json,text,html}
Specify output format.
.. option:: --url URL
Specify API URL. Overrides value from configuration file, see :ref:`files`.
The URL should end with ``/api/``, for example ``https://hosted.weblate.org/api/``.
.. option:: --key KEY
Specify API user key to use. Overrides value from configuration file, see :ref:`files`.
You can figure out your key in your profile in Weblate.
.. option:: --config PATH
Override path to configuration file, see :ref:`files`.
.. option:: --config-section SECTION
Override section to use in configuration file, see :ref:`files`.
Subcommands
-----------
Currently following subcommands are available:
.. option:: version
Prints current version.
.. option:: list-languages
List used languages in Weblate.
.. option:: list-projects
List projects in Weblate.
.. option:: list-components
List components in Weblate.
.. option:: list-translations
List translations in Weblate.
.. _files:
Files
+++++
:file:`~/.config/wlc`
User configuration file
:file:`/etc/xdg/wlc`
Global configration file
The program follows XDG specification, so you can adjust placement of config files
by environment variables ``XDG_CONFIG_HOME`` or ``XDG_CONFIG_DIRS``.
Following settings can be configured in the ``[wlc]`` section (you can
customize this by :option:`--config-section`):
.. describe:: key
API KEY to access Weblate.
.. describe:: url
API server URL, defaults to ``http://127.0.0.1:8000/api/``.
The configuration file is INI file, for example:
.. code-block:: ini
[wlc]
url = https://hosted.weblate.org/api/
key = APIKEY
Examples
++++++++
Print current program version:
.. code-block:: sh
$ wlc version
version: 0.1
List all projects:
.. code-block:: sh
$ wlc list-projects
name: Hello
slug: hello
source_language: en
url: http://example.com/api/projects/hello/
web: http://weblate.org/
web_url: http://example.com/projects/hello/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment