From a5106252b787ae5c0c91b0f4388f87178ee5b7fd Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 23 Dec 2023 01:17:43 +0530 Subject: [PATCH 1/4] improved readme --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 4a9240b..5555b19 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,35 @@
paste.py 🐍 - A pastebin written in python. + +
+ +## Uasge: + +### Uisng CLI +> cURL is required to use the CLI. + +- Paste a file named 'file.txt' + +```bash +curl -X POST -F "file=@file.txt" https://paste.fosscu.org/file +``` + +- Paste from stdin + +```bash +echo "Hello, world." | curl -X POST -F "file=@-" https://paste.fosscu.org/file +``` + +- Delete an existing paste + +```bash +curl -X DELETE https://paste.fosscu.org/paste/ +``` + +### Using the web interface: +[Go here](https://paste.fosscu.org/web) + +
+ +For info API usage and shell functions, see the [website](https://paste.fosscu.org). \ No newline at end of file From 6e3edabbc8ddecbeace8f611827081c766cd89cc Mon Sep 17 00:00:00 2001 From: Kanishk Pachauri Date: Sat, 23 Dec 2023 04:02:26 +0530 Subject: [PATCH 2/4] Update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2dc53ca..7a13323 100644 --- a/.gitignore +++ b/.gitignore @@ -152,7 +152,7 @@ dmypy.json # Cython debug symbols cython_debug/ -# PyCharm +# PyCharm - JetBrains # JetBrains specific template is maintained in a separate JetBrains.gitignore that can # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear From c973b9d3e9611bef2d0790e4d8e2dcd885b3235a Mon Sep 17 00:00:00 2001 From: Kanishk Pachauri Date: Sat, 23 Dec 2023 04:17:02 +0530 Subject: [PATCH 3/4] fix: import error --- src/paste/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/paste/main.py b/src/paste/main.py index 2437515..0ed75e6 100644 --- a/src/paste/main.py +++ b/src/paste/main.py @@ -6,7 +6,7 @@ from fastapi import FastAPI from fastapi.templating import Jinja2Templates from fastapi.middleware.cors import CORSMiddleware -from utils import generate_uuid +from .utils import generate_uuid app = FastAPI(title="paste.py 🐍") From 584b1692a2ff48582ff4e5e124f1de67716e17d3 Mon Sep 17 00:00:00 2001 From: Kanishk Pachauri Date: Sat, 23 Dec 2023 04:17:36 +0530 Subject: [PATCH 4/4] chore: removed old --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7a13323..2dc53ca 100644 --- a/.gitignore +++ b/.gitignore @@ -152,7 +152,7 @@ dmypy.json # Cython debug symbols cython_debug/ -# PyCharm - JetBrains +# PyCharm # JetBrains specific template is maintained in a separate JetBrains.gitignore that can # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear