Giter Club home page Giter Club logo

starfetch's Introduction

starfetch

A rewrite of the command-line program starfetch in Rust.

This utility displays constellations and some information about them in the command line.

Why?

There is no real point to the rewrite. It's just a fun afternoon project.

Installation

First, run this command:

cargo install --path=.

Then, run starfetch -d to display the data directory, and copy all files in share/constellations there.

Usage

Use starfetch --help for a help page.

Use starfetch -r to display a random constellation.

Use starfetch -l to list all available constellations with their name, file name and quadrant.

Use starfetch aries to display Aries, or any other constellation.

Constellations

All constellations are taken from the original starfetch and adapted with the convert.py script. I'd like to thank Stefano Gini (Haruno19) for creating the data files.

File format

Constellation files are JSON, an example is:

{
    "title": "───── aries ─────",
    "graph": [
        [4, 2, ""],
        [14, 4, ""],
        [16, 6, ""],
        [15, 7, ""],
    ],
    "name": "Aries",
    "quadrant": "NQ1",
    "right_ascension": "01h 46m 37.3761s –03h 29m 42.4003s",
    "declination": "+31.2213154° to –10.3632069°",
    "area": "441 sq.deg. (39th)",
    "main_stars": "4, 9"
}

Most of the attributes are self-explanatory, and simply strings displayed literally in the output. graph is a list of stars, with their X and Y coordinates, and the character used to draw them, in this order.

Screenshots

starfetch -l starfetch ursa_major
Listing constellations Displaying a constellation

starfetch's People

Contributors

codercharmander avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

starfetch's Issues

How to use the `convert.py` ?

Working well and easy-to-use on Windows.
Can add the stars as:

{
    "title": "───── aries ─────",
    "graph": [
        [4, 2, ""],
        [14, 4, ""],
        [16, 6, ""],
        [15, 7, ""],
    ],
    "name": "Aries",
    "quadrant": "NQ1",
    "right_ascension": "01h 46m 37.3761s –03h 29m 42.4003s",
    "declination": "+31.2213154° to –10.3632069°",
    "area": "441 sq.deg. (39th)",
    "main_stars": "4, 9"
}

And, could you write the used-way of convert.py?
Anyway, thanks for your precious time that has been invested.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.