Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved readme #12

Merged
merged 7 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ cython_debug/
# 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
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,35 @@
<hr>

paste.py 🐍 - A pastebin written in python.

<hr>

## 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/<id>
```

### Using the web interface:
[Go here](https://paste.fosscu.org/web)

<hr>

For info API usage and shell functions, see the [website](https://paste.fosscu.org).
11 changes: 11 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
annotated-types==0.6.0
anyio==3.7.1
fastapi==0.104.1
idna==3.6
Jinja2==3.1.2
MarkupSafe==2.1.3
pydantic==2.5.2
pydantic_core==2.14.5
sniffio==1.3.0
starlette==0.27.0
typing_extensions==4.9.0
12 changes: 9 additions & 3 deletions src/paste/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>paste.py 🐍</title>
<title>paste.py 🐍</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="og:title" content="paste.py 🐍"/>
<meta name="og:site_name" content="paste.py"/>
<meta name="og:description" content="A simple pastebin powered by FastAPI."/>
<meta name="og:type" content="website"/>
<meta name="og:url" content="https://paste.fosscu.org"/>
<meta name="og:locale" content="en_US"/>
<style>
body {
font-family: sans-serif;
Expand Down
12 changes: 9 additions & 3 deletions src/paste/templates/web.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>paste.py 🐍</title>
<title>paste.py 🐍</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="og:title" content="paste.py 🐍"/>
<meta name="og:site_name" content="paste.py"/>
<meta name="og:description" content="Web form for posting to paste.py. A simple pastebin powered by FastAPI."/>
<meta name="og:type" content="website"/>
<meta name="og:url" content="https://paste.fosscu.org/web"/>
<meta name="og:locale" content="en_US"/>
<style>
body {
font-family: sans-serif;
Expand Down