Quick fix for ubuntu docs dir.
authorjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Fri, 22 May 2009 21:16:37 +0000 (21:16 +0000)
committerjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Fri, 22 May 2009 21:16:37 +0000 (21:16 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11087 221aa14e-8319-0410-a670-987f0aec2ac5

grc/src/platforms/python/utils/extract_docs.py
grc/todo.txt

index dfc0b7e97596e15f364e5d1730962cd1ccdc7608..ac0fe59b437ad3348dc0737e16e4b63ada46a571 100644 (file)
@@ -77,15 +77,17 @@ def extract(key):
        @param key the block key
        @return a string with documentation
        """
-       #get potential xml file matches for the key
-       if os.path.exists(DOCS_DIR) and os.path.isdir(DOCS_DIR):
-               matches = filter(lambda f: is_match(key, f), os.listdir(DOCS_DIR))
-       else: matches = list()
+       UBUNTU_DOCS_DIR = '/usr/share/doc/gnuradio-doc/xml'
+       if os.path.exists(DOCS_DIR): docs_dir = DOCS_DIR
+       elif os.path.exists(UBUNTU_DOCS_DIR): docs_dir = UBUNTU_DOCS_DIR
+       else: return ''
+       #extract matches
+       matches = filter(lambda f: is_match(key, f), os.listdir(docs_dir))
        #combine all matches
        doc_strs = list()
        for match in matches:
                try:
-                       xml_file = DOCS_DIR + '/' + match
+                       xml_file = os.path.join(docs_dir, match)
                        xml = etree.parse(xml_file)
                        #extract descriptions
                        comp_name = extract_txt(xml.xpath(DOXYGEN_NAME_XPATH)[0]).strip('\n')
index 33cf58e657d607e7abb1d18ead77b87fcbe077c3..581f2f713f866103f76576b00470d48767f46245 100644 (file)
@@ -25,3 +25,4 @@
 -save/restore cwd
 -threads dont die on exit in probe and variable sink
 -overloaded gui classes for each platform, move param input objects into overloaded
+-update extract_docs.py for current doxygen setup