No description, website, or topics provided.
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
sciparse
.gitignore
README.md
requirements.txt
setup.py

README.md

Sciparse

About:

Tools for parsing references from HTML snippets, and from JSON data structures generated by the Citelet. Extracts references in CSL format.

Usage:

import sciparse
parser = sciparse.RefParse.get('mit')
reference = parser('''<td valign=\"top\"><span>Abler, B., Walter, H., Erk, S., Kammerer, H., &amp; Spitzer, M. (<span class=\"NLM_year\">2006</span>). <span class=\"NLM_article-title\">Prediction error as a linear function of reward probability is coded in human nucleus accumbens.</span> <span class=\"citation_source-journal\">Neuroimage</span>, 31, <span class=\"NLM_fpage\">790</span>\u2013<span class=\"NLM_lpage\">795</span>. <script type=\"text/javascript\">\n\t\t\t\tgenRefLink(16, 'R1', '10.1016%2Fj.neuroimage.2006.01.001');\n\t\t\t</script><a class=\"ref\" href=\"javascript:popRefLink(16,'R1','10.1016%2Fj.neuroimage.2006.01.001')\">[CrossRef]</a> </span></td>''')\
    .parse()

Organization

  • util: Assorted utility files
  • sources: Publisher-specific parsers and validators

Install

  • python setup.py install

Testing

  • Run python -m sciparse.tests.test_parse
  • Or run nosetests

Documentation

  • sphinx-apidoc . -o doc -F
  • cd doc
  • Add the following to conf.py:
    • sys.path.insert(0, os.path.abspath(os.path.pardir))
  • make html