Giter Site home page Giter Site logo

yymao / adstex Goto Github PK

View Code? Open in Web Editor NEW
164.0 7.0 14.0 149 KB

Automated generation of NASA ADS bibtex entries directly from citation keys in your TeX source files

Home Page: https://github.com/yymao/adstex#adstex

License: MIT License

Python 100.00%
latex astronomy bibliography bibtex-files nasa-ads python

adstex's Introduction

adstex

Conda Version PyPI version

Tired of copying and pasting bibtex entries? Here's a new way to manage your bibtex entries โ€” do not manage them!

adstex automatically identifies all citation keys (e.g., identifiers, author+year) in your TeX source files and use NASA's Astrophysics Data System (ADS) to generate corresponding bibtex entries!

adstex was featured in an ADS blog post "User-Developed Tools for ADS"!

Features

  • Write your papers without worrying about the bibtex entries. Simply put down arXiv IDs, ADS bibcodes, DOIs, or first author & year citation keys in your \cite commands, and then use adstex to automatically generate the bibtex file for you.

  • adstex recognizes all variants of the \cite commands, and works with various styles of citation keys. For example, adstex would work with all the following:

    \citet{1705.03888}
    \citep[e.g.,][]{Mao:2015, White2018}
    \citealt{10.1093/mnras/stx3111, 2017arXiv170909665M}
  • adstex works along with your existing bibtex files. It simply skips (or updates) those citation keys that already have corresponding bibtex entries.

  • adstex will also update existing bibtex entries for you! Citing an arXiv preprint which is now published in a journal? No problem, adstex will detect this and automatically update the bibtex entry. (This is amazing, yes, I know!)

  • adstex also detects citation keys that actually refer to the same paper (e.g., you use an author:year citation key but another collaborator uses an arxiv ID as key for the same paper), and will prompt you to fix these issues.

Installation and Setup

Install adstex

You can install adstex from conda-forge

conda install adstex --channel conda-forge

Or from PyPI

pip install adstex

Set up an ADS API token

adstex requires an API token to use ADS. Here's how to obtain one:

  1. Visit NASA/ADS to sign up for an account if you don't have one.

  2. Visit the API Token page, log in with your ADS account and you will see an API token string. Copy that token string.

  3. Set your token string to an environment variable named ADS_API_TOKEN. You can do that by running:

    # If you use bash or bash-like shells --
    export ADS_API_TOKEN="your token string here"
    # If you use csh or csh-like shells --
    setenv ADS_API_TOKEN "your token string here"

    You can put this line into your ~/.bashrc or ~/.cshrc file.

Usage

