Skip to content

nmatsui/GoogleReaderPlay2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Reader Play2!

Playframework2 + scalaで作成した、「Google Readerで自分が購読している記事」を解析し、出現する単語のトレンドを表示するアプリです。

Google Readerのデータを取得するために、Google oAuth2の「Web application API」を用いています。

また記事を形態素解析のために、javaで実装されディクショナリも内蔵されたKuromojiを利用しました。ありがとうございます!

環境準備

Google API Consoleより、Google Serviceを利用するためのキーを取得してください。

  1. Google Readerは公式なサービスAPIが公開されていないため、「URL Shortener API」で代替します。「service」タブから「URL Shortener API」をONにしてください
  2. ProjectをCreateし、「Web application」のClientIDを生成してください(この際、RedirectURIは http://localhost:9000/oauth2callback にしてください)
  3. app/utils/Constants.scala の clintId, clientSecret, redirectURI を修正してください

必要なライブラリを追加し、ClassPathに定義してください

  • HTTPクライアント Apache HttpClient 4.1.3

    • httpcore-4.1.4.jar
    • httpclient-4.1.3.jar
  • HTML(XML)パーサ Validator.nu

    • htmlparser-1.3.1-with-transitions.jar
  • 形態素解析ライブラリ Kuromoji

    • kuromoji-0.7.7.jar

Playframeworkのドキュメントに従い、Playframework 2.0.1をインストールしてください

使い方

  1. GoogleReaderPlay2ディレクトリで、playを実行してください(Proxyの背後から利用する場合、play -Dhttp.proxyHost=192.168.0.1 -Dhttp.proxyPort=8080 -Dhttp.proxyUser=hoge -Dhttp.proxyPassword=fuga等、Proxyの設定を引数で指定してください)
  2. Playコンソール上から、clean
  3. Playコンソール上から、compile
  4. Playコンソール上から、run
  5. ブラウザからhttp://localhost:9000にアクセスすると、TOP画面が表示されます
  6. 「Googleへログイン」からgoogle認証サイトへ遷移し、Googleアカウントでログインした後アプリケーションのアクセスを許可してください
  7. Google Readerに定義してあるフォルダのリストが表示されます
  8. 各フォルダの「単語クラウド表示」をクリックすると、そのフォルダに分類されたRSSフィードを80件取得し、出現頻度に従ってタグクラウド風に単語(名詞)を表示します

License

Copyright(C) 2012 Nobuyuki Matsui (nobuyuki.matsui@gmail.com)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

About

Playframework2 + scala + Google oAuth2 + Google Reader Unofficial API + Kuromoji = GoogleReaderPlay2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages