Comment Box Generator
- 4 Devlogs
- 11 Total hours
A website to quickly generate centred comment boxes
A website to quickly generate centred comment boxes
Comment Box Generator is a super lightweight site for making unicode boxes to put in comments in your code that are centred, for example:
# ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
# ▓ EXAMPLE ▓
# ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
(which looks centred if you are using a monospace font)
This is probably the last devlog for this project, meaning all these changes are finishing touches. For example:
monospace fontWill be shipping it soon!
Comment Box Generator is a super lightweight site for making unicode
boxes to put in comments in your code that are centred, for example:
/*
╔════════════════════════════════════╗
║ EXAMPLE ║
╚════════════════════════════════════╝
*/
(trust me this looks normal in a code editor)
It’s made with Bun on the backend, so it builds and hosts fast. When
distributed, it loads super fast as it’s only 50KB minified. This is
done by removing all whitespace in HTML, CSS and JS and removing
unnecessary glyphs in the one font that’s bundled, Stack Sans.
Things that have been added since the previous devlog:
= because there are far fewer of those that work withThings yet to come:
Comment Box Generator is a small site that lets you generate comment boxes with text inside for various programming languages:
# ======================================
# = like so =
# ======================================
(which is centred when you are using a monospace font)
In this devlog I’ve rewritten the “backend” in Bun so in package.json there are several scripts for various purposes:
bun run build.js which minifies whats in src/ and puts it out to dist/
vps.sh which is primarily just meant for me to run on my VPS (hosted at https://commentboxgenerator.lemonsite.uk/ ). It kills whatever process is on the port used by CBG (always 3054), builds the project and deploys. It uses nohup to log to a file and to run in the background. It then restarts nginx.src/
On the frontend I’ve added the option to use different languages’ comment syntax, to use single line or multiline comments, and to change what symbol is used for the box.
Things that are coming soon:
Was trying to write one of those centred box comments in one of my projects, like:
# ======================================
# = HELPER FUNCTIONS =
# ======================================
(which is centred in monospace font)
But I couldn’t find any tool online that could centre a box comment online, so I’m making one myself.
Here’s just a minimal prototype for Python, but I will be updating and making it look nicer; and most importantly adding new features like other language support and custom box characters.