diff options
author | jblum | 2009-05-22 21:16:37 +0000 |
---|---|---|
committer | jblum | 2009-05-22 21:16:37 +0000 |
commit | c6935bf1775ae73edf525376b79aeafc05f673b1 (patch) | |
tree | 4565fdbcdf6523084c95ab0f3c04e34f64069c5b /grc/src | |
parent | b5da63dada08409208cad3d64a7efd65f96071e2 (diff) | |
download | gnuradio-c6935bf1775ae73edf525376b79aeafc05f673b1.tar.gz gnuradio-c6935bf1775ae73edf525376b79aeafc05f673b1.tar.bz2 gnuradio-c6935bf1775ae73edf525376b79aeafc05f673b1.zip |
Quick fix for ubuntu docs dir.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11087 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/src')
-rw-r--r-- | grc/src/platforms/python/utils/extract_docs.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/grc/src/platforms/python/utils/extract_docs.py b/grc/src/platforms/python/utils/extract_docs.py index dfc0b7e97..ac0fe59b4 100644 --- a/grc/src/platforms/python/utils/extract_docs.py +++ b/grc/src/platforms/python/utils/extract_docs.py @@ -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') |