Skip to content
/ penis Public

PENIS - A Portable Efficient Navigation Interface System library written in C++

Notifications You must be signed in to change notification settings

gnussy/penis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PENIS 🍆

Portable Efficient Navigation Interface System


Introduction

PENIS is a C++ library that provides a subscription-based API to allow clients to access commands from a prompt. The library is a wrapper around the <termios.h> library, which controls keys, maintains a history, and provides auto-complete functionality to the user.

Features

  • Subscription-based API to access commands from a prompt
  • Auto-complete functionality for faster input
  • Command history tracking
  • Navigation features for ease of use
  • Portable and easy-to-use

Requirements

  • A C++ compiler that supports C++11 or later
  • The <termios.h> library

Installation

  • Describe installation

Usage

  • Describe usage

Examples

Here's an example of how to use the PENIS library to create a simple calculator:

#include <penis/penis.hpp>
#include <iostream>

void my_callback(const std::string& command) {
  std::cout << "Received command: " << command << std::endl;
}

int main() {
  penis::PromptBuilder repl;
  repl.subscribe_command(my_callback).run();
  return 0;
}

This example creates a subscription to the PENIS prompt and waits for the user to input a command. If the command is "exit", the program will exit. Otherwise, it tries to convert the command string to an integer and prints the result to the console. If the conversion fails, it prints an error message.

License

PENIS is licensed under the GPL-3 License. See the LICENSE file for more information.

Contact

  • Create a gnussy e-mail

About

PENIS - A Portable Efficient Navigation Interface System library written in C++

Topics

Resources

Stars

Watchers

Forks