{
"info": {
"author": "Edwin Henneken",
"author_email": "ehenneken@cfa.harvard.edu",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "[](https://travis-ci.org/adsabs/adsutils)\n[](https://coveralls.io/github/adsabs/adsutils?branch=master)\n\nADSutils\n========\n\nThis is a module with various ADS specific utilities\n\n## Installing\nIf you just want to work with these utilities, you can install `adsutils` with pip. It is still advisable to use it in a virtual environment. In your virtual environment just do\n```\npip install adsutils\n```\nand you should be all set to go. This has been tested under MacOS X, CentOS and Ubuntu with Python 2.7.\n\nIn case you want to work with the code: clone the repo to a local directory\n```\ngit clone https://github.com/adsabs/adsutils adsutils \n```\nGo into the newly created directory and create a virtual environment\n```\nvirtualenv --no-site-packages -ppython2.7 venv\n```\nand start it\n```\nsource venv/bin/activate\n```\nUpdate `pip` like\n```\npip install -U pip\n```\nand then install the required software\n```\npip install -r requirements.txt\n```\nTest if things are working:\n```\npython adsutils/test/nosetests.py\n```\n## Utility to create bibcodes\n\nImport the relevant module:\n```\nfrom adsutils import make_bibcode\n```\nand provide the necessary metadata:\n```\ndata = {\"year\":\"2006\",\n \"bibstem\":'PhRvL',\n \"volume\":\"96\",\n \"page\":\"295701\",\n \"author\":'Grünwald, Michael',\n }\n```\nand then call\n```\nbibcode = make_bibcode(data)\n```\nand a bibcode will get generated. You will have to determine the correct journal abbreviation (bibstem). The journal abbreviations are available here: http://adsabs.harvard.edu/abs_doc/journals2.html\n\n## Utility to resolve reference strings\n\nImport the relevant module:\n```\nfrom adsutils import resolve_references\n```\nYou can provide reference data in various formats:\n* A single reference string\n* A newline-separated set of reference strings\n* A (Python) list of reference strings\n\nExamples:\nA case with just one reference string:\n```\nrefdata = 'Hermsen, W., et. al. 1992, IAU Circ. No. 5541'\nresult = resolve_references(refdata)\n```\nin which case the result (always a list of dictionaries) will look like\n```\n[{'refstring': u'Hermsen, W., et. al. 1992, IAU Circ. No. 5541', \n 'confidence': 'Success', \n 'bibcode': u'1992IAUC.5541....1H'\n}]\n```\nMultiple reference strings work as follows:\n```\nrefdata = ['J. B. Gupta, and J. H. Hamilton, Phys. Rev. C 16, 427 (1977)', 'Pollock, J. T. 1982, Ph. D. Thesis, University of Florida']\nresult = resolve_references(refdata)\n```\nin which case the result (always a list of dictionaries) will look like\n```\n[{'refstring': u'J. B. Gupta, and J. H. Hamilton, Phys. Rev. C 16, 427 (1977)', \n 'confidence': 'Success', \n 'bibcode': u'1977PhRvC..16..427G'}, \n {'refstring': u'Pollock, J. T. 1982, Ph. D. Thesis, University of Florida', \n 'confidence': 'Success', \n 'bibcode': u'1982PhDT.........1P'}]\n```\n# Possible outcome\nThe resolver can return three classes of 'confidence' levels:\n* Success\n* Failed\n* Not verified\n\nThe only class that needs some explanation is the last one; it is quite possible that the metadata contains enough information to guess a bibcode. The year could be off by 1 (which can also apply to the page or volume number) or a journal was abbreviated in a non-standard way. It is also possible that all the metadata is correct, but the record is not in the ADS database. Even though a bibcode is returned, you cannot assume it is correct. These Not verified cases need further inspection.\n\n## Utility to get ADS journal abbreviation from publication name\n\nAn essential part of the ADS publication identifier (bibcode) is the publication abbreviation (bibstem). This utility takes a string representing the publication name and attempts to match it to an ADS abbreviation. It returns a list of candidates and associated scores.\n\nImport the relevant module:\n```\nfrom adsutils import get_pub_abbreviation\n```\nThe bibstem candidates are then found as follows:\n```\npubstring = 'American Astronautical Society Meeting'\nresult = get_pub_abbreviation(pubstring)\n```\nwhich returns a list of tuples with candidates and their associated scores (sorted by score, descending):\n```\n[(1.0, 'aans.meet'), (0.98545706272125244, 'AAS......'), (0.95637118816375732, 'aans.symp'), (0.93698060512542725, 'AAS......'), (0.91897505521774292, 'acs..meet')]\n```\nYou can specify that you are only interested in exact matches in the following way:\n```\npubstring = 'Astrophysical Journal'\nresult = get_pub_abbreviation(pubstring, exact=True)\n```\nwhich would result in\n```\n[(1, 'ApJ......')]\n```\nwhile\n```\npubstring = 'Astrophysical Journ'\nresult = get_pub_abbreviation(pubstring, exact=True)\n```\nwould result in\n```\n[]\n```\n",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/adsabs/adsutils",
"keywords": "",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "adsutils",
"package_url": "https://pypi.org/project/adsutils/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/adsutils/",
"project_urls": {
"Homepage": "http://github.com/adsabs/adsutils"
},
"release_url": "https://pypi.org/project/adsutils/1.0.33/",
"requires_dist": null,
"requires_python": "",
"summary": "A Python tool with some general ADS utilities",
"version": "1.0.33"
},
"last_serial": 2393528,
"releases": {
"1.0.32": [
{
"comment_text": "",
"digests": {
"md5": "dfc605d655e8da7516bc8ec9ff30784f",
"sha256": "fcba44ff078e45cec99fe765e0de83594c8b9184e79e4ec58625825391af57e9"
},
"downloads": -1,
"filename": "adsutils-1.0.32.tar.gz",
"has_sig": false,
"md5_digest": "dfc605d655e8da7516bc8ec9ff30784f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 567853,
"upload_time": "2016-10-11T12:07:43",
"url": "https://files.pythonhosted.org/packages/d1/eb/d01d74b8d29fd51ef24ff6d487d1588a8a4202e6773f7cb4c502579393a2/adsutils-1.0.32.tar.gz"
}
],
"1.0.33": [
{
"comment_text": "",
"digests": {
"md5": "450af33775638e58c8ecc1c798aec6c0",
"sha256": "fb9e6d07af4b8e627416cb7e0b088a8c650e18534864a51cb40c45187ad4ad2a"
},
"downloads": -1,
"filename": "adsutils-1.0.33.tar.gz",
"has_sig": false,
"md5_digest": "450af33775638e58c8ecc1c798aec6c0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 567917,
"upload_time": "2016-10-11T15:18:54",
"url": "https://files.pythonhosted.org/packages/c4/d9/471a9b5f509b05bbfd887d9519fca92fab08f9b4ddbf4c7c626536e7e3c1/adsutils-1.0.33.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "450af33775638e58c8ecc1c798aec6c0",
"sha256": "fb9e6d07af4b8e627416cb7e0b088a8c650e18534864a51cb40c45187ad4ad2a"
},
"downloads": -1,
"filename": "adsutils-1.0.33.tar.gz",
"has_sig": false,
"md5_digest": "450af33775638e58c8ecc1c798aec6c0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 567917,
"upload_time": "2016-10-11T15:18:54",
"url": "https://files.pythonhosted.org/packages/c4/d9/471a9b5f509b05bbfd887d9519fca92fab08f9b4ddbf4c7c626536e7e3c1/adsutils-1.0.33.tar.gz"
}
]
}