dexplo / jupyter_to_medium

Python package for publishing Jupyter Notebooks as Medium blogposts
https://dexplo.org/jupyter_to_medium
MIT License
147 stars 14 forks source link

will add a preprocessor here (ready to merge) #31

Open martinlarsalbert opened 3 years ago

martinlarsalbert commented 3 years ago

Will add a preprocessor that enables (removing-pieces-of-cells-using-cell-tags)[https://nbconvert.readthedocs.io/en/latest/removing_cells.html#removing-pieces-of-cells-using-cell-tags]. fixes #30

martinlarsalbert commented 3 years ago

I've now tested this feature and it seems to be working. I think that this is usefull feature, that is now ready for merge.

mjam03 commented 3 years ago

Hi Martin,

Sorry for the delay in response. Ted's let me help with contributing to the repo and I've just started going through the issues. I love the idea of some way to customise which code shows and which code doesn't, particularly when you've just a big long block that is required but doesn't add anything to a medium article.

I had a similar issue where the medium code highlighting is terrible so I added an option to 'gistify' code blocks so that they automatically get linted gists created and entered in the article.

Given that I've merged that pull request (which means this one needs updated), I'll do the work to pull this branch down and update it.

Obviously everyone writes different articles with different content - I'm not sure by default omitting all code blocks is something we want. Would you be happy with something along the lines of the following implementation that would show up in the html form for configuration:

What do you think? I think there is then one missing piece which is 'total flexibility' i.e. the ability to determine for every code block:

but I think the above setup would be a nice middle ground given that everyone uses this for various uses - some are more code heavy articles compared to more articles where the code is used to generate images more.

Mark