README.md 1.09 KB
Newer Older
Michael Witrant's avatar
Michael Witrant committed
1
2
3
Amendment extraction
====================

Michael Witrant's avatar
Michael Witrant committed
4
5
6
It's a tool to extract amendment texts from EU documents and output them in mediawiki format.

It was made for [La Quadrature du Net](http://www.laquadrature.net/).
Michael Witrant's avatar
Michael Witrant committed
7

Michael Witrant's avatar
Michael Witrant committed
8
9
It's also available here: http://quadrature.herokuapp.com/

Michael Witrant's avatar
Michael Witrant committed
10

Michael Witrant's avatar
Michael Witrant committed
11
12
13
Installation
------------

Michael Witrant's avatar
Michael Witrant committed
14
15
You need git, Ruby 1.9+ and the gem `bundler`.

16
17
18
19
20
21
22
23
24
### Prerequisites

You need rbenv and ruby-build to get everything working.

    rbenv install 2.4.0

Activate the env

    rbenv local 2.4.0
Michael Witrant's avatar
Michael Witrant committed
25

26
27
28
29
30
31
32
33
34
35
Now, get bundler

    gem install bundler
    rbenv rehash

### Get the code

    git clone git://git.laquadrature.net/lqdn-interne/amendments.git
    cd amendments
    bundle
Michael Witrant's avatar
Michael Witrant committed
36
37
38
39
40
41
42
43

Usage
-----

First you must save the doc file to OpenDocument text (.odt) with OpenOffice or LibreOffice.

Then you can run the command line version:

Michael Witrant's avatar
Michael Witrant committed
44
    ruby extract_amendments.rb your_document.odt >result.mediawiki
Michael Witrant's avatar
Michael Witrant committed
45
46
47

Or you can use the web server :

Michael Witrant's avatar
Michael Witrant committed
48
49
50
Run the server with `ruby server.rb` (or `rerun server.rb`) and go to http://localhost:4567/

Then select your odt file and submit. Your browser should display the mediawiki text to copy/paste.
Michael Witrant's avatar
Michael Witrant committed
51