streams/util/py/README.txt

129 lines
2.6 KiB
Text
Raw Normal View History

NSH - 2021.10.05
2015-02-16 00:29:12 +00:00
2021-09-04 08:27:16 +00:00
Client for browsing Nomad DAV repositories.
2015-02-16 00:29:12 +00:00
Install
-------
2021-09-04 08:27:16 +00:00
NSH requires 'requests'(1).
2015-02-16 00:29:12 +00:00
Please refer to requests docs on how to install it (2)
2021-09-04 08:27:16 +00:00
Extract somewhere and launch nsh
2021-09-04 11:10:49 +00:00
If installing in an alternatte location, copy the util/py directory to the
2021-09-04 08:27:16 +00:00
directory containing the nsh script
2015-02-16 00:29:12 +00:00
Description
-----------
2021-09-04 08:27:16 +00:00
You can connect to a repository using
2019-08-14 06:57:00 +00:00
2021-09-04 08:27:16 +00:00
connect username@hostname
if you know a username on that site and if they have given you the requisite permission *or* their directory contains publicly readable content.
2019-08-14 06:57:00 +00:00
----
2021-09-04 08:27:16 +00:00
NSH is a command line WebDAV client for Nomad platforms.
It knows how to magic-auth to remote hubs using OpenWebAuth.
2015-02-16 00:29:12 +00:00
2021-09-04 08:27:16 +00:00
NSH uses 'easywebdav' library (0) with small modifications
2015-02-16 00:29:12 +00:00
to 'zotify' it. (See easywebdav/LICENSE)
Commands
--------
2021-09-04 08:27:16 +00:00
connect <hostname>
Authenticate to 'hostname' and switch to it. The root directory may be
hidden/empty. If it is, the only way to proceed is if you know a username on
that server. Then you can 'cd username'.
2015-02-16 00:29:12 +00:00
2021-09-04 08:27:16 +00:00
connect <username@hostname>
Authenticate to 'hostname' and switch to it and automatically cd to the 'username' directory
2015-02-16 00:29:12 +00:00
cd <dirname|..>
change remote dir
2015-02-16 00:29:12 +00:00
ls [path] [-a] [-l] [-d]
list remote files in current dir if 'path' not defined
-a list all, show hidden dot-files
-l list verbose
-d list only dirs
exists <path>
Check existence of 'path'
mkdir <name>
Create directory 'name'
mkdirs <path>
Create parent directories to path, if they don't exist
2015-02-16 00:29:12 +00:00
rmdir <name>
Delete directory 'name'
delete <path>
Delete file 'path'
2021-09-04 08:27:16 +00:00
put <local_path> [remote_path]
Upload local file 'local_path' to 'remote_path'
2015-02-16 00:29:12 +00:00
2021-09-04 08:27:16 +00:00
get <remote_path> [local_path]
2015-02-16 00:29:12 +00:00
Download remote file 'remote_path' and save it as 'local_path'
cat <remote_path>
2015-02-16 00:29:12 +00:00
Print content of 'remote_path'
pwd
Print current path
lcd
lpwd
lls
Local file management (cd, pwd, and ls)
2015-02-16 00:29:12 +00:00
quit
help
Config
------
2021-09-04 08:27:16 +00:00
Create a .nshrc file in your home or in same folder with the nsh script:
2015-02-16 00:29:12 +00:00
2021-09-04 08:27:16 +00:00
[nsh]
2015-02-16 00:29:12 +00:00
host = https://yourhost.com/
username = your_username
password = your_password
Optionally adds
verify_ssl = false
to skip verification of ssl certs
Changelog
----------
2021-10-05 22:09:27 +00:00
2021.10.06 Add alternate configuration support and cmdline arg processing
2021.10.05 Add autocompletion
2021-09-04 08:27:16 +00:00
0.0.3 Convert to python3 and rename from zotsh to nsh
2015-02-16 00:29:12 +00:00
0.0.2 Fix "CommandNotFound" exception, new 'cat' command
0.0.1 First release
Links
-----
_0 : https://github.com/amnong/easywebdav
_1 : http://docs.python-requests.org/en/latest/
_2 : http://docs.python-requests.org/en/latest/user/install/