From 4ee064b834b7752b4b874a992d9ca2d7e8f17207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Szab=C3=B3?= <25702868+szabodanika@users.noreply.github.com> Date: Mon, 11 Apr 2022 19:14:00 +0100 Subject: [PATCH 1/2] Update README.MD --- README.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.MD b/README.MD index db42eb2..b318962 100644 --- a/README.MD +++ b/README.MD @@ -35,4 +35,6 @@ Then start the service with `systemctl start microbin` and enable it on boot wit - Removing pasta after N reads - File uploads - URL shortening +- CLI tool +- Configuration with command line arguments (ports, enable-disable pasta list, footer, etc) From a3915fed764b6aa589ddf6e0740f7683ac0763b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Szab=C3=B3?= <25702868+szabodanika@users.noreply.github.com> Date: Mon, 11 Apr 2022 19:31:56 +0100 Subject: [PATCH 2/2] Updated README.MD with cURL instructions --- README.MD | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.MD b/README.MD index b318962..75eef9b 100644 --- a/README.MD +++ b/README.MD @@ -23,6 +23,24 @@ WantedBy=multi-user.target Then start the service with `systemctl start microbin` and enable it on boot with `systemctl enable microbin`. +### Create Pasta with cURL + +Simple text Pasta: `curl -d "expiration=10min&content=This is a test pasta" -X POST https://microbin.myserver.com/create` + +Simple text Pasta: `curl -d "expiration=10min&content=$( < mypastafile.txt )" -X POST https://microbin.myserver.com/create` + +Available expiration options: +- 1min +- 10min +- 1hour +- 24hour +- 1week +- never + +Use cURL to read the pasta: `curl https://microbin.myserver.com/rawpasta/fish-pony-crow` + +or to download the pasta: `curl https://microbin.myserver.com/rawpasta/fish-pony-crow > output.txt` + ### Features - No CSS or JS, super lightweight and simple - Animal names instead of random numbers for pasta identifiers