{"id":21572094,"url":"https://github.com/zingale/lazy-astroph","last_synced_at":"2025-04-10T14:21:22.952Z","repository":{"id":83577042,"uuid":"38973582","full_name":"zingale/lazy-astroph","owner":"zingale","description":"A parser for arxiv.org astro-ph that will find a list of papers matching keywords and either e-mail it or post it to Slack","archived":false,"fork":false,"pushed_at":"2024-02-07T21:32:16.000Z","size":46,"stargazers_count":26,"open_issues_count":1,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T13:03:23.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zingale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-12T18:48:39.000Z","updated_at":"2025-01-21T21:37:16.000Z","dependencies_parsed_at":"2024-11-24T11:18:27.821Z","dependency_job_id":"d6bc8223-f559-4d8d-8c87-fe84eb9c2762","html_url":"https://github.com/zingale/lazy-astroph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingale%2Flazy-astroph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingale%2Flazy-astroph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingale%2Flazy-astroph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zingale%2Flazy-astroph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zingale","download_url":"https://codeload.github.com/zingale/lazy-astroph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248233935,"owners_count":21069493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T11:18:09.978Z","updated_at":"2025-04-10T14:21:22.937Z","avatar_url":"https://github.com/zingale.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# about lazy_astroph.py\n\nThis is a simple script to get the latest papers from astro-ph/arxiv,\nsearch their abstracts and titles for keywords, and report the\nresults.  Reports are done either through e-mail or by posting to\nslack channels using web-hooks.  This way if we forget to read\nastro-ph for a bit, we can atleast get notified of the papers deemed\nimportant to us (and discuss them on slack).\n\nNote: this requires python 3\n\n## usage\n\n```\n./lazy_astroph.py [-m e-mail-address] [-w slack-webhook-file] inputs\n```\n\nwhere `inputs` is a file of (case-insensitive) keywords, one per\nline.  Note, ending a keyword with \"-\" will make sure that keyword\nis uniquely matched, and not embedded in another keyword.  Adding\na clause \"NOT:\" to a keyword line followed by common-separated\nterms will result in a match only if the terms following NOT are\nnot found\n\nE.g.,\n\n```\nsupernova               NOT: dark energy, interstellar medium, ISM\nnova-\nxrb\n```\n\nwill return the matching papers containing \"supernova\", so long as\nthey don't also contain \"dark energy\", \"interstellar medium\", or\n\"ISM\".  It will also return papers that contain \"nova\" distinct from\n\"supernova\" (since `\"nova\" in \"supernova\"` is `True` in python).\nAnd it will return those papers containing xrb.\n\nSlack channels are indicated by a line beginning with \"#\", with\nan optional \"requires=N\", where N is the number of keywords\nwe must match before posting a paper to a slack channel.\n\nYou need to create a webhook via slack.  Put the URL into a file\n(just the URL, nothing else) and then pass the name of that\nfile into `lazy_astroph.py` using the `-w` parameter.\n\n\n## automating\n\nTo have this run nightly, add a line to your crontab.  Assuming that\nyou've put the `lazy_astroph.py` script and an `inputs` file in your\n~/bin/, then do something like:\n\n```\ncrontab -e\n```\n\nadd a new line with:\n\n```\n00 04 * * * /home/username/bin/lazy_astroph.py -m me@something.edu /home/username/bin/inputs\n```\n\nreplacing the e-mail with your e-mail and `username` with your username.\n\n\n# arXiv appearance dates\n\narticles appear according to the following schedule:\n\n  ```\n  submitted                    appear\n\n  Th 20:00 -\u003e F  19:59           M\n  F  20:00 -\u003e M  19:59           Tu\n  M  20:00 -\u003e Tu 19:59           W\n  Tu 20:00 -\u003e W  19:59           Th\n  W  20:00 -\u003e Th 19:59           F\n  ```\n  \n  but note that holidays can throw this off by a day or so.\n\nA possible solution is to store in a config file the id of the last\npaper parsed and then start each day by requesting 1000 papers leading\nup to today and go back only until we hit the previously parsed paper.\n\n\n# inspiration\n\n* The basic feedparser mechanism of interacting with the arxiv API\ncame from this example:\n\n   https://github.com/zonca/python-parse-arxiv/blob/master/python_arXiv_parsing_example.py\n\n* The instructions on how to search by date range came from the arxiv API google group:\n\n   https://groups.google.com/forum/#!msg/arxiv-api/I95YLIPesSE/3MZ83Pq_cugJ\n\n   https://groups.google.com/forum/#!searchin/arxiv-api/lastupdateddate/arxiv-api/GkTlg6tikps/C-E5noLbu94J\n\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzingale%2Flazy-astroph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzingale%2Flazy-astroph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzingale%2Flazy-astroph/lists"}