Once you finish the paper (sorry, can't help with that!), simply run adstex with the following command (Internet connection is needed for adstex to work.):

# Note: if you are using version 0.2.x, please add the -o option. See below.

adstex your_tex_source.tex

adstex will automatically build the bibtex files, and write to the bibtex source that you specified in your tex source file.

  • If you want to have more control on the output file (or if you are using adstex v0.2.x), use the -o option:

    adstex your_tex_source.tex -o your_bib_source.bib

    Once adstex is done, it will write all bibtex entries in the file that you specified with the -o option.

  • You can also provide multiple TeX source files at once:

    adstex your_tex_source1.tex [your_tex_source2.tex [...]] -o your_bib_source.bib
  • For citation keys that are arXiv IDs, ADS bibcodes, or DOIs, adstex will automatically find the corresponding bibtex entries.

  • For first author + year citation keys, adstex will search on NASA ADS and provide you a list of candidate papers to select from. If you don't see the paper you are looking for, you can directly enter an ADS bibcode or arXiv ID when prompted.

  • You can also find a complete option list by running:

    adstex --help

    However, you may find the following FAQs more informative.

FAQs

  1. Can adstex recognize citation keys with multiple authors or compound surnames?

    Not always; adstex uses regular expression, not AI.

    For citation keys with multiple authors, if you use a separator to separate the surnames, (e.g., \cite{Press:Schechter:1974}), the adstex will be able to identify the first author and year to conduct a search on the ADS.

    For compound surnames, your best bets are joining the words without the spaces (e.g., \cite{deSitter:1913}), and keeping the hyphens (e.g., \cite{Boylan-Kolchin:1913}).

    Note that in the event that adstex cannot find the correct paper from a first author + year citation key, it will prompt you to enter an identifier (ADS bibcode, arXiv ID, or DOI) for that key.

  2. I have some other bibtex files, how to ask adstex to skip citation keys that already have existing entries in those files?

    Use the -r option to provide additional existing bibtex files. adstex will read in these files without modifying them (only the file specified by -o will be modified). Here's an example command:

    adstex main.tex -o main.bib -r software.bib classic.bib
  3. How do I use adstex as a reference manager? Or can I use adstex with other reference managers (e.g., JabRef, Mendeley, Zotero)?

    adstex is not a reference manager, and will not be one. The philosophy behind adstex is to not manage the references, because NASA's ADS is already doing that for us (and is doing an excellent job)! So adstex simply generates the bibtex file using the ADS on the fly.

    If you are already using a reference manager, you may want to continue to use it to generate bibtex files. You can then use adstex to fetch just the new entries (see FAQ #2). You can also use adstex to update all existing entries with the latest version from the ADS by running:

    adstex your_bibtex_file.bib
  4. Does this work with the ADS astronomy database only?

    For citation keys that are arXiv IDs, ADS bibcodes, or DOIs, adstex would work with any entry as long as it is in the ADS.

    For first author + year citation keys, by default adstex would only search the astronomy database on NASA ADS. However, you can use --include-physics to include the ADS physics database.

    adstex only works with the ADS, and hence the name of this program :)

  5. adstex seems to run very slowly. Is there any way to speed it up?

    By default, adstex check if existing entries have any updates (e.g., arXiv preprint becoming a journal paper), and this process may slow down the execution. You can use --no-update to turn this feature off, so that adstex will only look for new entries.

    In addition, you can turn on parallel execution by adding the --parallel (-p) option. You can further specify the number of threads it uses with --threads=x (default is 8).

  6. I have different citation keys that point to the same paper in my tex file, can adstex merge and remove the repetitions?

    adstex will warn you (near the end of its execution) if it detects multiple keys that point to the same paper. It will list all those citation keys, but it will not merge them automatically. adstex never edits the tex source files; hence, you need to update the citation keys in the tex source files manually.

  7. Is there a way to use adstex with Overleaf?

    If you or your institution has an Overleaf subscription, you can use Overleaf's git or Dropbox integration to fetch the source files to your local machine, run adstex locally, and then push back to Overleaf via git (in the case of Dropbox, no pushing needed).

    If you don't have access to Overleaf's premium features, you can still just download the tex source file and bib file, run adstex locally, and then upload the updated bib file back to Overleaf (tex source file will not be changed by adstex).

  8. I got a SSLCertVerificationError! How to fix it?

    This error usually happens when the ADS SSL certification has been updated, but your local SSL certification has not yet. The error should go away once the local certification is updated too.

    With adstex 0.4.0+, you can use the --disable-ssl-verification option to temporarily disable the verification of SSL certification. This option can be handy if you don't have control of your local SSL certification installation. Note that with this option, your ADS API key may be vulnerable to a man-in-the-middle attack. You can generate new ADS API key on ADS website if you think your API key may have been compromise.

  9. adstex saves me so much time. How do I acknowledge it?

    First of all, thank you :)

    adstex won't exist without NASA's ADS, so please do acknowledge them by adding the following to your acknowledgements section:

    This research has made use of NASA's Astrophysics Data System.

    (Note: adstex is not affiliated with nor endorsed by NASA's ADS.)

    Then, if you would like to also acknowledge adstex, you can add the following to your acknowledgements section:

    This research has made use of adstex (\url{https://github.com/yymao/adstex}).

adstex's People

Contributors

dwijn avatar lewiscowper avatar pkgw avatar syrte avatar yymao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

adstex's Issues

recognize "bibentry" and "nobibliography"

When writing proposals, I sometimes save space with the bibentry package. In that case, the bibliography file is marked with the \nobibliography{filename} command instead of \bibliography{filename} and references are inserted with \bibentry{key} instead of \cite{key}. I can make the bibentry syntax work by modifying the definitions for _re_bib and _re_cite in the code, but I can't figure out how to make a regex that would find both bibentry and cite or biblography and nobiblography with the same regex. You are clearly a wizzard here, so maybe you can add that.

Line breaks in citations cause failed capturing of bib keys

natbib citations such as

\citep[see also][]{Aauthor2019,Bauthor2020}

are not correctly recognized if a line-break occurs. Some authors/text editors might hard-wrap this citation at the space:

Lorem ipsum dolor sit amet, consectetur adipiscing \citep[see
also][]{Aauthor2019,Bauthor2020} eget risus sollicitudin neque
imperdiet suscipit. 

adstex fails to detect those bib keys.

Command line option to skip SSL certificate validation while connecting to api.adsabs.harvard.edu

This is not adstex problem that could have an adstex-specific solution. The ADS servers (api.adsabs.harvard.edu) apparently got a new SSL certificate that my operating system (unlike my browser) does not recognize. It would be great to add a command line option to adstex that would tell it to skip certificate validation while connecting, for example as discussed here.

For now I'm getting the following error message:

$ adstex nher.tex

------------------------------------------------------------
Auto-identifying bibtex files...
Main bibtex source (output file): nher.bib

------------------------------------------------------------
Overwritting existing string for key: june.
Traceback (most recent call last):
  File "/home/kirx/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/home/kirx/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/home/kirx/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/home/kirx/.local/lib/python3.8/site-packages/urllib3/connection.py", line 414, in connect
    self.sock = ssl_wrap_socket(
  File "/home/kirx/.local/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/home/kirx/.local/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/lib/python3.8/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1147)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/home/kirx/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/home/kirx/.local/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.adsabs.harvard.edu', port=443): Max retries exceeded with url: /v1/search/query/?q=identifier%3A%222013MNRAS.433.1991R%22&fl=id&fl=bibcode&sort=score+desc%2Cid+desc&cursorMark=%2A&rows=50 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1147)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kirx/.local/bin/adstex", line 33, in <module>
    sys.exit(load_entry_point('adstex==0.3.12', 'console_scripts', 'adstex')())
  File "/home/kirx/.local/lib/python3.8/site-packages/adstex.py", line 396, in main
    bibcode_new = entry2bibcode(bib.entries_dict[key])
  File "/home/kirx/.local/lib/python3.8/site-packages/adstex.py", line 261, in entry2bibcode
    id_this = id2bibcode(unquote(entry[field_name]), possible_id_types)
  File "/home/kirx/.local/lib/python3.8/site-packages/adstex.py", line 165, in id2bibcode
    return next(s).bibcode
  File "/home/kirx/.local/lib/python3.8/site-packages/ads/search.py", line 501, in __next__
    self.execute()
  File "/home/kirx/.local/lib/python3.8/site-packages/ads/search.py", line 533, in execute
    self.session.get(self.HTTP_ENDPOINT, params=self.query)
  File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 563, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.adsabs.harvard.edu', port=443): Max retries exceeded with url: /v1/search/query/?q=identifier%3A%222013MNRAS.433.1991R%22&fl=id&fl=bibcode&sort=score+desc%2Cid+desc&cursorMark=%2A&rows=50 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1147)')))

Have a way of keeping aliases for common papers #feature-request

There should be a ~/.adstexrc file or something that would allow aliases for commonly used papers. E.g Planck18 should resolve to whatever the arxiv number is (but the search would be performed to ensure published papers become published once published :), i.e pure key-value resolution).

