{"id":13405814,"url":"https://github.com/adamsky/globe","last_synced_at":"2025-04-08T08:18:04.130Z","repository":{"id":56491165,"uuid":"287075113","full_name":"adamsky/globe","owner":"adamsky","description":"Interactive ASCII globe generator","archived":false,"fork":false,"pushed_at":"2024-04-08T16:09:20.000Z","size":3315,"stargazers_count":602,"open_issues_count":8,"forks_count":20,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-08T18:38:07.283Z","etag":null,"topics":["ascii","earth","globe","planet","terminal"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/adamsky.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},"funding":{"github":"adamsky","patreon":"adamsky","ko_fi":"adamsky","liberapay":"adamsky"}},"created_at":"2020-08-12T17:30:29.000Z","updated_at":"2024-08-06T15:52:36.000Z","dependencies_parsed_at":"2024-10-26T01:39:48.432Z","dependency_job_id":"60866434-1cad-4ac8-a541-aeed12690194","html_url":"https://github.com/adamsky/globe","commit_stats":{"total_commits":38,"total_committers":5,"mean_commits":7.6,"dds":0.1842105263157895,"last_synced_commit":"3261d3f3dc4c033f3a6f86d540c3bd554fa148b4"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamsky%2Fglobe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamsky%2Fglobe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamsky%2Fglobe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamsky%2Fglobe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamsky","download_url":"https://codeload.github.com/adamsky/globe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801176,"owners_count":20998339,"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":["ascii","earth","globe","planet","terminal"],"created_at":"2024-07-30T19:02:12.650Z","updated_at":"2025-04-08T08:18:04.090Z","avatar_url":"https://github.com/adamsky.png","language":"Rust","funding_links":["https://github.com/sponsors/adamsky","https://patreon.com/adamsky","https://ko-fi.com/adamsky","https://liberapay.com/adamsky"],"categories":["Rust"],"sub_categories":[],"readme":"![](.github/globe_logo.png)\n\nRender an ASCII globe in your terminal. Make it interactive or just let it\nspin in the background.\n\n![](.github/earth_dragging.gif)\n\n## Changelog\n\nv0.2.1:\n- upgraded `clap` dependency to `3.0.0`\n- changed `globe-cli` `template` argument to not be required\n\nv0.2.0:\n- added multiple CLI arguments for setting up the scene (`refresh-rate`, \n`globe-rotation`, `cam-rotation`, `cam-zoom`, `location`, `focus-speed`,\n`night`, `template`, `texture`, `texture-night`)\n- added experimental *listing mode* that supports reading coordinates from\nstandard input and going through all of them, animating camera target changes\n(see `--pipe`)\n- enabled ability to display night side of the globe using an additional\ntexture\n- changed default Earth texture (now includes New Zealand)\n- added vim-style navigation for the interactive mode\n- improved internal library representation of `Texture`\n- improved documentation\n\nv0.1.2\n- added clearing screen on exit\n- fixed panic when using rust version \u003c1.45\n\nv0.1.1\n- fixed mouse capture staying on after exit\n\nv0.1.0\n- initial release\n\n## Install\n\nTo build `globe-cli` you will need to have \n[Rust programming language](https://rustup.rs) installed on your machine. \n\nUse `cargo install`:\n```\ncargo install globe-cli\n```\n\nOr `git clone` and `cargo run --release` directly from the repository.\n\n### AUR\n\n`globe` can be installed from available [AUR packages](https://aur.archlinux.org/packages/?O=0\u0026SeB=b\u0026K=globe-cli\u0026outdated=\u0026SB=n\u0026SO=a\u0026PP=50\u0026do_Search=Go) using an [AUR helper](https://wiki.archlinux.org/index.php/AUR_helpers). For example,\n\n```\nyay -S globe-cli\n```\n\nIf you prefer, you can clone the [AUR packages](https://aur.archlinux.org/packages/?O=0\u0026SeB=b\u0026K=globe-cli\u0026outdated=\u0026SB=n\u0026SO=a\u0026PP=50\u0026do_Search=Go) and then compile them with [makepkg](https://wiki.archlinux.org/index.php/Makepkg). For example,\n\n```\ngit clone https://aur.archlinux.org/globe-cli.git\ncd globe-cli\nmakepkg -si\n```\n\n### Docker\n\nYou can also use Docker to try out `globe`, no Rust needed. After cloning the repo, just build and run an image from the `Dockerfile` contained at the root of the project:\n```bash\ndocker build -t globe .\ndocker run -it --rm globe -s\n```\n\n## Run\n\nTo get a full listing of available features and options, show the `--help`\ninformation with:\n```\nglobe -h\n```\n\nDisplay a globe in *screensaver mode* using the `-s` option. \n```\nglobe -s \n```\n\nIt's kind of boring. Let's add some camera rotation to make it look more\nalive:\n```\nglobe -sc2\n```\n\nNow let's also enable the night side and rotate the globe on its axis:\n```\nglobe -snc2 -g10\n```\n\nIf you want to adjust things at runtime check out the *interactive mode*.\nHere you can pan the globe around using either the mouse or keyboard arrows:\n```\nglobe -i\n```\n\nUse `+` and `-` to control the globe rotation speed, `,` and `.` to control\nthe camera rotation speed, `PgUp` and `PgDown` to control the camera zoom,\n`n` to toggle displaying globe's night side.\n\nSettings we used on the *screensaver mode* also work:\n```\nglobe -inc2 -g10\n```\n\nLast but not least there is the *listing mode*. It allows you to pass location\ncoordinates to the program and see them shown one by one on the globe.\nCurrently, it only supports a very basic input format. Here's an example:\n```\necho \"0,0.5;0.1,0.5;0.3,0.5;0.5,0.5;0.7,0.5\" | globe -p\n```\n\nIf you're feeling creative, you can also load custom textures, like so:\n```\nglobe -in --texture ./path-to-texture --texture-night ./path-to-night-texture\n```\n\n## Use the library\n\nTo use `globe` within your Rust project, add it to your dependencies:\n```\n[dependencies]\nglobe = \"0.2.0\"\n```\n\nFirst create a `Globe`:\n```\nlet mut globe = GlobeConfig::new()\n    .use_template(GlobeTemplate::Earth)\n    .with_camera(CameraConfig::default())\n    .build();\n```\n\nNext make a new `Canvas` and render the `Globe` onto it:\n```\nlet mut canvas = Canvas::new(250, 250, None);\nglobe.render_on(\u0026mut canvas);\n```\n\nYou can now print out the canvas to the terminal:\n```\nlet (size_x, size_y) = canvas.get_size();\n// default character size is 4 by 8\nfor i in 0..size_y / 8 {\n    for j in 0..size_x / 4 {\n        print!(\"{}\", canvas.matrix[i][j]);\n    }\n    println!();\n}\n``` \n\nSee `globe-cli` code for examples of runtime changes to the `Globe` and it's\n`Camera`.\n\n## Credits\n\nRendering math based on \n[C++ code by DinoZ1729](https://github.com/DinoZ1729/Earth).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamsky%2Fglobe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamsky%2Fglobe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamsky%2Fglobe/lists"}