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

Read text from stdin #10

Closed
wants to merge 5 commits into from
Closed

Read text from stdin #10

wants to merge 5 commits into from

Conversation

happyRip
Copy link
Contributor

@happyRip happyRip commented Nov 1, 2021

I added functionality to enable piping text into typer instead of having to rely on babble or an input file, as specified in #2
typer

I also changed default -c and -p flags functionality to work more intuitively.
typer2

@maaslalani
Copy link
Owner

Thank you for the changes! I really appreciate the stdin functionality, it's awesome! (Maybe we should add some docs in the README.md about it).

For the flag changes, I'm not so sure the changes are intuitive, could you explain it to me? monkeytype.com and keybr.com both start off with all lowercase and no punctuation for their typing tests so I think typer should do the same. Then, if people want punctuation or capitalization they can opt-in.

`go install -o typer` doesn't work at all, `go install` should be used instead.
@happyRip
Copy link
Contributor Author

happyRip commented Nov 1, 2021

For the flag changes, I'm not so sure the changes are intuitive, could you explain it to me?

Since we are using stdin now it seems strange to me that by just using typer without any flags input from stdin is stripped from any punctuation and swapped to lowercase, when it could be intended that way. I thought that input to the program should be consicered as user intended it to be.

@maaslalani
Copy link
Owner

For the flag changes, I'm not so sure the changes are intuitive, could you explain it to me?

Since we are using stdin now it seems strange to me that by just using typer without any flags input from stdin is stripped from any punctuation and swapped to lowercase, when it could be intended that way. I thought that input to the program should be considered as user intended it to be.

I think it's okay to filter the input in this case (for a typing test) since the user will probably use stdin to curl text from the web and cat files, etc... so it still makes sense for typer to use this input and remove punctuation and capitalization. If the user wants unchanged input then they can use the -cp flags. Currently it works this way for files as well with the -f flags. If users complain, then we can change this to your suggested solution, but I'd lean to keeping it as it currently is for now.

@happyRip
Copy link
Contributor Author

happyRip commented Nov 2, 2021

Then the changes can be merged without commit e351378

@maaslalani
Copy link
Owner

Merged in #15

@maaslalani maaslalani closed this Nov 5, 2021
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.

None yet

2 participants