Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr-ressources
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Learning Lab
mooc-rr-ressources
Commits
64381acf
Commit
64381acf
authored
Mar 22, 2019
by
Arnaud Legrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HTML cosmetics
parent
7a175054
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
pandoc_fixer.pl
bin/pandoc_fixer.pl
+9
-4
No files found.
bin/pandoc_fixer.pl
View file @
64381acf
...
...
@@ -43,16 +43,22 @@ open OUTPUT, "> ".$output or die;
while
(
defined
(
my
$line
=<
INPUT
>
))
{
if
(
$line
=~
/<p>AUTHOR:/
)
{
next
;
}
if
(
$line
=~
/<h1 class="title"/
)
{
next
;
}
if
(
$line
=~
/<h1 class="date"/
)
{
next
;
}
# $line =~ s|https://gitlab.inria.fr/learninglab/|https://learninglab.gitlabpages.inria.fr/|g; ## Not such a good idea!
if
(
$input
=~
/_fr.html/
)
{
$line
=~
s
|<
body
>|<
body
>
Les
<
a
href
=
'$gitlab_origin/$input'
>
sources
de
ce
document
sont
disponibles
sur
gitlab
</
a
>.|
g
;
$line
.=
"<br><i>Version du $gitdate.</i><br><hr/>\n"
}
else
{
$line
=~
s
|<
body
>|<
body
>
The
<
a
href
=
'$gitlab_origin/$input'
>
source
of
this
this
document
is
available
on
gitlab
</
a
>.|
g
;
$line
.=
"<br><i>Last version: $gitdate</i><br><hr/>\n"
}
$line
=~
s
|<
span
class
=
"smallcaps"
>
TOC
</
span
>||
g
;
$line
=~
s
|---<
/p>|<hr/
>|
g
;
$line
=~
s
|
Date:
.*<
br
|<
i
>
Date:
$gitdate
</
i
><
br
|
g
;
$line
=~
s
|<
p
>
TITLE:
\
(
.*\
)
<
br
|<
b
>
TITLE:$1
</
b
><
br
|
g
;
$line
=~
s
|
href
=
" ---</p>|<hr/>|g;
# $line =~ s|Date:.*<br|<i>Date: $gitdate</i><br|g;
# $line =~ s|<p>TITLE:\(.*\)<br|<b>TITLE:$1</b><br|g;
$line
=~
s
|
img
src
=
"http|img src="
%|
g
;
$line
=~
s
|
img
src
=
"([^%][^"
]
*
)
"|img src="
$url_path
/
$1
?
inline
=
false
"|g;
...
...
@@ -61,7 +67,6 @@ while(defined(my $line=<INPUT>)) {
# if($line =~ /img src="
([
^%
][
^
"]*)"
/
)
{
# $line = "\t".$line;
# }
if
(
$line
=~
/<p>AUTHOR:/
)
{
next
;
}
print
OUTPUT
$line
;
}
Write
Preview
Markdown
is supported
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