Skip to main content

Command-line tool to upload files to https://file.io

Project description

file.io-cli-tddschn

Fork of file.io-cli with maintenance and enhancements.

$ pip install file.io-cli-tddschn

Command-line tool to upload files to https://file.io

Synopsis

$ file.io-cli --help

usage: file.io-cli [-h] [--version] [-e E] [-n NAME] [-q] [-c] [-t PATH] [-z]
                   [-v] [-N UPLOAD_TIMES]
                   [file]

Upload a file to file.io and print the download link. Supports stdin.

positional arguments:
  file                  the file to upload

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -e E, --expires E     set the expiration time for the uploaded file
  -n NAME, --name NAME  specify or override the filename
  -q, --quiet           hide the progress bar
  -c, --clip            copy the URL to your clipboard
  -t PATH, --tar PATH   create a TAR archive from the specified file or
                        directory
  -z, --gzip            filter the TAR archive through gzip (only with -t,
                        --tar)
  -v, --verbose         print the server response
  -N UPLOAD_TIMES, --upload-times UPLOAD_TIMES
                        upload the file N times

Examples

Upload a file and copy the link:

$ file.io hello.txt -c
[============================================================] 100% (15 bytes / 15 bytes)
https://file.io/pgiPc2 (copied to clipboard)
$ cat https://file.io/pgiPc2
Hello, File.io!

Upload a compressed archiveCompress a file/directory and upload it (streaming):

$ file.io -zt AllMyFiles/
/ (55MB)
https://file.io/sf2La

Upload from stdin:

$ find .. -iname \*.py | file.io -n file-list.txt
/ (312KB)
https://file.io/uRglUT

Upload a file 3 times concurrently:

$ file.io -N 3 file_io_cli_tddschn/cli.py

https://file.io/Vv7QtVfMVBr2
https://file.io/10Y2DgoXDJwQ
https://file.io/rCoWI2PN58cg

Installation

pipx

This is the recommended installation method.

$ pipx install file.io-cli-tddschn

pip

$ pip install file.io-cli-tddschn

Develop

$ git clone https://github.com/tddschn/file.io-cli-tddschn.git
$ cd file.io-cli-tddschn
$ poetry install

Changelog

1.0.5

  • Add -v, --verbose option to print server response in JSON
  • Use poetry for developing and packaging

v1.0.4

  • Fix missing entrypoint in new setup script

v1.0.3

  • Fix declared dependencies in setup script

v1.0.2

  • Replaced time.clock (removed in python 3.8) with time.perf_counter
  • Minimum Python version is 3.3

v1.0.1

  • Add -t, --tar and -z, --gzip options
  • Fix NameError when using -c, --clip
  • Fix progress bar left incomplete

v1.0.0

  • Initial version

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

file_io_cli_tddschn-1.1.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

file_io_cli_tddschn-1.1.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file file_io_cli_tddschn-1.1.1.tar.gz.

File metadata

  • Download URL: file_io_cli_tddschn-1.1.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Darwin/22.5.0

File hashes

Hashes for file_io_cli_tddschn-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c803b626365da18e1ba134b479ae93c27d17e7c853ef38082340763016065c01
MD5 494478786b125550c5aa15fa3c37e8d0
BLAKE2b-256 a5cff7297c4dfa2abccdc264338e80f9eddbe7fb257e1158c0a54d9b7337b19c

See more details on using hashes here.

File details

Details for the file file_io_cli_tddschn-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for file_io_cli_tddschn-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 776ea64a54840a474b9d5b59bd32cc3bce3e075f4abce31977de598f7617bc94
MD5 d4fb8826b3d00fd2ac74d1670e68b6b0
BLAKE2b-256 44f68637571f6b2a1380fd9773f6e3adbbbd059b6da64de0691057fc584f6297

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