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:
parent
80d5aad05d
commit
626633a7a9
1 changed files with 36 additions and 0 deletions
36
README.md
36
README.md
|
@ -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
|
should work as expected. `-u` is not implemented because, well, just use the
|
||||||
right user in the first place. 🤷♀️
|
right user in the first place. 🤷♀️
|
||||||
|
|
||||||
|
#### Uploading files
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ nc <server> <port> < <file>
|
||||||
|
```
|
||||||
|
|
||||||
### Recup Server
|
### Recup Server
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -45,6 +51,14 @@ $ source venv/bin/activate
|
||||||
$ pyfiche-recup # try --help for options
|
$ 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
|
### Lines Server
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -52,6 +66,28 @@ $ source venv/bin/activate
|
||||||
$ pyfiche-lines # try --help for options
|
$ 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
|
## License
|
||||||
|
|
||||||
PyFiche is licensed under the MIT license. See the [LICENSE](LICENSE) file for
|
PyFiche is licensed under the MIT license. See the [LICENSE](LICENSE) file for
|
||||||
|
|
Loading…
Reference in a new issue