Update nextcloudcmd documentation.

Signed-off-by: allexzander <blackslayer4@gmail.com>
This commit is contained in:
allexzander 2021-08-20 18:46:38 +03:00
parent 3feba08965
commit 4927e48bf3
3 changed files with 16 additions and 28 deletions

View File

@ -46,6 +46,9 @@ the server URL.
Other command line switches supported by ``nextcloudcmd`` include the following: Other command line switches supported by ``nextcloudcmd`` include the following:
``--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. Use ``user`` as the login name.
@ -67,12 +70,6 @@ Other command line switches supported by ``nextcloudcmd`` include the following:
``--httpproxy http://[user@pass:]<server>:<port>`` ``--httpproxy http://[user@pass:]<server>:<port>``
Uses ``server`` as HTTP proxy. Uses ``server`` as HTTP proxy.
``--nonshib``
Uses Non Shibboleth WebDAV Authentication
``--davpath [path]``
Overrides the WebDAV Path with ``path``
``--exclude [file]`` ``--exclude [file]``
Exclude list file Exclude list file
@ -92,15 +89,15 @@ Credential Handling
:: ::
$ nextcloudcmd /home/user/my_sync_folder https://carla:secret@server/nextcloud/remote.php/dav/ $ nextcloudcmd /home/user/my_sync_folder https://carla:secret@server/nextcloud
To synchronize the Nextcloud directory ``Music`` to the local directory To synchronize the Nextcloud directory ``Music`` to the local directory
``media/music``, through a proxy listening on port ``8080``, and on a gateway ``media/music``, through a proxy listening on port ``8080``, and on a gateway
machine using IP address ``192.168.178.1``, the command line would be:: machine using IP address ``192.168.178.1``, the command line would be::
$ nextcloudcmd --httpproxy http://192.168.178.1:8080 \ $ nextcloudcmd --httpproxy http://192.168.178.1:8080 --path /Music \
$HOME/media/music \ $HOME/media/music \
https://server/nextcloud/remote.php/dav/Music https://server/nextcloud
``nextcloudcmd`` will prompt for the user name and password, unless they have ``nextcloudcmd`` will prompt for the user name and password, unless they have
been specified on the command line or ``-n`` has been passed. been specified on the command line or ``-n`` has been passed.
@ -120,5 +117,5 @@ Example
:: ::
$ nextcloudcmd /home/user/<my_sync_folder> \ $ nextcloudcmd --path /<Directory_that_has_been_created> /home/user/<my_sync_folder> \
https://<username>:<secret>@<server_address>/remote.php/dav/<Directory_that_has_been_created> https://<username>:<secret>@<server_address>

View File

@ -24,11 +24,14 @@ The first parameter is the local directory. The second parameter is
the server URL. the server URL.
.. note:: Prior to the 1.6 release of nextcloudcmd, the tool only accepted .. note:: Prior to the 1.6 release of nextcloudcmd, the tool only accepted
``nextcloud://`` or ``nextclouds://`` in place of ``http://`` and ``https://`` as ``owncloud://`` or ``ownclouds://`` in place of ``http://`` and ``https://`` as
a scheme. See ``Examples`` for details. a scheme. See ``Examples`` for details.
OPTIONS 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. Use ``user`` as the login name.
@ -50,12 +53,6 @@ OPTIONS
``—httpproxy http://[user@pass:]<server>:<port>`` ``—httpproxy http://[user@pass:]<server>:<port>``
Uses ``server`` as HTTP proxy. Uses ``server`` as HTTP proxy.
``—nonshib``
Uses Non Shibboleth WebDAV Authentication
``—davpath [path]``
Overrides the WebDAV Path with ``path``
``—exclude [file]`` ``—exclude [file]``
Exclude list file Exclude list file
@ -74,18 +71,18 @@ To synchronize the nextCloud directory ``Music`` to the local directory ``media/
through a proxy listening on port ``8080`` on the gateway machine ``192.168.178.1``, through a proxy listening on port ``8080`` on the gateway machine ``192.168.178.1``,
the command line would be:: the command line would be::
$ nextcloudcmd —httpproxy http://192.168.178.1:8080 \ $ nextcloudcmd —httpproxy http://192.168.178.1:8080 --path /Music \
$HOME/media/music \ $HOME/media/music \
https://server/nextcloud/remote.php/dav/Music https://server/nextcloud
``nextcloudcmd`` will enquire user name and password, unless they have ``nextcloudcmd`` will enquire user name and password, unless they have
been specified on the command line or ``-n`` (see `netrc(5)`) has been passed. been specified on the command line or ``-n`` (see `netrc(5)`) has been passed.
Using the legacy scheme, it would be:: Using the legacy scheme, it would be::
$ nextcloudcmd —httpproxy http://192.168.178.1:8080 \ $ nextcloudcmd —httpproxy http://192.168.178.1:8080 --path /Music \
$HOME/media/music \ $HOME/media/music \
nextclouds://server/nextcloud/remote.php/dav/Music ownclouds://server/nextcloud
BUGS BUGS

View File

@ -78,7 +78,6 @@ struct CmdOptions
bool ignoreHiddenFiles; bool ignoreHiddenFiles;
QString exclude; QString exclude;
QString unsyncedfolders; QString unsyncedfolders;
QString davPath;
int restartTimes; int restartTimes;
int downlimit; int downlimit;
int uplimit; int uplimit;
@ -352,11 +351,6 @@ int main(int argc, char **argv)
return EXIT_FAILURE; return EXIT_FAILURE;
} }
// check if the dav path was added to the url and append if not.
if (!options.target_url.endsWith("/")) {
options.target_url.append("/");
}
QUrl hostUrl = QUrl::fromUserInput(options.target_url); QUrl hostUrl = QUrl::fromUserInput(options.target_url);
// Order of retrieval attempt (later attempts override earlier ones): // Order of retrieval attempt (later attempts override earlier ones):