Entries tagged 'cat:Projects'

SBWG 0.13 Entry created on 2025-11-10 (edited 2025-11-18) author:steeph (364) cat:Bash (31) cat:Code (31) cat:Computer (77) cat:Linux (35) cat:Projects (40) cat:SBWG (18) cat:Scripts (28) cat:Software (52) lang:en (248) top:Projects:Code:Bash Scripts:SBWG (16)

Wow, has it been more than a year again without publishing a new SBWG version? Another year where I didn't have much energy for things besides work. But I finally worked on it again. It's still evolving a lot. But the list of things I still want to do is slowly becoming shorter.

SBWG 0.13.0 is a pretty stable version again. I've tested it with several sites for a while and I'm now also using it to generate this web site. You can get it from there.

Apart from the almost permanently ongoing task of cleaning up the code formatting line by line because I started out with a mess of tabs and spaces mixed in different circumstances, I find the following changes worth describing here.

File attachments: Image files are now only embedded as a thumbnail and displayed as a gallery if the file type is one of the following: image/avif, image/bmp, image/gif, image/heic, image/jp2, image/jpeg, image/jpm, image/jpx, image/jxr, image/png, image/svg+xml, image/tiff, image/vnd.microsoft.icon, image/webp or image/x-jp2-codestream. Even though not all of them are supported by most web browsers and there are browsers that support formats not on the list, those are the image types that I find widely supported enough to try to display their contents instead of only linking to the original files. If a file attachment is in a subdirectory, the same sub-path is now used on the generated web site, allowing for several files of the same name to be attached to different entries. That is something that is now possible because file attachment now not necessarily need to be named after the entry they are attached to. Their file name does not matter if the directory they are in is named after the entry. For axample: ENTRYNAME, ENTRYNAME-files or ENTRYNAME-images

