A web service and GUI for ./badges
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Lucas Hinderberger e7cda95354 Fixed reactivity of BadgeGeneratorForm and ParameterTreeInput 1 month ago
badges Updates own badges 2 months ago
frontend Fixed reactivity of BadgeGeneratorForm and ParameterTreeInput 1 month ago
webservice Updating webservice to ./badges v2.0.0 1 month ago
.gitignore Added .gitignore for GoLand 3 months ago
LICENSE.txt Initial Commit 4 months ago
NOTICE.txt Frontend: Updated dependencies 2 months ago
README.md Removed outdated README passage about compatibility 2 months ago
RELEASES.md BUGFIX Proper error when specifying non-existing font 1 month ago
logo.svg Updated logo 2 months ago

README.md

./badges web

A web service and GUI for ./badges

Status: Active Issue Tracker License: Apache v2.0 ./badges

Summary

This repository contains a web service and GUI for generating and downloading repository badges, powered by ./badges.

It consists of a small webservice, written in Go, and a lightweight HTML/JavaScript frontend, written using Vue.js 3.

Web Service

The ./badges web service is a small REST webservice, written in Go.

To build it, simply run

go build

in the webservice subdirectory.

For a development server, you can run

go run main.go

The web service exposes an /openapi.json endpoint, that gives a description of the service's endpoints.

It also exposes a /templates endpoint, that provides an index of all available templates and for each template a list of available themes as well as each theme's parameters.

Configuration of the webservice is done by passing in a JSON file using the -c command line parameter. An example configuration file is provided in webservice/example-config.json.

In its default configuration, it is configured for allowing any Cross-Origin requests. You can configure a stricter setting in the server configuration file.

By default, the webservice will support the template and themes built into ./badges.

GUI

Building the entire GUI

The ./badges web GUI is a lightweight HTML/JavaScript GUI (< 100KiB gzipped for v1.0.0), written with Vue.js 3 and Halfmoon CSS.

It features live-updating badges and interactive selection of themes, as well as example Markdown generation.

You can configure it using the frontend/.env file, where you can set the web service URL and whether the download and remote inclusion sections should be shown.

To run it, first make sure the web service (see above) is running and its URL is configured in the file frontend/.env. Then run:

npm run serve

for a development server and

npm run build

for a production build.

The GUI is suitable for local use. For production use, you might need to add legal and privacy links as well as further copyright attribution, if you use custom themes and templates. For these customizations, it is suggested to include the GUI as a NPM dependency and to re-use its components or to create your custom fork, modifying App.vue and other relevant files in place.

Reusing the GUI components

The GUI components are published on npm and can be re-used in your own application. Please be sure to include LICENSE and NOTICE in this scenario.

npm install dot-slash-badges-web

Contributing

Feel free to contribute by posting issues on this project's Issue Tracker.

Please note that pull requests are only accepted if they are in line with the licensing of the rest of the project (see below).

./badges web is (C) 2021 Lucas Hinderberger

It is licensed under the Apache Licence Version 2.0.

The output of the ./badges generator using the built-in fonts, themes and templates is unencumbered by copyright restrictions (to the extent possible under law), due to the built-in fonts, themes and templates being released under CC0 1.0 Universal.

For details, please refer to the LICENCE file and the NOTICE file.

Author and Contact

./badges web is authored by Lucas Hinderberger. For contact data, see https://lhinderberger.com/impressum

The repository of ./badges web can be found at https://codeberg.org/lhinderberger/dot-slash-badges-web

You're welcome to file bug reports, other issues and pull requests there.

You can also contact the author via email at mail@lhinderberger.com