We wrap all the functionality of the tools built in the `mediumapi` and the `convert` modules to upload the rendered markdown document to Medium
first_article = nb2medium(title = 'First test',
notebook = '../samples/test-notebook.ipynb')
nb2medium can both be used from python or as a CLI thanks to the amazing @call_parse
decorator developed by fastcore. You can use nb2medium
from the command line in the following way
!nb2medium --help
Both the title
and notebook
arguments are positional and hence you need to pass them in order in addition to that if your title
contains any spaces you will need to put it between double or single quotes.
%%sh
nb2medium "My really cool article" ../samples/test-gist-output-df.ipynb
Note: I am using the %%sh
and the shebang !
magic to emulate what you would usually run from bash, zshell or your preferred shell