Got a web site? Want social network replies and likes on your site? Want to post and tweet from your site? Bridgy is for you.
Bridgy pulls comments and likes from social networks back to your web site. You can also use it to publish your posts to those networks. See the docs for more details.
License: This project is placed in the public domain.
Most dependencies are in git submodules. Be sure to run
git submodule update --init --recursive after you clone the repo.
Requires the App Engine SDK
and looks for it in the
GAE_SDK_ROOT environment variable,
~/google_appengine, in that order.
You can run the unit tests with
alltests.py. If you send a pull request,
please include (or update) a test for the new functionality if possible!
This command runs the tests, pushes any changes in your local repo(s), and deploys to App Engine:
./alltests.py && cd activitystreams && ./alltests.py && \ cd oauth_dropins && ./alltests.py && cd webutil && ./alltests.py && \ cd ../../.. && git push --recurse-submodules=on-demand && \ ~/google_appengine/appcfg.py --oauth2 update .
Most dependencies are clean, but we've made patches to some that we haven't (yet) tried to push upstream. If we ever switch submodule repos for those dependencies, make sure the patches are included!
The datastore is automatically backed up by a
Datastore Admin backup
and stores the results in
Cloud Storage, in the
It backs up all entities weekly, and all entities except
SyndicatedPost daily, since they make up 92% of all entities by size and
they aren't as critical to keep.
We use this command to set a Cloud Storage lifecycle policy on that bucket that deletes all files over 30 days old:
gsutil lifecycle set cloud_storage_lifecycle.json gs://brid-gy.appspot.com
So far, this has kept us within the 5GB free quota. Run this command to see how much space we're currently using:
gsutil du -hsc gs://brid-gy.appspot.com/\*
# remote_api_shell from models import Response cursor = None with open('sent_urls', 'w') as sent, open('unsent_urls', 'w') as unsent: while True: results, cursor, _ = Response.query( # projection=[Response.sent,Response.skipped,Response.error,Response.failed] ).fetch_page(100, start_cursor=cursor) if not results: break for r in results: print >> sent, '\n'.join(r.sent) print >> unsent, '\n'.join(r.skipped + r.error + r.failed) # shell sort sent_urls | uniq > sent_uniq cut -f3 -d/ sent_uniq | sed 's/^www\.//' | sort --ignore-case | uniq -i > sent_domains wc sent_urls sent_uniq sent_domains