{"id":26878650,"url":"https://github.com/maimere/gemini-protocol-logbook","last_synced_at":"2026-01-28T01:31:36.028Z","repository":{"id":282659328,"uuid":"949260295","full_name":"maimere/gemini-protocol-logbook","owner":"maimere","description":"A CGI script to manage a logbook for Gemini protocol servers, written in GNU AWK.","archived":false,"fork":false,"pushed_at":"2025-03-16T19:39:30.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-31T18:36:51.440Z","etag":null,"topics":["awk","cgi-script","gawk","gemini-protocol","gnu-awk"],"latest_commit_sha":null,"homepage":"","language":"Awk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maimere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-16T03:16:05.000Z","updated_at":"2025-03-16T19:39:33.000Z","dependencies_parsed_at":"2025-05-31T08:18:33.136Z","dependency_job_id":"7c91c042-574e-4def-85a2-cee36f415a75","html_url":"https://github.com/maimere/gemini-protocol-logbook","commit_stats":null,"previous_names":["maimere/gemini-protocol-logbook"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maimere/gemini-protocol-logbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maimere%2Fgemini-protocol-logbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maimere%2Fgemini-protocol-logbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maimere%2Fgemini-protocol-logbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maimere%2Fgemini-protocol-logbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maimere","download_url":"https://codeload.github.com/maimere/gemini-protocol-logbook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maimere%2Fgemini-protocol-logbook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28831553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"ssl_error","status_checked_at":"2026-01-27T23:25:58.379Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awk","cgi-script","gawk","gemini-protocol","gnu-awk"],"created_at":"2025-03-31T12:28:38.145Z","updated_at":"2026-01-28T01:31:36.014Z","avatar_url":"https://github.com/maimere.png","language":"Awk","funding_links":[],"categories":[],"sub_categories":[],"readme":"A CGI script to manage a logbook for Gemini protocol servers, written in GNU AWK. It enables users to retrieve and display logbook entries from a text file based on a date specified in the URL. Think of it as a lightweight tool for serving date-specific logbook content over the Gemini protocol.\n\n## Features\n- Date-Based Retrieval: Extracts a date from the URL's `PATH_INFO` (e.g., `/YYYY-MM-DD`) to fetch the corresponding logbook entry.\n- Input Validation: Ensures the date is in YYYY-MM-DD format.\n- Gemini Protocol Compliance: Outputs proper Gemini response headers and formats content in the Gemini text format.\n- Entry Display: Shows the title and full content of the logbook entry matching the requested date.\n- Fallback Behavior: If no entry matches the date, displays a list of all available logbook entries with clickable Gemini links.\n- Link Generation: Automatically creates Gemini links for each logbook entry, enhancing navigation.\n- Atom feed: atom.xml script creates an automated Atom feed for your logbook.\n\n## Logbook File Format\nThe script expects a logbook file in the following format:\n\n```\n#### YYYY-MM-DD Title\nEntry content line 1\nEntry content line 2\n\n#### YYYY-MM-DD Another Title\nAnother entry content\n```\nEach entry begins with a line starting with `#### `, followed by the date in `YYYY-MM-DD` format, a space, and the entry's title.\n\nThe entry's content follows on subsequent lines until the next `#### ` line or the end of the file.\n\nIt fetches the date, title and content of each entry, creating its own gemlog page.\n\n## How It Works\n### 1) Date Extraction and Validation:\n- Grabs the first 10 characters of `PATH_INFO` after the leading `/` (e.g., `2023-10-15` from `/2023-10-15`). `PATH_INFO` is an environment variable given by the server. Check your server's documentation (YMMV).\n- Validates the date format and range; if invalid, redirects to `/cgi-bin/logbook` with a Gemini redirect response.\n\n### 2) Logbook Processing:\n- Reads the logbook file line by line.\n- Collects all entry titles for potential listing.\n- When an entry’s date matches the request, outputs a Gemini success header (20 text/gemini), a capsule header with a home link, the entry’s title as a level 3 heading (###), and its content.\n\n### 3) No-Entry Fallback:\n- If no match is found after processing the file, sends a success header and displays a message indicating no entry exists for the date.\n- Lists all logbook entries with their dates and titles as Gemini links (e.g., `=\u003e /YYYY-MM-DD Title`).\n\n## Requirements\n- GAWK, of course.\n- Gemini server with CGI support. It must offer the URL info given after the script (check `PATH_INFO` variable).\n\n## Setup Instructions\n1. Place the Script: Copy the script to your Gemini server’s CGI directory (e.g., `/var/gemini/cgi-bin/`).\n2. Set the Logbook Path: Edit the script to include the absolute path to your logbook file.\n3. Make Executable: Run `chmod +x script` to grant execute permissions.\n4. Access It: Visit `gemini://yourcapsule.com/cgi-bin/script/YYYY-MM-DD` in a Gemini client, replacing `YYYY-MM-DD` with the desired date.\n\n## Security Note\nAs a CGI script, ensure it doesn’t expose security risks. This script only reads a predefined file and avoids executing user input, but always review CGI deployments for potential vulnerabilities.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaimere%2Fgemini-protocol-logbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaimere%2Fgemini-protocol-logbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaimere%2Fgemini-protocol-logbook/lists"}