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
piks3l
am2wiki
Commits
c1df5c7e
Commit
c1df5c7e
authored
Apr 28, 2017
by
piks3l
Browse files
correcting merge
parents
b2153261
947277ee
Pipeline
#1013
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
c1df5c7e
# This file is a template, and might need editing before it works on your project.
# Full project: https://gitlab.com/pages/plain-html
pages
:
stage
:
deploy
script
:
-
mkdir .public
-
cp -r * .public
-
mv .public public
artifacts
:
paths
:
-
public
only
:
-
master
am2wiki.html
View file @
c1df5c7e
...
...
@@ -7,8 +7,9 @@
<!--
Am2Wiki by Oncela
Last modification: 27-04-2017
This program intends to convert amendments drafted by Members of European
Parliament into reusable formats.
...
...
@@ -29,7 +30,9 @@
var
colors
=
[
"
white
"
,
"
#A60000
"
,
"
#F55E33
"
,
"
#BABABA
"
,
"
#AEF279
"
,
"
#44C92C
"
];
// Political groups of the EP
var
groups
=
[
""
,
"
EPP
"
,
"
S&D
"
,
"
ALDE
"
,
"
Verts/ALE
"
,
"
ECR
"
,
"
GUE/NGL
"
,
"
NI
"
,
"
EFD
"
];
var
groups
=
[
""
,
"
EPP
"
,
"
S&D
"
,
"
ALDE
"
,
"
Verts/ALE
"
,
"
ECR
"
,
"
GUE/NGL
"
,
"
NI
"
,
"
EFDD
"
,
"
ENF
"
];
// Template for conversion (how the amendments are displayed once processed: you can change it at will)
/*
...
...
@@ -192,15 +195,15 @@
// Use the internal tags to isolate each amendment in an array
var
parser
=
cleanFile
.
match
(
/Am>.*
?
<
\/
NumAm>.*
?\[\[
.*
?\]\]
.*
?((
<Num
)
|$
)
/g
);
var
parser
=
cleanFile
.
match
(
/Am>.*
?
<
\/
NumAm>.*
?
<Members>.*
?\[\[
.*
?\]\]
.*
?((
<Num
)
|$
)
/g
);
// Use the internal tags to retrive each info and put them into the amendments array
for
(
var
i
=
0
;
i
<
parser
.
length
;
i
++
)
{
var
am
=
{};
am
.
number
=
parser
[
i
].
replace
(
/Am> *
(
.*
?)
*<
\/
NumAm>.*/
,
"
Amendment $1
"
);
am
.
member
=
(
rapporteur
!=
""
)
?
rapporteur
:
parser
[
i
].
replace
(
/.*<RepeatBlock-By> *<Members> *
(
.*
?)
*<
\/
Members>.*/
,
"
$1
"
);
am
.
member
=
parser
[
i
].
replace
(
/.*<RepeatBlock-By> *<Members> *
(
.*
?)
*<
\/
Members>.*/
,
"
$1
"
);
am
.
article
=
parser
[
i
].
replace
(
/.*<Article> *
(
.*
?)
*<
\/
Article>.*/
,
"
$1
"
);
am
.
left
=
parser
[
i
].
replace
(
/.*
\[\[
*
(
.*
?)
*
\|\|
.*/
,
"
$1
"
);
am
.
right
=
parser
[
i
].
replace
(
/.*
\|\|
*
(
.*
?)
*
\]\]
.*/
,
"
$1
"
);
...
...
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