parent
e91e8f9edf
commit
b6f10ec669
@ -0,0 +1,104 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/photonsh/themes@0.3.0/photon-light/photon-light.min.css">
|
||||||
|
<script defer id="photon_lib" src="https://cdn.jsdelivr.net/npm/photon-js@0.1.3/dist/photon.min.js"></script>
|
||||||
|
<script>
|
||||||
|
document.querySelector('#photon_lib').addEventListener('load', function() {
|
||||||
|
photon.highlight({ apiKey: '1d634ab9bb2817a5e1c78937c6ecb3b6' });
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
pre {
|
||||||
|
background-color: whitesmoke;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<title>pastebucket</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main class="container">
|
||||||
|
<h1>pastebucket</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="https://gitlab.com/rascul/pasteb/pipelines">
|
||||||
|
<img src="https://gitlab.com/rascul/pasteb/badges/master/pipeline.svg" alt="Pipeline Status" />
|
||||||
|
</a>
|
||||||
|
<a href="https://rascul.gitlab.io/pasteb/cov/index.html">
|
||||||
|
<img src="https://gitlab.com/rascul/pasteb/badges/master/coverage.svg?job=cov" alt="Coverage" />
|
||||||
|
</a>
|
||||||
|
<a href="https://gitlab.com/rascul/pasteb/blob/master/LICENSE">
|
||||||
|
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
A pastebin like web application. Useful for pasting text into a form to store.
|
||||||
|
Syntax highlighting is selected via a dropdown menu and is applied server side.
|
||||||
|
No javascript to load, just some CSS.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Curl may be used to submit text, but there is no option at this time to specify
|
||||||
|
the language (for syntax highlighting) via curl:
|
||||||
|
|
||||||
|
<pre><code class="language-bash">cargo check | curl -T- https://p.rascul.xyz
|
||||||
|
curl -T- https://p.rascul.xyz < src/main.rs
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The git repo is located at https://gitlab.com/rascul/pasteb.
|
||||||
|
There is an instance running at https://p.rascul.xyz.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
pastebucket is written in <a href="https://rust-lang.org">rust</a> and uses the
|
||||||
|
<a href="https://gotham.rs">gotham</a> web application framework.
|
||||||
|
|
||||||
|
<h2>Building</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
First, clone the repo:
|
||||||
|
|
||||||
|
<pre><code class="language-bash">git clone https://gitlab.com/rascul/pasteb
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Enter the directory and create your configuration:
|
||||||
|
|
||||||
|
<pre><code class="language-bash">cd pasteb
|
||||||
|
cp config.toml.default config.toml
|
||||||
|
$EDITOR config.toml
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Build pastebucket
|
||||||
|
|
||||||
|
<pre><code class="language-bash">cargo build --release
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h2>Running</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Run pastebucket
|
||||||
|
|
||||||
|
<pre><code class="language-bash">cargo run --release
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
It is best to run a web server such as <a href="https://httpd.apache.org">Apache</a> or
|
||||||
|
<a href="https://nginx.org">nginx</a> and reverse proxy connections to pastebucket.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You may run the executable directly (without cargo), it is located at
|
||||||
|
<code>target/release/pastebucket</code>.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
pastebucket should be run from the directory containing <code>config.toml</code>. At this
|
||||||
|
time there is no option specify where to load the config from via the command
|
||||||
|
line.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
A sample systemd service file is included in the git repo.
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in new issue