pd

command
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

pd is a Pixeldrain client application.

Usage

pd has two subcommands: upload and download.

upload command uploads files specified by the given paths to Pixeldrain and shows a URL to download them.

$ pd upload <path[:name]>...

Each path can have an optional name. If a name is given, uploaded file will be renamed with it. For example, this command reads img.png and uploads it as another.png:

$ pd upload img.png:another.png

If path is "-", the uploading file is read from stdin. In this case, it's recommended to give a file name. For example, this command reads data from stdin and uploads it as output.log:

$ pd upload -:output.log

If multiple files are given, an album consists of them will be created. By default, the album has a random name. --album flag can specify the name. For example, this command uploads two files and creates an album named "screenshots":

$ pd upload --album screenshots img1.png img2.png

download command downloads files from Pixeldrain to the current directory.

$ pd download <URL>...

If --dir or -o option is given with a directory path, the downloaded file is stored in the directory.

For example, this command downloads a file URL into ~/Download:

$ pd download URL -o ~/Download

If recipients are specified with --recipient and/or --recipient-file flags to upload command, files will be encrypted before being uploaded by age. Encrypted files will have extension .age.

A recipient specified with --recipient flag can be an age public key generated by age-keygen ("age1...") or an SSH public key ("ssh-ed25519 AAAA...", "ssh-rsa AAAA..."). A recipient file specified with --recipient-file flag contains one or more recipients, one per line. Empty line sand lines starting with "#" are ignored as comments.

If a downloading file has extension .age and an identity file is specified with --identity flag to download command, the file will be decrypted.

An identity contains one or more secret keys ("AGE-SECRET-KEY-1..."), one per line, or an SSH key. Empty lines and lines starting with "#" are ignored as comments.

See https://github.com/FiloSottile/age for the details of age and age-keygen.

Installation

If you're a Homebrew or Linuxbrew user, you can install this app by the following commands:

$ brew tap jkawamoto/pixeldrain
$ brew install pixeldrain

To build the newest version, use go get command:

$ go get github.com/jkawamoto/go-pixeldrain

Otherwise, compiled binaries are also available at https://github.com/jkawamoto/go-pixeldrain/releases.

License

This software is released under the MIT License.

Directories

Path Synopsis
Package auth provides functions to attach and extract auth information to and from a context.
Package auth provides functions to attach and extract auth information to and from a context.
Package command implements subcommands.
Package command implements subcommands.
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
internal
Package status defines status codes pd command returns.
Package status defines status codes pd command returns.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL