SjoerdV / ConvertOneNote2MarkDown

Ready to make the step to Markdown and saying farewell to your OneNote, EverNote or whatever proprietary note taking tool you are using? Nothing beats clear text, right? Read on!
GNU General Public License v3.0
196 stars 113 forks source link

I modified the code to allow for section groups #10

Closed nixsee closed 3 years ago

nixsee commented 3 years ago

I don't know how to share/push this - probably don't have access. But I modified this to allow for top-level section groups, but it kills any top-level section functionality, so you'd have to move all section to a section group to use it. Quite useful for me because I really do need that extra level of hierarchy without creating a new notebook.

I made a function "ProcessSections" that gets called from within the SectionGroup For loop, with the idea that it could then be called from within another loop to process any top-level sections, but got to the edge of my capabilities...

Anyway, feel free to incorporate this however you like. ConvertOneNote2MarkDownSectionGroups.zip

@johnkyle4, you might be interested in this as well?

nixsee commented 3 years ago

And here is one that handles Section Groups as well as creates subfolders rather than prepend the name of the parent page.

The downside is that it creates a new media folder for each folder (but this already happens in the original for each section) - I tried to change it to have 1 common media folder at the root and had semi-success, but it was ultimately too broken because I couldn't figure out which lines did what with regards to image file paths etc...

Regardless of my new features, a common media folder does seem like a useful idea if you're keen for it @SjoerdV

I'm pretty impressed with myself! Haven't written a line of code in at least 7 years, and was never good to begin with... But it would take me years to make half of the original script!

ConvertOneNote2MarkDownSectionGroupsSubpageFolders.zip

SjoerdV commented 3 years ago

Hi @nixsee good stuff, my man! Might come in handy for people visiting. You could always create a fork of this repo and host your own script, I would not be offended ;-) If I have the time I will use your input to put in a 2.0 revision, but this could be a while. In the mean time I hope you got the end result you wanted, so I wish you happy Markdown-ing.

SjoerdV commented 3 years ago

6 is describing the original issue, so this one will be closed