This repository has been archived by the owner on Aug 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
82 lines (73 loc) · 2.48 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Settings
output: '/tmp/mw2md'
authors_csv: 'authors.csv'
wiki_xml: 'dump.xml'
history: true
output_subdir: 'source'
# Regular expression of pages to skip
skip: '^(user|user talk|talk|template|mediawiki):'
# Assign category (& directory) based on filename
# (it will stop on the first match, so order matters)
catmatch:
#"workshop": event/workshop
#"event": event
#"how[ -]?to": howto
#"api": api
#"guide": documentation
# Rewrite filenames
rewrite_file:
#"how[ -]?to[ -]?": ""
# Rewrite directories
rewrite_dir:
#"features": "feature"
#"home/feature": "feature"
#"infra.*": "infra"
#"how-to": "howto"
#"releases": "release"
# Rewrite directory and filename after everything above is processed
# (catch-all)
rewrite_full:
"^category/(.*).html.md": '\1/index.html.md'
#"project-proposal/": "project/proposal/"
#"/project-proposal-": "/"
#"^draft-documentation/": "documentation/draft/"
#"^projects/": "project/"
#"^how-to/": "howto/"
#"^(development)-(environment)/": '\1/\2/'
#"^(building)-(engine)/": '\2/\1/'
# Match original wikitext and add metadata to frontmatter
frontmatter:
#'\{\{Feature\|[^}]*name=([^\|}]*)[^}]*\}\}': "feature_name"
#'\{\{Feature\|[^}]*modules=([^\|}]*)[^}]*\}\}': "feature_modules"
#'\{\{Feature\|[^}]*status=([^\|}]*)[^}]*\}\}': "feature_status"
# Rewrite special wiki constructs to be markdown-friendly
# (output should be HTML that feeds into the Markdown conversion)
rewrite_wiki:
'\{\{#ev:youtube\|([^|}]*)\|([^|}]*)\}\}': '<iframe width="\2" src="//youtube.com/embed/\1" frameborder="0" allowfullscreen="true"> </iframe>'
'\{\{#ev:youtube\|([^|}]*)\|([^|}]*)\|([^|}]*)[^}]?\}\}': '<iframe width="\2" src="//youtube.com/embed/\1" frameborder="0" align="\3" allowfullscreen="true"> </iframe>'
# Rewrite resulting Markdown
rewrite_markdown:
# Fix dd-indented bullets
'^:\\\* ': ' * '
'^::\\\* ': ' * '
'^:::\\\* ': ' * '
# Fix dd-indentent numbered lists
'^:# ': ' 1. '
'^::# ': ' 1. '
'^:::# ': ' 1. '
# Fix bolding not getting translated
"'''([^']*)'''": '**\\1**'
# Fix empty lines with trailing space
# (as often seen in code blocks)
'^\s+$': ''
# Fix username (oVirt-specific)
#'<username>': '<username>'
# Keep track of specific warnings,
# for pages that might need extra attention
warnings:
'<references>': 'references'
'<\/ref>': 'references'
'\|style\=': 'table-style'
'\|colspan\=': 'table-colspan'
'\|width\=': 'table-width'
'^\:\*': 'list-item?'