HackerTrans
TopNewTrendsCommentsPastAskShowJobs

kangruixiang

no profile record

Submissions

Show HN: I made Ankify that converts notes to Anki cards

ankify.krxiang.com
180 points·by kangruixiang·4 anni fa·62 comments

comments

kangruixiang
·4 anni fa·discuss
In short it doesn't let me do what I wanted. I just wanted to keep my notes as is and add cards if I need to. I don't want to change lines of notes and reformat things just to make a card.
kangruixiang
·4 anni fa·discuss
Thanks! Let me know if there's any suggestions or problems!
kangruixiang
·4 anni fa·discuss
Right now it's only one directional from note to cards. To be bidirectional I would have to interact with the database directly. Theoretically it's possible but would just take a long time to program.
kangruixiang
·4 anni fa·discuss
I think this is more for people who are already in the Anki ecosystem and use it extensively.

Anki can take a while to get used to. And there are a lot of articles/videos tutorials. I didn't think it was within the scope of my program to explain Anki cards haha.
kangruixiang
·4 anni fa·discuss
That's a really well written app. I'll look at it more. I briefly tried to work with the database but found it really confusing and would take a lot of time trying to work with
kangruixiang
·4 anni fa·discuss
I tried it before. It has very strict formatting. Meaning to make a card I have to change the way the note looks. I just want to be able to add cards quickly without messing with the format. This way my notes still flow well if I just want to read
kangruixiang
·4 anni fa·discuss
That's why I like my note taking first approach to making cards. If I just focus on making high quality notes, then the cards are automatically updated over time.
kangruixiang
·4 anni fa·discuss
Another thing that made me end up choosing Javascript is because I could define an user interface and then use it over and over.

For this project, I first defined how each component would look, then used the same UI for both the website and the app to have a coherent look: https://kangruixiang.github.io/snow-ui/
kangruixiang
·4 anni fa·discuss
I have time now :), in residency! And I should have more time as I go further in training!
kangruixiang
·4 anni fa·discuss
This is really cool as well! It's fun to see how different people have different solutions to the same problem.
kangruixiang
·4 anni fa·discuss
Yeah let me know if you have any comments or suggestions!
kangruixiang
·4 anni fa·discuss
The XML comments are just my personal preference because it's fast. I have it bound to ",," so that with 2 taps, I could make a card in a few seconds. It's also supported automatically in different markdown programs like Typora/Obsidian. When I upload to the web, the comments also disappear, so the flow of the note isn't interrupted if I just want to read. For example, when you can look at my personal wiki here, you wouldn't know these are cards unless you see the original markdown files. https://kangruixiang.github.io/wiki/

You can also use anything else instead. In my example, you could use {{}} as the front of the card instead of comments. I just chose comments myself.
kangruixiang
·4 anni fa·discuss
this is really cool. Does the cards get automatically added to the Anki database? What do you do if you want to add to different decks?
kangruixiang
·4 anni fa·discuss
Definitely, thank you. Ankify really was present in every step of me learning programming.

I think I just got caught at a bad time with Python. It was a few years ago, and Python was in the process of going from 2 to 3. Consequently, a lot of the things I tried ended up throwing error messages.

I tried few of Python's GUI makers but found that I end up having to learn so many new things that only apply to that one GUI program. Where as with Electron, I'm really using HTML/CSS/tailwind that I use every where else. I could essentially make Ankify web only and it would make minimal difference to the UI.

I was fond of PyAutoGUI. It seemed very intuitive for me at the time.
kangruixiang
·4 anni fa·discuss
Yes, Ankify adds an ID to the front of the card so that on re-import, cards are updated instead of re-added. I'm careful about making changes to the MD file. The ID are only added to the front of the card so that the content of the notes are minimally changed.

See more here: https://ankify.krxiang.com/docs/basic
kangruixiang
·4 anni fa·discuss
I agree with "automate the boring stuff with python." It's actually the first book I used to learn Python.

I think it would be good if you learn it prior to going in. You just won't have time to do any programming learning in med school. Med school is more than a full time job by itself.
kangruixiang
·4 anni fa·discuss
I actually looked into Mochi as well. I really like the ability to make edits inside the program. For me though, I like having my notes in markdown files so I could move it to places, upload to websites, etc.
kangruixiang
·4 anni fa·discuss
I've looked into Anki generating packages before. The problem I run into is that you have to specify the ID for the deck that might be different for different people. Especially if they want to import into existing deck. Then you'll have to figure out how to pull the deck information out of the database first and then import cards into it.

The current Ankify already adds ID for the cards so it'll update the contents on each conversion. The only problem is if you delete a card, you'll have to manually do that in Anki.
kangruixiang
·4 anni fa·discuss
In the future for Linux yeah. I don't think it'll be too much harder. I just need to make sure the directories are done correctly.
kangruixiang
·4 anni fa·discuss
Yeah unfortunately this would only work on desktop. But you could make the cards on desktop and then sync to mobile.