feat: init

[skip ci]
This commit is contained in:
Tiara Rodney 2022-04-01 01:02:09 +02:00
commit 0d6c010cce
55 changed files with 4216 additions and 0 deletions

View file

@ -0,0 +1,17 @@
Advanced Usage
==============
Binary Pastes
-------------
httpaste supports encoding. Encode your data as Base64, Base85, Base32, or
Base16 and provide an encoding specifier.
.. code-block:: shell
$ cat my.pdf | base64 | curl "http://localhost:8080/paste/public?encoding=base64"
http://localhost:8080/paste/public/5Rt3E3n6
When getting pastes, you may provide a MIME type, if a client deduces the encoding by looking at the HTTP 'Content-Type' header.
$ curl "https://p.victoryk.it/paste/public/5Rt3E3n6?mime=application/pdf"

17
docs/guide/backend.rst Normal file
View file

@ -0,0 +1,17 @@
Backend
=======
Binary Pastes
-------------
httpaste supports encoding. Encode your data as Base64, Base85, Base32, or
Base16 and provide an encoding specifier.
.. code-block:: shell
$ cat my.pdf | base64 | curl "http://localhost:8080/paste/public?encoding=base64"
http://localhost:8080/paste/public/5Rt3E3n6
When getting pastes, you may provide a MIME type, if a client deduces the encoding by looking at the HTTP 'Content-Type' header.
$ curl "https://p.victoryk.it/paste/public/5Rt3E3n6?mime=application/pdf"

2
docs/guide/cli.rstas Normal file
View file

@ -0,0 +1,2 @@
Get Started
===========

View file

@ -0,0 +1,70 @@
Get Started
===========
Installation
------------
.. code-block:: shell
$ python3 -m pip install httpaste-victorykit
$ httpaste --help
Create configuration
--------------------
.. code-block:: shell
$ httpaste default-config --dump myconfig.ini
Run a local test server
-----------------------
.. code-block:: shell
$ httpaste standalone --config myconfig.ini --port 8080
* Serving Flask app 'httpaste' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://localhost:8080/ (Press CTRL+C to quit)
Publish a Private Paste
-----------------------
.. code-block:: shell
$ echo 'My first private paste' | curl -F 'data=<-' \
-u myusername:mypassword \
http://localhost:8080/paste/private
http://localhost:8080/paste/private/UALUA9
.. note::
If the user does not exist, they will be created upon authentication.
Retrieve a Private Paste
------------------------
.. code-block:: shell
$ curl -u myusername:mypassword http://localhost:8080/paste/private/UALUA9
My first private paste
Publish a Public Paste
-----------------------
.. code-block:: shell
$ echo 'My first public paste' | curl -F 'data=<-' \
http://localhost:8080/paste/public
http://localhost:8080/paste/public/X4L39J
Retrieve a Public Paste
------------------------
.. code-block:: shell
$ curl http://localhost:8080/paste/public/X4L39J
My first public paste