I really enjoyed how you took a real world problem and made a solution for it. Automation is one of the coolest things that coding can do and you showed a fairly simple idea and made it into something useful. Good job!
Thanks much Jake. I am in the same boat as you. Correction! Smaller boat and a lot more smellier. I am a veterinary neurology and neurosurgery resident with a wife, kids, in-laws, and a dog. ;), This is really helping. I have to take general IM boards first and this helps with all the cardio, entero, and other smelly and necessary headaches. My sincere thanks.
This deserves way more views. Super motivated by this video to try and learn not only how to code a bit, but to also learn more efficiently. Wish you all the best in your endeavors 🙏
Wow thank you for the inspiration and hints - i just created a tool. It takes the standard powerpoint-pdfs of my prof. It finds adobe acrobat, then saves the heading as a picture and the content, then flips to the next page, rinse repeat - then writes it into a csv that anki can use. i got some more tweaking to do but im already very happy. Getting 500 slides into anki already makes me super happy
@@Sallau_Jr download python. then tell chat gpt kind of: i need python code for a program that turns a pdf into anki cards. first it should bring adobe acrobat to the front. then take one screenshot of the header that will serve as question and one screen shot of another area that i will define that will contain the answer. write question and answer in a csv file that anki can import. then simulate a page_down press and repeat everthing till the last page of the pdf.
@@pedroewert143 Hello. I am having issues with the question, I need your help. Can you please break it down, I have downloaded everything and I have generated the code from Chat Gpt. But my issue is " question text is not define " did you mean question file ?? Can you please help
@@Sallau_Jr it should create question1.jpg and answer1.jpg in a folder and in an excel file have the filepath for both, then anki should be able to import it
Super inspiring. Im a 3rd year medical student from germany and wanted to let you know that your videos have been very helpful with elevating my chatgpt usage for medical school. now i might have to get into python too goddamn...haha
00:18 Automatically importing images into flashcards using HTML links can save significant time. 02:04 Challenges faced in converting textbook to Anki flashcards 03:55 Creating an app to extract images and text from a PDF textbook for Anki flashcards 05:43 Challenges faced in turning textbook into Anki flashcards 07:18 Automated image counting and image organization for Anki flashcards 08:49 Successfully converted textbook into Anki flashcards 10:25 Challenges in turning textbooks into Anki flashcards 12:11 Developed a common format for easier processing Crafted by Merlin AI.
Sure! I've got something planned, but I'm not so sure how granular to make it. My cards look the way they do because I customize them with CSS and HTML. But I use chatGPT to do most of it. Are you familiar with customizing your anki note templates (colors, fonts, fields, etc)? Or would you need a video that's starts with the basics of flashcard templates?
@@JakeRommMD I'm a little familiar with it, but for the channel I think it would be helpful to show from the start. I would love to learn and see your process.
You need to check out the AnKore deck. You can get it on AnkiHub. It's based on Core and has like 30k cards. A bit overkill if you ask me, but it has every single thing from Core in it. The decks I made aren't from Core, that's just the picture I used in the thumbnail.
I love this you did all of this, but how is this less effort than just reading this cases for understanding and snipping the images to create a card while you do your first pass?
It was a lot of work up front for the first book. But I was then able to process the next 11 books with the same scripts with minimal tweaks. So I converted over 2100 cases into flashcards that contained over 4500 images without having to manually copy any text or snip any images. Then I adjusted these scripts to process another series of case books and did another 7 books and added about 1300 more cases to the deck. And that second series only took me 1 hour of actual work and most of that was spent quickly screening for errors. Manually making cards is a great way to learn if you have the time. But this project would've been potentially hundreds of hours worth of manual clicks. And I just didn't have that kind of time.
I'll be making a video about my process for creating anki elements like the drop-down boxes soon...but the short answer is I have ChatGPT code them and I test them out and tweak them as needed to get them to work.
Small, hopefully not so dumb question After making the flashcards, now what? Should I study them immediately or read the textbook first? Or both maybe?
Up to you! I prefer to read the chapter first and then do the flashcards right after to review the concepts. Some people just do the flashcards and don't read, but sometimes the flashcards feel "out context" when I do that.
The thumbnail is a little bit of false advertising I'm afraid. The flashcards are from the Case Review Series. I worked on automating flashcards from Core, but I need more time to explore AI models that are more capable than GPT with an API. I can't share the deck as it contains over 5k copyrighted images. But I can share how I did it. Which is coming after I finish get through done with nights.
I don't think it would work on handwritten text. But I think it should be able to extract the images. Thomas Frank (@ThomasFrankExplains) has been using GPT-4 Vision to convert handwritten notes into Notion notes. Something like this would make your text easier to extract. He's working on a tutorial for this now. Alternatively, you could use something like PyTesseract and have GPT-4 built the script for you.
I literally just made a comment to figure out how to do this while I’m in my nursing program and eventually graduate school! I’d like to do this exact same thing! Are you willing to share the code you’ve written?
I'd be happy to! I cant give up the whole project because I'm afraid Elsevier will come after me for encouraging people to rip off their intellectual property. But maybe I can make a guide with some of the important pieces of code so you can see how I do it.
@@JakeRommMD that would be amazing!! Anything you could do would be more than appreciated. I will 100% stay subscribed and wait for you to drop it or we can connect off of here. Plus, to avoid anyone coming after you, you could always just use a copyright free book as an example in your video, point out the differences between what someone “might do” with a college textbook? Not 100% sure if that would work but not a bad place to start. Keep up the amazing work 🔥
No. ChatGPT can't do that in any version. I used ChatGPT to write a Python script using the PyMuPDF library to extract the images. And the free version of ChatGPT can do that for you. You just need a simple code editor to run the scripts. Mu is a beginner friendly IDE. It's what I used for this project.
The app is useless unless you are using the specific books I was using. Because it uses simple Python scripts and doesn't incorporate any LLMs, so it's very inflexible. But I'm slowly breaking down the process for people who want to do what I did into bite sized tutorials.
Well, all you need is access to ChatGPT and a clear idea of what you want your script to do. ChatGPT can guide you through each step of the process. That's essentially how I did what I did. It's going to take a lot of problem solving no matter what you try to build, and I won't be able to prepare you for all the potential issues. Each textbook I've added to this project so far has had its own unique issues to work through. Is there a specific part of the process you have questions about?
I have extracted all the text and images using python, ptesseract . I don't know how to create that Jason file to link images and the part where you talked about javascript . I have also realised these things are not easy as it seems sometimes things are more complex as you drive in if you are a noob . I think I will follow your previous method of copying text to gpt and then the output to excel. By the way thanks for all your videos they have helped me.
Ah yes. I didn't use ptesseract, so I'm not sure if it would work exactly the same. But the key to making this work for my script was the fact that my textbook was a case book. So there was very consistent formatting which I could target with regular expressions to segment the cases. This made it very clear which images belonged to each case. So all I had to do was ask GPT to adjust the script so that it would count how many images were in each case and save those numbers to a JSON file. Then, in a separate script, the exact number of html links for each case were created using the counts from that JSON file and by using the consistent image naming convention i created. In order for this to work you need the following: - a predictable pattern in the way images are presented - a way to organize and name images (either by using textual context from your PDF or by relying on a numerical cataloging system you create yourself) There are an infinite possible solutions to this issue, but this is what I did. Since you gave me your email, I can send you this portion of my script and you can have ChatGPT explain it to you, but I don't think it will help you because your PDF is formatted differently than mine. Alternatively, if you don't have time to mess with a python script, you can just manually feed your text to GPT and have it create cards for you. You can still include html image links in your excel sheet and import them with your cards if you know which images go with each card.
I totally agree with you that my pdf is very different from yours so your script won't work for me. I would have worked on python script but I'm running short of time to experiment as exams are very near so I will stick to the old pattern of feeding text to gpt and your new advice of linking html image links. Thank you so much Jake...!!!
I will! I'll put it up on my website and put the link in the description. I just worry that people won't be able to get it to work because of how segmented the workflow is...but I'll post it for those interested in seeing how it works.
Bro if you figure out how to generalize this to other textbooks I'm going to start a petition to give you the Nobel Prize
😂
regex is a hack, is probably impossible
@@jorios550 I made this comment a long time ago. What is regex?
I aso vote for the Nobel in Anki!😂
I'll be waiting for this app. Keep up the good work!
I really enjoyed how you took a real world problem and made a solution for it.
Automation is one of the coolest things that coding can do and you showed a fairly simple idea and made it into something useful. Good job!
this is what i needddd, i found way to add image to field through html like this some days, but no one describe that, but i found you.
Thanks much Jake. I am in the same boat as you. Correction! Smaller boat and a lot more smellier. I am a veterinary neurology and neurosurgery resident with a wife, kids, in-laws, and a dog. ;), This is really helping. I have to take general IM boards first and this helps with all the cardio, entero, and other smelly and necessary headaches. My sincere thanks.
This deserves way more views. Super motivated by this video to try and learn not only how to code a bit, but to also learn more efficiently. Wish you all the best in your endeavors 🙏
Omg game changer again! Love you dude. Sorry that I didn't write the email last time
great video thanks. I think it’ll probably come in handy later
Wow thank you for the inspiration and hints - i just created a tool. It takes the standard powerpoint-pdfs of my prof. It finds adobe acrobat, then saves the heading as a picture and the content, then flips to the next page, rinse repeat - then writes it into a csv that anki can use. i got some more tweaking to do but im already very happy. Getting 500 slides into anki already makes me super happy
Hello. Can you please explain this method
@@Sallau_Jr download python. then tell chat gpt kind of:
i need python code for a program that turns a pdf into anki cards.
first it should bring adobe acrobat to the front. then take one screenshot of the header that will serve as question and one screen shot of another area that i will define that will contain the answer. write question and answer in a csv file that anki can import. then simulate a page_down press and repeat everthing till the last page of the pdf.
@@pedroewert143 Thank you
@@pedroewert143 Hello. I am having issues with the question, I need your help. Can you please break it down, I have downloaded everything and I have generated the code from Chat Gpt. But my issue is " question text is not define " did you mean question file ?? Can you please help
@@Sallau_Jr it should create question1.jpg and answer1.jpg in a folder and in an excel file have the filepath for both, then anki should be able to import it
Extremely impressive! Great work
Oh woah, this is fun to learn that there is someone else who is doing the same thing as I do. lol, this is super entertaining to watching!
Same thing here, what is fascinating is also I'm a newbie, I made a tuning script for each textbook because the layout and formatting are different
Super inspiring. Im a 3rd year medical student from germany and wanted to let you know that your videos have been very helpful with elevating my chatgpt usage for medical school. now i might have to get into python too goddamn...haha
Awesome! I know, now I'm hooked and I can't stop tinkering with coding projects. It's very addicting lol.
00:18 Automatically importing images into flashcards using HTML links can save significant time.
02:04 Challenges faced in converting textbook to Anki flashcards
03:55 Creating an app to extract images and text from a PDF textbook for Anki flashcards
05:43 Challenges faced in turning textbook into Anki flashcards
07:18 Automated image counting and image organization for Anki flashcards
08:49 Successfully converted textbook into Anki flashcards
10:25 Challenges in turning textbooks into Anki flashcards
12:11 Developed a common format for easier processing
Crafted by Merlin AI.
very cool and inspirational! great work. Projects are really the only way how to learn anything
Completely agree!
oms 1 here, you are really doing gods work😭✊✊
You make ChatGPT to e=another level, you did something you don't know, i like your job, pls make more videos
omg that would save me so much time
You are such a genius
Could you make a detailed video...how everything has to be done
Jake you're awesome, can you also make a video on your anki settings and how you get your anki to look the way that it does?
Sure! I've got something planned, but I'm not so sure how granular to make it. My cards look the way they do because I customize them with CSS and HTML. But I use chatGPT to do most of it.
Are you familiar with customizing your anki note templates (colors, fonts, fields, etc)? Or would you need a video that's starts with the basics of flashcard templates?
@@JakeRommMD I'm a little familiar with it, but for the channel I think it would be helpful to show from the start. I would love to learn and see your process.
I have the same idea so i started to learn python. Damn. Thanks man
Nice! How is it going so far? I need to actually learn python. It's so frustrating trying to make changes to scripts without understanding the basics.
Cool project and very entertaining video!
Thanks!
Can we use that project?
keep us posted
You're a genius👍
I enjoyed the whole process❤🎉
Hey man, awesome stuff. I’m a radiology resident in Cambridge UK. Any chance you could share the core radiology Anki deck?
You need to check out the AnKore deck. You can get it on AnkiHub. It's based on Core and has like 30k cards. A bit overkill if you ask me, but it has every single thing from Core in it.
The decks I made aren't from Core, that's just the picture I used in the thumbnail.
I love this you did all of this, but how is this less effort than just reading this cases for understanding and snipping the images to create a card while you do your first pass?
It was a lot of work up front for the first book. But I was then able to process the next 11 books with the same scripts with minimal tweaks. So I converted over 2100 cases into flashcards that contained over 4500 images without having to manually copy any text or snip any images. Then I adjusted these scripts to process another series of case books and did another 7 books and added about 1300 more cases to the deck. And that second series only took me 1 hour of actual work and most of that was spent quickly screening for errors.
Manually making cards is a great way to learn if you have the time. But this project would've been potentially hundreds of hours worth of manual clicks. And I just didn't have that kind of time.
Hi there! How did you create the drop down question and answers on the back of the cards? Thanks for your video!
I'll be making a video about my process for creating anki elements like the drop-down boxes soon...but the short answer is I have ChatGPT code them and I test them out and tweak them as needed to get them to work.
big brain guy
Small, hopefully not so dumb question
After making the flashcards, now what? Should I study them immediately or read the textbook first? Or both maybe?
Up to you! I prefer to read the chapter first and then do the flashcards right after to review the concepts.
Some people just do the flashcards and don't read, but sometimes the flashcards feel "out context" when I do that.
Wish you luck
it is possible to have the core radiology flashcards?? 'm a radiology resident and I'll have the exam with cases soon. Thank you!
The thumbnail is a little bit of false advertising I'm afraid. The flashcards are from the Case Review Series. I worked on automating flashcards from Core, but I need more time to explore AI models that are more capable than GPT with an API.
I can't share the deck as it contains over 5k copyrighted images. But I can share how I did it. Which is coming after I finish get through done with nights.
Awesome video!
Is there anyway we can convert the handwritten text by python ocr to normal text and then make flashcard?
Yes, this would be possible using an OCR library.
Can we use this for a handwritten pdf which contains a lot of histopathology images, tables and flowcharts. ???
I don't think it would work on handwritten text. But I think it should be able to extract the images.
Thomas Frank (@ThomasFrankExplains) has been using GPT-4 Vision to convert handwritten notes into Notion notes. Something like this would make your text easier to extract. He's working on a tutorial for this now.
Alternatively, you could use something like PyTesseract and have GPT-4 built the script for you.
Wow
Thank you so kuch
I literally just made a comment to figure out how to do this while I’m in my nursing program and eventually graduate school! I’d like to do this exact same thing! Are you willing to share the code you’ve written?
I'd be happy to! I cant give up the whole project because I'm afraid Elsevier will come after me for encouraging people to rip off their intellectual property. But maybe I can make a guide with some of the important pieces of code so you can see how I do it.
@@JakeRommMD that would be amazing!! Anything you could do would be more than appreciated. I will 100% stay subscribed and wait for you to drop it or we can connect off of here. Plus, to avoid anyone coming after you, you could always just use a copyright free book as an example in your video, point out the differences between what someone “might do” with a college textbook? Not 100% sure if that would work but not a bad place to start. Keep up the amazing work 🔥
Can we extract images from chat gpt in free app also?
No. ChatGPT can't do that in any version.
I used ChatGPT to write a Python script using the PyMuPDF library to extract the images. And the free version of ChatGPT can do that for you. You just need a simple code editor to run the scripts. Mu is a beginner friendly IDE. It's what I used for this project.
Can you share the app
The app is useless unless you are using the specific books I was using. Because it uses simple Python scripts and doesn't incorporate any LLMs, so it's very inflexible. But I'm slowly breaking down the process for people who want to do what I did into bite sized tutorials.
@@JakeRommMDok sir
Hi Jake...I have signed in from your email , i wanted to know who did you do this... hope you share it sooner I have a exam coming in 2 months 😢
Well, all you need is access to ChatGPT and a clear idea of what you want your script to do. ChatGPT can guide you through each step of the process. That's essentially how I did what I did.
It's going to take a lot of problem solving no matter what you try to build, and I won't be able to prepare you for all the potential issues. Each textbook I've added to this project so far has had its own unique issues to work through.
Is there a specific part of the process you have questions about?
I have extracted all the text and images using python, ptesseract . I don't know how to create that Jason file to link images and the part where you talked about javascript . I have also realised these things are not easy as it seems sometimes things are more complex as you drive in if you are a noob . I think I will follow your previous method of copying text to gpt and then the output to excel. By the way thanks for all your videos they have helped me.
Ah yes. I didn't use ptesseract, so I'm not sure if it would work exactly the same. But the key to making this work for my script was the fact that my textbook was a case book. So there was very consistent formatting which I could target with regular expressions to segment the cases.
This made it very clear which images belonged to each case. So all I had to do was ask GPT to adjust the script so that it would count how many images were in each case and save those numbers to a JSON file. Then, in a separate script, the exact number of html links for each case were created using the counts from that JSON file and by using the consistent image naming convention i created.
In order for this to work you need the following:
- a predictable pattern in the way images are presented
- a way to organize and name images (either by using textual context from your PDF or by relying on a numerical cataloging system you create yourself)
There are an infinite possible solutions to this issue, but this is what I did. Since you gave me your email, I can send you this portion of my script and you can have ChatGPT explain it to you, but I don't think it will help you because your PDF is formatted differently than mine.
Alternatively, if you don't have time to mess with a python script, you can just manually feed your text to GPT and have it create cards for you. You can still include html image links in your excel sheet and import them with your cards if you know which images go with each card.
I totally agree with you that my pdf is very different from yours so your script won't work for me.
I would have worked on python script but I'm running short of time to experiment as exams are very near so I will stick to the old pattern of feeding text to gpt and your new advice of linking html image links.
Thank you so much Jake...!!!
TAKE MY MONEY
🌚
Kok
P R O M O S M
You need to share this script with us 🥹
I will! I'll put it up on my website and put the link in the description. I just worry that people won't be able to get it to work because of how segmented the workflow is...but I'll post it for those interested in seeing how it works.
@@JakeRommMD Gladly waiting for it 🫱🏿🫲🏽