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: 5 months 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 (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-11T11:36:55.000Z (over 1 year ago)
- Last Synced: 2025-02-11T14:25:04.544Z (over 1 year ago)
- Topics: cat, cpp, json, pepito, sse
- Language: C++
- Homepage:
- Size: 308 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

## Here is one of Pépito's official accounts:
https://x.com/PepitoTheCat
# The 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