~kota/pcf

A simple command line sha1/FTP-based pastebin client.
add initial sftp support
implement io.ReadAll for older go versions
bump version

clone

read-only
https://git.sr.ht/~kota/pcf
read/write
git@git.sr.ht:~kota/pcf

You can also use your local clone with git send-email.

#pcf

A command line sha1/(S)FTP-based pastebin client. Reads from STDIN or a list of filenames as arguments, uploads files to a server, and prints the urls to STDOUT.

Server information is configured using a simple toml format in $XDG_CONFIG_HOME/pcf/config.toml which is typically $HOME/.config/pcf/config.toml. An example configuration is shown below with the details for a free public pcf server paste.nilsu.org.

#Config

ftp_url = "ftp://paste.nilsu.org:21/incoming"
sftp_anon_url = "sftp://paste.nilsu.org:22/incoming"
sftp_auth_url = "sftp://paste.nilsu.org:22/var/www/html/paste"
sftp_user = "kota"
sftp_pass = "cowscows"

# Default mode. Options are "ftp", "sftp-anon", and "sftp-auth".
default_mode = "sftp-anon"

# Prefix for the resulting file sha1 name.
output = "https://paste.nilsu.org/"

#License

GPL3+ see LICENSE in this repo for more details.

#Build

Build dependencies:

  • golang
  • make
  • sed
  • scdoc

make all

#Install

Optionally configure config.mk to specify a different install location.
Defaults to /usr/local/

sudo make install

#Uninstall

sudo make uninstall

#Resources

Send patches and questions to ~kota/pcf@lists.sr.ht.

Bugs & todo here: ~kota/pcf