From 0cf9f29aea49b1f1501fcd4b139ec88d942f244c Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Mon, 29 Mar 2021 21:05:33 -0600 Subject: put a bow on the damn thing --- LICENSE | 25 +++++++++++++++++++++++++ README.md | 23 +++++++++++++++++++++++ app.py | 4 ++-- templates/index.html.jinja | 24 ++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 templates/index.html.jinja 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/.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 'sample badge for Rust' +def index(): + return render_template('index.html.jinja') @app.route('/badge/.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 @@ + + + + + Where Is This Packaged? + + +

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.

+

Usage

+

/badge/<package>.svg will generate a badge for all the known 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.

+

Source code available under the GLWTPL.

+ + -- cgit v1.2.3