Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ericgj/beautiful-workbench
https://github.com/ericgj/beautiful-workbench
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ericgj/beautiful-workbench
- Owner: ericgj
- Created: 2012-06-10T16:09:16.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-06-14T03:20:19.000Z (over 12 years ago)
- Last Synced: 2024-11-15T12:27:20.683Z (2 months ago)
- Language: JavaScript
- Size: 194 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
## Beautiful Workbench
A simple workbench for trying out different visualization techniques in a
collaborative way. Based on the book _Beautiful Visualization_.### How to install sample data
Drop the file in `data`, and it will add a route for the file under `/api`.
So the file `data/foo.json` => the url `/api/foo.json`.### How to set up a route
1. Add a ruby file named so you can identify it as yours (e.g. use your github
name), to `routes`.2. This file should be written as if it were a classic Sinatra app --i.e. top-
level routes and settings.3. In general the routes should be in the form
`/#{your-name}/#{chapter-or-visualization-name}`
For instance, `get '/eric/3'`4. Also in the routes file, specify the routes that should be publicly viewable like this:
```ruby
routes_index['eric'] = [
[ '3', 'word cloud visualizations'],
[ '4', 'color experiments' ]
]
```### How to set up your views
Views should be saved to the `views` subdirectory, or done as named templates
within your routes file. They can use any templating engine you want.There is a bare-bones default layout which loads a reset and application css and
yields your content as the body. It's written in [slim](http://slim-lang.com).
If you want to use this layout but not slim in your views, dohaml :my_view, :layout_engine => :slim
Or if you want to provide your own layout,
erb :my_view, :layout => :'my_name/my_layout'
Javascript, CSS, and images are in directories under `public` -- feel free to
drop whatever you need in, using subdirectories to namespace.### How to run locally
1. `bundle install`
2. `bundle exec rackup` from the root directory
3. Browse [http://localhost:9292/contrib](http://localhost:9292/contrib).