#10637: Implement sage -sws2rst
------------------------------------------------------------+---------------
       Reporter:  nthiery                                   |         Owner:  
jason, mpatel, was                                                              
                                             
           Type:  enhancement                               |        Status:  
positive_review                                                                 
                                             
       Priority:  major                                     |     Milestone:  
sage-5.9                                                                        
                                             
      Component:  notebook                                  |    Resolution:    
                                                                                
                                           
       Keywords:  ReST, worksheet                           |   Work issues:    
                                                                                
                                           
Report Upstream:  Workaround found; Bug reported upstream.  |     Reviewers:  
Nicolas Thiéry, Jason Grout, Karl-Dieter Crisman, Jason Bandlow, John Palmieri, 
Simon King, Karl-Dieter Crisman, Pablo Angulo
        Authors:  Pablo Angulo, Karl-Dieter Crisman         |     Merged in:    
                                                                                
                                           
   Dependencies:                                            |      Stopgaps:    
                                                                                
                                           
------------------------------------------------------------+---------------
Changes (by kcrisman):

  * status:  needs_review => positive_review
  * reviewer:  Nicolas Thiéry, Jason Grout, Karl-Dieter Crisman, Jason
               Bandlow, John Palmieri, Simon King => Nicolas
               Thiéry, Jason Grout, Karl-Dieter Crisman,
               Jason Bandlow, John Palmieri, Simon King,
               Karl-Dieter Crisman, Pablo Angulo


Old description:

> Implement:
>
> {{{
>     sage -sws2rst bla.sws bli.sws ...
> }}}
>
> which given worksheets
>
> {{{bla.sws, bli.sws, ...}}} would create ReST files {{{bla.rst, bli.rst,
> ...}}} together with media directories:
>
> {{{
> media/bla/
> media/bla/data/
> media/bla/7/sage0.png
> ...
> media/bli/
> ...
> }}}
>
> The proposed implementation adds a script
> {{{local/bin/sage-sws2rst}}}, edits {{{spkg/bin/sage}}} to add
> the sws2rst option, and add some libraries in
> {{{sagenb-main/sagenb/notebook/}}}. It further depends on the
> !BeautifulSoup Python library (released under Python's license).
>
> The script builds the ReST file from the worksheet.html file included in
> the .sws as follow:
>
>  - Preparsing to handle the input / output fields
>  - Parsing of the resulting html using !BeautifulSoup
>  - Manipulation on the obtained tree
>
> Suggestions for better file layout or implementation welcome!
>
> == Install instructions ==
>
>  * Install the beautifulsoup spkg
> [http://sage.math.washington.edu/home/kcrisman/beautifulsoup-3.2.1.spkg
> here].  (To release manager: this would need to be moved to the optional
> spkg directory.)
>  * Apply [attachment:trac_10637-root.patch] to the root repository
>  * Apply [attachment:trac_10637-scripts.patch] and [attachment:trac_10637
> -scripts-docsandmore.patch] to the scripts repository
>
>  * Apply [attachment:tools_sws2rst_4.patch], [attachment:trac_10637
> -sagenb-reviewer.patch],
> [attachment:trac_10637_answer_to_kcrisman.patch], and
> [attachment:trac_10637-second-review.patch] to sagenb, possibly followed
> by
> {{{
>     sage -python setup.py install && sage -python setup.py develop
> }}}

New description:

 Implement:

 {{{
     sage -sws2rst bla.sws bli.sws ...
 }}}

 which given worksheets

 {{{bla.sws, bli.sws, ...}}} would create ReST files {{{bla.rst, bli.rst,
 ...}}} together with media directories:

 {{{
 media/bla/
 media/bla/data/
 media/bla/7/sage0.png
 ...
 media/bli/
 ...
 }}}

 The proposed implementation adds a script
 {{{local/bin/sage-sws2rst}}}, edits {{{spkg/bin/sage}}} to add
 the sws2rst option, and add some libraries in
 {{{sagenb-main/sagenb/notebook/}}}. It further depends on the
 !BeautifulSoup Python library (released under Python's license).

 The script builds the ReST file from the worksheet.html file included in
 the .sws as follow:

  - Preparsing to handle the input / output fields
  - Parsing of the resulting html using !BeautifulSoup
  - Manipulation on the obtained tree

 Suggestions for better file layout or implementation welcome!

 == Install instructions ==

  * Install the beautifulsoup spkg
 [http://sage.math.washington.edu/home/kcrisman/beautifulsoup-3.2.1.spkg
 here].
  * Apply [attachment:trac_10637-root.patch] to the root repository
  * Apply [attachment:trac_10637-scripts.patch] and [attachment:trac_10637
 -scripts-docsandmore.patch] to the scripts repository

  * Apply [attachment:tools_sws2rst_4.patch], [attachment:trac_10637
 -sagenb-reviewer.patch], [attachment:trac_10637_answer_to_kcrisman.patch],
 and [attachment:trac_10637-second-review.patch] to sagenb, possibly
 followed by
 {{{
     sage -python setup.py install && sage -python setup.py develop
 }}}

 == Release Manager Instructions ==
  * Add beautiful soup to the optional spkg directory
  * Apply [attachment:trac_10637-root.patch] to the root repository
  * Apply [attachment:trac_10637-scripts.patch] and [attachment:trac_10637
 -scripts-docsandmore.patch] to the scripts repository
  * Merge with [https://groups.google.com/forum/?fromgroups=#!topic/sage-
 notebook/oHcBEL7_vLA sagenb 0.10.6] (no ticket as yet)

--

Comment:

 Thanks so much!

 Jeroen, I'm setting this to positive review, but please ask for a fix on
 the root repo patch if that is not the new way these scripts are called.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10637#comment:133>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to