-
Notifications
You must be signed in to change notification settings - Fork 129
Absolute Links
In the default config of wtf_wikipedia
local links in the MediaWiki (e.g. Wikipedia, Wikiversity, ...) are treated as local links in the converted output (e.g. in HTML format). This might be not the desired output, due to the fact that the converted content of the Wiki source is moved outside the web context where the relative links will work.
The alsolute link is a boolean Key/Value pair inoptions.source
(not implemented in 7.0):
option.source = {
"language":"en",
"domain":"wikiversity",
"article":"Water",
"absolutelinks":true
}
This means that the source of the article was the article Water
fetched from Wikiversity and the language of the article was english
. This allows the expansion of the relative link to Swarm Intelligence to be expanded to https://en.wikiversity.org/wiki/Swarm_intelligence.
The WikiID is just the concatenation of the language
and domain
variable. Fetching the Water article will lead to the following setting of option.source
:
option.source = {
"language":"en",
"domain":"wikipedia",
"article":"Water",
"absolutelinks":true
}
- Parsing Concepts are based on Parsoid - https://www.mediawiki.org/wiki/Parsoid
- Output: Based on concepts of the swiss-army knife of
document conversion
developed by John MacFarlane PanDoc - https://www.pandoc.org