I guess it isn't in TODO list of Jupyter team, but I'd like to have possibility to export/publish my Jupyter Notebooks to Medium (https://medium.com/). It is quite a popular platform among users of Jupyter and I think I could write appropriate custom exporter for nbconvert. But I'd like to know in advance:
1) is there any other attempt in this way? Maybe some already useful I'd like to use them
2) whether anyone else need similar exporter?
I would definitely appreciate this feature. The only thing out there I found was the advice to post the whole notebook as gist:
https://medium.com/plata/posting-jupyter-notebooks-in-medium-19c49847e7fb
That's not ideal, because people can't comment on the specific paragraphs. A direct exporter to medium would be much better.
@rabernat Thanks for the hint! Another problem with gist injection which I've found - it adds vertical scrollbar from right side, what looks ugly. But sure, with an iframe which they are using there is no way around of scroll bar.
Anyway I see some interest from you guys which has motivated me and I have slowly started experiment with medium api to support jupyter publishing. As I see right now It would be quite a complex issue, because jupyter notebook is much more expressive than medium. So very soon I'd like to get helps.
I will drop here a link to the github project once I will be able to write down the list of issues to do. But don't think it will be early than 馃巹 :)
I just had a look at the medium API:
https://github.com/Medium/medium-api-docs/blob/master/README.md#33-posts
It鈥檚 possible to create posts from either markdown or html formatted text. Nbconvert already has exporters for both. So it should be quite simple to plug medium鈥檚 api into nbconvert.
@hyzhak, let me know when you have a project repo started. I鈥檇 be happy to help contribute.
@rabernat Yes, thanks! I still haven't returned from Christmas journey yet and will be home at the end of the next week. But I've already tried to publish markdown and HTML to medium API and should note that it is very restricted. I think to put all I have found to my blog at the end of next week.
A thing we have been toying about with for some time is a big-tent nbpublish. I had previously worked on nbanacondacloud, which uses _another_ package, anaconda_client to push up to anaconda.org, and a number of other ones for gists, etc.
Then there's nikola's integration, which handles a larger scope of things.
To this, add medium, as well as ghost, twitter, facebook, make-a-new-mybinderable-repo, speakerdeck, slid.es, etc. as targets, and indeed, one could imagine a publisher wanting to blast all of them _and_ have crosslinks between them.
At the GUI level, it would be great to unify all of these under a consistent File -> Publish -> New Publication activity, which captured the capabilities of the underlying CLI-level things that actually handle important stuff (like auth) as well as the configuration of an (couple) nbconvert pipelines as a data file, i.e. my-blog.nbpublish.json which could then be reused in the GUI, or in a CLI.
Anyhow, just some thought on previous trips down this road... interested to see what you come up with!
I created the package jupyter_to_medium to automate the publishing of jupyter notebooks as Medium blog posts.
That's a really awesome project @tdpetrou ! I think a lot of people will benefit from that as it evolves. Is the code base at a maturity level that you'd feel comfortable with nbconvert referencing it from a How-To or Extensions section?
@MSeal Thanks! Yes, it's fairly stable at the moment, and works for all OSes. It should be able to save people lots of time, so I think it would be valuable to add to a list of extensions.
Would you be open to adding an entry in our docs as a PR? You might write the instructions better than me, and it's always nice to get new commiters in the project :)
Yes! Thanks for the opportunity. Do you mind linking the exact repo?
No go ahead and add links. I think it's good for projects to point to recommended adjacent projects for specific usecases.
I've been thinking about postprocessors recently, and after some thought, this would probably be better served as a writer and not a postprocessor, but either could be done. Just a thought.
Most helpful comment
I would definitely appreciate this feature. The only thing out there I found was the advice to post the whole notebook as gist:
https://medium.com/plata/posting-jupyter-notebooks-in-medium-19c49847e7fb
That's not ideal, because people can't comment on the specific paragraphs. A direct exporter to medium would be much better.