Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
amendments
Commits
ce0534f7
Commit
ce0534f7
authored
Apr 12, 2017
by
okhin
Browse files
Rewrote the README.md and fixed a small bug
parent
8cf8be2b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Gemfile.lock
View file @
ce0534f7
GEM
remote: http://rubygems.org/
specs:
active_support (3.0.0)
activesupport (= 3.0.0)
activesupport (3.0.0)
activesupport (5.0.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
clik (0.1.0)
ffi (1.6.0)
haml (4.0.1)
concurrent-ruby (1.0.5)
ffi (1.9.18)
haml (4.0.7)
tilt
htmldiff (0.0.1)
listen (0.7.3)
nokogiri (1.5.9)
rack (1.5.2)
rack-protection (1.5.0)
i18n (0.8.1)
listen (3.1.1)
rb-fsevent (>= 0.9.3)
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
rb-inotify (0.9.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
rerun (0.
8
.0)
listen
rubyzip (
0.9.9
)
sinatra (1.4.
2
)
rack (~> 1.5
, >= 1.5.2
)
rerun (0.
11
.0)
listen
(~> 3.0)
rubyzip (
1.2.1
)
sinatra (1.4.
8
)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
tilt (1.3.6)
zippy (0.2.1)
rubyzip (>= 0.9.1)
tilt (>= 1.3, < 3)
thread_safe (0.3.6)
tilt (2.0.7)
tzinfo (1.2.3)
thread_safe (~> 0.1)
zippy (0.2.3)
rubyzip (>= 1.0.0)
PLATFORMS
ruby
DEPENDENCIES
active
_
support
activesupport
clik
haml
htmldiff
...
...
@@ -40,3 +53,6 @@ DEPENDENCIES
rerun
sinatra
zippy
BUNDLED WITH
1.14.6
README.md
View file @
ce0534f7
...
...
@@ -13,10 +13,26 @@ Installation
You need git, Ruby 1.9+ and the gem
`bundler`
.
git clone git://github.com/piglop/quadrature.git
cd quadrature
bundle
### Prerequisites
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
-----
...
...
@@ -27,7 +43,6 @@ Then you can run the command line version:
ruby extract_amendments.rb your_document.odt >result.mediawiki
Or you can use the web server :
Run the server with
`ruby server.rb`
(or
`rerun server.rb`
) and go to http://localhost:4567/
...
...
extract_amendments.rb
View file @
ce0534f7
...
...
@@ -117,7 +117,7 @@ class AmendmentExtractor
debug
"parsing amendment table"
tables
=
nodes
.
css
(
'table|table'
)
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment