An open API service indexing awesome lists of open source software.

https://github.com/gnussy/penis

PENIS - A Portable Efficient Navigation Interface System library written in C++
https://github.com/gnussy/penis

cpp prompt repl xmake

Last synced: about 1 year ago
JSON representation

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

Awesome Lists containing this project

README

          

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 library, which controls keys, maintains a history, and provides auto-complete functionality to the user.

# Features

- [X] Subscription-based API to access commands from a prompt
- [ ] Auto-complete functionality for faster input
- [X] 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 library

# Installation
- [ ] Describe installation

# Usage
- [ ] Describe usage

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

```c++
#include
#include

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