Changes between Version 6 and Version 9 of Ticket #11459


Ignore:
Timestamp:
06/18/11 03:41:39 (11 years ago)
Author:
slabbe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11459

    • Property Cc kini jasonbhill added
  • Ticket #11459 – Description

    v6 v9  
    11This ticket concerns the following :
    22
    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`.
    68
    79My 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.
    810
    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].
     11On 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.
    1012
    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.
     13Here 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.
    1214
    1315I 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.
     
    1618
    1719I mentionned the idea on sage-devel in December 2010 [http://groups.google.com/group/sage-devel/browse_thread/thread/5d86874cd359e1a5/eda52be07a9fb994 here].
     20
     21This 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].