{"id":42638215,"url":"https://github.com/playbymail/ottomap","last_synced_at":"2026-01-29T06:03:47.396Z","repository":{"id":252835764,"uuid":"841600004","full_name":"playbymail/ottomap","owner":"playbymail","description":"Ottomap","archived":false,"fork":false,"pushed_at":"2025-12-15T17:42:40.000Z","size":1282,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-19T00:31:14.150Z","etag":null,"topics":["hex-maps","tribenet","worldographer"],"latest_commit_sha":null,"homepage":"https://ottomap.mdhenderson.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/playbymail.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-12T18:21:35.000Z","updated_at":"2025-12-15T17:40:22.000Z","dependencies_parsed_at":"2024-10-26T19:06:03.415Z","dependency_job_id":"5020ee82-8158-4ade-b8e2-e82394432a28","html_url":"https://github.com/playbymail/ottomap","commit_stats":null,"previous_names":["playbymail/ottomap"],"tags_count":53,"template":false,"template_full_name":null,"purl":"pkg:github/playbymail/ottomap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playbymail%2Fottomap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playbymail%2Fottomap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playbymail%2Fottomap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playbymail%2Fottomap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/playbymail","download_url":"https://codeload.github.com/playbymail/ottomap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/playbymail%2Fottomap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28865269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T05:56:06.453Z","status":"ssl_error","status_checked_at":"2026-01-29T05:55:57.668Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["hex-maps","tribenet","worldographer"],"created_at":"2026-01-29T06:02:43.908Z","updated_at":"2026-01-29T06:03:47.385Z","avatar_url":"https://github.com/playbymail.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OttoMap\n\nOttoMap is a tool that translates TribeNet turn report files into Worldographer maps.\n\n## Overview\nI'm planning on translating a small subset of the turn report.\nSee the files in the `domain` directory to get an idea of what we're looking at.\n\nI think that will be enough data to feed the map generator.\nLet me know if you think that there's something missing.\n\nSee the `OTTOMAP.md` file for an overview of running from command line and `BUILDING.md` for instructions on building the project.\n\n\u003e ISSUES: Please report any issues on the TribeNet Discord server.\n\n## Deployment\n\nOttoMap uses a two-script deployment system for reliable production deployments:\n\n### bin/deploy.sh\n\nThe main deployment script that:\n- Builds Linux and Windows executables for the current version\n- Creates a compressed tarball containing all deployment files\n- Stops services on the production server\n- Transfers the tarball to the production server via rsync\n- Executes the installation remotely\n- Restarts services\n- Cleans up temporary files\n\nUsage:\n```bash\n./bin/deploy.sh\n```\n\nThe script provides colored output and comprehensive error checking. It will automatically detect the version from the built executable and handle all deployment steps.\n\n### bin/install.sh\n\nThe server-side installation script that:\n- Creates backups of the current installation\n- Installs versioned and current executables to multiple locations\n- Verifies installations by checking versions\n- Updates file permissions appropriately\n- Provides detailed logging of all operations\n\nThis script is included in the deployment tarball and executed automatically by `deploy.sh`.\n\n### Migration from push_files.sh\n\nThe new deployment system replaces `push_files.sh` and offers several improvements:\n- More reliable transfers using a single tarball instead of multiple files\n- Automatic backup creation before installation\n- Better error handling and recovery\n- Comprehensive verification of installations\n- Cleaner separation between build/deploy and installation logic\n\n### Status\nOttoMap is in early development.\nThe turn report parser is nearly complete for land based movement.\nFleet movement has not been implemented (it's waiting on actual examples from turn reports)\n\nThe command line interface seems to be working but the documentation is incomplete.\n\nThe web interface is not yet implemented.\nThe single user server has been started but requires changes to the turn report parser.\nI don't want to break the CLI, so this is proceeding slowly at best.\n\n## Input Data\nOttoMap expects all turn reports to be in text files in a single directory.\n\nOttoMap loads all files that match the pattern \"YEAR-MONTH.CLAN_ID.report.txt.\"\nYEAR and MONTH are the three-digit year and two-digit month from the \"Current Turn\" line of the report.\nCLAN_ID is the four-digit identifier for the clan (it must include the leading zero).\n\n```bash\n$ ls -1 input/*.txt\n\ninput/899-12.0138.report.txt\ninput/900-01.0138.report.txt\ninput/900-02.0138.report.txt\ninput/900-03.0138.report.txt\ninput/900-04.0138.report.txt\ninput/900-05.0138.report.txt\n```\n\nThe files are created by opening the turn report (the `.DOCX` file),\nselecting all the text, and pasting it into a plain text file.\n\n```bash\n$ ls -1 input/*.docx\ninput/899-12.0138.Turn-Report.docx\ninput/900-01.0138.Turn-Report.docx\ninput/900-02.0138.Turn-Report.docx\ninput/900-03.0138.Turn-Report.docx\ninput/900-04.0138.Turn-Report.docx\ninput/900-05.0138.Turn-Report.docx\n\n$ file input/*\n\ninput/899-12.0138.Turn-Report.docx: Microsoft Word 2007+\ninput/899-12.0138.report.txt:        Unicode text, UTF-8 text\ninput/900-01.0138.Turn-Report.docx: Microsoft Word 2007+\ninput/900-01.0138.report.txt:        Unicode text, UTF-8 text\ninput/900-02.0138.Turn-Report.docx: Microsoft Word 2007+\ninput/900-02.0138.report.txt:        Unicode text, UTF-8 text\ninput/900-03.0138.Turn-Report.docx: Microsoft Word 2007+\ninput/900-03.0138.report.txt:        Unicode text, UTF-8 text\ninput/900-04.0138.Turn-Report.docx: Microsoft Word 2007+\ninput/900-04.0138.report.txt:        Unicode text, UTF-8 text\ninput/900-05.0138.Turn-Report.docx: Microsoft Word 2007+\ninput/900-05.0138.report.txt:        Unicode text, UTF-8 text\n```\n\nSpaces, line breaks, page breaks, and section breaks are important to the parser.\nPlease try to avoid altering them.\n\n\u003e WARNING: Please don't make changes your original turn report (the `.DOCX` file).\n\u003e You may not be able to revert back to the original file.\n\n## License\nOttoMap is licensed under version 3 of the GNU Affero General Public License.\n\nOttoMap is built using packages that have different licenses.\nAll of these packages must be used in accordance with their original licenses;\nincluding them in this application does not change their license terms to the AGPLv3.\n\nPlease see the individual packages for their license terms.\n\n## Grids and the Big Map\nThe big map is divided into 676 grids arranged in 26 columns and 26 rows.\nThe grids use letters, not digits, for their coordinates on the big map.\nThe grid at the top left is (A, A), top right is (A, Z), bottom left is (Z, A), and bottom right is (Z, Z).\n\nThe ID for a grid is row then column.\nThe ID for the grid at top left is AA, top right is AZ, bottom left is ZA, and bottom right is ZZ.\n\nEach grid has 30 columns and 21 rows.\nThe hex at the top left is (1, 1), top right is (1, 30), bottom left is (21, 1), and bottom right is (21, 30).\n\nThe ID for a hex is two-digit column then two-digit row.\nThe ID for the hex at the top left is 0101, top right is 3001, bottom left is 0121, and bottom right is 3021.\n\nHexes are \"flat\" on the top and even rows are shifted down.\nFor example, hex (13, 10) has\n\n1. (13, 9) to the north\n2. (14, 9) to the north-east\n3. (14, 10) to the south-east\n4. (13, 11) to the south\n5. (12, 10) to the south-west\n6. (12, 9) to the north-west\n\nIn turn reports, a hex in the grid is usually displayed as \"AA 1310.\"\n\nYou can convert grid coordinates to big map coordinates.\nA coordinate like \"VN 0810\" is \"(N8, V10).\"\nThat's row N, column V on the big map, then column 8, row 10 on the grid.\n\nYou can convert also convert grid coordinates to absolute coordinates by scaling the column and row values.\nFor our coordinate of \"VN 0810,\" \"N\" is the 14th grid from the left and \"V\" is the 22nd grid from the top.\nThis gives us a column of (14 - 1) * 30 + (8 - 1) = 397 and row of (22 - 1) * 21 + (10 - 1) = 450, or (397, 450)\n(We subtract one before multiplying because absolute coordinates start at zero, not one.)\n\n## Parsing Errors\nThe report processor has been updated to fail on unexpected input.\nI know this is annoying, but it prevents bad data from going into the map.\n\nThere are two causes for this: typos and new scenarios.\n\n### Fixing typos in the input\nTypos don't happen often, but when they do, you need to fix them and restart.\nIf you don't understand what needs to be fixed, please ask for help on the TribeNet Discord's `#mapping` channel.\n\n### New scenarios\nThis is more common than typos since TribeNet supports so many actions.\n\nYou'll usually find a new scenario in the Scouting results.\nI need to update the code and the test suites, so please ask for help on the TribeNet Discords `#mapping-tool` channel.\n\nAdding code can take a while.\nIn the meantime, the only work-around is to delete the new scenario from the input and restart.\nResults for that unit are going to be \"off\" until the code is fixed, but you'll be able to map out the rest of the turn.\n\n## Big Map notes\n\n![big_map_crossing](docs/big_map_crossing.png)\n\n## Hex Movement\nThe map has flat hexagons with odd columns shoved down.\n(I know, 0201 is SE of 0101, but 0101 is really (0, 0).)\n\n```go\n// hexDirectionVectors defines the vectors used to determine the coordinates\n// of the neighboring column based on the direction and the odd/even column\n// property of the starting hex.\n//\n// NB: grids start at 0101 and hexes at (0,0), so \"odd\" and \"even\" are based\n//     on the hex coordinates, not the grid.\nvar hexDirectionVectors map[string]map[string][2]int\n```\n\n![grid1206](docs/grid1206.png)\n\n```go\nhexDirectionVectors[\"odd-column\"]= {\n    \"N\" : {+0, -1}, // ## 1206 -\u003e (11, 05) -\u003e (11, 04) -\u003e ## 1205\n    \"NE\": {+1, +0}, // ## 1206 -\u003e (11, 05) -\u003e (12, 05) -\u003e ## 1306\n    \"SE\": {+1, +1}, // ## 1206 -\u003e (11, 05) -\u003e (12, 06) -\u003e ## 1307\n    \"S\" : {+0, +1}, // ## 1206 -\u003e (11, 05) -\u003e (11, 06) -\u003e ## 1207\n    \"SW\": {-1, +1}, // ## 1206 -\u003e (11, 05) -\u003e (10, 06) -\u003e ## 1107\n    \"NW\": {-1, +0}, // ## 1206 -\u003e (11, 05) -\u003e (10, 05) -\u003e ## 1106\n}\n```\n\n![grid1306](docs/grid1306.png)\n\n```go\nhexDirectionVectors[\"even-column\"] = {\n    \"N\" : {+0, -1}, // ## 1306 -\u003e (12, 05) -\u003e (12, 04) -\u003e ## 1305\n    \"NE\": {+1, -1}, // ## 1306 -\u003e (12, 05) -\u003e (13, 04) -\u003e ## 1405\n    \"SE\": {+1, +0}, // ## 1306 -\u003e (12, 05) -\u003e (13, 05) -\u003e ## 1406\n    \"S\" : {+0, +1}, // ## 1306 -\u003e (12, 05) -\u003e (12, 06) -\u003e ## 1307\n    \"SW\": {-1, +0}, // ## 1306 -\u003e (12, 05) -\u003e (11, 05) -\u003e ## 1206\n    \"NW\": {-1, -1}, // ## 1306 -\u003e (12, 05) -\u003e (11, 04) -\u003e ## 1205\n}\n```\n\n## Roadmap\n\n1. Replace the CLI with a web front end.\n2. A future version of the tool will convert the turn report files into JSON data that you can use to create your own maps.\n3. Usable documentation.\n\n## Mac Notes\n\nCreating tar files on the Mac is no fun.\n\n```bash\ntar -cz --no-xattrs --no-mac-metadata -f assets.tgz assets\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaybymail%2Fottomap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplaybymail%2Fottomap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaybymail%2Fottomap/lists"}