[IPython-dev] Where to look: extending Markdown, and including NB in other webpages
Stian HĂ„klev
shaklev at gmail.com
Sat Jan 12 16:56:46 EST 2013
Hi. I'm coming from the Ruby world, but have been blown away by IPython and
Notebook, as well as the incredible support for scientific computing,
statistics etc. I'm a PhD student in education, and have decided to try to
use IPython for my statistical analysis, instead of SPSS etc. Also very
interested in open scholarship/reproducible research etc.
I've been working on an "open scholar" workflow, using Ruby+AppScript to
integrate a citation manager, PDF reader, and Dokuwiki into a pretty neat
system (see http://reganmian.net/wiki/researchr:start). I'm currently
thinking about how to integrate IPython with my workflow. I have two ideas,
and in both cases, I'd love a little pointer as to where to look (I realize
I'll have to dig through some code, and learn more Python, to get there).
1. How easy is it to write a "plugin" for the Markdown parser? In my wiki,
[@citekey] is replaced with a proper citation, with a link to the relevant
article page etc. I also wrote a plugin for Wordpress to do the same (they
get the info from a pre-processed JSON file). For WordPress this is as easy
as a small php file with a regexp. How would I do some similar
"post-processing" on Markdown cells?
2. A more ambitious idea would be to try to integrate Notebook with
Dokuwiki. My idea would be to have a php plugin which started an IPython
instance, and then sent each code block on the page to the server, and got
back output, which was written to the page (which is then cached, so it
doesn't have to be re-run until the page changes).
I was thinking of having a markup like
<IPython>plot(x,y)</IPython> - possibly also with the option of hiding the
Python code and only showing the output (this would make it more similar to
knitr), or also showing the color highlighted Python code...
I'm not sure how easy this would be - I need to understand more about how
to start and communicate with an IPython kernel, and what exactly it sends
back (ie. how much of the HTML processing etc gets done in Notebook, as
opposed to in the kernel, etc). Has anyone else tried to do something
similar?
Again, pointers to where I should start to look would be useful! I will of
course share anything I come up with!
Thanks again for an amazing project. I look forward to the first Coursera
course (or similar) using IPython and Numpy+Scipy+Pandas instead of R (I am
thinking of trying to take one of the courses, and doing all the exercises
in IPython instead).
Stian Haklev
Curriculum, Teaching and Learning, University of Toronto
--
http://reganmian.net/blog -- Random Stuff that Matters
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130112/6bef69da/attachment.html>
More information about the IPython-dev
mailing list