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:
``--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]``
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>``
Uses ``server`` as HTTP proxy.
``--nonshib``
Uses Non Shibboleth WebDAV Authentication
``--davpath [path]``
Overrides the WebDAV Path with ``path``
``--exclude [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
``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::
$ nextcloudcmd --httpproxy http://192.168.178.1:8080 \
$ nextcloudcmd --httpproxy http://192.168.178.1:8080 --path /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
been specified on the command line or ``-n`` has been passed.
@ -120,5 +117,5 @@ Example
::
$ nextcloudcmd /home/user/<my_sync_folder> \
https://<username>:<secret>@<server_address>/remote.php/dav/<Directory_that_has_been_created>
$ nextcloudcmd --path /<Directory_that_has_been_created> /home/user/<my_sync_folder> \
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.
.. 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.
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]``
Use ``user`` as the login name.
@ -50,12 +53,6 @@ OPTIONS
``—httpproxy http://[user@pass:]<server>:<port>``
Uses ``server`` as HTTP proxy.
``—nonshib``
Uses Non Shibboleth WebDAV Authentication
``—davpath [path]``
Overrides the WebDAV Path with ``path``
``—exclude [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``,
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 \
https://server/nextcloud/remote.php/dav/Music
https://server/nextcloud
``nextcloudcmd`` will enquire user name and password, unless they have
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 \
$ nextcloudcmd —httpproxy http://192.168.178.1:8080 --path /Music \
$HOME/media/music \
nextclouds://server/nextcloud/remote.php/dav/Music
ownclouds://server/nextcloud
BUGS

View file

@ -78,7 +78,6 @@ struct CmdOptions
bool ignoreHiddenFiles;
QString exclude;
QString unsyncedfolders;
QString davPath;
int restartTimes;
int downlimit;
int uplimit;
@ -352,11 +351,6 @@ int main(int argc, char **argv)
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);
// Order of retrieval attempt (later attempts override earlier ones):