Since SBWG sometimes changes how certain features work, it is possible (as in thinkable. It's not like SBWG is used by so many sites that there has been an actual example of it.) that a web site created for one version of SBWG is not generating as expected with a newer version of the script. That is why it is now possible to declare in a site's settings file that it may not be generated by a SBWG script newer than a certain version. If your site uses hooks it may be a good idea to use this new feature so that you get a message when trying to use a wrong version of SBWG instead of noticing after a possibly long generation process that everything does not look right. To activate this restriction, simply add a < sign followed by the latest version allowed to the first line of the site's settings file. For example: #SBWG <0.13.0

Accessibility as an afterthought: For some reason I didn't many things wrong from the start when it comes to accessibility. I've always felt that design decisions are and should be subject to my personality and mood. This is why SBWG is only written for Bash (so far) and so many specialty features are the way they are. I guess I've let this policy spill out on decisions like how readable generated sites are. I've never been good with designing web pages entirely on my own. I'm better at implementing CSS than at design decisions. But this goes so far that I've created an image gallery feature (for image file attachments) with modal preview without using any JavaScript. To realise that I had to break some HTML rules and create HTML that is not viewable without a basic minimum of styling (to hide some elements). I am very very slowly drifting off that course of not caring about things like that. As a start, I've changed the layout of web sites generated with SBWG to contain their menu after the content. For a styled site there's no difference (e.g. using the default "elth" style). But in text browsers (and hopefully also screen readers) this means the entire menu with all topics and the whole tagcloud isn't displayed/read before getting to the actual content of a page. To make it easy to access the menu, there is now a "Jump to the menu" link at the top of every page. Another improvement in this regard is inclusion of image descriptions as alt attributes where descriptions are found in the meta information embedded in the image files. SBWG now looks for all sorts of tags that might hold a useful description of an image, or at least a title or keywords. Fields meant for image descriptions are preferred over others that probably only hold inferior information. This should in some cases already generate useful alt attributes. But I know that I'm going to have to actually write those image descriptions for images used on my site. It's a start. Like I said. I'm moving very very slowly on this.

Style set handling: The most recent large change has been the rewrite of everything related to fetching and embedding style sets. I made some minor compromises but simplified some parts a lot. Changes emerging from the re-write include: Style sets can be placed in different directories now. SBWG looks for the requested style sets in the web site's own styles directory as before. If it isn't there, it continues looking in the user's home directory (`~/.local/share/sbwg/styles/`), then in a global styles directory (`/usr/local/share/sbwg/styles/`), then in the styles directory relative to the script file (in case SBWG is used as a portable directory, not installed). This way styles can be provided globally, e.g. with an install script, additional or altered styles can be installed by a user for their own sites and additional or altered styles again can be limited to a single web site. And lastly a stylesheet file can be chosen by path no matter where it's localed. But this file will be its own style set. Special use case, I know. But if you happen to have a use for that feature, there you go. Style files named reset.css are no longer treated specially. It wasn't a requested feature and I never used it myself. If you use alternate styles on your site (which is unlikely enough) and there are style definitions you want to be included in all style sets, simply include them in all style sets. If you want to refrain from using redundant CSS, put that code in a separate file like before with reset.css) and create links for each style set. The result will be same as before but more self explanatory. When using alternate styles on a web site (so the user can select from them in the browser), all non-styling files from all style sets are now being used. Again this is more in line with what you would expect. Although I might change this again later because the way it used to be was more practical. There were good reasons for it. The basic minimum of styling that should be applied to a site generated by SBWG is now hardcoded. If no style whatsoever is requested, a file with those minimal rules is generated and linked on generated HTML files.

Other than that it's mostly code improvements, HTML cleanliness improvements, formatting improvements and UI/style improvements of a tiny nature. But I'm glad I have two of the larger todos - attachment changes and the style rewrite - (almost) done.

"RGB LEDed" Shop Sign Entry created on 2020-12-04 (edited 2025-07-17) author:steeph (364) cat:Arduino (3) cat:DIY (15) cat:Electronics (15) cat:Lamps (1) cat:Light (4) cat:Projects (40) lang:en (248) top:Projects:Arduino (3) top:Projects:Light (2)

Found this old shop sign on ebay Kleinanzeigen. Idk, I just wanted to have it. Picket it up for 10 € since it wasn't far from me. Put some RGB LEDs and an Arduino inside, used some sample RGB LED sketch, Robert is your uncle. This was a straight forward mod, but I like the effect a lot. I nevr changed the default animation. The lamp has been to camps and other events and is now either lighting up the art area of my new home or adding colourful admosphere to it.

File Attachments (5 files)
Schildlampe-IMG_20200313_072725_1.jpg (image/jpeg, 2691231 B)
Schildlampe-IMG_20200313_072725_1.jpg (image/jpeg, 2691231 B)
hdr
hdr
hdr
hdr
Schildlampe-PXL_20210402_100556600.jpg (image/jpeg, 2698064 B)
Schildlampe-PXL_20210402_100556600.jpg (image/jpeg, 2698064 B)
Schildlampe-PXL_20210402_100611987.jpg (image/jpeg, 2579889 B)
Schildlampe-PXL_20210402_100611987.jpg (image/jpeg, 2579889 B)
SBWG 0.12.8 Entry created on 2024-07-04 author:steeph (364) cat:#100DaysToOffload (40) cat:Bash (31) cat:Code (31) cat:Computer (77) cat:Linux (35) cat:Projects (40) cat:SBWG (18) cat:Scripts (28) cat:Software (52) lang:en (248)

I've recently published a new version of SBWG, my web site generating bash script. The time that I'm able to allocate to working on SBWG fluctuated a lot in the last year and when I do work on it, I often just feel like doing one type of thing. So, when that is starting a new feature, all the other types of tasks can take on a pile that takes months to resolve. But eventually I managed to test and stabilise the features that I've added and changed, edited the README file and tried out the new version with real web sites. Well, testing could be more professionel, but it's okay for a hobby project, I think.

It's been well over a year since I wrote a blog entry about what's new in SBWG. This entry goes through the main new things since version 0.11.1.

A big new thing, at least from the view of the author/me, is that certain options where that makes sense now support multiple arguments. For example if you've edited three entries and want to re-generate just those three, you don't have to run the script three times but rather define the entries like this: sbwg -e ENTRYNAME_1 ENTRYNAME_2 ENTRYNAME_3. The same goes for pages, tagpages, entry attachments and galleries. This doesn't just make it easier and quicker to generate just some changed pieces of content. It also allows the usage of shell globbing (like *, ? and […]) and brace expansion ({…}). For example you can now regenerate all entries that are stored in one subdirectory or all entries whose names start with a vertain string of characters. Another practicle use case is to add external entries and/or to the site that are not stored in the respective directories in the web site's input directory. Using option -E/-P on the contents of an entire directory creates HTML files in the web site's output directory that look like any other of the web site's pages, but without integrating them in the structure of categories and other tags.

There is now a way to create a custom menu in the navigation bar without writing any code in the settings file of a web site. By using the new 'menu:' tag type in the header of a page or entry source file, the page or entry will get added to the menu. This allows for a list of pages you want to link to from the site's navbar, or a nested tree of interesting blog entries. The tag can be used similarly to the 'topic:' tag with the main difference that it doesn't add the entry or page to a list of entries with that topic, but rather directly in the navigation bar. In the default style set that is a drop down menu like the list of categories, authors, languages and topics. But it is just an unordered list, so it can be styled like any web site menu.

The default style set has changed a bit over the year. It basically looks the same but it's a bit cleaner now and is split into more file more logically. It will become even cleaner in the future though. It now also makes use of the new possibility to present the list of categories in the navigation bar in the form of a tag cloud. Audio attachments are better to look at now, especially when there are several audio files attached to an entry. Image attachments are can now be previewed in a modal without loading the (large) original file and without leaving the page. This almost gallery-like display is about as far as I'd like to go without starting to use JavaScript in the default styleset. Some parts of a web site generated with SBWG are now collapsible/expandable. The parts with this new feature are: entry attachments, entire entries on tagpages, entire entries on their own pages, the custom menu, the category list, topic list, language list and author list in the navbar and the entire navbar. By default all of those things are extanded upon page lead and collapsible by clicking/tapping on their titles. But you can add a setting in your settings file for each of those types of things to be collapsed upon page load and expandable by cliking/tapping on them.

Another thing that behaves similarly is content warnings. Hiding the content of an entry, or parts of it, could always be done by hand, e.g. by adding a <details> and <summary> tag pair to the body of the entry. But it is now easily possible by adding a warn: tag to the header of an entry. For example adding warn:This entry contains spoilers. to an entry header results in the entire content being hidden behind a collapsed <details> tag. Initially visible is only the summary "This entry contains spoilers. (click to open)". The default style set makes this warning line very visible but dunking it into a strong red. If the entry has attachments, those will be collapsed and their title marked in red, too. Both the entry content and its attachments will be collapsed by default if the entry has a warn: tag, independently of what your settings for those parts is in the settins file.

New special tagpages: If there are entries that have a language tag and others don't have one, 'nolang.html' will be created that lists all entries that don't have a language tags. Similarly, if at least one entry on the blog has an author tag, but other entries don't, 'noauthor.html' is created and linked to from the navigation bar.

RSS feeds are now created for every tagpage. That means visitors can now subscribe to individual topics or categories or authors or languages. It also means a longer generation time for a complete regeneration process. But permanent caching reduces that to an acceptable amount. Other feed formats are still not created because I reckon that writing those will be particularly fun and satisfying. So I want to get to that when more of the less interesting todo bullet points are done.

Many small changes make web sites with different structures than mine cleaner. Empty directories or menu entries aren't created. There are new hooks for the various different new functions and loops which a user might want to hook into. Various changes around the default language being used for RSS feeds and HTML documents in order to abide by the standards. Many bugs around all sorts of things have been fixed. The logging option works pretty reliable now. It may still be completely removed one day because it's a large chunk in the code, makes the script slower when enabled and can now be entirely replaced by redirecting output from the script on the shell level. The new flags 'hideinfeeds', 'noshow', 'nogal', 'noatts' and 'noheader' control how and where entries are presented and which parts are visible. See the README for descriptions of those flags.

Reading these update blog posts shouldn't be seen as a replacement for reading the CHANGELOG file. If you have a SBWG web site and consider updating SBWG, at least check the CHANGELOG for lines marked with ! since your current version. That makes it much much less likely that you miss something that you should change upon updating SBWG. I mean, I don't think anybody except me uses any version of SBWG. But I've always approached this project working as if it would be used by others in order to produce something that is practically usable without reading and understanding the codebase first.

The list of things that I'd like to do with SBWG is still long and includes heavy changes on how content is placed in the website's input directory. I reckon that it would take me something like 10 - 16 years to get there is I would continue advancing through the todo list at the pace at which I have in the last year. But if I would loose interest at any point along this path, I could feel okay for at least have gotton as far as testing and publishing version 0.12.8 because it's getting closer to looking how I want it to look in regards to the results it produces.

SBWG 0.11.1 Entry created on 2023-02-04 author:steeph (364) cat:Bash (31) cat:Code (31) cat:Computer (77) cat:Linux (35) cat:Projects (40) cat:SBWG (18) cat:Scripts (28) cat:Software (52) lang:en (248) top:Projects:Code:Bash Scripts:SBWG (16)

I'm glad to have this version done and published. Even though it has new features compared to the last published version, I've used it enough to feel relatively comfortable saying it is also more stable and has fewer bugs than the last version. There are known bugs still left. But those aren't new.

Caching options and settings are slowly getting a bit elaborate, but also close to what I imagined them being able to do. There are new cachegroups and parts of entries can now be chosed as individual cachegroups, giving the user more control over what is cached and what caches are used. The lifetime of caches can now be set to make sure that no matter how the caching options are used, no outdated content, tags, attachments, etc. will stay on the web site for too long because cache files have been forgotten to be purges. The cache lifetime can be chosen from 1 second to unfinite. The directory used for persistant caches can now be chosen via command line option. I think the caching options are now in a state in which they can seriously be used reliably. Changes to existing cachegroups, like in previous versions, will probably not be made anymore. Just more cachegroups will be added.

The README file has grown a lot. Not only from new features and options. It's now also more complete. A lot of bugs have been fixed. And some general little code quality improvements took place. The stylesheets of the example web site have been improved a bit.

The messaging and logging system has been completely rewritten. It's not really an important part of the script and strictly doesn't matter for its functionality at all. But I decided to have a messaging system and a logging option that doesn't rely on shell redirects. So I did want to redo it properly. Different message types can now be redirected using file descriptors. The option parser has also been party re-written. It's approaching a state in which it's close to what I think personally a complete option parser for Bash should be like.

Alternate styles can now be defined in a web site's settings file. That way alternate style sheets will be offered to the web browser. If the browser supports alternate style sheets, the visitor can select from them to view the page in a different style. There is now an option to change the tagstyle, enabling a web site to have tags of the same type grouped for a more readable look of the entries' headers. Tags now show in parenthesis the number of entries that carry that tag. The number of file attachments is also displayed below entries.

The options for generating a single entry, page or gallery that is not located in the input directory/isn't actually part of the web site can now be used. They were very buggy or nonexistant before. Entries (and other items) with duplicate names are handled in defined ways now. Text files can now be used as file attachments to entries. But if the script determines one to look like a SBWG source file, it is omitted/not displayed/not linked to.

There are still big plans for future versions. Small and big features as well as a complete re-thinking of how the input directory is structured. Nicer looking web sites, more flexible command line options, more options for speeding up the script in cases where a complete website is updated/re-built. A pause like the one before this release will probably occur more often in the future.

Fred - Part 3 - Power Supplies Entry created on 2021-04-18 (edited 2022-09-14) author:steeph (364) cat:Case Modding (11) cat:Computer (77) cat:DIY (15) cat:Fred (3) cat:Hardware (16) cat:Hoarding (5) cat:Projects (40) lang:en (248) top:Projects:Case Modding:Fred (3)
This entry is a reply to or continuation of the entry 'Fred - Part 2 - The Case Lid And Cooling'.

After getting rid of the fan wall, the power supply was the main source of noise. The original PSU was a 3U redundant (2+1) server power supply. Noise does not matter with machines like that. I wanted to be able to have it running in my living room though, so the noise had to drop a fucking lot. Seriously, that's said so many times for people who don't work with servers like this. But people are still surprised when they hear a server fan for the first time. One of original 60 mm fans in the back is louder than my vaccum cleaner. And there were two of those, four 80 mm fans and five 40 mm fans. Three of the latter in the power supplies. Because I have no means to control the fans in software and don't need all the power the power supply can supply, I tried how much I can lower the noise by adding resistors in series to the fans. That did reduce noise a lot. But not only aren't these fans optimated for quiet operation, they are 40 mm fans. They will nver be quiet enough.

So I looked online for a power supply that

  1. fits in the case (it's not completely an ATX case)
  2. can supply enough current for everything and
  3. is trustworthy/doesn't appear to be too cheaply built

I found a Newton Power Model NPS-300AB B, which doesn't meat points 2 and 3 but fits so perfectly into the case that it was a weird feeling to accept that it is mostly coincidence. I got it for a couple of euros on ebay. Most sellers seem to think it's some piece of premium equipment because it's used in some Fujitsu servers or something. But it's really just a cheap ATX power supply in a non-standard case. But because of that non-standard case fitted so well into my non-standard server case, I got it anyway. I only had to drill the screw holes and that was it. It's hardly enough for 14 HDDs and the internet says it's really cheap and not trustworthy. But I went with it anyway in order to pay tribute to r/thingsfittinginthings.

Not a year later the PSU died. Probably overstressed it for too long. I replaced it with a better SFX unit. I had a nice and thick plate of stainless steel lying around, from which I cut an adapter plate.

I'll attach some photos below. Maybe I'll continue this series of entries on Fred some other day with experiences of dust and heat and such over time.

File Attachments (5 files)
The old power supply after it died. (The unplugged fan and the missing screws do not resemble how it looked while it was in use.)
The old power supply after it died. (The unplugged fan and the missing screws do not resemble how it looked while it was in use.)
Maybe it would have lived longer if I had cooled it better. It wasn't efficient. It would have been too loud.
Maybe it would have lived longer if I had cooled it better. It wasn't efficient. It would have been too loud.
The new power supply. Fits well in height and leaves more than enough room for its modular cables (even for the ones that aren't used) and airflow.
The new power supply. Fits well in height and leaves more than enough room for its modular cables (even for the ones that aren't used) and airflow.
I'm happy with the adapter plate and how it turned out, even though I originally made it for a different SFX unit and the fan cutout now seems redundant. But it actually looks kind of professional. That's rare enough with me. I bet you can't tell which part I made myself. (Or is this because the photo is so bad?)
I'm happy with the adapter plate and how it turned out, even though I originally made it for a different SFX unit and the fan cutout now seems redundant. But it actually looks kind of professional. That's rare enough with me. I bet you can't tell which part I made myself. (Or is this because the photo is so bad?)
I made my own modular cables with old molex connectors for the HDD backplane. The unused cables in the plastic bag has its place at the back of the PSU.
I made my own modular cables with old molex connectors for the HDD backplane. The unused cables in the plastic bag has its place at the back of the PSU.
Go To Navigation Page
Show/Hide Navigation