Implemented a plan & tested further with parsing

This commit is contained in:
theskywinds 2025-06-20 11:39:10 +02:00
parent 8bc42a853a
commit f87f628082
2 changed files with 38 additions and 2 deletions

View File

@ -1,2 +1,27 @@
# discord-timestamp
Reliably create timestamps for Discord entirely within the terminal!
Mainly made in mind with Linux (Although it will in the future work on Windows too)
## plan
The program should run purely in the terminal, working on Windows and Linux.
It should take a couple of commandline arguments based on
1. What time format (By default 'f').
2. Short format (HH MM SS) or long format (DD MM YY HH MM SS)
It start the output as:
- Current time
- Information on what to input
- User input
Do input validation, then output as a copyable format whilst waiting for input before
continuing.
### Possible additions
Allow for the user to pass the output into a file for use in the longer term.
Directly allow input using the parser alone.
## progress
- [ ] Set up the startup sequence & basic input (and output)
- [ ] Add a basic system for inputting time and outputting (correct) epoch time
- [ ] Properly implement commandline parsing as stated in the plan

View File

@ -2,6 +2,17 @@
#include "CLI11.hpp"
int main([[maybe_unused]] int argc,[[maybe_unused]] char **argv) {
std::cout << argc << argv[0];
std::cout << "Hello world";
CLI::App app{"Test program thus far"};
bool test{false};
app.add_flag("-f", test, "Test flag");
try {
app.parse(argc, argv);
} catch(const CLI::ParseError &e) {
return app.exit(e);
}
if (test)
std::cout << "Hello world";
}