bib file not being updated

Hmm adstex appears to run fine, but new entries are not showing up in the .bib file.

$ adstex --no-update ms.tex -o ms.bib
Overwriting existing string for key: june.
conroy2010: EXISTING
stsci2020: EXISTING
harris2016: EXISTING
bradley2021: EXISTING
foreman-mackey2013: EXISTING
harris2018: EXISTING
astropy:2018: EXISTING
aguerri2020: EXISTING
lim2020: EXISTING
simionescu2011: EXISTING
janssens2019: EXISTING
harris1981: EXISTING
vandokkum2015: EXISTING
schlafly2011: EXISTING
deustua2018: EXISTING
stetson1987: EXISTING
harris2020: EXISTING
bertin1996: EXISTING
conroy2009: EXISTING
sirianni2005: EXISTING
saha2011: EXISTING
astropy:2013: EXISTING
vanderburg2016: EXISTING

------------------------------------------------------------
Resolving keys that do not contain identifiers...
------------------------------------------------------------

------------------------------------------------------------
Choose one entry from below for <erwin2015> (most cited at the end)
------------------------------------------------------------
[5] 2015AAS...22544505E (cited 0 times)
    Erwin, Peter; Saglia, Roberto; Thomas, Jens; Opitsch, Michael et al.
    SMBH Measurements and Host-Galaxy Correlations: Ellipticals, Bulges, Pseud

