Skip to content

Perl version of plussfeed - converts public Google Plus posts to RSS/Atom feed

Notifications You must be signed in to change notification settings

deniszh/plusfeed.pl

Repository files navigation

plusfeed.pl

V0.05

Port of Russell Beattie's Plusfeed https://github.com/russellbeattie/plusfeed
(tool which translate public Google+ posts of particular user to Atom feed) 

RATIONALE

As time of writing Google do not provides RSS/Atom feeds in Google+. 
There are many similar projects -
https://github.com/russellbeattie/plusfeed - Python on GoogleAppengine.
https://github.com/tedkulp/gplusfeed - Node.js on Heroku.
https://github.com/AntonTyutin/gp2rss - Node.js
but I can't find anything on Perl, so, I write it by myself :)
Also there is no public service for G+ RSS translation AFAIK - Russel's public 
Plusfeed http://plusfeed.appspot.com was closed because of changing prices on AppEngine,
Public instance of gplusfeed at http://gplusfeed.herokuapp.com also not working (at least for me). 
So, purpose of this project is to provide simple and reliable piece of code for anyone 
who want to translate G+ posts to RSS/Atom, until Google do not provide this 

FILES

PlusFeed.pm - main module.
PlusFeed/Atom.pm - module for Atom feed instead of RSS.
plusfeed_simple.cgi - Simple cgi ( good for personal use )
plusfeed_wcache.cgi - Advanced cgi ( with caching on Redis DB and Atom feed, also good for personal use)

static/
cache/
app.psgi 
requrements.txt
stackato.yml
Makefile.PL
- PSGI application with Atom feed and caching using files. 
Even public service can be provided using this, but remember that free G+ API key have 1000 req/day limit.
Also ready for run at Heroku (http://heroku.com) or ActiveState Stackato cloud (http://stackato.com)
You can use my instance there - http://plusfeed-pl.herokuapp.com/

INSTALLATION

1. Simple CGI

Requirements:
- Perl 5.10 or newer
- Perl modules (use CPAN for this)
Google::Plus
XML::RSS
XML::Atom::SimpleFeed
- Web server with CGI interface (Apache or lighhtpd)

Put plusfeed_simple.cgi to cgi-bin folder on your webserver and edit it
APIKEY - replace with own Google+ API key (https://code.google.com/apis/console/)
USER - replace with your Google+ user id
PAGES - replace with 0 for all pages, 1 - to get last page, 2 - last 2 pages, etc.

2. Advanced CGI

Requrements:
See p.1 plus
CHI + drivers ( if needed, for caching - see https://metacpan.org/module/CHI )

Put plusfeed_wcache.cgi in cgi-bin folder on your webserver and edit it 
APIKEY - replace with own Google+ API key (https://code.google.com/apis/console/)
USER - replace with your Google+ user id
PAGES - replace with 0 for all pages, 1 - to get last page, 2 - last 2 pages, etc.
cache_ttl - caching time - if you need it (in seconds, default is 300 sec = 5 min).

4. PSGI application at Heroku (http://heroku.com)
  Edit app.psgi
APIKEY - Provide own Google+ API key (https://code.google.com/apis/console/)
BASE_URL - Base URL of your application (http://<YOURAPPNAME>.herokuapp.com/)
  Then run
git init
git add .
git commit -m "Initial version"
heroku create <YOURAPPNAME> -s cedar --buildpack https://github.com/miyagawa/heroku-buildpack-perl
git push heroku master

5. PSGI application at Stackato (http://stackato.com)
Edit app.psgi
APIKEY - Provide own Google+ API key (https://code.google.com/apis/console/)
BASE_URL - Base URL of your application (http://<YOURAPPNAME>.sandbox.activestate.com/)
See Stackato Quickstart for setup stackato - http://docs.stackato.com/quick-start.html#command-line-client
Then
stackato push YOURAPPNAME
makes all magic. :)
Really good thing, give it a try.

6. PSGI application on your server
   Requrements:
See p.1 plus 
Task::Plack 
Path::Router
Plack::App::Path::Router
   Edit app.psgi
APIKEY - Provide own Google+ API key (https://code.google.com/apis/console/)
BASE_URL - Base URL of your application
   Run it like
starman app.psgi
Open http://yourhost:3000/ and follow instructions :)

SUPPORT
Feel free to drop me an email to denis.zhdanov@google.com or post issue 
through https://github.com/deniszh/plusfeed.pl/issues

About

Perl version of plussfeed - converts public Google Plus posts to RSS/Atom feed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published