Commit ce0534f7 authored by okhin's avatar okhin
Browse files

Rewrote the README.md and fixed a small bug

parent 8cf8be2b
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
active_support (3.0.0) activesupport (5.0.2)
activesupport (= 3.0.0) concurrent-ruby (~> 1.0, >= 1.0.2)
activesupport (3.0.0) i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
clik (0.1.0) clik (0.1.0)
ffi (1.6.0) concurrent-ruby (1.0.5)
haml (4.0.1) ffi (1.9.18)
haml (4.0.7)
tilt tilt
htmldiff (0.0.1) htmldiff (0.0.1)
listen (0.7.3) i18n (0.8.1)
nokogiri (1.5.9) listen (3.1.1)
rack (1.5.2) rb-fsevent (>= 0.9.3)
rack-protection (1.5.0) rb-inotify (>= 0.9.7)
mini_portile2 (2.1.0)
minitest (5.10.1)
nokogiri (1.7.1)
mini_portile2 (~> 2.1.0)
rack (1.6.5)
rack-protection (1.5.3)
rack rack
rb-inotify (0.9.0) rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0) ffi (>= 0.5.0)
rerun (0.8.0) rerun (0.11.0)
listen listen (~> 3.0)
rubyzip (0.9.9) rubyzip (1.2.1)
sinatra (1.4.2) sinatra (1.4.8)
rack (~> 1.5, >= 1.5.2) rack (~> 1.5)
rack-protection (~> 1.4) rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4) tilt (>= 1.3, < 3)
tilt (1.3.6) thread_safe (0.3.6)
zippy (0.2.1) tilt (2.0.7)
rubyzip (>= 0.9.1) tzinfo (1.2.3)
thread_safe (~> 0.1)
zippy (0.2.3)
rubyzip (>= 1.0.0)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
active_support activesupport
clik clik
haml haml
htmldiff htmldiff
...@@ -40,3 +53,6 @@ DEPENDENCIES ...@@ -40,3 +53,6 @@ DEPENDENCIES
rerun rerun
sinatra sinatra
zippy zippy
BUNDLED WITH
1.14.6
...@@ -13,10 +13,26 @@ Installation ...@@ -13,10 +13,26 @@ Installation
You need git, Ruby 1.9+ and the gem `bundler`. You need git, Ruby 1.9+ and the gem `bundler`.
git clone git://github.com/piglop/quadrature.git ### Prerequisites
cd quadrature
bundle You need rbenv and ruby-build to get everything working.
rbenv install 2.4.0
Activate the env
rbenv local 2.4.0
Now, get bundler
gem install bundler
rbenv rehash
### Get the code
git clone git://git.laquadrature.net/lqdn-interne/amendments.git
cd amendments
bundle
Usage Usage
----- -----
...@@ -27,7 +43,6 @@ Then you can run the command line version: ...@@ -27,7 +43,6 @@ Then you can run the command line version:
ruby extract_amendments.rb your_document.odt >result.mediawiki ruby extract_amendments.rb your_document.odt >result.mediawiki
Or you can use the web server : Or you can use the web server :
Run the server with `ruby server.rb` (or `rerun server.rb`) and go to http://localhost:4567/ Run the server with `ruby server.rb` (or `rerun server.rb`) and go to http://localhost:4567/
......
...@@ -117,7 +117,7 @@ class AmendmentExtractor ...@@ -117,7 +117,7 @@ class AmendmentExtractor
debug "parsing amendment table" debug "parsing amendment table"
tables = nodes.css('table|table') tables = nodes.css('table|table')
raise "amendment table not found" if tables.size == 0 raise "amendment table not found" if tables.size == 0
raise "too many tables" if tables.size > 1 #raise "too many tables" if tables.size > 1
table = tables.first table = tables.first
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment