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

hascard: setupTerm: Couldn't look up terminfo entry "st-256color" #3

Closed
IvoLeist opened this issue Jul 21, 2020 · 4 comments
Closed

Comments

@IvoLeist
Copy link

IvoLeist commented Jul 21, 2020

Hello Yvee1,

first thank you for sharing that idea on reddit.
I am looking for a good terminal based flashcard application for a while already
to learn Spanish (recently moved to Barcelona).

Thus, I would love to give it a try but unfortunately your snap does not support the st terminal?

❯ hascard
hascard: setupTerm: Couldn't look up terminfo entry "st-256color"

My idea would be to trigger your app when opening a new terminal window.
Meaning I would have to solve at least one Spanish vocab / grammar question before I can use the terminal.

Best regards,
Ivo

@Yvee1
Copy link
Owner

Yvee1 commented Jul 21, 2020

Hey Ivo,
That's a great idea indeed! Regarding the issue, I actually had the same problem with the snap installation with the alacritty terminal I'm using, though it did work with other terminals. Sadly though, I do not know enough about terminfo to know how to solve that problem, I just use a package that depends on it. The good news is that with me the problem only occurred with the snap installation, so perhaps you could try another installation method and see if it works? If you have any more questions/problems feel free to ask. I will add some information about this problem in the readme.

@Yvee1 Yvee1 added the help wanted Extra attention is needed label Jul 21, 2020
@IvoLeist
Copy link
Author

IvoLeist commented Aug 8, 2020

Hey Yvee1
I finally found the time to give it another go and yes using stack everything works as expected :)

Regarding my idea I did not found the time yet to implement that.
But I let you know as soon as I have done it 🤓

@Yvee1
Copy link
Owner

Yvee1 commented Aug 8, 2020

That's nice to hear :)

For you information, since hearing your idea I implemented some command line options for shuffling and reviewing only a couple cards in a deck, which may be useful for implementing your idea.

So how I would go about it is to make one big file with all your Spanish cards, say spanish.txt, and put that in some directory like ~/Documents/spanish.txt. Then you can do
for example hascard -s -a 3 ~/Documents/spanish.txt to review 3 random cards from that file. The -s shuffles the cards, and -a 3 picks the first three of them.

You will still have to figure out how to run that command when opening a new terminal window, but maybe my explanation helps you a little!

@Yvee1
Copy link
Owner

Yvee1 commented Aug 26, 2020

I just looked into this issue a little and apparently it is a known issue with snap and terminfo. A workaround is to copy the terminfo file for your terminal from your system to the hascard snap directory.

Relevant links:
snapcrafters/mutt#2
https://forum.snapcraft.io/t/handling-of-alternative-terminfo-settings-kitty-term/19256
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1834631

I'll close this issue since it's not a problem with how I setup the snap installation

@Yvee1 Yvee1 closed this as completed Aug 26, 2020
@Yvee1 Yvee1 removed the help wanted Extra attention is needed label Aug 27, 2020
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

No branches or pull requests

2 participants