Repository navigation
Mass import instead of single document importation #156
|
Is there a way to import notes in the form of pdf but in bulk (for example all my previous notes represent about 1500 documents and folders) it'd be kinda annoying to import. Is there a script i could run or a feature in xnotes to do that? Thanks! For example goodnotes can import from a zip file, would a similar thing be possible? |
Replies: 1 comment 1 reply
|
After a few days, i tried using qwen 3.8 27b parameters running locally on my computer, it didn't work. Tonight, i had a idea. i tried using duck.ai using the model gpt 5.6 luna in reasoning mode, giving it exactly what i wanted from the program, here is the original prompt : using this githubhttp://github.com/shardulvs/xnotes-android, can you create a script that would run on linux, and convert recursively all pdf files into the .xnote format while preserving the file placement and structure. if a pdf has a matching .xnote the script need to ignore that file and move on. the script need to start where it is placed and work from there. it will lave the original files in the same place and create a folder with the same structure with the pdf and .xnote in it. about the .xnote format, inside is a folder called assets with the pdf file in it, and a json with these informations{"format":"xnote","version":1,"writer":48,"dpi":150,"has_pdf":true,"bookmarks":[],"pages":[{"width":1275,"height":1650,"pdf_page":0,"items":[]},{"width":1275,"height":1650,"pdf_page":1,"items":[]}]} after two tests and giving it a descriptions of what was working, it gave me a script that was working. it took existing pdf files in a bunch of folders, and converted them to .xnote recursively starting where the script is placed,. It will need a template made using the app, any .xnote made using the app renamed template.xnote placed in the same folder as the script will work. The script will create a 1:1 copy of the original folder, called converted_xnotes. I recommend to make a copy of the notes you want to convert first and put it in a seperate folder with the script and the template .xnote. Of course run the script at your own risk, i'm not a developper yet and i don't claim to understand what gpt did (altough i have some basics in python and reading it gave me the confidence it was safe enough to run) I don't claim any right nor credit about this script, feel free to copy share it edit it whatever you want to do with it. I wanted to share it with whoever might be in the situation i was, migrating from another note taking app. Thanks a lot to the devloppers of xnotes, this app is awesome and i can't wait to see the progress and improvements it will have in the future. I may contribute further in my studies. Beware: if some pdf files are very large (multiple gigabytes) the script may use a lot of ram, matching that size. My mini pc with 16gb ran out of ram when i tried to do it, but my desktop with 32 did it without problems. Edit on 12/09/2026 i noticed this morning the script ignored the existing .xnote files as expected. you will need to copy them to the folder with the converted ones manually. Other than that everything worked, all my notes i took in goodnotes that are in pdf format now have its equivalent in .xnote :D |
After a few days, i tried using qwen 3.8 27b parameters running locally on my computer, it didn't work. Tonight, i had a idea. i tried using duck.ai using the model gpt 5.6 luna in reasoning mode, giving it exactly what i wanted from the program, here is the original prompt :
using this githubhttp://github.com/shardulvs/xnotes-android, can you create a script that would run on linux, and convert recursively all pdf files into the .xnote format while preserving the file placement and structure. if a pdf has a matching .xnote the script need to ignore that file and move on. the script need to start where it is placed and work from there. it will lave the original files in the same place and…