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++
- Host: GitHub
- URL: https://github.com/gnussy/penis
- Owner: gnussy
- Created: 2023-03-29T21:53:08.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-04T14:02:47.000Z (almost 3 years ago)
- Last Synced: 2024-10-24T13:59:00.179Z (over 1 year ago)
- Topics: cpp, prompt, repl, xmake
- Language: C++
- Homepage: https://gnussy.org
- Size: 73.2 KB
- Stars: 17
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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