All Projects → adamsky → Globe

adamsky / Globe

Licence: gpl-3.0
Interactive ASCII globe generator

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Globe

Qov
The terminal presentation tool.
Stars: ✭ 141 (-67.95%)
Mutual labels:  terminal, ascii
Ascii py
Make some ascii arts
Stars: ✭ 211 (-52.05%)
Mutual labels:  terminal, ascii
Kittik
Create slides in TypeScript and present them in the terminal using ASCII only!
Stars: ✭ 147 (-66.59%)
Mutual labels:  terminal, ascii
Lehar
Visualize data using relative ordering
Stars: ✭ 81 (-81.59%)
Mutual labels:  terminal, ascii
Simpletable
Simple tables in terminal with Go
Stars: ✭ 288 (-34.55%)
Mutual labels:  terminal, ascii
Ervy
Bring charts to terminal.
Stars: ✭ 1,530 (+247.73%)
Mutual labels:  terminal, ascii
Tcharts.js
📉 Lightweight and fast terminal ASCII charts for nodejs and browser.
Stars: ✭ 172 (-60.91%)
Mutual labels:  terminal, ascii
Diagram
CLI app to convert ASCII arts into hand drawn diagrams.
Stars: ✭ 642 (+45.91%)
Mutual labels:  terminal, ascii
simple-world-map
A simple SVG world map with ISO 3166-1 annotations
Stars: ✭ 59 (-86.59%)
Mutual labels:  earth, globe
google-globe-trends
Create beautiful and interactive Google Trends globe visualizations with ease
Stars: ✭ 33 (-92.5%)
Mutual labels:  earth, globe
Asciichart
Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
Stars: ✭ 1,107 (+151.59%)
Mutual labels:  terminal, ascii
Tart
Tart - draw ASCII art in the terminal with your mouse!
Stars: ✭ 296 (-32.73%)
Mutual labels:  terminal, ascii
Video To Ascii
It is a simple python package to play videos in the terminal using characters as pixels
Stars: ✭ 960 (+118.18%)
Mutual labels:  terminal, ascii
Unibits
Visualize different Unicode encodings in the terminal
Stars: ✭ 125 (-71.59%)
Mutual labels:  terminal, ascii
Terminaltables
Generate simple tables in terminals from a nested list of strings.
Stars: ✭ 685 (+55.68%)
Mutual labels:  terminal, ascii
Tuicss
Text-based user interface CSS library
Stars: ✭ 167 (-62.05%)
Mutual labels:  terminal, ascii
Ftxui
💻 C++ Functional Terminal User Interface. ❤️
Stars: ✭ 433 (-1.59%)
Mutual labels:  terminal, ascii
Tvision
A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
Stars: ✭ 612 (+39.09%)
Mutual labels:  terminal, ascii
Cowsay Files
A collection of additional/alternative cowsay files.
Stars: ✭ 216 (-50.91%)
Mutual labels:  terminal, ascii
Csconsoleformat
.NET C# library for advanced formatting of console output [Apache]
Stars: ✭ 296 (-32.73%)
Mutual labels:  terminal, ascii

Render an ASCII globe in your terminal. Make it interactive or just let it spin in the background.

Changelog

v0.2.0:

  • added multiple CLI arguments for setting up the scene (refresh-rate, globe-rotation, cam-rotation, cam-zoom, location, focus-speed, night, template, texture, texture-night)
  • added experimental listing mode that supports reading coordinates from standard input and going through all of them, animating camera target changes (see --pipe)
  • enabled ability to display night side of the globe using an additional texture
  • changed default Earth texture (now includes New Zealand)
  • added vim-style navigation for the interactive mode
  • improved internal library representation of Texture
  • improved documentation

v0.1.2

  • added clearing screen on exit
  • fixed panic when using rust version <1.45

v0.1.1

  • fixed mouse capture staying on after exit

v0.1.0

  • initial release

Install

To build globe-cli you will need to have Rust programming language installed on your machine.

Use cargo install:

cargo install globe-cli

Or git clone and cargo run --release directly from the repository.

AUR

globe can be installed from available AUR packages using an AUR helper. For example,

yay -S globe-cli

If you prefer, you can clone the AUR packages and then compile them with makepkg. For example,

git clone https://aur.archlinux.org/globe-cli.git
cd globe-cli
makepkg -si

Docker

You 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:

docker build -t globe .
docker run -it --rm globe -s

Run

To get a full listing of available features and options, show the --help information with:

globe -h

Display a globe in screensaver mode using the -s option.

globe -s 

It's kind of boring. Let's add some camera rotation to make it look more alive:

globe -sc2

Now let's also enable the night side and rotate the globe on its axis:

globe -snc2 -g10

If you want to adjust things at runtime check out the interactive mode. Here you can pan the globe around using either the mouse or keyboard arrows:

globe -i

Use + and - to control the globe rotation speed, , and . to control the camera rotation speed, PgUp and PgDown to control the camera zoom, n to toggle displaying globe's night side.

Settings we used on the screensaver mode also work:

globe -inc2 -g10

Last but not least there is the listing mode. It allows you to pass location coordinates to the program and see them shown one by one on the globe. Currently, it only supports a very basic input format. Here's an example:

echo "0,0.5;0.1,0.5;0.3,0.5;0.5,0.5;0.7,0.5" | globe -p

If you're feeling creative, you can also load custom textures, like so:

globe -in --texture ./path-to-texture --texture-night ./path-to-night-texture

Use the library

To use globe within your Rust project, add it to your dependencies:

[dependencies]
globe = "0.2.0"

First create a Globe:

let mut globe = GlobeConfig::new()
    .use_template(GlobeTemplate::Earth)
    .with_camera(CameraConfig::default())
    .build();

Next make a new Canvas and render the Globe onto it:

let mut canvas = Canvas::new(250, 250, None);
globe.render_on(&mut canvas);

You can now print out the canvas to the terminal:

let (size_x, size_y) = canvas.get_size();
// default character size is 4 by 8
for i in 0..size_y / 8 {
    for j in 0..size_x / 4 {
        print!("{}", canvas.matrix[i][j]);
    }
    println!();
}

See globe-cli code for examples of runtime changes to the Globe and it's Camera.

Credits

Rendering math based on C++ code by DinoZ1729.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].