[HN Gopher] Show HN: SpaceBadgers - Free and Libre SVG Badges
___________________________________________________________________
Show HN: SpaceBadgers - Free and Libre SVG Badges
Greetings, Hacker News community! I am thrilled to present
SpaceBadgers, a new free and open-source SVG badge generator I've
been working on. It's located at badgers.space. SpaceBadgers is
born out of the desire to offer more flexibility and customization
for project badges, often used in open-source projects. It's fully
open source, provided under the permissive MIT license, and will
always be provided for free. The core badge worker is written in
Rust, and so is the library behind it, which you can also find on
crates.io under the name spacebadgers. I am excited to receive
your feedback and suggestions. Check it out and let me know what
you think in the comments. Contributions are also welcomed and
appreciated. You can find the source code here:
https://github.com/splittydev/spacebadgers.
Author : splittydev
Score : 147 points
Date : 2023-05-21 11:54 UTC (11 hours ago)
(HTM) web link (badgers.space)
(TXT) w3m dump (badgers.space)
| mixmastamyk wrote:
| Never really understood the point of these? They started showing
| up maybe ten years ago, and I must have missed the introductory
| blog post on them with the rationale.
|
| Guess I can see the utility of having a little stats/props table
| at the top of a project readme. But the in-line wrapped style and
| _images_ from an external web service aspects never made sense to
| me. Why is that popular?
| splittydev wrote:
| I guess, badges can seem a bit peculiar at first. Showing
| automatically updating stats (like current version, downloads,
| build/ci status, etc.) is generally very useful for software
| projects, and using a badge generation service is an easy and
| aesthetic way of achieving that.
|
| Personally, I think they also add a pleasant touch of style to
| a project, since READMEs often have otherwise dry and
| information-heavy looks. Adding a bit of color never hurt
| anyone :)
| bloopernova wrote:
| This is fantastic, I really like the idea. Great stuff!!
| mattl wrote:
| On mobile if the browser font is larger the content is off the
| screen without a way to scroll.
| splittydev wrote:
| Thanks for bringing this to my attention! Will look into it
| goodpoint wrote:
| How is this better than https://shields.io/ ?
| splittydev wrote:
| Honestly, depends on your use-case. Spacebadgers generates
| minified and brotli-compressed SVG code instead of images, so
| we can run on the edge with very little performance overhead.
| Due to the reduced bandwidth, we can also serve badges with
| much shorter cache-times, so they update more frequently. I
| suppose if you're happy with shields.io, there's no good reason
| to switch, but for people who are actively looking for a faster
| alternative, or want to get some fresh badges for a new
| project, Spacebadgers is a great alternative.
| goodpoint wrote:
| ...or people could just contribute compressed SVG to
| shields.io
| splittydev wrote:
| Sure, but I don't see how competing services are harmful in
| any way. As I said in other comments, if you're happy with
| shields.io, go ahead and use it. I'm not trying to deter
| anyone from using service A or service B, especially
| because I'm not making any money from this. Spacebadgers is
| just another choice, one that might be better or worse for
| your specific use-case.
| amenghra wrote:
| It's better because it's written in Rust /s
| splittydev wrote:
| Good one :P I really tried not to over-emphasize the usage of
| Rust in the project. It is indeed quite fast, but mostly
| because of the focus on minified SVG, edge-computing and
| WebAssembly.
| [deleted]
| samstave wrote:
| Please put your email in your profile - or tell me how to contact
| you offline about a tangential project or email me first initial
| last name from profile name at proton
| splittydev wrote:
| You can reach me under hn.nqc37@simplelogin.com
| assimpleaspossi wrote:
| I have no clue what is going on here or how to access anything.
| [deleted]
| splittydev wrote:
| The service generates badge images that can be embedded into
| Markdown documents (or anywhere else where images work). It's
| accessed using a REST-like API.
|
| For example, to generate a badge with the CI status for
| spacebadgers, you can use
| https://badgers.space/github/checks/splittydev/spacebadgers.
| This URL returns an SVG image with the current CI status for
| this project.
| danrl wrote:
| Great project!
|
| Nit: Personally would prefer rounded corners.
| splittydev wrote:
| I'm gonna add that soon :) I wanted to get the flat design
| right first, but I've already figured out rounded corners using
| SVG masks, so supporting them properly shouldn't be too hard
| splittydev wrote:
| Btw, many more integrations are coming soon :) NPM is already
| lined up for release, just gotta test it a bit more and make sure
| everything works as intended
| nihit-desai wrote:
| Very neat! I was looking for something exactly like this for a
| library I'm building - will try it out
| andrew_ wrote:
| Wasn't expecting the "why" section to be at the bottom, since
| that's where I'm used to seeing license and contribution info.
| Might be worth linking to that at the top of your readme so folks
| don't miss it. I was specifically looking for why shields.io
| wasn't good enough, and found my answer there.
| splittydev wrote:
| You're right, I should've moved that up a bit. Shields.io
| definitely has its merits, they've got a huge collection of
| supported badges. Badgen.net was created because shields.io was
| significantly slowing down over time, and solved that by
| serving SVG over the edge, and it's what I've been using for
| the past few years. But badgen has lots of broken badges
| nowadays, and it doesn't seem to be properly maintained. So I
| decided to roll my own, using a Rust library and Cloudflare
| workers. In the end, there are still good reasons to use
| shields.io or badgen.net, depending on the specific use-case.
| I've just become frustrated with broken badges, especially
| since we're using them on our company website, and it really
| doesn't make a good impression to have broken images everywhere
| swyx wrote:
| i would put the Why on the website too, not just the readme.
| i was wondering Why until i scrolled down here and realized
| its on the github.
| xenodium wrote:
| > So I decided to roll my own, using a Rust library and
| Cloudflare workers.
|
| What is Cloudflare workers Rust support is like? I'd be a a
| complete Rust noob and looking for a dev environment with
| some code completion. Is that feasible today? Could you share
| your dev environment?
| splittydev wrote:
| The documentation from Cloudflare isn't too great, but you
| can look at the badgers-worker code for inspiration. I
| personally use VS Code, with the rust-analyzer extension. I
| use Rust a lot, and I'm very satisfied with the code
| completion quality that rust-analyzer provides.
| Cloudflare's wrangler tool provides easy local debugging
| for workers, but its live-reload doesn't work too well, so
| you have to frequently restart.
| splittydev wrote:
| Adding to that, Rust really isn't such a fringe language
| anymore. It's used in production all over the world, at
| huge companies such as Google, Meta, Microsoft, Netflix,
| etc. and it powers like 75% of the large crypto
| companies. The dev tools are high-quality, and there are
| lots of learning resources available. The language itself
| is mature too, and very stable.
| xenodium wrote:
| This is really encouraging! I'm keen to experiment with
| Cloudflare and Rust. Thank you for sharing.
| peter_l_downs wrote:
| This is great, thank you! Any chance you'd consider making
| binaries available for download? I wanted to try out the CLI but
| I haven't used rust before, and I got as far as installing
| `cargo` via `rustup` but I can't figure out how to download and
| build the cli.
|
| The badges look great and I love that this is available as both a
| web service (easy to link to) and as a CLI tool (no risk of
| depending on your web service).
| splittydev wrote:
| I'm planning to release the CLI binaries in the future, but for
| now the CLI isn't all that great. It's still lacking some
| features that are already implemented in the library and web-
| service, and I need to update the command-line interface to
| support them properly.
| splittydev wrote:
| Oh btw, building the CLI is super easy. If you've already
| installed Rust using rustup, you can just clone the repository
| and run `cargo run`. Since the CLI is the only tool that's
| actually marked as a binary, cargo will automatically build and
| run that one.
|
| You can then pass parameters like so: `cargo run -- --label Foo
| --status Bar --color green`
| lgreiv wrote:
| Very handy tool for sure. I really appreciate the efforts you
| made on in-line, repo and website documentation.
| chrisweekly wrote:
| Awesome! I love that it "just works"; I might engage with the CLI
| for meaningful integrations later, but right off the bat I can
| create custom SVGs thanks to dynamic URL params:
|
| https://badgers.space/badge/mylabel/statuscode/green
| zackproser wrote:
| These look really nice! Well done
| splittydev wrote:
| Thank you so much! I spent quite a bit of time crafting the
| default color scheme "honey", and I'm glad people like it :)
___________________________________________________________________
(page generated 2023-05-21 23:00 UTC)