#11459: Implement sage -rst2txt and sage -rst2sws
---------------------------+------------------------------------------------
   Reporter:  slabbe       |          Owner:  slabbe      
       Type:  enhancement  |         Status:  new         
   Priority:  major        |      Milestone:  sage-4.7.1  
  Component:  notebook     |       Keywords:  sd31, days31
Work_issues:               |       Upstream:  N/A         
   Reviewer:               |         Author:              
     Merged:               |   Dependencies:              
---------------------------+------------------------------------------------
Description changed by slabbe:

Old description:

> Convert a rst file into a notebook file (text file).
>
> The idea is that in general I wrote code using the Sage Code Convention
> where examples are formatted in ReST. Then converting rst examples to the
> notebook would be nice. Also, ReST file is more fun to edit than the
> html/cells notebook text file.
>
> I implemented a script called {{{rst2notebook}}} available
> [http://combinat.sagemath.org/hgwebdir.cgi/misc/file/ef17ccb37589/notebook2rst/
> on the Sage Combinat server].
>
> In this script, I use docutils 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. But I am able to make
> math role work by adding dollar signs.
>
> I am planning to make this script more clean during
> [http://wiki.sagemath.org/days31 Sage Days 31], I hope based on sphinx
> and written as patches.
>
> Related to : #10637 (Implement sage -sws2rst) and #10652.
>
> I mentionned the idea on sage-devel in December 2010
> [http://groups.google.com/group/sage-
> devel/browse_thread/thread/5d86874cd359e1a5/eda52be07a9fb994 here].

New description:

 This ticket concerns the following :

  - Convert a ReST file into a worksheet file (txt)
  - Convert a ReST file into a Sage worksheet (sws)
  - Add the possibility to upload a .rst file from the Notebook.

 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.

 This is based on a script called {{{rst2notebook}}} available
 [http://combinat.sagemath.org/hgwebdir.cgi/misc/file/ef17ccb37589/notebook2rst/
 on the Sage Combinat server].

 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.

 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.

 Related to : #10637 (Implement sage -sws2rst) and #10652.

 I mentionned the idea on sage-devel in December 2010
 [http://groups.google.com/group/sage-
 devel/browse_thread/thread/5d86874cd359e1a5/eda52be07a9fb994 here].

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11459#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to