aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE25
-rw-r--r--README.md23
-rw-r--r--app.py4
-rw-r--r--templates/index.html.jinja24
4 files changed, 74 insertions, 2 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a0f7ec4
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,25 @@
+ GLWT(Good Luck With That) Public License
+ Copyright (c) Everyone, except Author
+
+Everyone is permitted to copy, distribute, modify, merge, sell, publish,
+sublicense or whatever they want with this software but at their OWN RISK.
+
+ Preamble
+
+The author has absolutely no clue what the code in this project does.
+It might just work or not, there is no third option.
+
+
+ GOOD LUCK WITH THAT PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION
+
+ 0. You just DO WHATEVER YOU WANT TO as long as you NEVER LEAVE A
+TRACE TO TRACK THE AUTHOR of the original product to blame for or hold
+responsible.
+
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+Good luck and Godspeed.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..15df425
--- /dev/null
+++ b/README.md
@@ -0,0 +1,23 @@
+# Where Is This Packaged?
+
+A service to make SVG badges showing which package repositories offer something.
+
+**Poorly written, poorly tested, not production ready.**
+
+Only necessary because the existing service that does this [is run by assholes](https://twitter.com/QuinnyPig/status/1376357557191643141).
+
+## Usage
+
+`/badge/<package>.svg` will generate a badge for all the [known](https://code.boringcactus.com/where-packaged/tree/repos) repositories that have a package with that name.
+
+You can override with query string parameters.
+For example, `/badge/rust.svg?crates-io=&debian=rustc&ubuntu=rustc` looks for packages named "rust", but ignores crates.io and looks for "rustc" instead on Debian & Ubuntu.
+
+## Status
+
+I don't know if I intend to finish this up and make it a more permanent service.
+
+## About
+
+Written by [boringcactus / Melody Horn](https://www.boringcactus.com).
+Source code [available](https://code.boringcactus.com/where-packaged/) under the [GLWTPL](https://github.com/me-shaon/GLWTPL).
diff --git a/app.py b/app.py
index 05e8449..140e31b 100644
--- a/app.py
+++ b/app.py
@@ -7,8 +7,8 @@ app = Flask(__name__)
app.jinja_options['autoescape'] = select_autoescape(default=True)
@app.route('/')
-def hello_world():
- return '<a href="/badge/nushell.svg?crates-io=nu">sample badge for Rust</a>'
+def index():
+ return render_template('index.html.jinja')
@app.route('/badge/<package>.svg')
diff --git a/templates/index.html.jinja b/templates/index.html.jinja
new file mode 100644
index 0000000..94611ef
--- /dev/null
+++ b/templates/index.html.jinja
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Where Is This Packaged?</title>
+</head>
+<body>
+<h1>Where Is This Packaged?</h1>
+<p>A service to make SVG badges showing which package repositories offer something.</p>
+<p><strong>Poorly written, poorly tested, not production ready.</strong></p>
+<p>Only necessary because the existing service that does this <a href="https://twitter.com/QuinnyPig/status/1376357557191643141">is run by assholes</a>.</p>
+<h2>Usage</h2>
+<p><code>/badge/&lt;package&gt;.svg</code> will generate a badge for all the <a href="https://code.boringcactus.com/where-packaged/tree/repos">known</a> repositories that have a package with that name.</p>
+<p>
+ You can override with query string parameters.
+ For example, <a href="/badge/rust.svg?crates-io=&debian=rustc&ubuntu=rustc"><code>/badge/rust.svg?crates-io=&amp;debian=rustc&amp;ubuntu=rustc</code></a> looks for packages named "rust", but ignores crates.io and looks for "rustc" instead on Debian & Ubuntu.
+</p>
+<h2>Status</h2>
+<p>I don't know if I intend to finish this up and make it a more permanent service.</p>
+<h2>About</h2>
+<p>Written by <a href="https://www.boringcactus.com">boringcactus / Melody Horn</a>.</p>
+<p>Source code <a href="https://code.boringcactus.com/where-packaged/">available</a> under the <a href="https://github.com/me-shaon/GLWTPL">GLWTPL</a>.</p>
+</body>
+</html>