Package: arxiv-update-cli
Fetch new articles on arXiv by keywords and authors.CLI tool to fetch new articles on arXiv in selected categories (e.g. quant-ph) filtered by keywords or authors.
The results are printed in the command line but they can also be written into a file or be sent by email so that
the script can be run automatically withcron.The script will fetch the articles on arXiv thatweresubmitted/updatedafter the last update date (or the provided date, see--sinceoption)ANDbelong to one of thecategoriesAND(one of theauthorsis in the author list)OR(one of thekeywordsis in the title or abstract)All theoptionsare set in the configuration file. Note that keywords can contain spaces, e.g.machine learning.Thequerysubcommand allows for sending custom queries to the arXiv API, see sectionCustom queries to the ArXiv API.Thank you to arXiv for use of its open access interoperability.Table of ContentsDependenciesInstallQuick startConfiguration fileCustom queries to the ArXiv APIFieldsOperatorsGrouping operatorsAutomatic executionTroubleshootingLicenseChangelogDependenciesPython 3feedparserkeyring(optional): Store password of email account in system keyring (for the--emailoption)Running the tests in Windows also requirespynput.InstallThe script can be installed with pip$ pip install arxiv_update_clior by downloading thesource codeand running$ python setup.py installfrom within the folder.For Archlinux users, there is aPKGBUILDfile inpackaging_archlinux/.Quick startExecutearxiv-update-cli, or if the package is not installed, executearxiv_update_cli.pywith python.Usage:arxiv_update_cli.py [-h] [-e] [-s YYYY-MM-DD] [-c [FILE]] [-v] [-o FILE] [-f FORMAT] [--log] {query} ...Options:-h, --helpshow the help message and exit-e, --emailsend result by email using SMTP (you will be prompted for missing settings)-s YYYY-MM-DD, --since YYYY-MM-DDfetch update since YYYY-MM-DD 00:00-c [FILE], --config [FILE]config file to use or print path to default one and exit if no argument is provided-v, --versionshow version and exit-o FILE, --output FILEwrite the output into FILE-f FORMAT, --format FORMATarticle formatting: “id” (arXiv id, “title” (title - date),
“condensed” (title, authors, date - url),
“full” (title, authors, date, abstract, url, …), or “bibtex”--logshow path to log file and exitquerysubcommand to send a custom query the arXiv API, seeCustom queries to the ArXiv APIIf no configuration file exists, one will be created. Then, you can edit thecategories,keywordsandauthorsfields and run the script again.Configuration fileThe location of the configuration file is given by the-coption. The file contains to sections:General: configuration of the filtering of the arXiv updates.Email: email settings to receive the updates by email. You will be prompted to fill in the missing email settings when you run the script.There are comments in the file explaining how to fill in the options in each section.
Note that some options in the configuration file can be overriden by command line arguments.Custom queries to the ArXiv APIUsage:arxiv_update_cli.py [-e] [-o FILE] query [-h] [--api-query-help] [--id-list ID [ID ...]] [--sort-by SORT_BY] [--sort-order ORDER]
                                              [--start-date YYYY-MM-DD] [--end-date YYYY-MM-DD] [--max-results N] [QUERY]Options:-h, --helpshow this help message and exit--api-query-helpdisplay API search query help and exit--id-list ID [ID …]only results with given arXiv ids--sort-by SORT_BYsort results by “relevance”, “lastUpdatedDate” [default], or “submittedDate”--sort-order ORDERsort results in “ascending” or “descending” [default] order--start-date YYYY-MM-DDminimum date--end-date YYYY-MM-DDmaximum date--max-results Ndisplay only the N first resultsPositional arguments:QUERYAPI search query, typical form:<field>:<query>+<operator>+<field>:<query>...FieldsprefixexplanationtiTitleauAuthorabsAbstractcoCommentjrJournal ReferencecatSubject CategoryrnReport NumberallAll of the aboveExample::ti:checkerboardto list the articles whose titles contain the wordcheckerboard.OperatorsSeveral fields can be combined using boolean operators:ANDORANDNOTExample::au:del_maestro+ANDNOT+ti:checkerboardto list the articles ofAdrian DelMaestrowith titles that do not contain the wordcheckerboardGrouping operatorsMore complex queries can be used by using parentheses for grouping the Boolean expressions.Entire phrases can be used in a search field by enclosing them in double quotes.The grouping operators are encoded in the following way:symbolencodingexplanation( )%28 %29Used to group Boolean expressions for Boolean operator precedence.“”%22 %22Used to group multiple words into phrases to search a particular field.space+Used to extend a search_query to include multiple fields.Example:ti:%22quantum+criticality%22to list the articles whose titles contain the wordsquantumandcriticality.More about the arXiv API:https://arxiv.org/help/api/user-manualAutomatic executionOnce the email setttings have been configured and the password saved in the keyring, regular executions ofarxiv_update_clican be scheduled. For instance, one can receive daily email updates at 9:30 on working days with the followingcrontab(Unix)30 09 * * 1-5 arxiv-update-cli -eTroubleshootingErrors are logged in the filearxiv_update_cli.login the system’s temporary folder. Use the--logoption to display the path.LicenseCopyright (c) 2022-2023 Juliette MonselPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the “Software”), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.Changelogarxiv-update-cli 1.1.0Addformatoption to choose how the articles are displayedAddoutputoption to write the results in a text fileAdd direct queries to the arXiv APIMake compatible with Windowsarxiv-update-cli 1.0.3Set default config path to local folder if the script is not installedarxiv-update-cli 1.0.2Add comment field to the article summaryColor the article URL in blue like the DOI link in the terminalarxiv-update-cli 1.0.1Fix URL in PKGBUILD and setup.pyarxiv-update-cli 1.0.0First release