Skip to content

Add version option#27

Open
pjueon wants to merge 3 commits into
hzeller:masterfrom
pjueon:add-version-option
Open

Add version option#27
pjueon wants to merge 3 commits into
hzeller:masterfrom
pjueon:add-version-option

Conversation

@pjueon

@pjueon pjueon commented Jul 26, 2022

Copy link
Copy Markdown
Contributor
  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.

pjueon added 3 commits July 26, 2022 20:42
Could add a pre-build script that generates this header
automatically using the version info
in the CMakeLists.txt in the future.
@pjueon

pjueon commented Aug 22, 2022

Copy link
Copy Markdown
Contributor Author

@hzeller
Could you check this please?

@hzeller

hzeller commented Sep 9, 2022

Copy link
Copy Markdown
Owner

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

@pjueon

pjueon commented Nov 8, 2022

Copy link
Copy Markdown
Contributor Author

@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