{"id":13581891,"url":"https://github.com/bzz/scholar-alert-digest","last_synced_at":"2025-06-17T22:03:40.814Z","repository":{"id":36430036,"uuid":"215662203","full_name":"bzz/scholar-alert-digest","owner":"bzz","description":"Aggregate unread emails from Google Scholar alerts","archived":false,"fork":false,"pushed_at":"2023-10-25T21:32:47.000Z","size":1919,"stargazers_count":45,"open_issues_count":25,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-23T05:51:43.947Z","etag":null,"topics":["google-alerts","google-scholar","ml-on-code","paper"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bzz.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":"2019-10-16T23:25:48.000Z","updated_at":"2025-03-20T11:53:52.000Z","dependencies_parsed_at":"2023-01-17T01:24:00.866Z","dependency_job_id":"317bdcd5-d571-4856-bcc4-c7de8007b5d2","html_url":"https://github.com/bzz/scholar-alert-digest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bzz/scholar-alert-digest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzz%2Fscholar-alert-digest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzz%2Fscholar-alert-digest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzz%2Fscholar-alert-digest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzz%2Fscholar-alert-digest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bzz","download_url":"https://codeload.github.com/bzz/scholar-alert-digest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bzz%2Fscholar-alert-digest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260447632,"owners_count":23010541,"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":["google-alerts","google-scholar","ml-on-code","paper"],"created_at":"2024-08-01T15:02:18.161Z","updated_at":"2025-06-17T22:03:35.801Z","avatar_url":"https://github.com/bzz.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Google Scholar alert digest\n\u003e aggregate google scholar email alerts by paper\n\nSimplifies scientific paper discovery by aggregating all unread emails under\na Gmail label from the Google Scholar alerts, grouping papers by title and producing a report ([Markdown](https://gist.github.com/bzz/1e8445f71db03a7d57d94147279ee09f)/[HTML](https://gist.github.com/bzz/e1e3ef3e0cdabc254f4e75bfa5511bcb)/[JSON](https://gist.github.com/bzz/4feeec459bcd1ec21f919eaeb163ac7a)).\n\n* [How to use](#how-to-use)\n* [Setup](#setup)\n   * [Building a binary (optional)](#building-a-binary-optional)\n   * [Configure google cloud](#configure-google-cloud)\n* [CLI](#cli)\n* [Web Server](#web-server)\n* [License](#license)\n\n# How to use\n\nTo use this tool for generating a report on new papers from Google Scholar, do the following:\n\n 1. Search on Google Scholar for a paper of an author\n 2. Create an Alert (for citations, new or similar publications)\n 3. Create a Gmail filter, moving all those emails under a dedicated Label\n 4. Run this tool to get an aggregated report (in Markdown or HTML) of all the papers from the unread emails\n\nFor more details, please refer to the [documentation](/docs).\n\n# Setup\n\nMake sure you have a recent version of [`go`](https://golang.org). Then clone this repository:\n\n```shell\ngit clone github.com/bzz/scholar-alert-digest\n```\n\n## Building a binary (optional)\n\nAlternatively, you can try to build a `scholar-alert-digest` binary and put it under `$GOPATH/bin` with:\n\n```shell\ncd \"$(mktemp -d)\" \u0026\u0026 go mod init scholar-alert-digest  \u0026\u0026 go get github.com/bzz/scholar-alert-digest\n```\n\nHowever this approach is known to yield errors and is not recommended.\n\n## Configure google cloud\n\nEnable \"Gmail API\" Google Cloud Platform (GCP) project \u0026 download `credentials.json` following [these steps](https://developers.google.com/gmail/api/quickstart/go#prerequisites).\u003c/br\u003e\n_That will guide you through creation of a new GCP project, enabling the Gmail API and geting \"OAuth client ID\" - [authorization credentials for a desktop application](https://developers.google.com/workspace/guides/create-credentials#oauth-client-id) that are needed in order to get access to your email messages at Gmail_\n\nAfter placing credentials.json in the project directory, you need to authenticate the application. You can do this by running\n\n```shell\ngo run main.go\n```\n\nAn accounts.google.com link will be printed (and possibly opened in your browser). Follow the login instructions, selecting the google account you used for the previous step if you have multiple. You will get a warning that google has not verified the app; click Continue, and then Continue again. \n\n_Oh no! This site can't be reached!_ You'll get a \"refused to connect\" message. That is fine! Just go to the url bar and look for a section like this:\n\n```\n\u0026code=4/0AWtgzh78xyaMnEMdDBL5P-tX66J3Fsb_93XvRCJzmLXDplnByMZmaXZcFjde3hJIt3D1pA\n```\n\nCopy the part following the = sign (importantly not including the trailing \u0026scope) and paste it into the terminal. Now the app is authenticated. In the future you won't need to repeat this step\n\n# CLI\n\nThe CLI tool is used to generate one-time Markdown/HTML reports.\n\nTo find your specific label name:\n\n```shell\ngo run main.go -labels\n```\n\nTo generate the report, either pass the label name though CLI:\n\n```shell\ngo run main.go -l '\u003cyour-label-name\u003e'\n```\n\nOr export it as an env var:\n\n```shell\nexport SAD_LABEL='\u003cyour-label-name\u003e'\ngo run main.go\n```\n\n## Run\nTo output rendered HTML or JSON instead of the default Markdown, use\n```shell\ngo run main.go -html\ngo run main.go -json\n```\n\nTo mark all emails that were aggregated in the current report as read, use\n```shell\ngo run main.go -mark\n```\n\nTo include read emails in the separate section of the report, do\n```shell\ngo run main.go -read\n```\n\nTo only aggregate the email subjects do\n```\ngo run main.go -subj | uniq -c | sort -dr\n```\n\nThere is an optional more compact report template that may be useful for a large number of papers:\n```shell\ngo run main.go -compact\n```\n\nTo include authors in the paper details snippet, use\n```shell\ngo run main.go -authors\n```\n\nTo include references to original email into the report, do:\n```shell\ngo run main.go -refs\n```\n\n# Web Server\nThe Web UI exposes HTML report generation to multiple concurrent users.\n\n## Test\nIt is possible to test it locally, without Gmail app configuration from below, by using emails from `./fixtures` by running:\n\n```\ngo run ./cmd/server -test\n```\n\n## Configure\nIt does not support the same OAuth client credentials as CLI from `credentials.json`.\n\nIt requires:\n - To create a new credentials in your API project `https://console.developers.google.com/apis/credentials?project=quickstart-\u003cNNN\u003e`\n - \"Credentials\" -\u003e \"Create credentials\" -\u003e \"Web application\" type\n - Add http://localhost/login/authorized value to `Authorized redirect URIs` field\n - Copy the `Client ID` and `Client secret`\n\nPass in the ID and the secret as env vars e.g by\n```shell\nexport SAD_GOOGLE_ID='\u003cclient id\u003e'\nexport SAD_GOOGLE_SECRET='\u003cclient secret\u003e'\n```\n\nYou do not need to pass the label name on the startup as it can be chosen at\nruntime at [/labels](http://localhost:8080/labels).\n\n## Run\nThe report generation is exposed through a web server that can be started with\n```\ngo run ./cmd/server [-compact]\n```\n\nto spin up a server at http://localhost:8080\n\nStart by visiting http://localhost:8080/login to get the user OAuth access token.\nVisit http://localhost:8080/labels to chose your label name.\n\n# License\n\nApache License, Version 2.0. See [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbzz%2Fscholar-alert-digest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbzz%2Fscholar-alert-digest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbzz%2Fscholar-alert-digest/lists"}