Skip to content

morika-t/github-preview

 
 

Repository files navigation

Github Preview TravisCI Dependency Status

App on CloudFoundry

http://github-preview.cloudfoundry.com/

How to Deploy Cloudfoundry

git clone git@github.com:morika-t/github-preview.git
bundle install --path vendor/bundle
vmc push deploy-app-name

App on Heroku

http://github-preview.herokuapp.com/

Preview script

Put this into your path at e.g. ~/bin/github-preview and chmod +x it.
Then github-preview someproject/Readme.markdown

#!/usr/bin/env ruby
# open a given markdown file via github preview app
raise "gime a file!!" unless ARGV[0]

require 'cgi'
content = File.read(ARGV[0])
url = 'http://github-preview.herokuapp.com/'

exec "open '#{url}/?text=#{CGI.escape content}&format=markdown'"

Local development

bundle
bundle exec rspec spec
bundle exec thin start
open http://localhost:3000

Copy to Clipboard

Using ussy/clippy. Thanks a lot!

About

Instant Preview for Github's README formats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 80.3%
  • Ruby 19.7%