kraanzu / smassh

Smassh your Keyboard, TUI Edition
GNU General Public License v3.0
1.41k stars 50 forks source link

💡 [FEAT] load a text file to use for practice #89

Open rhuygen opened 4 months ago

rhuygen commented 4 months ago

Is your feature request related to a problem? 😢 Please describe.

Would it be possible to load a text file as example text to practice? That way we can use text that contains words that are often used in our field and even can load some code as text to practice typing code faster.

Users could then also ask ChatGPT to generate some text based on specific criteria and use that in Smassh.

Describe the solution you'd like 🤔

Add a button to 'Load text...'

Describe alternatives you've considered 🧐

Allow to input a prompt that would instruct ChatGPT to create a text based on criteria like #words, characters to use, ....

Additional context 📝

No response

kraanzu commented 4 months ago

Hmm...great idea. I'm sharing how this can be possible. Feel free to share your own idea as well :)

In the bar another item called custom will be added This would replace the current paragraph with a custom one (if there are none set, it can default to some random paraphrase) Now the user can add more items by clicking on a button called Load text This will provide with a list of items to load text from Also there'll be a button to add more

If the user clicks on add more then a dialogue will open with Title and Text inputs which user can fill and save

rhuygen commented 4 months ago

That sounds already great.

kraanzu commented 4 months ago

Would the custom text allow for multiple paragraphs?

I mean, we can replace all the newlines with spaces :)

What options would the 'Load text ...' provide? Loading from a file, clipboard, ... ?

I think the best way is to copy-paste, Loading from a file is something I'll need to implement fully (If there's already an extension to do it then ok otherwise nope) Also, drag-and-drop files do not seem to work on all the terminals so we can count that out