Changes between Version 6 and Version 9 of Ticket #11459
- Timestamp:
- 06/18/11 03:41:39 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11459
- Property Cc kini jasonbhill added
-
Ticket #11459 – Description
v6 v9 1 1 This ticket concerns the following : 2 2 3 - Convert a ReST file into a worksheet file (txt) 4 - Convert a ReST file into a Sage worksheet (sws) 5 - Add the possibility to upload a .rst file from the Notebook. 3 * Convert a ReST file into a worksheet file from the command line : `sage -rst2txt`. 4 * Convert a ReST file into a Sage worksheet from the command line : `sage -rst2sws`. 5 * Upload a ReST (.rst) file from the Notebook. 6 * Upload a .html file output from docutils rst2html on a ReST. 7 * Upload a `worksheet.html` file as those stored in the repository `~/.sage/sage_notebook.sagenb/home/admin` without having to change the extension to `.txt`. 6 8 7 9 My motivation is that in general I wrote my own code using the Sage Code Convention where examples are formatted in ReST. The possibility of converting rst syntax to a worksheet would be nice. Also, ReST file is more fun to edit than the html/cells worksheet text file. It is also more versatile as it can be used to generate a web page or S5 presentation, etc. using docutils. 8 10 9 This is based on a script called {{{rst2notebook}}} available [http://combinat.sagemath.org/hgwebdir.cgi/misc/file/ef17ccb37589/notebook2rst/ on the Sage Combinat server].11 On my web page, I created a page [http://www.thales.math.uqam.ca/~labbes/Sage/rst2sws/ rst2sws] where I put an example of ReST file. Note that I managed to use !MathJax to render the HTML output of docutils `rst2html` command. 10 12 11 The docutils is used to translate a rst file into html file. From this, I convert blocks into cells. Note that I do not use sphinx so that not all usual Sage Rest syntax is working (yet). But I am able to make math role work by adding dollar signs.13 Here is [http://code.google.com/r/slabqc-flask/ my clone of the sage-flask-notebook] where I my patch on the sage notebook will be available. 12 14 13 15 I am planning to make this script more clean during [http://wiki.sagemath.org/days31 Sage Days 31]. I will upload patches as it gets better. … … 16 18 17 19 I mentionned the idea on sage-devel in December 2010 [http://groups.google.com/group/sage-devel/browse_thread/thread/5d86874cd359e1a5/eda52be07a9fb994 here]. 20 21 This is based on a script called `rst2notebook` I wrote in January 2011 available [http://combinat.sagemath.org/hgwebdir.cgi/misc/file/ef17ccb37589/notebook2rst/ on the Sage Combinat server].