Add file transfer instructions to README

Enhanced the README with clear examples for uploading and downloading files, and for interaction with pastes via curl or browser. This update should assist users in performing common tasks without needing to refer to external documentation, improving ease of use.
This commit is contained in:
Kumi 2024-01-22 08:44:37 +01:00
parent 80d5aad05d
commit 626633a7a9
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -38,6 +38,12 @@ 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. 🤷‍♀️
#### Uploading files
```bash
$ nc <server> <port> < <file>
```
### Recup Server
```bash
@ -45,6 +51,14 @@ $ source venv/bin/activate
$ pyfiche-recup # try --help for options
```
#### Downloading files
Pipe the ID of an uploaded file to `nc`:
```bash
$ echo <id> | nc <server> <port> > <file>
```
### Lines Server
```bash
@ -52,6 +66,28 @@ $ source venv/bin/activate
$ pyfiche-lines # try --help for options
```
#### 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>
```
## License
PyFiche is licensed under the MIT license. See the [LICENSE](LICENSE) file for