Skip to content

Commit

Permalink
2135: refactoring - use qcommandlineparser to parse command line argu…
Browse files Browse the repository at this point in the history
…ments

Signed-off-by: aheimberger <andreasheimberger@gmx.at>
  • Loading branch information
AHeimberger committed Mar 13, 2022
1 parent 124a6e0 commit 176dda9
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 390 deletions.
13 changes: 8 additions & 5 deletions doc/options.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
You have the option of starting your Nextcloud desktop client with the
``nextcloud`` command. The following options are supported:

``nextcloud -h`` or ``nextcloud --help``
``nextcloud --help``, ``nextcloud -h`` or ``nextcloud -?``,
Displays all command options.

The other options are:

``--logwindow``
``--logwindow``, ``-l``
Opens a window displaying log output.

``--logfile`` `<filename>`
Write log output to the file specified. To write to stdout, specify `-`
Writes log output to the file specified. To write to stdout, specify `-`
as the filename.

``--logdir`` `<name>`
Expand All @@ -25,10 +25,13 @@ The other options are:
Clears (flushes) the log file after each write action.

``--logdebug``
Also output debug-level messages in the log (equivalent to setting the env var QT_LOGGING_RULES="qt.*=true;*.debug=true").
Also outputs debug-level messages in the log (equivalent to setting the env var QT_LOGGING_RULES="qt.*=true;*.debug=true").

``--confdir`` `<dirname>`
Uses the specified configuration directory.

``--background``
Launch the application in the background (i.e. without opening the main dialog).
Launches the application in the background (i.e. without opening the main dialog).

``--quit``, ``-q``
Quits the running instance.
38 changes: 24 additions & 14 deletions man/nextcloudcmd.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,46 +32,56 @@ OPTIONS
``--path``
Overrides default remote root folder to a specific subfolder on the server(e.g.: /Documents would sync the Documents subfolder on the server)

``user``, ``-u`` ``[user]``
``--user``, ``-u`` ``[user]``
Use ``user`` as the login name.

``password``, ``-p`` ``[password]``
``--password``, ``-p`` ``[password]``
Use ``password`` as the password.

``-n``
``--netrc``, ``-n``
Use ``netrc (5)`` for login.

``non-interactive``
``--non-interactive``
Do not prompt for questions.

``silent``, ``s``
``--silent``, ``-s``
Inhibits verbose log output.

``trust``
``--trust``
Trust any SSL certificate, including invalid ones.

``httpproxy http://[user@pass:]<server>:<port>``
``--httpproxy http://[user@pass:]<server>:<port>``
Uses ``server`` as HTTP proxy.

``exclude [file]``
``--exclude [file]``
Exclude list file

``unsyncedfolders [file]``
``--unsyncedfolders [file]``
File containing the list of unsynced folders (selective sync)

``max-sync-retries [n]``
``--max-sync-retries [n]``
Retries maximum n times (defaults to 3)

``-h``
Sync hidden files,do not ignore them
``--ignore-hidden``, ``-i``
Ignores hidden files, do not sync them

``--uplimit``
Limit the upload speed of files to n KB/s

``--downlimit``
Limit the download speed of files to n KB/s

``--logdebug``
More verbose logging


Example
=======
To synchronize the nextCloud directory ``Music`` to the local directory ``media/music``
through a proxy listening on port ``8080`` on the gateway machine ``192.168.178.1``,
the command line would be::

$ nextcloudcmd httpproxy http://192.168.178.1:8080 --path /Music \
$ nextcloudcmd --httpproxy http://192.168.178.1:8080 --path /Music \
$HOME/media/music \
https://server/nextcloud

Expand All @@ -80,7 +90,7 @@ been specified on the command line or ``-n`` (see `netrc(5)`) has been passed.

Using the legacy scheme, it would be::

$ nextcloudcmd httpproxy http://192.168.178.1:8080 --path /Music \
$ nextcloudcmd --httpproxy http://192.168.178.1:8080 --path /Music \
$HOME/media/music \
ownclouds://server/nextcloud

Expand Down
Loading

0 comments on commit 176dda9

Please sign in to comment.