Command Line Interface for trans server
branch | Travis status |
---|---|
master |
|
develop |
You can install tran-cli
command by pip
pip3 install --upgrade git+https://github.com/nwtgck/trans-cli-python@v1.0.0
Then you can use trans-cli
command.
# Send a file
trans-cli send ~/Documents/hello.txt
# Get a file
trans-cli get d84
(File ID, d84
is save as d84
file in $PWD
)
# Get a file
trans-cli delete d84
# Set server URL
trans-cli config --server=http://localhost:8080
(default URL is https://trans-akka.herokuapp.com)
You can also use pre-enrolled aliases like the following.
# Set server URL by pre-enrolled alias, "local8080"
trans-cli config --server=local8080
# Enroll new alias
trans-cli config --alias-name=myserver --alias-url=https://trans.example.com
You can get more information by trans-cli config -h
(Configure file location is $HOME/.config/trans-cli-python/config.json
)
rm `trans-cli config --store-path`
(config file is automatically generated by command execution)
# Send a file with 30-second-store-duration
trans-cli send --duration=30s ~/Documents/hello.txt
# Send a file with download-once limit
trans-cli send --get-times=1 ~/Documents/hello.txt
# Send a file with delete-key
trans-cli send --delete-key=mydeletekey123 ~/Documents/hello.txt
# Send a file with longer id-length
trans-cli send --id-length=16 ~/Documents/hello.txt
You can get more information by trans-cli send -h
# Get a file content in stdout and redirect to `my.txt`
trans-cli get --stdout d84 > my.txt
You can get more information by trans-cli get -h
# Delete a file with delete-key
trans-cli delete --delete-key=mydeletekey123 d31
You can get more information by trans-cli delete -h