#10351: Fix the way sage/misc/sagedoc.py reads doc/common/builder.py
------------------------------+---------------------------------------------
   Reporter:  jdemeyer        |       Owner:  mvngu     
       Type:  defect          |      Status:  new       
   Priority:  major           |   Milestone:  sage-4.6.1
  Component:  documentation   |    Keywords:            
     Author:  Jeroen Demeyer  |    Upstream:  N/A       
   Reviewer:                  |      Merged:            
Work_issues:                  |  
------------------------------+---------------------------------------------
 The following code from {{{sage/misc/sagedoc.py}}} is horrible:
 {{{
         # check if any documentation is missing.  first read the start
         # of SAGE_ROOT/devel/sage/doc/common/builder.py to find list
         # of languages, documents, and documents to omit
         doc_path = os.path.join(ROOT, 'devel', 'sage', 'doc')
         builder = open(os.path.join(doc_path, 'common', 'builder.py'))
         s = builder.read()[:1000]
         builder.close()
         # list of languages
         lang = []
         idx = s.find("LANGUAGES")
         if idx != -1:
             start = s[idx:].find('[')
             end =  s[idx:].find(']')
             if start != -1 and end != -1:
                 lang = s[idx+start+1:idx+end].translate(None, "'\"
 ").split(",")
         # documents in SAGE_ROOT/devel/sage/doc/LANG/ to omit
         omit = []
         idx = s.find("OMIT")
         if idx != -1:
             start = s[idx:].find('[')
             end =  s[idx:].find(']')
             if start != -1 and end != -1:
                 omit = s[idx+start+1:idx+end].translate(None, "'\"
 ").split(",")
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10351>
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