{"id":15288106,"url":"https://github.com/sternenseemann/spacecookie","last_synced_at":"2025-04-13T05:34:34.857Z","repository":{"id":27930886,"uuid":"31423267","full_name":"sternenseemann/spacecookie","owner":"sternenseemann","description":"gopher library \u0026 server written in Haskell","archived":false,"fork":false,"pushed_at":"2023-04-18T15:17:30.000Z","size":309,"stargazers_count":46,"open_issues_count":15,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-25T22:21:03.145Z","etag":null,"topics":["gopher","gopher-protocol","gopher-server","haskell","network","server","systemd"],"latest_commit_sha":null,"homepage":"https://sternenseemann.github.io/spacecookie/","language":"Haskell","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/sternenseemann.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2015-02-27T14:37:15.000Z","updated_at":"2024-04-25T22:21:03.146Z","dependencies_parsed_at":"2024-09-30T15:54:11.339Z","dependency_job_id":null,"html_url":"https://github.com/sternenseemann/spacecookie","commit_stats":{"total_commits":274,"total_committers":4,"mean_commits":68.5,"dds":0.5145985401459854,"last_synced_commit":"e8b0e04d4980c7d355238e3bffb425805870e77c"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sternenseemann%2Fspacecookie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sternenseemann%2Fspacecookie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sternenseemann%2Fspacecookie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sternenseemann%2Fspacecookie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sternenseemann","download_url":"https://codeload.github.com/sternenseemann/spacecookie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670518,"owners_count":21142896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gopher","gopher-protocol","gopher-server","haskell","network","server","systemd"],"created_at":"2024-09-30T15:44:08.998Z","updated_at":"2025-04-13T05:34:34.459Z","avatar_url":"https://github.com/sternenseemann.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spacecookie\n\nHaskell gopher server daemon and library.\n\n## Features\n\n* implements RFC1436\n* optionally supports common protocol extensions:\n  * informational entries via the `i`-type\n  * [`h`-type and URL entries](http://gopher.quux.org:70/Archives/Mailing%20Lists/gopher/gopher.2002-02%7C/MBOX-MESSAGE/34)\n* supports gophermaps (see [below](#adding-content))\n* supports systemd socket activation\n* provides a library for custom gopher applications ([see documentation](http://hackage.haskell.org/package/spacecookie/docs/Network-Gopher.html))\n\n## Non-Features\n\nspacecookie intentionally does not support:\n\n* HTTP, Gemini: Multi protocol support is a non-goal for spacecookie.\n  For HTTP you can [proxy](https://github.com/sternenseemann/gopher-proxy)\n  pretty easily, however.\n* Search: Gopher supports search transactions, but the spacecookie daemon doesn't offer\n  the possibility to add a search engine to a gopherspace. It is however\n  entirely possible to implement an index search server using [the\n  spacecookie library](https://hackage.haskell.org/package/spacecookie/docs/Network-Gopher.html)\n\n## Installation\n\n* Nix(OS): [`pkgs.haskellPackages.spacecookie`](https://search.nixos.org/packages?channel=unstable\u0026from=0\u0026size=50\u0026sort=relevance\u0026query=spacecookie)\n  (see also [below](#on-nixos))\n* Cabal: `cabal v2-install spacecookie`\n  (see also [hackage package](http://hackage.haskell.org/package/spacecookie))\n\n## Documentation\n\n* User Documentation: [spacecookie(1)](https://sternenseemann.github.io/spacecookie/spacecookie.1.html)\n* [Developer Documentation](https://hackage.haskell.org/package/spacecookie)\n\n## Configuration\n\nspacecookie is configured via a JSON configuration file.\nAll available options are documented in\n[spacecookie.json(5)](https://sternenseemann.github.io/spacecookie/spacecookie.json.5.html).\nThis repository also contains an example configuration file in\n[`etc/spacecookie.json`](./etc/spacecookie.json).\n\n## Running\n\nAfter you've created your config file just start spacecookie like this:\n\n\tspacecookie /path/to/spacecookie.json\n\nspacecookie runs as a simple process and doesn't fork or write a PID file.\nTherefore any supervisor (systemd, daemontools, ...) can be used to run\nit as a daemon.\n\n### With systemd\n\nspacecookie supports systemd socket activation. To set it up you'll need\nto install `spacecookie.service` and `spacecookie.socket` like so:\n\n\tcp ./etc/spacecookie.{service,socket} /etc/systemd/system/\n\tsystemctl daemon-reload\n\tsystemctl enable spacecookie.socket\n\tsystemctl start  spacecookie.socket\n\tsystemctl start  spacecookie.service # optional, started by the socket automatically if needed\n\nOf course make sure that all the used paths are correct!\n\nHow the systemd integration works is explained in\n[spacecookie(1)](https://sternenseemann.github.io/spacecookie/spacecookie.1.html#SYSTEMD_INTEGRATION).\n\n### On NixOS\n\n[NixOS](https://nixos.org/nixos/) provides a service module for spacecookie:\n[`services.spacecookie`](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/networking/spacecookie.nix).\nSetting up spacecookie is as simple as adding the following line to your `configuration.nix`:\n\n\tservices.spacecookie.enable = true;\n\nFor all available options, refer to the NixOS manual:\n\n* [NixOS stable](https://nixos.org/manual/nixos/stable/options.html#opt-services.spacecookie.enable)\n* [NixOS unstable](https://nixos.org/manual/nixos/unstable/options.html#opt-services.spacecookie.enable)\n\n## Adding Content\n\nspacecookie acts as a simple file server, only excluding files\nor directories that start with a dot. It generates gopher menus\nautomatically, but you can also use custom ones by adding a\ngophermap file.\n\nspacecookie checks for `.gophermap` in every directory it serves and,\nif present, uses the menu specified in there.\n\nSuch a file looks like this:\n\n\tYou can just start writing text that\n\twill be displayed by the gopher client\n\twithout a link to a file. Empty lines are\n\talso possible.\n\n\t1Menu Entry for a directory full of funny stuff\t/funny\n\tIFunny Image\t/funny.jpg\n\tgcat gif\t/cat.gif\n\t0about me\t/about.txt\n\t1Floodgap's gopher server\t/\tgopher.floodgap.com\t70\n\nAs you can see, it largely works like the actual gopher menu a server will\nsend to clients, but allows to omit redundant information and to insert\nlines that are purely informational and not associated with a file.\n[spacecookie.gophermap(5)](https://sternenseemann.github.io/spacecookie/spacecookie.gophermap.5.html)\nexplains syntax and semantics in more detail.\n\nThe format is compatible with the ones supported by\n[Bucktooth](gopher://gopher.floodgap.com/1/buck/) and\n[pygopherd](https://github.com/jgoerzen/pygopherd).\nIf you notice any incompatibilities, please open an issue.\n\n## Portability\n\nspacecookie is regularly tested on GNU/Linux via CI, but\nshould also work on other Unix-like operating systems.\nMost portability problems arise due to\n[haskell-socket](https://github.com/lpeterse/haskell-socket)\nwhich is for example known\n[not to work on OpenBSD](https://github.com/lpeterse/haskell-socket/issues/63).\n\nWindows support would be possible, but could be tricky as gopher\nexpects Unix-style directory separators in paths. I personally\ndon't want to invest time into it, but would accept patches adding\nWindows support.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsternenseemann%2Fspacecookie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsternenseemann%2Fspacecookie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsternenseemann%2Fspacecookie/lists"}