A little UNIX-inspired terminal application for the Numworks Calculator (not using escher).

Related tags

CLI terminal cpp numworks
Overview

L.E. Terminal (Lightweight Emulated Terminal)

Logo

L.E. Terminal (let for short) is a little UNIX-inspired terminal for the Numworks Calculator.

Screenshot

It does not use escher (Numworks' GUI Library).

Features

Bare bones multi-user system

Each user have an username, a UID (universal id), and an execution level (low to root)

Let introduces four default user accounts, each assigned to a specific execution level :

  • root is, obviously, the root user : it have the highest execution level (well, named root)
  • boat, who takes the lowest execution level (low)
  • cacahuete, who takes the normal execution level (normal)
  • coconut, who takes the high (right below root) execution level.

Users can also be added dynamically using the useradd command.

Filesystem

The standard UNIX filesystem commands that are implemented currently interfaces with a virtual file system (VFS). The Numworks' Ion Storage is mounted by default in /ram/

A text editor is actually in development, called kilo (inspired from nano)

Commands

Here are the implemented commands :

  • uname : same command as UNIX : displays kernel info such as Epsilon's version, etc...

  • echo : print the passed arguments to the screen

  • clear : clear the terminal

  • history : displays the commands history

  • whoami: displays the current user name

  • ion : interfaces with Ion (Numworks low level library)

    Arguments :

    • -s : put the calculator in sleep mode (like the power button)
    • -D : enter DFU mode (needs root privileges)
    • -S : shutdown the calculator
    • -r : reboot the calculator (not working for the moment)
    • -b : shows the battery level as a nice bar
    • -u : shows USB infos
  • rm, touch, cp, cat : same as UNIX

  • ls : list all files in the Numworks' storage (because of a limitation within Ion, ls needs a file extension to list files, default is set to py)

  • pyscr : creates the default samples Python scripts in Epsilon (i.e. squares.py, etc...)

  • args : displays every arguments on screen, including the command

  • chars : displays every char in the range 0-255 (for debug purposes)

  • poincare : an interactive poincare shell (for calculation) (Warning : it crashes if you throw it letters in input)

  • su : means here switch user, who switches to root if no arguments passed, or the user who is passed in arguments (user name)

  • useradd : add an user to the user repository

  • users : list available users, use -d as argument for detailed output

Building instructions

Note : the terminal does not support the simulator

As a "subfirmware"

If you want to use let as a "subfirmware" (kind of a firmware in a firmware), follow these steps :

  • Clone the source of the firmware you want to use (ex: Epsilon)
  • Clone this repository in the apps/terminal folder of the firmware source (the terminal folder needs to be created, of course)
  • Add the following line to the makefile apps/Makefile at the top :
include apps/terminal/Makefile
  • Go to the main.cpp file and add this line to the top :
#include "terminal/startup.h"
  • In the same file, call the terminal's main function right below Poincare::Init(); :
void ion_main(int argc, const char * const argv[]) {
  // Initialize Poincare::TreePool::sharedPool
  Poincare::Init();

  terminal_startup_check(argc, argv);

And done ! You will be able to launch the terminal at startup when pressing the HOME key !

Issues
  • Building errors [bug]

    Building errors [bug]

    Your project seems awesome, but I can't build it (I tried with let in the apps folder, but there's a lot of .h missing and other errors), so if you could put some building instructions (I saw a todo in the readme, but nobody can test it without these) I'd love to contribute, so thanks in advance ^^

    opened by ArtichOwO 10
  • error: 'class Ion::Events::Event' has no member named 'id'

    error: 'class Ion::Events::Event' has no member named 'id'

    I have this error when compiling with make binpack -j8 with Omega on the omega-dev branch :

    apps/terminal/external/extapp_api.cpp: In function 'int extapp_getKey(bool, bool*)':
    apps/terminal/external/extapp_api.cpp:300:19: error: 'class Ion::Events::Event' has no member named 'id'; did you mean 'uint8_t Ion::Events::Event::m_id'? (not accessible from this context)
      300 |       key = event.id();
          |                   ^~
    In file included from ion/include/ion.h:9,
                     from apps/terminal/external/extapp_api.cpp:1:
    ion/include/ion/events.h:41:11: note: declared private here
       41 |   uint8_t m_id;
          |           ^~~~
    

    When changing event.id() to event.m_id(), I have this error :

    apps/terminal/external/extapp_api.cpp: In function 'int extapp_getKey(bool, bool*)':
    apps/terminal/external/extapp_api.cpp:300:19: error: 'uint8_t Ion::Events::Event::m_id' is private within this context
      300 |       key = event.m_id();
          |                   ^~~~
    In file included from ion/include/ion.h:9,
                     from apps/terminal/external/extapp_api.cpp:1:
    ion/include/ion/events.h:41:11: note: declared private here
       41 |   uint8_t m_id;
          |           ^~~~
    apps/terminal/external/extapp_api.cpp:300:24: error: expression cannot be used as a function
      300 |       key = event.m_id();
          |                        ^
    

    What should I do ?

    opened by ArtichOwO 7
  • undefined reference to `Code::ScriptTemplate::[ScriptName]()' (Epsilon 15)

    undefined reference to `Code::ScriptTemplate::[ScriptName]()' (Epsilon 15)

    Tried with Epsilon 15.3.1 (to avoid Omega-related errors), but I have this error :

    /usr/local/Cellar/arm-none-eabi-gcc/9-2019q4-update/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /var/folders/w2/sy9f6ygx2935d8xnqqgj5pt80000gn/T//epsilon.elf.8MWz63.ltrans0.ltrans.o: in function `terminal_main(int, char const* const*) [clone .constprop.0]':
    /Users/leo/Downloads/EpsilonTerm/apps/terminal/commands/commands.h:300: undefined reference to `Code::ScriptTemplate::Squares()'
    /usr/local/Cellar/arm-none-eabi-gcc/9-2019q4-update/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/leo/Downloads/EpsilonTerm/apps/terminal/commands/commands.h:301: undefined reference to `Code::ScriptTemplate::Parabola()'
    /usr/local/Cellar/arm-none-eabi-gcc/9-2019q4-update/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/leo/Downloads/EpsilonTerm/apps/terminal/commands/commands.h:302: undefined reference to `Code::ScriptTemplate::Mandelbrot()'
    /usr/local/Cellar/arm-none-eabi-gcc/9-2019q4-update/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/leo/Downloads/EpsilonTerm/apps/terminal/commands/commands.h:303: undefined reference to `Code::ScriptTemplate::Polynomial()'
    collect2: error: ld returned 1 exit status
    make: *** [output/release/device/n0110/epsilon.elf] Error 1
    
    opened by ArtichOwO 3
  • Switching to root user after using a command

    Switching to root user after using a command

    ~~Using history makes the user switch to root automatically~~ Using any command makes the user switch to root automatically That's all x)

    (Got this error with Epsilon 15.3.2)

    opened by ArtichOwO 1
  • Crash with LeT

    Crash with LeT

    Hi, I'm having troubles with LET, every time I enter a command the calculator just resets itself, I believe that it's due to a parser error but i(m not sure. I'm going to search in the code but i'm not sure that i will be able to find the issue. Thanks by advance, Bzyli

    opened by Bzyli 0
Releases(v1.5.0)
  • v1.5.0(Feb 10, 2021)

    • New status bar at the bottom (shows battery level, USB status, etc...)
    • New daemon system (manages things such as auto-sleep or sleep mode detection)
    • And other minor things...
    Source code(tar.gz)
    Source code(zip)
Owner
Cacahuète Sans Sel
A passionate french developer
Cacahuète Sans Sel
Simple Unix Terminal Football Manager-like game.

Superleage 2020/2021 It is a "work in progress" simple game based on some mechanics of Football Manager. The game is in a very early stage of Developm

sewe2000 2 Oct 14, 2021
A terminal emulator that runs in your terminal. Powered by Turbo Vision.

tvterm A terminal emulator that runs in your terminal. Powered by Turbo Vision. tvterm is an experimental terminal emulator widget and application bas

null 18 Jun 1, 2022
Spitfire is a basic terminal language that can exicute code via the terminal.

Spitfire is a basic terminal language that can exicute code via the terminal. It is easy to learn and runs fast, considering that its just a 300 line c++ file.

jhomas tefferson 0 Nov 18, 2021
httpserve - Spin up a little http server from the commandline.

httpserve - Spin up a little http server from the commandline.

James Barford-Evans 1 Aug 22, 2021
This is a terminal made using C language.

CommandConsole As the name suggests this is a terminal like software. Like a normal terminal in linux or command prompt in windows, it also works like

Shreejan Dolai 9 Feb 14, 2022
Rizin - UNIX-like reverse engineering framework and command-line toolset.

Rizin - UNIX-like reverse engineering framework and command-line toolset.

Rizin Organization 1.4k Jun 26, 2022
SimPle SHell - minimalist Unix interactive shell written in a single C file

SimPle SHell - minimalist Unix interactive shell written in a single C file. The shell does not support scripting yet and is in an early stage of development. If you notice any bug, please open an issue on github.

sewe2000 2 Oct 24, 2021
This C program imitates what an 'ls' command does in UNIX like operating systems.

This C program imitates what an 'ls' command does in UNIX like operating systems. Arguments can be passed to the program to modify and filter the results from the command

Yusuf Ghodiwala 1 Nov 22, 2021
A tiny UNIX shell.

Tiny SHell - TSH Description This project is a tiny UNIX shell supports only job control. It's the 5th lab of 15-213: Introduction to Computer Systems

Ali Ghorab 2 Apr 3, 2022
Small header only C++ library for writing multiplatform terminal applications

Terminal Terminal is small header only library for writing terminal applications. It works on Linux, macOS and Windows (in the native cmd.exe console)

Jupyter Xeus 208 Jun 30, 2022
:computer: C++ Functional Terminal User Interface. :heart:

FTXUI Functional Terminal (X) User interface A simple C++ library for terminal based user interface. Demo: Feature Functional style. Inspired by [1] a

Arthur Sonzogni 3.2k Jun 23, 2022
Draw sequence diagram in text from terminal.

sequence-diagram-cli Draw seqence diagram from terminal.

null 42 Feb 28, 2022
X terminal emulator rendering through OpenGL ES Compute Shaders

Zutty is a terminal emulator for the X Window System, functionally similar to several other X terminal emulators such as xterm, rxvt and countless others

Tom Szilagyi 212 Jun 22, 2022
The new Windows Terminal and the original Windows console host, all in the same place!

The new Windows Terminal and the original Windows console host, all in the same place!

Microsoft 83.8k Jun 27, 2022
n³ The unorthodox terminal file manager

n³ The unorthodox terminal file manager

Mischievous Meerkat 14.3k Jun 28, 2022
Graphs the activity of a chia harvester in a linux terminal.

Chia Harvest Graph Monitor for Chia Harvesting Introduction The chiaharvestgraph tool will graph Chia Harvesting activity in a linux terminal. Use a 2

Bram Stolk 219 Jun 3, 2022
a simple to use linux terminal

a simple to use linux terminal

notaweeb 7 Feb 17, 2022
Collection of human friendly terminal interface for git.

A collection of human friendly terminal user interface for git.

Arthur Sonzogni 61 Jun 26, 2022
Simple benchmark for terminal output

TermBench This is a simple timing utility you can use to see how slow your terminal program is at parsing escape-sequence-coded color output. It can b

Casey Muratori 171 May 30, 2022