Skip to content

nwtgck/trans-cli-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI for trans in Python

Command Line Interface for trans server

branch Travis status
master Build Status
develop Build Status

Installation

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.

Basic usages

# 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

Advanced usages

Set server URL

# 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

# 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)

Remove config

rm `trans-cli config --store-path`

(config file is automatically generated by command execution)

Send

# 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

# 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

# Delete a file with delete-key
trans-cli delete --delete-key=mydeletekey123 d31

You can get more information by trans-cli delete -h

About

CLI for trans in Python

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages