Add PyFiche pastebin service with servers and configs
Introducing PyFiche, a pastebin service optimized for command-line usage, including a full suite of servers – a TCP-based 'Fiche' server, an HTTP 'Lines' server, and a 'Recup' server for file retrieval via netcat. The initial release features configuration via pyproject.toml, a comprehensive README, and the MIT license.
This robust solution allows for easy code snippet sharing, file uploads, and downloads without dependencies outside the Python standard library. Setup involves environment configuration and pip installation with the project's handle to git. The 'Fiche' server accepts specific command-line options for customizability, and banlists/allowlists manage server access control, with detailed logging available per user request. Users should note that HTTPS support requires a reverse proxy setup, as PyFiche itself does not handle SSL/TLS.
The '.gitignore' file ensures that local development directories, bytecode and sensitive files are excluded from the repository to maintain a clean working environment. This addition represents a significant milestone for the Private.coffee team in providing a self-contained pastebin service.
2024-01-21 20:38:17 +00:00
|
|
|
# PyFiche
|
|
|
|
|
|
|
|
PyFiche is a simple pastebin optimized for the command line, written in Python
|
|
|
|
and heavily inspired by [fiche](https://github.com/solusipse/fiche/), or rather
|
2024-01-21 20:42:29 +00:00
|
|
|
a shameless translation. It has no dependencies outside the Python standard
|
|
|
|
library.
|
Add PyFiche pastebin service with servers and configs
Introducing PyFiche, a pastebin service optimized for command-line usage, including a full suite of servers – a TCP-based 'Fiche' server, an HTTP 'Lines' server, and a 'Recup' server for file retrieval via netcat. The initial release features configuration via pyproject.toml, a comprehensive README, and the MIT license.
This robust solution allows for easy code snippet sharing, file uploads, and downloads without dependencies outside the Python standard library. Setup involves environment configuration and pip installation with the project's handle to git. The 'Fiche' server accepts specific command-line options for customizability, and banlists/allowlists manage server access control, with detailed logging available per user request. Users should note that HTTPS support requires a reverse proxy setup, as PyFiche itself does not handle SSL/TLS.
The '.gitignore' file ensures that local development directories, bytecode and sensitive files are excluded from the repository to maintain a clean working environment. This addition represents a significant milestone for the Private.coffee team in providing a self-contained pastebin service.
2024-01-21 20:38:17 +00:00
|
|
|
|
|
|
|
It also comes with a re-implementation of Lines, the HTTP server that comes
|
2024-01-21 20:48:13 +00:00
|
|
|
with Fiche, which this time around also allows you to upload files using POST
|
|
|
|
requests. Additionally, PyFiche also comes with a simple TCP server, Recup,
|
2024-01-21 20:42:29 +00:00
|
|
|
to download pastes through netcat without using HTTP(S), in the same way you
|
|
|
|
upload them.
|
Add PyFiche pastebin service with servers and configs
Introducing PyFiche, a pastebin service optimized for command-line usage, including a full suite of servers – a TCP-based 'Fiche' server, an HTTP 'Lines' server, and a 'Recup' server for file retrieval via netcat. The initial release features configuration via pyproject.toml, a comprehensive README, and the MIT license.
This robust solution allows for easy code snippet sharing, file uploads, and downloads without dependencies outside the Python standard library. Setup involves environment configuration and pip installation with the project's handle to git. The 'Fiche' server accepts specific command-line options for customizability, and banlists/allowlists manage server access control, with detailed logging available per user request. Users should note that HTTPS support requires a reverse proxy setup, as PyFiche itself does not handle SSL/TLS.
The '.gitignore' file ensures that local development directories, bytecode and sensitive files are excluded from the repository to maintain a clean working environment. This addition represents a significant milestone for the Private.coffee team in providing a self-contained pastebin service.
2024-01-21 20:38:17 +00:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
### Dependencies
|
|
|
|
|
2024-01-21 20:42:29 +00:00
|
|
|
- Python 3 (tested with 3.11)
|
Add PyFiche pastebin service with servers and configs
Introducing PyFiche, a pastebin service optimized for command-line usage, including a full suite of servers – a TCP-based 'Fiche' server, an HTTP 'Lines' server, and a 'Recup' server for file retrieval via netcat. The initial release features configuration via pyproject.toml, a comprehensive README, and the MIT license.
This robust solution allows for easy code snippet sharing, file uploads, and downloads without dependencies outside the Python standard library. Setup involves environment configuration and pip installation with the project's handle to git. The 'Fiche' server accepts specific command-line options for customizability, and banlists/allowlists manage server access control, with detailed logging available per user request. Users should note that HTTPS support requires a reverse proxy setup, as PyFiche itself does not handle SSL/TLS.
The '.gitignore' file ensures that local development directories, bytecode and sensitive files are excluded from the repository to maintain a clean working environment. This addition represents a significant milestone for the Private.coffee team in providing a self-contained pastebin service.
2024-01-21 20:38:17 +00:00
|
|
|
|
|
|
|
### Local Installation
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ python -m venv venv
|
|
|
|
$ source venv/bin/activate
|
|
|
|
$ pip install -U git+https://kumig.it/PrivateCoffee/pyfiche.git
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
### Fiche Server
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ source venv/bin/activate
|
|
|
|
$ pyfiche-server # try --help for options
|
|
|
|
```
|
|
|
|
|
|
|
|
With the exception of the `-u` option, all arguments of the original Fiche
|
|
|
|
should work as expected. `-u` is not implemented because, well, just use the
|
|
|
|
right user in the first place. 🤷♀️
|
|
|
|
|
2024-01-22 07:44:37 +00:00
|
|
|
#### Uploading files
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ nc <server> <port> < <file>
|
|
|
|
```
|
|
|
|
|
Add PyFiche pastebin service with servers and configs
Introducing PyFiche, a pastebin service optimized for command-line usage, including a full suite of servers – a TCP-based 'Fiche' server, an HTTP 'Lines' server, and a 'Recup' server for file retrieval via netcat. The initial release features configuration via pyproject.toml, a comprehensive README, and the MIT license.
This robust solution allows for easy code snippet sharing, file uploads, and downloads without dependencies outside the Python standard library. Setup involves environment configuration and pip installation with the project's handle to git. The 'Fiche' server accepts specific command-line options for customizability, and banlists/allowlists manage server access control, with detailed logging available per user request. Users should note that HTTPS support requires a reverse proxy setup, as PyFiche itself does not handle SSL/TLS.
The '.gitignore' file ensures that local development directories, bytecode and sensitive files are excluded from the repository to maintain a clean working environment. This addition represents a significant milestone for the Private.coffee team in providing a self-contained pastebin service.
2024-01-21 20:38:17 +00:00
|
|
|
### Recup Server
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ source venv/bin/activate
|
|
|
|
$ pyfiche-recup # try --help for options
|
|
|
|
```
|
|
|
|
|
2024-01-22 07:44:37 +00:00
|
|
|
#### Downloading files
|
|
|
|
|
|
|
|
Pipe the ID of an uploaded file to `nc`:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ echo <id> | nc <server> <port> > <file>
|
|
|
|
```
|
|
|
|
|
Add PyFiche pastebin service with servers and configs
Introducing PyFiche, a pastebin service optimized for command-line usage, including a full suite of servers – a TCP-based 'Fiche' server, an HTTP 'Lines' server, and a 'Recup' server for file retrieval via netcat. The initial release features configuration via pyproject.toml, a comprehensive README, and the MIT license.
This robust solution allows for easy code snippet sharing, file uploads, and downloads without dependencies outside the Python standard library. Setup involves environment configuration and pip installation with the project's handle to git. The 'Fiche' server accepts specific command-line options for customizability, and banlists/allowlists manage server access control, with detailed logging available per user request. Users should note that HTTPS support requires a reverse proxy setup, as PyFiche itself does not handle SSL/TLS.
The '.gitignore' file ensures that local development directories, bytecode and sensitive files are excluded from the repository to maintain a clean working environment. This addition represents a significant milestone for the Private.coffee team in providing a self-contained pastebin service.
2024-01-21 20:38:17 +00:00
|
|
|
### Lines Server
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ source venv/bin/activate
|
|
|
|
$ pyfiche-lines # try --help for options
|
|
|
|
```
|
|
|
|
|
2024-01-22 07:44:37 +00:00
|
|
|
#### Viewing pastes in a browser
|
|
|
|
|
|
|
|
Go to `http://<server>:<port>/<id>`.
|
|
|
|
|
|
|
|
#### Downloading raw pastes
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ curl http://<server>:<port>/<id>/raw
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Uploading pastes
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ curl -X POST -d '<paste content>' http://<server>:<port>
|
|
|
|
```
|
|
|
|
|
|
|
|
Or use a file:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ curl -X POST -d @<file> http://<server>:<port>
|
|
|
|
```
|
|
|
|
|
Add PyFiche pastebin service with servers and configs
Introducing PyFiche, a pastebin service optimized for command-line usage, including a full suite of servers – a TCP-based 'Fiche' server, an HTTP 'Lines' server, and a 'Recup' server for file retrieval via netcat. The initial release features configuration via pyproject.toml, a comprehensive README, and the MIT license.
This robust solution allows for easy code snippet sharing, file uploads, and downloads without dependencies outside the Python standard library. Setup involves environment configuration and pip installation with the project's handle to git. The 'Fiche' server accepts specific command-line options for customizability, and banlists/allowlists manage server access control, with detailed logging available per user request. Users should note that HTTPS support requires a reverse proxy setup, as PyFiche itself does not handle SSL/TLS.
The '.gitignore' file ensures that local development directories, bytecode and sensitive files are excluded from the repository to maintain a clean working environment. This addition represents a significant milestone for the Private.coffee team in providing a self-contained pastebin service.
2024-01-21 20:38:17 +00:00
|
|
|
## License
|
|
|
|
|
|
|
|
PyFiche is licensed under the MIT license. See the [LICENSE](LICENSE) file for
|
|
|
|
more information.
|