Google Scholar Alert
Google Scholarには新しい論文が発表されたときに,メールでお知らせしてくれる機能があります.
- 研究者に関するアラート
- 新しい論文
- その著者の論文を引用した新しい論文
- 関連した研究

- 特定の論文に関するアラート
- その論文を引用した新しい論文

- 検索結果に関するアラート
- 検索結果にヒットする新しい論文
- Google Scholarプロフィールを作っていない研究者の新しい論文のアラートを受け取りたいときにも役立つ

Scholar Alert Digest
Google Scholarのアラートは,アラートの設定条件ごとにメールが送られてくるため,同じ論文に関するメールがたくさん届いたりします.例えば,論文P が フォローしてる著者A~Eの各論文を引用すると、同じ論文P のアラートが5回来る,という仕様になっており鬱陶しいのです.
そこで,重複したお知らせを1件にまとめ,重複数(≒自分にとっての重要さ)を数えてソートしてSlackに投稿するbotを作りました.
リポジトリ
- 重複するお知らせをまとめてくれるプログラム bzz/scholar-alert-digest
- このプログラムは日本語に対応していない.日本語対応のプルリクを送っているけどまだマージされてない
- 矢作が修正した日本語対応版 FlechaMaker/scholar-alert-digest
- 書式を整えてSlackに投稿するbot FlechaMaker/scholar-alert-digest-to-slack
使い方・セットアップ (所要時間20分)
- Macでの使い方を書きます.Linuxなら,同じように動くと思います.Windowsはよくわかりません.
環境構築
プログラムを走らせるためにGoとNodeJSが必要です.NodeJSのパッケージを入れるために,yarnも入れておきましょう. NodeJSのバージョン管理にnvmを使いたいとか,自分なりのやり方があれば,それでやってください.
brew install go node
npm install --global yarn
scholar-alert-digestのインストール
scholar-alert-digestをインストールとして,コマンドとしてscholar-alert-digest-to-slackが呼び出せるようにします. 下記の手順は,scholar-alert-digestのREADMEと大体同じです.
まず,scholar-alert-digestのソースコードをダウンロード・ビルド・インストールします.
git clone github.com/bzz/scholar-alert-digest
cd scholar-alert-digest
go install
scholar-alert-digestコマンドは $GOPATH/bin ($GOPATHは変数) にインストールされるので,パスに追加します.例えば,bashなら.bash_profileなどに次のコマンドを追記します.
export PATH=$PATH:$GOPATH/bin
次のコマンドを実行して,以下に示す出力が出ればインストールは完了です.
scholar-alert-digest -help
usage: go run [-labels | -subj] [-html | -json] [-compact] [-mark] [-read] [-authors] [-refs] [-l <your-gmail-label>] [-n]
Polls Gmail API for unread Google Scholar alert messaged under a given label,
aggregates by paper title and prints a list of paper URLs in Markdown format.
The -l flag sets the Gmail label to look for (overriden by 'SAD_LABEL' env variable).
The -n flag sets the number of concurent requests to Gmail API.
The -labels flag will only print all available labels for the current account.
The -subj flag will only include email subjects in the report. Usefull for " | uniq -c | sort -dr".
The -html flag will produce ouput report in HTML format.
The -json flag will produce output in JSONL format, one paper object per line.
The -compact flag will produce ouput report in compact format, usefull >100 papers.
The -mark flag will mark all the aggregated emails as read in Gmail.
The -read flag will include a new section in the report, aggregating all read emails.
The -authors flag will include paper authors in the report.
The -refs flag will add links to all email messages that mention each paper.
The -upd-test flag will write emails to ./fixtures/emails.json and quit.