[4] 2015DPS....4721017E (cited 0 times)
    Erwin, Justin; Koskinen, Tommi T.; Yelle, Roger V.
    Radiative equilibrium and escape of Pluto's atmosphere

[3] 2015IAUS..309..359E (cited 2 times)
    Erwin, Peter; Saglia, Roberto; Thomas, Jens; Fabricius, Maximilian et al.
    Using 3D Spectroscopy to Probe the Orbital Structure of Composite Bulges

[2] 2015MNRAS.446.4039E (cited 104 times)
    Erwin, Peter; Saglia, Roberto P.; Fabricius, Maximilian et al.
    Composite bulges: the coexistence of classical bulges and discy pseudo-bul

[1] 2015ApJ...799..226E (cited 208 times)
    Erwin, Peter
    IMFIT: A Fast, Flexible New Program for Astronomical Image Fitting
------------------------------------------------------------
Choose one entry from above for <erwin2015>
------------------------------------------------------------
ENTER choice (if no matches, ENTER 0 to skip or ENTER an identifier): 1
erwin2015: NEW ENTRY => 2015ApJ...799..226E

------------------------------------------------------------
Building new bibtex file, please wait...
------------------------------------------------------------

------------------------------------------------------------
Done!
------------------------------------------------------------

adstex is definitely writing a new bib file as the timestamp is updated, but it does not contain the new entry.

$ grep -i erwin2015 ms.bib
$

Recently upgraded to macOS Sonoma in case that's a clue. It also means that prior to this I was likely running the version of adstex that was available in Dec 2022.

Update existing bibtex file

Hi @yymao,

Really interesting project. I was wondering if you could support an even simpler use case:

If I give the program a ADS-derived bib file, it could look for updates to the entries, for example by adsurl entry. In that case, there is no TEX file.

It would help me update stale entries which I created based on arxiv submissions.

Cheers,
Johannes

Failed to update arxiv items in existing bib files

When I run
adstex main.tex -o main.bib -r mylib.bib --merge-other --force-regenerate

It failed to update the following items from the existing mylib.bib file (which is exported from zotero)

