WIP: Guess the format of numbers #24

Draft
PlexSheep wants to merge 0 commits from feat/guess-format into devel
Owner

it should be possible to input hex numbers, bin numbers and so on.

Consider adding a --guess flag (or --no-guess) to disable/enable guessing.

Guessing should not be the default, I suppose, as someone might want to input 0d10 but have it be interpreted as 0b10.

Refs: #20

  • Split the functionalities of the numf_parser
  • add another parser that allows setting a guess: bool parameter
  • have it guess the format with all supported formats
  • test guessing of formats
it should be possible to input hex numbers, bin numbers and so on. Consider adding a --guess flag (or `--no-guess`) to disable/enable guessing. Guessing should not be the default, I suppose, as someone might want to input `0d10` but have it be interpreted as `0b10`. Refs: #20 - [ ] Split the functionalities of the `numf_parser` - [ ] add another parser that allows setting a `guess: bool` parameter - [ ] have it guess the format with all supported formats - [ ] test guessing of formats
PlexSheep added the
Kind/Feature
Priority
Medium
Reviewed
Confirmed
labels 2024-05-23 13:35:03 +02:00
PlexSheep self-assigned this 2024-05-23 13:35:03 +02:00
Author
Owner

we need to specify a parser with a single parameter with clap derive to accept numbers with the cli. We could probably do manual parsing, but that sucks and I don't want to do it. We could implement guessing automatically, but then the user couldn't choose, which is something I don't want too.

This is more difficult than expected.

we need to specify a parser with a single parameter with clap derive to accept numbers with the cli. We could probably do manual parsing, but that sucks and I don't want to do it. We could implement guessing automatically, but then the user couldn't choose, which is something I don't want too. This is more difficult than expected.
Author
Owner

We really only have these options:

  1. Don't use clap to parse our stuff and parse the numbers manually
  2. Only guess-parse the stdin
We really only have these options: 1. Don't use clap to parse our stuff and parse the numbers manually 2. Only guess-parse the stdin
All checks were successful
cargo devel CI / cargo CI (push) Successful in 1m18s
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b feat/guess-format devel
git pull origin feat/guess-format

Step 2:

Merge the changes and update on Forgejo.
git checkout devel
git merge --no-ff feat/guess-format
git push origin devel
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: PlexSheep/numf#24
No description provided.