Code Monkey home page Code Monkey logo

ptable's Introduction

terminalperiodictable

A beautiful TUI periodic table for GNU/linux terminals coded in C - no extra dependencies

TO COMPILE and RUN:

* GNU/LINUX:
- Download or clone repository.
- Type "make" to compile and "./tptable" to run-
- Alternatively, type "bash build.sh" and ./tptable" to run.

TO INSTALL:

* Installation:
- sudo make install
- Run as "tptable"

Alt text

The periodic table, also known as the periodic table of the elements, is a rows and columns arrangement of the chemical elements. It is widely used in chemistry, physics, and other sciences, and is generally seen as an icon of chemistry. (WIKIPEDIA)

In my last project in C I wanted to compile everything I've learned with text user interfaces and create a retro-looking periodic table that looks nice :)

The explanation of all the modules below:

(Increasing in order of abstraction until you reach main.c)


LEVEL 0: (BASE)

  • rterm.c : With the ANSI escape sequences to color our output in the terminal
  • tm.c : Create a millisecond timer for animations

LEVEL 1: (LOW LEVEL ABSTRACTIONS)

  • keyb.c : Creates a small keyboard abstraction to read escaped keys \e on Linux
  • scbuf.c (1) : Creates an intermediate layer between the display and the terminal as a double screen buffer - listbox.c (2) : Creates a list with a selector with horizontal scroll

LEVEL 2: (HIGH LEVEL ABSTRACTIONS)

  • ui.c : Different tools like textbox and window for user interface
  • global.c: text messages and global variables

main.c: Main program elements.dat: Database of elements, most of the info generated with chatGPT.

(1) http://oldstuff286.blogspot.com/2017/09/a-very-simple-screen-double-buffer.html

(2) http://oldstuff286.blogspot.com/2018/07/segmentation-fault-c-pointers.html

ptable's People

Contributors

velorek1 avatar varuld avatar

Watchers

 avatar

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.