@article{Simon2019,
  title = {The {{Faintest Dwarf Galaxies}}},
  language = {en},
  journal = {arXiv e-prints},
  url = {https://ui.adsabs.harvard.edu/abs/2019arXiv190105465S/abstract},
  author = {Simon, Joshua D.},
  month = jan,
  pages = {arXiv:1901.05465},
  year = {2019}
}
@article{Richings2018,
  title = {Subhalo Destruction in the {{Apostle}} and {{Auriga}} Simulations},
  language = {en},
  journal = {ArXiv e-prints},
  url = {https://ui.adsabs.harvard.edu/\#abs/arXiv:1811.12437},
  author = {Richings, Jack and Frenk, Carlos and Jenkins, Adrian and Robertson, Andrew},
  month = nov,
  pages = {arXiv:1811.12437},
  year = {2018}
}

Usually, the arxiv number should be given as eprint for ads entries. Not sure why these items are not in the standard format. I can fix it by adding the following block at the end of the function entry2bibcode.

    if "pages" in entry and entry['pages'].lower().startswith('arxiv:'):
        s = fixedAdsSearchQuery(arxiv=entry["pages"].split(':')[1], fl=["bibcode"])
        try:
            return next(s).bibcode
        except StopIteration:
            pass

I'm satisfied with my solution for now. If you feel it could be a general problem for others, you can take it into your code. Thanks.

requests get stuck checking for a newer version

For some reason the call at the end of main to check for a newer version gets stuck. Going to the website in a browser actually works, so I'm not sure what the issue is. Perhaps it's related to a missing newline as the data is received but the call still hangs.

In any case, what works for me and what would help such a situation (or in the rare case where the site is down) would be to add a timeout to the requests.get call like this:

try:
    latest_version = StrictVersion(requests.get('https://pypi.python.org/pypi/adstex/json', timeout=0.1).json()['info']['version'])
except (requests.RequestException, KeyError, ValueError):
    pass

support apacite-style citations

AGU journals insist on apacite-style citations, which adstex does not appear to recognise. From their latex template:
`
% Reference citation instructions and examples:

% Please use ONLY \cite and \citeA for reference citations.

% \cite for parenthetical references
% ...as shown in recent studies (Simpson et al., 2019)

% \citeA for in-text citations

% ...Simpson et al. (2019) have shown...

%

%

%...as shown by \citeA{jskilby}.

%...as shown by \citeA{lewin76}, \citeA{carson86}, \citeA{bartoldy02}, and \citeA{rinaldi03}.

%...has been shown \cite{jskilbye}.

%...has been shown \cite{lewin76,carson86,bartoldy02,rinaldi03}.

%... \cite <i.e.>[]{lewin76,carson86,bartoldy02,rinaldi03}.

%...has been shown by \cite <e.g.,>[and others]{lewin76}.

%
% apacite uses < > for prenotes and [ ] for postnotes
% DO NOT use other cite commands (e.g., \citet, \citep, \citeyear, \citealp, etc.).
% \nocite is okay to use to add references from your Supporting Information
%`

I am currently using the following workaround to generate a temporary .tex file to run adstex against:
sed 's/citeA/cite/g' ms_grl.tex | sed 's/\\cite<[^>]*>/\\cite/g' > ms_tmp.tex
i.e. replacing \citeA with \cite and removing the <>-delimited prenotes.

Ignore commented out lines

It should be able to understand the latex "%" style comments and ignore (unresolvable) cites in those.

Not found error

Thanks for writing this code! I've been trying it out for the past week and it was working fine, but now I've encountered the following error when it reaches one of the references. Is there a way to determine which reference causes this? Perhaps it would be useful to have a way to skip to the next reference when such an error is encountered rather than quit the program?

Traceback (most recent call last):
File "/astro/mark/anaconda2/envs/ads/bin/adstex", line 10, in
sys.exit(main())
File "/astro/mark/anaconda2/envs/ads/lib/python3.10/site-packages/adstex.py", line 395, in main
bibcode_new = entry2bibcode(bib.entries_dict[key])
File "/astro/mark/anaconda2/envs/ads/lib/python3.10/site-packages/adstex.py", line 260, in entry2bibcode
id_this = id2bibcode(unquote(entry[field_name]), possible_id_types)
File "/astro/mark/anaconda2/envs/ads/lib/python3.10/site-packages/adstex.py", line 165, in id2bibcode
return next(s).bibcode
File "/astro/mark/anaconda2/envs/ads/lib/python3.10/site-packages/ads/search.py", line 501, in next
self.execute()
File "/astro/mark/anaconda2/envs/ads/lib/python3.10/site-packages/ads/search.py", line 532, in execute
self.response = SolrResponse.load_http_response(
File "/astro/mark/anaconda2/envs/ads/lib/python3.10/site-packages/ads/base.py", line 94, in load_http_response
raise APIResponseError(http_response.text)
ads.exceptions.APIResponseError: '{\n "error": "Not found"\n}\n'

Bug when key exists in others

adstex/adstex.py

Lines 394 to 398 in 5723da4

if (key_exists and args.update) or (
key_exists_in_others and args.merge_other and args.update
):
bibcode = extract_bibcode(bib.entries_dict[key])
bibcode_new = entry2bibcode(bib.entries_dict[key])

When key_exists_in_others is True and key_exists is False, the procedure will crash at bibcode = extract_bibcode(bib.entries_dict[key]), because bib.entries_dict does not have key there.

Syntax error from a very specific DOI

Stumped by this error

$ adstex test.tex 

------------------------------------------------------------
Auto-identifying bibtex files...
Main bibtex source (output file): bib.bib

------------------------------------------------------------
Traceback (most recent call last):
  File "/home/msyriac/.local/bin/adstex", line 8, in <module>
    sys.exit(main())
  File "/home/msyriac/.local/lib/python3.8/site-packages/adstex.py", line 394, in main
    bibcode_new = entry2bibcode(bib.entries_dict[key])
  File "/home/msyriac/.local/lib/python3.8/site-packages/adstex.py", line 259, in entry2bibcode
    id_this = id2bibcode(unquote(entry[field_name]), possible_id_types)
  File "/home/msyriac/.local/lib/python3.8/site-packages/adstex.py", line 164, in id2bibcode
    return next(s).bibcode
  File "/home/msyriac/.local/lib/python3.8/site-packages/ads/search.py", line 501, in __next__
    self.execute()
  File "/home/msyriac/.local/lib/python3.8/site-packages/ads/search.py", line 532, in execute
    self.response = SolrResponse.load_http_response(
  File "/home/msyriac/.local/lib/python3.8/site-packages/ads/base.py", line 94, in load_http_response
    raise APIResponseError(http_response.text)
ads.exceptions.APIResponseError: '{"responseHeader":{"status":400,"QTime":0,"params":{"q":"identifier:10.1051/0004-6361:20066170","fl":"id,bibcode","cursorMark":"*","start":"0","internal_logging_params":"X-Amzn-Trace-Id=Root=1-5e4abdd3-c8b04fc0540672306bd26010","sort":"score desc,id desc","rows":"50","wt":"json"}},"error":{"metadata":["error-class","org.apache.solr.common.SolrException","root-error-class","java.lang.Exception"],"msg":"org.apache.solr.search.SyntaxError: INVALID_SYNTAX_CANNOT_PARSE: Syntax Error, cannot parse identifier:10.1051/0004-6361:20066170: The parser reported a syntax error, antlrqueryparser hates errors! ","code":400}}\n'

that can be reproduced whenever a bib entry with a very specific DOI exists:

@article{Test,                                                                                                                        
 author = {{Test.}},                                                                                                                  
 doi = {10.1051/0004-6361:20066170},                                                                                                  
}  

(All other cites in my tex file worked, so thanks for making this!)

Parallelize updates

As noted in the readme, by default adstex checks for updates and it runs kind of slow as a result of doing many ADS queries serially. Parallelizing this step is relatively easy and would speed things up dramatically.
I have implemented parallelization using joblib in my fork (dwijn/adstex) and it seems to work properly, though I have not tested my code extensively.

issue opening the ADS beta site on firefox

I just cloned adstex and installed it, and managed to proceed with the ADSbeta registration/token retrieval with chromium, but on firefox I get a 404.html not found error.... Any idea? It might have to do with a local config, but I did not find which one (nor do I see anything obvious on the chromium side).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.