No description
  • JavaScript 97.1%
  • Shell 2.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2014-07-22 20:23:58 -07:00
.openshift Change database url handling to make sure we use the correct database on OpenShift. 2013-12-18 13:09:26 -08:00
bin Add license. Simplify web app. 2013-12-18 11:09:24 -08:00
lib Flickr API now requires https. 2014-07-22 20:23:58 -07:00
node_modules Flickr API now requires https. 2014-07-22 20:23:58 -07:00
COPYING Add license. Simplify web app. 2013-12-18 11:09:24 -08:00
deplist.txt Creating template 2013-12-15 22:27:25 -05:00
package.json Retry fetching images if there are no matches. Run every other hour during the day. 2013-12-18 10:16:22 -08:00
README.md Update the README to cover librsvg installation. 2013-12-20 20:11:47 -08:00
server.js Add license header to web app. 2013-12-18 11:15:20 -08:00

This is the node.js reimplementation of paintr.

It runs on OpenShift and posts images to tumblr.

You will need accounts on flickr, OpenShift and tumblr to use it. OpenShift is free software, the others aren't.

Some notes on installation follow.

  • Register a flickr app and get the token here:

http://www.flickr.com/services/apps/create/

  • Register a tumblr app, and authenticate here:

https://api.tumblr.com/console/

  • Register for OpenShift here:

https://www.openshift.com/app/account/new

  • Create an OpenShift node app:

rhc app create nodejs-0.10 rhc cartridge add mongodb-2.2 -a rhc cartridge add cron-1.4 -a

  • In OpenShift, install required software:

ssh [your OpenShift application] cd $OPENSHIFT_DATA_DIR

We need autotrace as it's not installed

wget http://mirror.centos.org/centos/6/os/x86_64/Packages/autotrace-0.31.1-26.el6.x86_64.rpm rpm2cpio autotrace-0.31.1-26.el6.x86_64.rpm | cpio -idmv

We need librsvg to allow ImageMagick to handle SVG

wget ftp://ftp.muug.mb.ca/mirror/centos/6.4/os/x86_64/Packages/librsvg2-2.26.0-5.el6_1.1.0.1.centos.x86_64.rpm rpm2cpio librsvg2-2.26.0-5.el6_1.1.0.1.centos.x86_64.rpm | cpio -idmv exit

  • Set an important evironment variable

rhc env set PAINTR_MONGO_URI="" --app rhc app restart --app

  • And create a config (inserting the correct values...):

ssh [your OpenShift application] mongo -u -p --host --port db.config.insert({ flickr_api_key: '', flickr_image_size: 'z', tumblr_consumer_key: '', tumblr_consumer_secret: '', tumblr_access_token: '', tumblr_access_secret: '', tumblr_blog_url: '.tumblr.com', working_directory: '/tmp', autotrace_command: 'autotrace', autotrace_args: ['--output-format', 'svg', '--despeckle-level', '10'], autotrace_options: {}, retries: 5 }) exit exit