Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avicted/pepito_app
Pépito C++ program that connects to a Server-sent events (SSE) API and parses every message for when Pépito the cat comes home or goes out.
https://github.com/avicted/pepito_app
cat cpp json pepito sse
Last synced: 8 days ago
JSON representation
Pépito C++ program that connects to a Server-sent events (SSE) API and parses every message for when Pépito the cat comes home or goes out.
- Host: GitHub
- URL: https://github.com/avicted/pepito_app
- Owner: Avicted
- License: mit
- Created: 2024-09-11T18:16:54.000Z (22 days ago)
- Default Branch: main
- Last Pushed: 2024-09-14T23:36:44.000Z (19 days ago)
- Last Synced: 2024-09-26T00:03:09.993Z (8 days ago)
- Topics: cat, cpp, json, pepito, sse
- Language: C++
- Homepage:
- Size: 306 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pépito C++ program
![pépito 17 years birthday](resources/pépito_17_screenshot.png)
## Here is one of Pépito's official accounts:
https://x.com/PepitoTheCat# Phe program
This is a multi-threaded C++ program that listens to Server-Sent Events (SSE) and prints the messages to the console.
All messages are parsed, and the program serves as an example of how to parse SSE messages in C++.Using this code as the base, you can extend it to do whatever you want with the messages.
The program is using the [Pépito API](
https://github.com/Clement87/Pepito-API/tree/main?tab=readme-ov-file#p%C3%A9pito-api) to get the messages.For example you could:
- When Pépito goes in or out of the house
- Connect to all Philips Hue bridges on your network and flash the lights when a particular message is received.
- Use your imagination and do something fun with the messages.## Pre-requisites
```bash
# Arch Linux
pacman -S meson nlohmann-json base-devel
```## How to build
VSCode press F5 to build and run the program.
```bash
# Build the program
clear && meson setup build --buildtype=debug && cd build && ninja && cd ..# Run the program
./build/pepito_app
```## License
MIT License