Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version option #27

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

pjueon
Copy link
Contributor

@pjueon pjueon commented Jul 26, 2022

  1. Added --version option to the txtempus.

Usage:

txtempus --version

Output:

txtempus 1.0.0.0

Added hard-coded version info for now, but is possible to generate the version.h on build using the version info in the CMakeLists.txt in the future.

  1. Minor refactoring

Created UserInput class. It handles all the user input now.

Could add a pre-build script that generates this header
automatically using the version info
in the CMakeLists.txt in the future.
@pjueon
Copy link
Contributor Author

pjueon commented Aug 22, 2022

@hzeller
Could you check this please?

@hzeller
Copy link
Owner

hzeller commented Sep 9, 2022

Not sure if the added complexity is worth for a --version option of a project that is likely to not really change much.

@pjueon
Copy link
Contributor Author

pjueon commented Nov 8, 2022

@hzeller
Sorry for the late response.

For example, let's say you want to implement txtempus on the devices like arduino.
And you may not be able to use a keyboard and have to use other input devices (like buttons or something).
In this scenario, I think it's a good idea to encapsulate the I/O logic and separate it from the main function.
It would be easier to edit the I/O part of the program.

But if you don't agree with me, I can revert the I/O part and minimize the change.
Let me know your opinion. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants