Merge branch 'master' of https://github.com/szabodanika/microbin
This commit is contained in:
commit
84136f1106
3 changed files with 30 additions and 16 deletions
38
README.md
38
README.md
|
@ -6,18 +6,24 @@
|
||||||
![Build](https://github.com/szabodanika/microbin/actions/workflows/rust.yml/badge.svg)
|
![Build](https://github.com/szabodanika/microbin/actions/workflows/rust.yml/badge.svg)
|
||||||
![crates.io](https://img.shields.io/crates/v/microbin.svg)
|
![crates.io](https://img.shields.io/crates/v/microbin.svg)
|
||||||
[![Docker Image](https://github.com/szabodanika/microbin/actions/workflows/docker.yml/badge.svg)](https://hub.docker.com/r/danielszabo99/microbin)
|
[![Docker Image](https://github.com/szabodanika/microbin/actions/workflows/docker.yml/badge.svg)](https://hub.docker.com/r/danielszabo99/microbin)
|
||||||
|
[![Docker Pulls](https://img.shields.io/docker/pulls/danielszabo99/microbin?label=Docker%20pulls)](https://img.shields.io/docker/pulls/danielszabo99/microbin?label=Docker%20pulls)
|
||||||
|
[![Support Server](https://img.shields.io/discord/662017309162078267.svg?color=7289da&label=Discord&logo=discord&style=flat-square)](https://discord.gg/3DsyTN7T)
|
||||||
|
|
||||||
MicroBin is a super tiny, feature rich, configurable, self-contained and self-hosted paste bin web application. It is very easy to set up and use, and will only require a few megabytes of memory and disk storage. It takes only a couple minutes to set it up, why not give it a try now?
|
MicroBin is a super tiny, feature rich, configurable, self-contained and self-hosted paste bin web application. It is very easy to set up and use, and will only require a few megabytes of memory and disk storage. It takes only a couple minutes to set it up, why not give it a try now?
|
||||||
|
|
||||||
Install from Cargo:
|
Install from Cargo:
|
||||||
|
|
||||||
`cargo install microbin`
|
```bash
|
||||||
|
cargo install microbin
|
||||||
|
```
|
||||||
|
|
||||||
And run with your custom configuration:
|
And run with your custom configuration:
|
||||||
|
|
||||||
`microbin --port 8080 --public-path https://myserver.net --highlightsyntax --editable`
|
```bash
|
||||||
|
microbin --port 8080 --public-path https://myserver.net --highlightsyntax --editable
|
||||||
|
```
|
||||||
|
|
||||||
Or get the Docker image from [Dockerhub: danielszabo99/microbin](https://hub.docker.com/r/danielszabo99/microbin)
|
Or get the Docker Image from [Dockerhub: danielszabo99/microbin](https://hub.docker.com/r/danielszabo99/microbin).
|
||||||
|
|
||||||
On our website [microbin.eu](https://microbin.eu) you will find the following:
|
On our website [microbin.eu](https://microbin.eu) you will find the following:
|
||||||
|
|
||||||
|
@ -27,31 +33,34 @@ On our website [microbin.eu](https://microbin.eu) you will find the following:
|
||||||
- [Donations and Sponsorships](https://microbin.eu/donate/)
|
- [Donations and Sponsorships](https://microbin.eu/donate/)
|
||||||
- [Community](https://microbin.eu/community/)
|
- [Community](https://microbin.eu/community/)
|
||||||
|
|
||||||
### Features
|
## Features
|
||||||
|
|
||||||
- Is very small
|
- Is very small
|
||||||
- Entirely self-contained executable, MicroBin is a single file!
|
- Entirely self-contained executable, MicroBin is a single file!
|
||||||
- Animal names instead of random numbers for pasta identifiers (64 animals)
|
- Animal names instead of random numbers for pasta identifiers (64 animals)
|
||||||
- File uploads (eg. server.com/file/pig-dog-cat)
|
- File uploads (eg. `server.com/file/pig-dog-cat`)
|
||||||
- Raw text serving (eg. server.com/raw/pig-dog-cat)
|
- Raw text serving (eg. `server.com/raw/pig-dog-cat`)
|
||||||
- URL shortening and redirection
|
- URL shortening and redirection
|
||||||
- QR code support
|
- QR code support
|
||||||
- Very simple database (JSON + files) for portability, easy backups and integration
|
- Very simple database (JSON + files) for portability, easy backups and integration
|
||||||
- Listing and manually removing pastas (/pastalist)
|
- Listing and manually removing pastas (`/pastalist`)
|
||||||
- Private and public, editable and final, automatically and never expiring pastas
|
- Private and public, editable and final, automatically and never expiring pastas
|
||||||
- Syntax highlighting
|
- Syntax highlighting
|
||||||
- Automatic dark mode and custom styling support with very little CSS and only vanilla JS (see [water.css](https://github.com/kognise/water.css))
|
- Automatic dark mode and custom styling support with very little CSS and only vanilla JS (see [`water.css`](https://github.com/kognise/water.css))
|
||||||
- Most of the above can be toggled on and off!
|
- Most of the above can be toggled on and off!
|
||||||
|
|
||||||
### What is a "pasta" anyway?
|
## What is a "pasta" anyway?
|
||||||
|
|
||||||
|
In MicroBin, a pasta can be:
|
||||||
|
|
||||||
In microbin, a pasta can be:
|
|
||||||
- A text that you want to paste from one machine to another, eg. some code,
|
- A text that you want to paste from one machine to another, eg. some code,
|
||||||
- A file that you want to share, eg. a video that is too large for Discord, a zip with a code project in it or an image,
|
- A file that you want to share, eg. a video that is too large for Discord, a zip with a code project in it or an image,
|
||||||
- A URL redirect.
|
- A URL redirect.
|
||||||
|
|
||||||
### When is MicroBin useful?
|
## When is MicroBin useful?
|
||||||
|
|
||||||
|
You can use MicroBin:
|
||||||
|
|
||||||
You can use MicroBin
|
|
||||||
- As a URL shortener/redirect service,
|
- As a URL shortener/redirect service,
|
||||||
- To send long texts to other people,
|
- To send long texts to other people,
|
||||||
- To send large files to other people,
|
- To send large files to other people,
|
||||||
|
@ -62,9 +71,6 @@ You can use MicroBin
|
||||||
|
|
||||||
...and many other things, why not get creative?
|
...and many other things, why not get creative?
|
||||||
|
|
||||||
|
MicroBin and MicroBin.eu are available under the [BSD 3-Clause License](LICENSE).
|
||||||
### License
|
|
||||||
|
|
||||||
MicroBin and MicroBin.eu are available under the BSD 3-Clause License.
|
|
||||||
|
|
||||||
© Dániel Szabó 2022
|
© Dániel Szabó 2022
|
||||||
|
|
|
@ -81,6 +81,7 @@ pub async fn create(
|
||||||
"10min" => timenow + 60 * 10,
|
"10min" => timenow + 60 * 10,
|
||||||
"1hour" => timenow + 60 * 60,
|
"1hour" => timenow + 60 * 60,
|
||||||
"24hour" => timenow + 60 * 60 * 24,
|
"24hour" => timenow + 60 * 60 * 24,
|
||||||
|
"3days" => timenow + 60 * 60 * 24 * 3,
|
||||||
"1week" => timenow + 60 * 60 * 24 * 7,
|
"1week" => timenow + 60 * 60 * 24 * 7,
|
||||||
"never" => {
|
"never" => {
|
||||||
if ARGS.no_eternal_pasta {
|
if ARGS.no_eternal_pasta {
|
||||||
|
|
|
@ -35,6 +35,13 @@
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
24 hours
|
24 hours
|
||||||
</option>
|
</option>
|
||||||
|
{% if args.default_expiry == "3days" %}
|
||||||
|
<option selected value="3days">
|
||||||
|
{%- else %}
|
||||||
|
<option value="3days">
|
||||||
|
{%- endif %}
|
||||||
|
3 days
|
||||||
|
</option>
|
||||||
{% if args.default_expiry == "1week" %}
|
{% if args.default_expiry == "1week" %}
|
||||||
<option selected value="1week">
|
<option selected value="1week">
|
||||||
{%- else %}
|
{%- else %}
|
||||||
|
|
Loading…
Reference in a new issue