diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-19 16:29:49 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-19 16:29:49 +0300 |
| commit | 55498328b20d2d8ae283b95c1a2f1380c144b5ea (patch) | |
| tree | aa2130e1fb80e3eebf371ace6bb7fe67cf3a44cf | |
| parent | 1a8dda02cd361cf2bf868863de750be4cd688ca3 (diff) | |
Update content for html
| -rw-r--r-- | about/showcase.html | 1213 | ||||
| -rw-r--r-- | about/showcase/debroid/image-1.png | 192 |
2 files changed, 809 insertions, 596 deletions
diff --git a/about/showcase.html b/about/showcase.html index a5be8e15..de71d518 100644 --- a/about/showcase.html +++ b/about/showcase.html @@ -13,7 +13,7 @@ </p> <h1 style='display: inline' id='project-showcase'>Project Showcase</h1><br /> <br /> -<span>Generated on: 2025-07-12</span><br /> +<span>Generated on: 2025-07-19</span><br /> <br /> <span>This page showcases my side projects, providing an overview of what each project does, its technical implementation, and key metrics. Each project summary includes information about the programming languages used, development activity, and licensing. The projects are ordered by recent activity, with the most actively maintained projects listed first.</span><br /> <br /> @@ -23,10 +23,12 @@ <li><a href='#project-showcase'>Project Showcase</a></li> <li>⇢ <a href='#overall-statistics'>Overall Statistics</a></li> <li>⇢ <a href='#projects'>Projects</a></li> +<li>⇢ ⇢ <a href='#totalrecall'>totalrecall</a></li> <li>⇢ ⇢ <a href='#gitsyncer'>gitsyncer</a></li> +<li>⇢ ⇢ <a href='#dtail'>dtail</a></li> +<li>⇢ ⇢ <a href='#rexfiles'>rexfiles</a></li> <li>⇢ ⇢ <a href='#timr'>timr</a></li> <li>⇢ ⇢ <a href='#tasksamurai'>tasksamurai</a></li> -<li>⇢ ⇢ <a href='#rexfiles'>rexfiles</a></li> <li>⇢ ⇢ <a href='#ior'>ior</a></li> <li>⇢ ⇢ <a href='#wireguardmeshgenerator'>wireguardmeshgenerator</a></li> <li>⇢ ⇢ <a href='#ds-sim'>ds-sim</a></li> @@ -34,7 +36,6 @@ <li>⇢ ⇢ <a href='#gos'>gos</a></li> <li>⇢ ⇢ <a href='#foostats'>foostats</a></li> <li>⇢ ⇢ <a href='#rcm'>rcm</a></li> -<li>⇢ ⇢ <a href='#gemtexter'>gemtexter</a></li> <li>⇢ ⇢ <a href='#quicklogger'>quicklogger</a></li> <li>⇢ ⇢ <a href='#docker-gpodder-sync-server'>docker-gpodder-sync-server</a></li> <li>⇢ ⇢ <a href='#terraform'>terraform</a></li> @@ -44,7 +45,7 @@ <li>⇢ ⇢ <a href='#gorum'>gorum</a></li> <li>⇢ ⇢ <a href='#guprecords'>guprecords</a></li> <li>⇢ ⇢ <a href='#randomjournalpage'>randomjournalpage</a></li> -<li>⇢ ⇢ <a href='#dtail'>dtail</a></li> +<li>⇢ ⇢ <a href='#gemtexter'>gemtexter</a></li> <li>⇢ ⇢ <a href='#sway-autorotate'>sway-autorotate</a></li> <li>⇢ ⇢ <a href='#photoalbum'>photoalbum</a></li> <li>⇢ ⇢ <a href='#algorithms'>algorithms</a></li> @@ -64,48 +65,101 @@ <li>⇢ ⇢ <a href='#template'>template</a></li> <li>⇢ ⇢ <a href='#muttdelay'>muttdelay</a></li> <li>⇢ ⇢ <a href='#netdiff'>netdiff</a></li> -<li>⇢ ⇢ <a href='#pwgrep'>pwgrep</a></li> <li>⇢ ⇢ <a href='#japi'>japi</a></li> <li>⇢ ⇢ <a href='#perl-poetry'>perl-poetry</a></li> <li>⇢ ⇢ <a href='#ipv6test'>ipv6test</a></li> -<li>⇢ ⇢ <a href='#loadbars'>loadbars</a></li> <li>⇢ ⇢ <a href='#cpuinfo'>cpuinfo</a></li> +<li>⇢ ⇢ <a href='#loadbars'>loadbars</a></li> +<li>⇢ ⇢ <a href='#pwgrep'>pwgrep</a></li> <li>⇢ ⇢ <a href='#perldaemon'>perldaemon</a></li> <li>⇢ ⇢ <a href='#awksite'>awksite</a></li> <li>⇢ ⇢ <a href='#jsmstrade'>jsmstrade</a></li> -<li>⇢ ⇢ <a href='#netcalendar'>netcalendar</a></li> <li>⇢ ⇢ <a href='#ychat'>ychat</a></li> +<li>⇢ ⇢ <a href='#netcalendar'>netcalendar</a></li> <li>⇢ ⇢ <a href='#hsbot'>hsbot</a></li> -<li>⇢ ⇢ <a href='#fype'>fype</a></li> <li>⇢ ⇢ <a href='#vs-sim'>vs-sim</a></li> +<li>⇢ ⇢ <a href='#fype'>fype</a></li> </ul><br /> <h2 style='display: inline' id='overall-statistics'>Overall Statistics</h2><br /> <br /> <ul> -<li>📦 Total Projects: 55</li> -<li>📊 Total Commits: 10,446</li> -<li>📈 Total Lines of Code: 211,600</li> -<li>📄 Total Lines of Documentation: 21,802</li> -<li>💻 Languages: Go (20.2%), Java (19.1%), C++ (17.6%), C/C++ (9.9%), Perl (8.1%), C (7.1%), Shell (6.9%), Config (2.2%), HTML (2.1%), Ruby (1.3%), HCL (1.3%), Make (0.9%), Python (0.8%), CSS (0.7%), Raku (0.6%), JSON (0.4%), XML (0.3%), Haskell (0.3%), YAML (0.2%), TOML (0.1%)</li> -<li>📚 Documentation: Text (52.5%), Markdown (45.2%), LaTeX (2.3%)</li> -<li>🎵 Vibe-Coded Projects: 2 out of 55 (3.6%)</li> -<li>🤖 AI-Assisted Projects (including vibe-coded): 7 out of 55 (12.7% AI-assisted, 87.3% human-only)</li> -<li>🚀 Release Status: 33 released, 22 experimental (60.0% with releases, 40.0% experimental)</li> +<li>📦 Total Projects: 56</li> +<li>📊 Total Commits: 10,528</li> +<li>📈 Total Lines of Code: 202,691</li> +<li>📄 Total Lines of Documentation: 236,370</li> +<li>💻 Languages: Go (31.4%), Java (20.0%), C (9.5%), C++ (8.7%), Perl (7.9%), Shell (6.4%), C/C++ (6.0%), HTML (1.8%), Config (1.8%), Ruby (1.4%), HCL (1.4%), Python (0.8%), Make (0.8%), Raku (0.4%), JSON (0.4%), CSS (0.4%), XML (0.3%), Haskell (0.3%), YAML (0.2%), TOML (0.1%)</li> +<li>📚 Documentation: Text (94.3%), Markdown (5.5%), LaTeX (0.2%)</li> +<li>🎵 Vibe-Coded Projects: 3 out of 56 (5.4%)</li> +<li>🤖 AI-Assisted Projects (including vibe-coded): 8 out of 56 (14.3% AI-assisted, 85.7% human-only)</li> +<li>🚀 Release Status: 34 released, 22 experimental (60.7% with releases, 39.3% experimental)</li> </ul><br /> <h2 style='display: inline' id='projects'>Projects</h2><br /> <br /> +<h3 style='display: inline' id='totalrecall'>totalrecall</h3><br /> +<br /> +<ul> +<li>💻 Languages: Go (99.8%), YAML (0.2%)</li> +<li>📚 Documentation: Markdown (92.7%), Text (7.3%)</li> +<li>📊 Commits: 42</li> +<li>📈 Lines of Code: 7418</li> +<li>📄 Lines of Documentation: 438</li> +<li>📅 Development Period: 2025-07-14 to 2025-07-19</li> +<li>🔥 Recent Activity: 2.0 days (avg. age of last 42 commits)</li> +<li>⚖️ License: MIT</li> +<li>🏷️ Latest Release: v0.5.0 (2025-07-19)</li> +<li>🎵 Vibe-Coded: This project has been vibe coded</li> +</ul><br /> +<br /> +<span>**totalrecall** is a Bulgarian language learning tool that generates comprehensive Anki flashcard materials from Bulgarian words. It creates high-quality audio pronunciations using OpenAI TTS, AI-generated contextual images via DALL-E, and automatic translations, making it easier for learners to memorize Bulgarian vocabulary through visual and auditory associations. The tool is particularly useful for language learners who want to create professional-quality flashcards with authentic Bulgarian pronunciation and memorable visual contexts without manually sourcing audio and images.</span><br /> +<br /> +<span>The project is implemented in Go with a modular architecture featuring both CLI and GUI interfaces. It leverages OpenAI's APIs for audio generation (11 available voices) and image creation, includes audio caching to minimize API costs, and supports batch processing from text files. The tool outputs Anki-compatible packages (.apkg format) or CSV files with all media included, following a clean package structure with separate modules for audio generation, image processing, Anki formatting, and configuration management using industry-standard libraries like Cobra for CLI and Viper for configuration.</span><br /> +<br /> +<a class='textlink' href='https://codeberg.org/snonux/totalrecall'>View on Codeberg</a><br /> +<a class='textlink' href='https://github.com/snonux/totalrecall'>View on GitHub</a><br /> +<br /> +<span>Go from <span class='inlinecode'>internal/gui/generator.go</span>:</span><br /> +<br /> +<pre> +func (a *Application) saveAudioAttribution(word, audioFile, voice string, speed + float64) error { + attribution := fmt.Sprintf("Audio generated by OpenAI TTS\n\n") + attribution += fmt.Sprintf("Bulgarian word: %s\n", word) + attribution += fmt.Sprintf("Model: %s\n", a.audioConfig.OpenAIModel) + attribution += fmt.Sprintf("Voice: %s\n", voice) + attribution += fmt.Sprintf("Speed: %.2f\n", speed) + + if a.audioConfig.OpenAIInstruction != "" { + attribution += fmt.Sprintf("\nVoice instructions:\n%s\n", + a.audioConfig.OpenAIInstruction) + } + + attribution += fmt.Sprintf("\nGenerated at: %s\n", time.Now().Format( + "2006-01-02 15:04:05")) + + attrPath := strings.TrimSuffix(audioFile, filepath.Ext(audioFile)) + + "_attribution.txt" + if err := os.WriteFile(attrPath, []byte(attribution), 0644); err != nil { + return fmt.Errorf("failed to write audio attribution file: %w", err) + } + + return nil +} +</pre> +<br /> +<span>---</span><br /> +<br /> <h3 style='display: inline' id='gitsyncer'>gitsyncer</h3><br /> <br /> <ul> -<li>💻 Languages: Go (89.5%), Shell (8.9%), YAML (1.1%), JSON (0.4%)</li> +<li>💻 Languages: Go (90.3%), Shell (8.3%), YAML (1.0%), JSON (0.4%)</li> <li>📚 Documentation: Markdown (100.0%)</li> -<li>📊 Commits: 76</li> -<li>📈 Lines of Code: 8340</li> -<li>📄 Lines of Documentation: 2363</li> -<li>📅 Development Period: 2025-06-23 to 2025-07-12</li> -<li>🔥 Recent Activity: 2.5 days (avg. age of last 42 commits)</li> +<li>📊 Commits: 88</li> +<li>📈 Lines of Code: 8976</li> +<li>📄 Lines of Documentation: 2475</li> +<li>📅 Development Period: 2025-06-23 to 2025-07-13</li> +<li>🔥 Recent Activity: 7.9 days (avg. age of last 42 commits)</li> <li>⚖️ License: BSD-2-Clause</li> -<li>🏷️ Latest Release: v0.5.0 (2025-07-09)</li> +<li>🏷️ Latest Release: v0.7.2 (2025-07-13)</li> <li>🎵 Vibe-Coded: This project has been vibe coded</li> </ul><br /> <br /> @@ -116,14 +170,99 @@ <a class='textlink' href='https://codeberg.org/snonux/gitsyncer'>View on Codeberg</a><br /> <a class='textlink' href='https://github.com/snonux/gitsyncer'>View on GitHub</a><br /> <br /> -<span>Go from <span class='inlinecode'>internal/showcase/images.go</span>:</span><br /> +<span>Go from <span class='inlinecode'>internal/showcase/showcase.go</span>:</span><br /> +<br /> +<pre> +func New(cfg *config.Config, workDir string) *Generator { + return &Generator{ + config: cfg, + workDir: workDir, + } +} +</pre> +<br /> +<span>---</span><br /> +<br /> +<h3 style='display: inline' id='dtail'>dtail</h3><br /> +<br /> +<ul> +<li>💻 Languages: Go (91.0%), Shell (4.1%), JSON (2.1%), C (1.4%), Make (0.9%), C/C++ (0.2%), Config (0.1%)</li> +<li>📚 Documentation: Text (98.3%), Markdown (1.7%)</li> +<li>📊 Commits: 1049</li> +<li>📈 Lines of Code: 27726</li> +<li>📄 Lines of Documentation: 220214</li> +<li>📅 Development Period: 2020-01-09 to 2025-07-04</li> +<li>🔥 Recent Activity: 17.0 days (avg. age of last 42 commits)</li> +<li>⚖️ License: Apache-2.0</li> +<li>🏷️ Latest Release: v4.2.0 (2023-06-21)</li> +<li>🤖 AI-Assisted: This project was partially created with the help of generative AI</li> +</ul><br /> +<br /> +<a href='showcase/dtail/image-1.png'><img alt='dtail screenshot' title='dtail screenshot' src='showcase/dtail/image-1.png' /></a><br /> +<br /> +<span>DTail is a distributed log processing system written in Go that allows DevOps engineers to tail, cat, and grep log files across thousands of servers concurrently. It provides secure access through SSH authentication and respects UNIX file system permissions, making it ideal for enterprise environments where log analysis needs to scale horizontally across large server fleets. The tool supports advanced features like compressed file handling (gzip/zstd) and distributed MapReduce aggregations for complex log analytics.</span><br /> +<br /> +<a href='showcase/dtail/image-2.gif'><img alt='dtail screenshot' title='dtail screenshot' src='showcase/dtail/image-2.gif' /></a><br /> +<br /> +<span>The system uses a client-server architecture where dtail servers run on target machines (listening on port 2222) and clients connect to multiple servers simultaneously. It can also operate in serverless mode for local operations. The implementation leverages SSH for secure communication, includes sophisticated connection throttling and resource management, and provides specialized tools (dcat, dgrep, dmap) for different log processing tasks. The MapReduce functionality supports SQL-like queries with server-side local aggregation and client-side final aggregation, enabling powerful distributed analytics across log data.</span><br /> +<br /> +<a class='textlink' href='https://codeberg.org/snonux/dtail'>View on Codeberg</a><br /> +<a class='textlink' href='https://github.com/snonux/dtail'>View on GitHub</a><br /> +<br /> +<span>Go from <span class='inlinecode'>cmd/dcat/main.go</span>:</span><br /> <br /> <pre> -func isGitHostedImage(url string) bool { - return strings.Contains(url, "github.com") || - strings.Contains(url, "githubusercontent.com") || - strings.Contains(url, "codeberg.org") || - strings.Contains(url, "codeberg.page") +flag.StringVar(&args.SSHPrivateKeyFilePath, "key", "", "Path to private key") +flag.StringVar(&args.ServersStr, "servers", "", "Remote servers to connect") +flag.StringVar(&args.UserName, "user", userName, "Your system user name") +flag.StringVar(&args.What, "files", "", "File(s) to read") +flag.StringVar(&pprof, "pprof", "", "Start PProf server this address") + +profiling.AddFlags(&profileFlags) + +flag.Parse() +config.Setup(source.Client, &args, flag.Args()) + +if displayVersion { + version.PrintAndExit() +} +</pre> +<br /> +<span>---</span><br /> +<br /> +<h3 style='display: inline' id='rexfiles'>rexfiles</h3><br /> +<br /> +<ul> +<li>💻 Languages: Perl (38.3%), Shell (30.6%), Config (8.0%), CSS (7.9%), TOML (6.9%), Ruby (5.8%), Lua (1.7%), JSON (0.7%), INI (0.1%)</li> +<li>📚 Documentation: Text (97.3%), Markdown (2.7%)</li> +<li>📊 Commits: 880</li> +<li>📈 Lines of Code: 4142</li> +<li>📄 Lines of Documentation: 854</li> +<li>📅 Development Period: 2021-12-28 to 2025-07-16</li> +<li>🔥 Recent Activity: 22.0 days (avg. age of last 42 commits)</li> +<li>⚖️ License: No license found</li> +<li>🧪 Status: Experimental (no releases yet)</li> +</ul><br /> +<br /> +<span>Based on my analysis of the codebase, **rexfiles** is a comprehensive infrastructure automation and configuration management project built with the Rex framework (a Perl-based alternative to Ansible, Puppet, or Chef). The project provides structured automation for managing multiple aspects of a personal infrastructure, including dotfiles, server configurations, and application deployments.</span><br /> +<br /> +<span>The project consists of three main components: **dotfiles** management for personal development environment configuration (bash, fish shell, helix editor, tmux, etc.), **frontends** for managing production OpenBSD servers with services like DNS (nsd), web servers (httpd), mail (OpenSMTPD), SSL certificates (ACME), and monitoring systems, and **babylon5** containing Docker container startup scripts for self-hosted applications. The implementation leverages Rex's declarative syntax to define tasks for package installation, file management, service configuration, and system state management, with templates for configuration files and support for multiple operating systems (OpenBSD, FreeBSD, Fedora Linux, Termux). This approach provides a KISS (Keep It Simple, Stupid) alternative to more complex configuration management tools while maintaining the ability to manage both local development environments and production infrastructure consistently.</span><br /> +<br /> +<a class='textlink' href='https://codeberg.org/snonux/rexfiles'>View on Codeberg</a><br /> +<a class='textlink' href='https://github.com/snonux/rexfiles'>View on GitHub</a><br /> +<br /> +<span>Perl from <span class='inlinecode'>frontends/scripts/foostats.pl</span>:</span><br /> +<br /> +<pre> +sub write ( $path, $content ) { + open my $fh, '>', "$path.tmp" + or die "\nCannot open file: $!"; + print $fh $content; + close $fh; + + rename + "$path.tmp", + $path; } </pre> <br /> @@ -138,7 +277,7 @@ func isGitHostedImage(url string) bool { <li>📈 Lines of Code: 873</li> <li>📄 Lines of Documentation: 135</li> <li>📅 Development Period: 2025-06-25 to 2025-07-12</li> -<li>🔥 Recent Activity: 15.4 days (avg. age of last 42 commits)</li> +<li>🔥 Recent Activity: 22.2 days (avg. age of last 42 commits)</li> <li>⚖️ License: BSD-2-Clause</li> <li>🏷️ Latest Release: v0.0.0 (2025-06-29)</li> <li>🤖 AI-Assisted: This project was partially created with the help of generative AI</li> @@ -172,7 +311,7 @@ func tick() tea.Cmd { <li>📈 Lines of Code: 6160</li> <li>📄 Lines of Documentation: 162</li> <li>📅 Development Period: 2025-06-19 to 2025-07-12</li> -<li>🔥 Recent Activity: 16.1 days (avg. age of last 42 commits)</li> +<li>🔥 Recent Activity: 22.9 days (avg. age of last 42 commits)</li> <li>⚖️ License: BSD-2-Clause</li> <li>🏷️ Latest Release: v0.9.2 (2025-07-02)</li> <li>🎵 Vibe-Coded: This project has been vibe coded</li> @@ -189,47 +328,27 @@ func tick() tea.Cmd { <a class='textlink' href='https://codeberg.org/snonux/tasksamurai'>View on Codeberg</a><br /> <a class='textlink' href='https://github.com/snonux/tasksamurai'>View on GitHub</a><br /> <br /> -<span>Go from <span class='inlinecode'>internal/version.go</span>:</span><br /> -<br /> -<pre> -const Version = "0.9.2" -</pre> -<br /> -<span>---</span><br /> -<br /> -<h3 style='display: inline' id='rexfiles'>rexfiles</h3><br /> -<br /> -<ul> -<li>💻 Languages: Perl (38.2%), Shell (30.6%), Config (8.0%), CSS (7.9%), TOML (7.0%), Ruby (5.7%), Lua (1.7%), JSON (0.7%), INI (0.1%)</li> -<li>📚 Documentation: Text (97.3%), Markdown (2.7%)</li> -<li>📊 Commits: 876</li> -<li>📈 Lines of Code: 4123</li> -<li>📄 Lines of Documentation: 854</li> -<li>📅 Development Period: 2021-12-28 to 2025-07-12</li> -<li>🔥 Recent Activity: 18.8 days (avg. age of last 42 commits)</li> -<li>⚖️ License: No license found</li> -<li>🧪 Status: Experimental (no releases yet)</li> -</ul><br /> -<br /> -<span>Based on my analysis of the codebase, **rexfiles** is a comprehensive infrastructure automation and configuration management project built with the Rex framework (a Perl-based alternative to Ansible, Puppet, or Chef). The project provides structured automation for managing multiple aspects of a personal infrastructure, including dotfiles, server configurations, and application deployments.</span><br /> -<br /> -<span>The project consists of three main components: **dotfiles** management for personal development environment configuration (bash, fish shell, helix editor, tmux, etc.), **frontends** for managing production OpenBSD servers with services like DNS (nsd), web servers (httpd), mail (OpenSMTPD), SSL certificates (ACME), and monitoring systems, and **babylon5** containing Docker container startup scripts for self-hosted applications. The implementation leverages Rex's declarative syntax to define tasks for package installation, file management, service configuration, and system state management, with templates for configuration files and support for multiple operating systems (OpenBSD, FreeBSD, Fedora Linux, Termux). This approach provides a KISS (Keep It Simple, Stupid) alternative to more complex configuration management tools while maintaining the ability to manage both local development environments and production infrastructure consistently.</span><br /> -<br /> -<a class='textlink' href='https://codeberg.org/snonux/rexfiles'>View on Codeberg</a><br /> -<a class='textlink' href='https://github.com/snonux/rexfiles'>View on GitHub</a><br /> -<br /> -<span>Perl from <span class='inlinecode'>frontends/scripts/foostats.pl</span>:</span><br /> +<span>Go from <span class='inlinecode'>internal/task/task.go</span>:</span><br /> <br /> <pre> -sub write ( $path, $content ) { - open my $fh, '>', "$path.tmp" - or die "\nCannot open file: $!"; - print $fh $content; - close $fh; +func SetDebugLog(path string) error { + if debugFile != nil { + debugFile.Close() + debugFile = nil + debugWriter = nil + } - rename - "$path.tmp", - $path; + if path == "" { + return nil + } + + f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o644) + if err != nil { + return err + } + debugFile = f + debugWriter = f + return nil } </pre> <br /> @@ -238,13 +357,13 @@ sub write ( $path, $content ) { <h3 style='display: inline' id='ior'>ior</h3><br /> <br /> <ul> -<li>💻 Languages: Go (81.0%), Raku (11.5%), C (4.4%), Make (1.7%), C/C++ (1.5%)</li> +<li>💻 Languages: Go (50.2%), C (43.4%), Raku (4.4%), Make (1.1%), C/C++ (0.9%)</li> <li>📚 Documentation: Text (63.6%), Markdown (36.4%)</li> -<li>📊 Commits: 330</li> -<li>📈 Lines of Code: 7911</li> +<li>📊 Commits: 331</li> +<li>📈 Lines of Code: 12762</li> <li>📄 Lines of Documentation: 742</li> -<li>📅 Development Period: 2024-01-18 to 2025-07-12</li> -<li>🔥 Recent Activity: 56.3 days (avg. age of last 42 commits)</li> +<li>📅 Development Period: 2024-01-18 to 2025-07-14</li> +<li>🔥 Recent Activity: 60.9 days (avg. age of last 42 commits)</li> <li>⚖️ License: No license found</li> <li>🧪 Status: Experimental (no releases yet)</li> <li>🤖 AI-Assisted: This project was partially created with the help of generative AI</li> @@ -263,19 +382,32 @@ sub write ( $path, $content ) { <a class='textlink' href='https://codeberg.org/snonux/ior'>View on Codeberg</a><br /> <a class='textlink' href='https://github.com/snonux/ior'>View on GitHub</a><br /> <br /> -<span>Go from <span class='inlinecode'>internal/file/file.go</span>:</span><br /> +<span>Go from <span class='inlinecode'>tools/filewriter/main.go</span>:</span><br /> <br /> <pre> -func NewFd(fd int32, name []byte, flags int32) FdFile { - f := FdFile{ - fd: fd, - name: types.StringValue(name), - flags: Flags(flags), +func main() { + file, err := os.OpenFile("output.txt", os.O_APPEND|os.O_CREATE|os.O_WRONLY, + 0644) + if err != nil { + panic(err) } - if f.flags == -1 { - panic(fmt.Sprintf("DEBUG with -1 flags: %v", f)) + defer file.Close() + + data := []byte("A") + + for { + _, err := file.Write(data) + if err != nil { + panic(err) + } + + err = file.Sync() + if err != nil { + panic(err) + } + + time.Sleep(3 * time.Second) } - return f } </pre> <br /> @@ -290,7 +422,7 @@ func NewFd(fd int32, name []byte, flags int32) FdFile { <li>📈 Lines of Code: 396</li> <li>📄 Lines of Documentation: 24</li> <li>📅 Development Period: 2025-04-18 to 2025-05-11</li> -<li>🔥 Recent Activity: 74.9 days (avg. age of last 42 commits)</li> +<li>🔥 Recent Activity: 81.7 days (avg. age of last 42 commits)</li> <li>⚖️ License: Custom License</li> <li>🏷️ Latest Release: v1.0.0 (2025-05-11)</li> </ul><br /> @@ -324,7 +456,7 @@ def initialize(myself) <li>📈 Lines of Code: 25762</li> <li>📄 Lines of Documentation: 3101</li> <li>📅 Development Period: 2008-05-15 to 2025-06-27</li> -<li>🔥 Recent Activity: 88.3 days (avg. age of last 42 commits)</li> +<li>🔥 Recent Activity: 95.1 days (avg. age of last 42 commits)</li> <li>⚖️ License: Custom License</li> <li>🧪 Status: Experimental (no releases yet)</li> <li>🤖 AI-Assisted: This project was partially created with the help of generative AI</li> @@ -339,16 +471,14 @@ def initialize(myself) <a class='textlink' href='https://codeberg.org/snonux/ds-sim'>View on Codeberg</a><br /> <a class='textlink' href='https://github.com/snonux/ds-sim'>View on GitHub</a><br /> <br /> -<span>Java from <span class='inlinecode'>src/main/java/protocols/implementations/VSPingPongProtocol.java</span>:</span><br /> +<span>Java from <span class='inlinecode'>src/main/java/testing/QuietProtocolTestRunner.java</span>:</span><br /> <br /> <pre> -private int clientCounter; +private final PrintStream target; +private final StringBuilder buffer = new StringBuilder(); -private int serverCounter; - -public VSPingPongProtocol() { - super(VSAbstractProtocol.HAS_ON_CLIENT_START); - setClassname(getClass().toString()); +public FilteredOutputStream(PrintStream target) { + this.target = target; } </pre> <br /> @@ -363,7 +493,7 @@ public VSPingPongProtocol() { <li>📈 Lines of Code: 33</li> <li>📄 Lines of Documentation: 3</li> <li>📅 Development Period: 2025-04-03 to 2025-04-03</li> -<li>🔥 Recent Activity: 100.9 days (avg. age of last 42 commits)</li> +<li>🔥 Recent Activity: 107.7 days (avg. age of last 42 commits)</li> <li>⚖️ License: No license found</li> <li>🧪 Status: Experimental (no releases yet)</li> </ul><br /> @@ -390,14 +520,13 @@ func main() { <ul> <li>💻 Languages: Go (98.6%), YAML (1.1%), JSON (0.2%)</li> <li>📚 Documentation: Markdown (100.0%)</li> -<li>📊 Commits: 381</li> +<li>📊 Commits: 382</li> <li>📈 Lines of Code: 3967</li> -<li>📄 Lines of Documentation: 411</li> -<li>📅 Development Period: 2024-05-04 to 2025-06-12</li> -<li>🔥 Recent Activity: 117.8 days (avg. age of last 42 commits)</li> +<li>📄 Lines of Documentation: 324</li> +<li>📅 Development Period: 2024-05-04 to 2025-07-12</li> +<li>🔥 Recent Activity: 120.8 days (avg. age of last 42 commits)</li> <li>⚖️ License: Custom License</li> <li>🏷️ Latest Release: v1.0.0 (2025-03-04)</li> -<li>🤖 AI-Assisted: This project was partially created with the help of generative AI</li> </ul><br /> <br /> <a href='showcase/gos/image-1.png'><img alt='gos screenshot' title='gos screenshot' src='showcase/gos/image-1.png' /></a><br /> @@ -411,27 +540,56 @@ func main() { <a class='textlink' href='https://codeberg.org/snonux/gos'>View on Codeberg</a><br /> <a class='textlink' href='https://github.com/snonux/gos'>View on GitHub</a><br /> <br /> -<span>Go from <span class='inlinecode'>internal/config/args.go</span>:</span><br /> +<span>Go from <span class='inlinecode'>internal/platforms/mastodon/mastodon.go</span>:</span><br /> <br /> <pre> -func (a *Args) ParsePlatforms(platformStrs string) error { - a.Platforms = make(map[string]int) - - for _, platformInfo := range strings.Split(platformStrs, ",") { - parts := strings.Split(platformInfo, ":") - platformStr := parts[0] - - if len(parts) > 1 { - var err error - a.Platforms[platformStr], err = strconv.Atoi(parts[1]) - if err != nil { - return err - } - } else { - colour.Infoln("No message length specified for", platformStr, "so assuming - 500") - a.Platforms[platformStr] = 500 - } +func Post(ctx context.Context, args config.Args, sizeLimit int, en entry.Entry) + error { + content, _, err := en.ContentWithLimit(sizeLimit) + if err != nil { + return err + } + if args.DryRun { + colour.Infoln("Not posting", en, "to Mastodon as dry-run enabled") + return nil + } + if content, err = prompt.FileAction("Do you want to post this message to + Mastodon?", + content, en.Path, prompt.RandomOption); err != nil { + return err + } + + payload := map[string]string{"status": content} + payloadBytes, err := json.Marshal(payload) + if err != nil { + return fmt.Errorf("failed to marshal payload: %w", err) + } + + newCtx, cancel := context.WithTimeout(ctx, mastodonTimeout) + defer cancel() + req, err := http.NewRequestWithContext(newCtx, "POST", + args.Config.MastodonURL, bytes.NewBuffer(payloadBytes)) + if err != nil { + return fmt.Errorf("failed to create request: %w", err) + } + + req.Header.Set("Authorization", "Bearer "+args.Config.MastodonAccessToken) + req.Header.Set("Content-Type", "application/json") + + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return fmt.Errorf("request failed: %w", err) + } + defer resp.Body.Close() + body, err := io.ReadAll(resp.Body) + if err != nil { + return err + } + + if resp.StatusCode != http.StatusOK { + return fmt.Errorf("unexpected status code: %d\n%s\n", + resp.StatusCode, string(body)) } return nil } @@ -448,7 +606,7 @@ func (a *Args) ParsePlatforms(platformStrs string) error { <li>📈 Lines of Code: 1586</li> <li>📄 Lines of Documentation: 154</li> <li>📅 Development Period: 2023-01-02 to 2025-07-12</li> -<li>🔥 Recent Activity: 121.8 days (avg. age of last 42 commits)</li> +<li>🔥 Recent Activity: 128.6 days (avg. age of last 42 commits)</li> <li>⚖️ License: Custom License</li> <li>🏷️ Latest Release: v0.1.0 (2025-07-12)</li> </ul><br /> @@ -486,7 +644,7 @@ sub write ( $path, $content ) { <li>📈 Lines of Code: 1373</li> <li>📄 Lines of Documentation: 48</li> <li>📅 Development Period: 2024-12-05 to 2025-02-28</li> -<li>🔥 Recent Activity: 141.6 days (avg. age of last 42 commits)</li> +<li>🔥 Recent Activity: 148.4 days (avg. age of last 42 commits)</li> <li>⚖️ License: Custom License</li> <li>🧪 Status: Experimental (no releases yet)</li> </ul><br /> @@ -498,54 +656,15 @@ sub write ( $path, $content ) { <a class='textlink' href='https://codeberg.org/snonux/rcm'>View on Codeberg</a><br /> <a class='textlink' href='https://github.com/snonux/rcm'>View on GitHub</a><br /> <br /> -<span>Ruby from <span class='inlinecode'>lib/dslkeywords/given.rb</span>:</span><br /> +<span>Ruby from <span class='inlinecode'>lib/dsl.rb</span>:</span><br /> <br /> <pre> -def respond_to_missing? = true - -def met? - return false if @conds.key?(:hostname) && Socket.gethostname != - @conds[:hostname].to_s - - true -end -</pre> -<br /> -<span>---</span><br /> -<br /> -<h3 style='display: inline' id='gemtexter'>gemtexter</h3><br /> -<br /> -<ul> -<li>💻 Languages: Shell (68.1%), CSS (28.7%), Config (1.9%), HTML (1.3%)</li> -<li>📚 Documentation: Text (76.1%), Markdown (23.9%)</li> -<li>📊 Commits: 465</li> -<li>📈 Lines of Code: 2268</li> -<li>📄 Lines of Documentation: 1180</li> -<li>📅 Development Period: 2021-05-21 to 2025-07-09</li> -<li>🔥 Recent Activity: 204.0 days (avg. age of last 42 commits)</li> -<li>⚖️ License: GPL-3.0</li> -<li>🏷️ Latest Release: 3.0.0 (2024-10-01)</li> -</ul><br /> -<br /> -<span>**Gemtexter** is a static site generator and blog engine that transforms content written in Gemini Gemtext format into multiple output formats. It's a comprehensive Bash-based tool designed to support the Gemini protocol (a simpler alternative to HTTP) while maintaining compatibility with traditional web technologies. The project converts a single source of Gemtext content into HTML (XHTML 1.0 Transitional), Markdown, and native Gemtext formats, enabling authors to write once and publish across multiple platforms including Gemini capsules, traditional websites, and GitHub/Codeberg pages.</span><br /> -<br /> -<span>The implementation is built entirely in Bash (version 5.x+) using a modular library approach with separate source files for different functionality (atomfeed, gemfeed, HTML generation, Markdown conversion, templating, etc.). Key features include automatic blog post indexing, Atom feed generation, customizable HTML themes, source code highlighting, Bash-based templating system, and integrated Git workflow management. The architecture separates content directories by format (gemtext/, html/, md/) and includes comprehensive theming support, font embedding, and publishing workflows that can automatically sync content to multiple Git repositories for deployment on various platforms.</span><br /> -<br /> -<a class='textlink' href='https://codeberg.org/snonux/gemtexter'>View on Codeberg</a><br /> -<a class='textlink' href='https://github.com/snonux/gemtexter'>View on GitHub</a><br /> -<br /> -<span>Shell from <span class='inlinecode'>lib/generate.source.sh</span>:</span><br /> -<br /> -<pre> -done < <(find "$CONTENT_BASE_DIR/gemtext" -type f -name \*.gmi) - -wait -log INFO "Converted $num_gmi_files Gemtext files" - -log VERBOSE "Adding other docs to $*" - -while read -r src; do - num_doc_files=$(( num_doc_files + 1 )) +def configure(reset: false, &block) + RCM::DSL.new(reset) do |rcm| + rcm.info('Configuring...') + rcm.instance_eval(&block) + rcm.evaluate! if rcm.conds_met + end </pre> <br /> <span>---</span><br /> @@ -559,7 +678,7 @@ while read -r src; do <li>📈 Lines of Code: 917</li> <li>📄 Lines of Documentation: 33</li> <li>📅 Development Period: 2024-01-20 to 2025-07-06</li> -<li>🔥 Recent Activity: 451.6 days (avg. age of last 42 commits)</li> +<li>🔥 Recent Activity: 458.4 days (avg. age of last 42 commits)</li> <li>⚖️ License: MIT</li> <li>🏷️ Latest Release: v0.0.3 (2025-07-06)</li> </ul><br /> @@ -631,7 +750,7 @@ func createPreferenceWindow(a fyne.App) fyne.Window { <li>📈 Lines of Code: 12</li> <li>📄 Lines of Documentation: 3</li> <li>📅 Development Period: 2024-03-24 to 2024-03-24</li> -<li>🔥 Recent Activity: 475.4 days (avg. age of last 42 commits)</li> +<li>🔥 Recent Activity: 482.2 days (avg. age of last 42 commits)</li> <li>⚖️ License: Custom License</li> <li>🧪 Status: Experimental (no releases yet)</li> </ul><br /> @@ -669,7 +788,7 @@ aws: build <li>📈 Lines of Code: 2850</li> <li>📄 Lines of Documentation: 52</li> <li>📅 Development Period: 2023-08-27 to 2025-04-05</li> -<li>🔥 Recent Activity: 505.4 days (avg. age of last 42 commits)</li> +<li>🔥 Recent Activity: 512.2 days (avg. age of last 42 commits)</li> <li>⚖️ License: MIT</li> <li>🧪 Status: Experimental (no releases yet)</li> </ul><br /> @@ -681,18 +800,20 @@ aws: build <a class='textlink' href='https://codeberg.org/snonux/terraform'>View on Codeberg</a><br /> <a class='textlink' href='https://github.com/snonux/terraform'>View on GitHub</a><br /> <br /> -<span>HCL from <span class='inlinecode'>org-buetow-base/ecr.tf</span>:</span><br /> +<span>HCL from <span class='inlinecode'>org-buetow-ecs/bagservice.tf</span>:</span><br /> <br /> <pre> -resource "aws_ecr_repository" "radicale-read" { - name = "radicale" + type = "A" - tags = { - Name = "radicale" + alias { + name = + data.terraform_remote_state.elb.outputs.alb_dns_name + zone_id = data.terraform_remote_state.elb.outputs.alb_zone_id + evaluate_target_health = true } } -resource "aws_iam_policy" "ecr_radicale_read" { +resource "aws_route53_record" "aaaa_record_bag" { </pre> <br /> <span>---</span><br /> @@ -706,7 +827,7 @@ resource "aws_iam_policy" "ecr_radicale_read" { <li>📈 Lines of Code: 1096</li> <li>📄 Lines of Documentation: 287</li> <li>📅 Development Period: 2023-04-17 to 2025-06-12</li> -<li>🔥 Recent Activity: 518.3 days (avg. age of last 42 commits)</li> +<li>🔥 Recent Activity: 525.0 days (avg. age of last 42 commits)</li> <li>⚖️ License: Custom License</li> <li>🏷️ Latest Release: v1.1.0 (2024-05-03)</li> <li>🤖 AI-Assisted: This project was partially created with the help of generative AI</li> @@ -721,32 +842,48 @@ resource "aws_iam_policy" "ecr_radicale_read" { <a class='textlink' href='https://codeberg.org/snonux/gogios'>View on Codeberg</a><br /> <a class='textlink' href='https://github.com/snonux/gogios'>View on GitHub</a><br /> <br /> -<span>Go from <span class='inlinecode'>internal/check.go</span>:</span><br /> +<span>Go from <span class='inlinecode'>internal/state.go</span>:</span><br /> <br /> <pre> -func (c check) run(ctx context.Context, name string) checkResult { - cmd := exec.CommandContext(ctx, c.Plugin, c.Args...) +func newState(conf config) (state, error) { + s := state{ + stateFile: fmt.Sprintf("%s/state.json", conf.StateDir), + checks: make(map[string]checkState), + staleEpoch: time.Now().Unix() - int64(conf.StaleThreshold), + } + + if _, err := os.Stat(s.stateFile); err != nil { + return s, nil + } - var bytes bytes.Buffer - cmd.Stdout = &bytes - cmd.Stderr = &bytes + file, err := os.Open(s.stateFile) + if err != nil { + return s, err + } + defer file.Close() - if err := cmd.Run(); err != nil { - if ctx.Err() == context.DeadlineExceeded { - return checkResult{name, "Check command timed out", time.Now().Unix(), - nagiosCritical, false} - } + bytes, err := io.ReadAll(file) + if err != nil { + return s, err } - parts := strings.Split(bytes.String(), "|") - output := strings.TrimSpace(parts[0]) + if err := json.Unmarshal(bytes, &s.checks); err != nil { + return s, err + } - ec := cmd.ProcessState.ExitCode() - if ec < int(nagiosOk) || ec > int(nagiosUnknown) { - ec = int(nagiosUnknown) + var obsolete []string + for name := range s.checks { |
