Giter Site home page Giter Site logo

pombredanne / redliner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benbalter/redliner

0.0 1.0 0.0 3.96 MB

A tool for facilitating the redlining of documents with the GitHub uninitiated

License: MIT License

Ruby 70.11% CSS 0.73% HTML 29.16%

redliner's Introduction

Redliner

A tool for facilitating the redlining of documents by the GitHub uninitiated.

screenshot

How it works

  1. You give the editor a unique, hashed URL
  2. They edit the GitHub-hosted document, either semi-anonymously or authenticated through Github
  3. When they click submit, Redliner automatically creates a pull request on their behalf

Are users authenticated?

By default, the user is simply prompted to enter their name, so be sure to only share URLs with those you trust.

The user can also authenticate with their GitHub account, if they have one, which will create the pull request on their behalf, rather than using a bot account.

How to generate a hashed URL

Swap github.com for your hosted Redliner instance in the URL to any file on GitHub.

You will be automatically redirect to the unique, hashed URL which you can then share with other, non-GitHub users.

Running

This app is a simple Sinatra app. It's designed to run on Heroku, but can run anywhere.

First, you'll need to create a developer application, which is used to authenticate users with GitHub accounts. The callback URL for authentication is simply the root URL. Once done, set these two environmental variables:

  • GITHUB_CLIENT_ID
  • GITHUB_CLIENT_SECRET

Next, you'll want to create a bot account with a personal access token scoped to the relevant repositories. Select public_repo to give it permission to read and write from repositories that it can access (and/or repo if it'll be working with private repos). Using your main account, make sure that the bot has both read and write access to each repository it will access. Once done, simply set the personal access token as:

  • GITHUB_TOKEN

You'll also need a Redis database. The free level of any of the Heroku addons should work, but Redistogo will work out of the box. Just run

heroku addons:add redistogo

If you want to use a different provider, just make sure that the database's URL is set as REDIS_URL.

Project status

Still in development. There's a lot to be done, and we'd love your help.

Contributing

Flow

  1. Take a look at the open issues.
  2. Fork the repository
  3. Create a descriptively named feature branch
  4. Tackle an open issue
  5. Submit a pull request

Working Locally

Install your fork of Redliner locally:

git clone [email protected]:your-name/redliner.git
cd redliner
bundle install
touch .env
git checkout -b descriptive-branch-name

Set your local variables for GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, and GITHUB_TOKEN in .env. You'll probably want to create a separate Github application for this, as you'll need to set localhost:5000 as the callback URL.

Then, start up a local Redis server (you may need to install Redis):

redis-server --port 16379

Start the app:

foreman start

redliner's People

Contributors

benbalter avatar stvnrlly avatar tmcw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.