Skip to main content

transfer.sh command-line client

Project description

Usage:

  • After installation, you can run this package directly in command line. Launching it without arguments starts it in interactive mode:

Sample output:

Github|⇒ transfer_files
Enter path to file or directory: ./sysinfo
Creating zipfile from files in... /home/path/to/directory/sysinfo
Added file:  cython_tut.cpython-34m.so
Added file:  cython_tut.pyx
Added file:  setup.py
Added file:  build
Added file:  fib.cpython-34m.so
Added file:  primes.c
Added file:  .idea
Added file:  fib.c
Added file:  parse_proc_files.py
Added file:  fib.pyx
Added file:  primes.pyx
Added file:  cython_tut.c
Added file:  primes.cpython-34m.so

Sending zipfile: files_archive_09-02_18:34.zip (size of the file: 0.407897 MB)
Link to download zipfile(will be saved till 2017-09-16):
Could not save metadata

Link copied to clipboard
Remove archive? (y/n, yes/no):yes
Removing file... /home/path/to/directory/sysinfo/files_archive_09-02_18:34.zip
Removed.
  • Besides that, you can start it with arguments:

    -i –interactive - keys that will start app with prompts (same as running it without arguments)

    -d –directory - enter path to directory (relative or absolute), which files will be sent in an archive

    -f –file - same as –directory, but enter path to file

    —ra –rm-archive - delete created archive, after it was sent

    –rf –rm-file - delete file after it was sent

    -h –help - display help message

Sample output

transfer.sh_client|dev⚡ ⇒ transfer_files -f test.txt --rf

Sending file: /home/path/to/directory/transfer.sh_client/test.txt (size of the file: 0.000113 MB)
Link to download file(will be saved till 2017-09-16):
https://transfer.sh/CtaJs/test.txt
Link copied to clipboard
Removing file... /home/path/to/directory/transfer.sh_client/test.txt
Removed.

Example of usage inside scripts

#!/usr/bin/env python3

from transfersh_client.app import send_to_transfersh, create_zip, remove_file


def send_files_from_dir():
    directory = './'
    zip_file = create_zip(directory)  # creates zip archive and returns it's absolute path
    send_to_transfersh(zip_file)  # sends archive to transfer.sh
    remove_file(zip_file)  # removes it


if __name__ == '__main__':
    send_files_from_dir()

Download

pip3 install transfersh_client

Requirements

  • pyperclip

  • requests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transfersh_client-1.1.3.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

transfersh_client-1.1.3-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file transfersh_client-1.1.3.tar.gz.

File metadata

  • Download URL: transfersh_client-1.1.3.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for transfersh_client-1.1.3.tar.gz
Algorithm Hash digest
SHA256 21db07e9d8d214a19cffd7b70646507f64b2d5308b8677b55fc0f21a250d80c2
MD5 2132139c8d58b96b4fc94930f7f4f7d3
BLAKE2b-256 5f95ef5cbbcb1afc1e925748856fb6f2179f00ed51971e63d1bc06f09434fb02

See more details on using hashes here.

File details

Details for the file transfersh_client-1.1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: transfersh_client-1.1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9

File hashes

Hashes for transfersh_client-1.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 648f9b82591686bbcbccb867ff4e9ee12db502f5224d857c11eae1580a278b56
MD5 2b580b5777961a24bac7a83a3b807c44
BLAKE2b-256 4736bb15d7106468bcd523fe0276c74d8a423417c177afa097c854e6cd4f0f75

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page