2015-12-23 19:29:10 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import os
|
|
|
|
import sys
|
2015-12-23 22:18:52 +01:00
|
|
|
|
2015-12-23 22:49:14 +01:00
|
|
|
# Local import
|
2015-12-23 23:58:16 +01:00
|
|
|
from reference_fetcher import arxiv
|
|
|
|
from reference_fetcher import bbl
|
2015-12-23 19:29:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2015-12-23 22:18:52 +01:00
|
|
|
import pprint
|
2015-12-23 19:29:10 +01:00
|
|
|
if len(sys.argv) < 2:
|
2015-12-23 22:18:52 +01:00
|
|
|
sys.exit("Usage: " + sys.argv[0] + " BBL_FILE|ARXIV_EPRINT.")
|
2015-12-23 19:29:10 +01:00
|
|
|
|
2015-12-23 22:18:52 +01:00
|
|
|
if os.path.isfile(sys.argv[1]):
|
2015-12-23 22:49:14 +01:00
|
|
|
pprint.pprint(bbl.get_dois(sys.argv[1]))
|
2015-12-23 22:18:52 +01:00
|
|
|
else:
|
2015-12-24 20:34:34 +01:00
|
|
|
pprint.pprint(arxiv.get_cited_dois(sys.argv[1]))
|