kpaste

command module
v0.0.0-...-99c8825 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: AGPL-3.0 Imports: 29 Imported by: 0

README

#+Title: ReadMe
#+Options: toc:nil author:nil creator:nil

* Usage
#+begin_src sh
# basic usage
echo "Hello world!" | curl p.koi.moe -Ff=@-

# parse as markdown or orgmode file
curl p.koi.moe -Ff@<yourfile>.md
# or
curl p.koi.moe -Ff@<yourfile>.org

# expire after 7 days
curl p.koi.moe -Ff=@<yourfile.ext> -Fexpire=7

# read max 5 times
curl p.koi.moe -Ff=@<yourfile.ext> -Fread=5

# Password protected
curl --user <user>:<password> p.koi.moe -Ff=@<yourfile.ext>

# Create or update with speicifying key
# Notice: Only password protected notes can be updated and deleted
curl p.koi.moe/<key> -Ff=@<youfile.ext>

# Delete
curl --user <user>:<password> -XDELETE p.koi.moe/<key>

#+end_src

* Content Limitation
#+begin_src 
Content-Security-Policy: default-src 'none'; style-src 'self'; sandbox allow-downloads allow-forms allow-popups
#+end_src

* Service Deployment
** Install
#+begin_src 
go install git.sr.ht/~lindsay/kpaste@latest
#+end_src

Or

#+begin_src 
git clone https://git.sr.ht/~lindsay/kpaste

cd kpaste

go build .
#+end_src

** Run
#+begin_src sh
kpaste serve --db /tmp/kpaste.db
# without --media flag, uploaded files will be stored in the sqlite database as blob type
# or

kpaste serve --db /tmp/kpaste --media /tmp/media --upload-limit 3027
#+end_src

** Clean up
Run =kpaste clean --db <database_file> [--media <media_path>]= to clean expired data.

** More help
#+begin_src 
kpaste help
#+end_src

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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