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

I modified the code to allow for section groups #10

Closed
nixsee opened this issue Jul 10, 2020 · 3 comments
Closed

I modified the code to allow for section groups #10

nixsee opened this issue Jul 10, 2020 · 3 comments
Labels
enhancement New feature or request own submision

Comments

@nixsee
Copy link

nixsee commented Jul 10, 2020

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
Copy link
Author

nixsee commented Jul 11, 2020

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

@nixsee nixsee mentioned this issue Jul 11, 2020
@SjoerdV SjoerdV added the enhancement New feature or request label Jul 13, 2020
@SjoerdV
Copy link
Owner

SjoerdV commented Jul 13, 2020

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
Copy link
Owner

SjoerdV commented Jul 13, 2020

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

@SjoerdV SjoerdV closed this as completed Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request own submision
Projects
None yet
Development

No branches or pull requests

2 participants