-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
106 lines (87 loc) · 3.8 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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 [email protected] or post issue
through https://github.com/deniszh/plusfeed.pl/issues