Commit c8b0bc57 authored by Michael Witrant's avatar Michael Witrant
Browse files

script de finition de conversion net neutrality

parent 528ad570
This diff is collapsed.
This diff is collapsed.
require 'rubygems'
require 'active_support/all'
include ActiveSupport::Inflector
data ='base.mediawiki')
data.gsub! %r((Amendement \d+\n<br/>\n.+\n<br/>\n)(.+)(\n<br/>[-+]*\n)) do |match|
prefix, names, suffix = $1, $2, $3
new_names = names.split(", ").map do |name|
page = transliterate(name.split(/\s+|-/).map(&:capitalize).reject { |part| part == "A." }.join)
end.join(", ")
prefix + new_names + suffix
data.gsub! %r(\|-\n\|width="50%"\|\n('''Or. '''<Original>'''\{..\}..'''|'''.'''|)</Original>\n\|width="50%"\|\n(<Original>)?</Original>\n), ''"result.mediawiki", "w") do |f|
f.write data
data.scan(/=== Amendment .+?\n\|\}/m).each do |amendment|
Supports Markdown
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