Questions tagged [wikitext]

Wikitext is a document written in a wiki markup language, used on Mediawiki sites such as wikipedia.org.

From MediaWiki.org:

Wikitext is a document written in a wiki markup language, such as the current one explained in Help:Editing (see also Markup spec/DTD). It is a mixture of content, markup, and metadata. The current and old versions of all pages of a wiki are stored in the database in the text table, in the form of wikitext.

73 questions
2
votes
1 answer

How can I convert Wikitext Markup containing the double curly bracket functions, into plaintext or html?

I am creating a customized Wiki Markup parser/interpreter. There is a big task however in regards to interpreting functions like these: {{convert|500|ft|m|0}} which is converted like so: 500 feet (152 m) I'd like to avoid having to manually…
Anon
  • 2,267
  • 3
  • 34
  • 51
2
votes
1 answer

Remove wikitext hyperlinks via regex

There are two different kinds of wikitext hyperlinks: [[stack]] [[heap (memory region)|heap]] I would like to remove the hyperlinks but keep the text: stack heap Currently, I am running two phases, employing two different regular…
fredoverflow
  • 256,549
  • 94
  • 388
  • 662
2
votes
7 answers

How to convert XML to something else using xslt stylesheet?

How to convert XML to something else using xslt stylesheet? In C++ C# PHP or ActionScript? For example I have this html2wiki xslt stylesheet I want to send to my programm my XML (in this case HTML file ) and get back a file (in this case Wiki…
Rella
  • 65,003
  • 109
  • 363
  • 636
2
votes
3 answers

Help with regular expressions (Parsing Wikipedia Markup) in PHP

I have this bit of text that I want to remove from a page I am fetching from Wikipedia. {{Historical populations|type=USA | 1698|4937 | 1712|5840 | 1723|7248 | 1737|10664 | 1746|11717 | 1756|13046 | 1771|21863 | 1790|33131 | 1800|60515 |…
Simon
  • 51
  • 1
  • 4
2
votes
0 answers

Eclipse Line Endings WikiText Editor

I am having a problem with line endings and the WikiText Editor in Eclipse. If I open a *.textile document outside of a project, line endings are preserved (no CR added). I can get the two tabs; one for source and another for Preview. However, if I…
2
votes
2 answers

.Net WikiText to HTML Parser

I know, I know, its sounds silly, but it seems that there are no opensource robust .NET libraries out there for parsing Wikitext to HTML. Anybody know of a stable.robust .net Wikitext to HTML parser (i.e. codeplex projects that are still in beta…
Jaimal Chohan
  • 8,530
  • 6
  • 43
  • 64
2
votes
2 answers

How do I use the Perl Text-MediawikiFormat to convert mediawiki to xhtml?

On an Ubuntu platform, I installed the nice little perl script libtext-mediawikiformat-perl - Convert Mediawiki markup into other text formats which is available on cpan. I'm not familiar with perl and have no idea how to go about using this…
cboettig
  • 12,377
  • 13
  • 70
  • 113
1
vote
1 answer

Parsing balanced nested wiki templates and extract a single line parameter's content by a regexp

I know parsing nested strings or HTML is better done by a real parser but in my case I have simple templates and wanted to extract the title content of a Wiki parameter 'title' from a template. It took me a while to achieve this but thanks to the…
1
vote
2 answers

Eclipse: How to change default markup language for WikiText Editor

I want to have project documentation in wiki format and commit to version control system together with code. I have tried standard Eclipse Mylyn WikiText Editor, which is sufficient for my needs. Due personal preferences I have chosen Confluence…
mschayna
  • 1,300
  • 2
  • 16
  • 32
1
vote
0 answers

Regexpr which excludes groups if they are precedeeded by curly brackets and only matches text within the first section of the bracket

I'm writing a Python script to parse Wikipedia articles, and part of that process is parsing links. I'm trying to write a regular expression that matches in this way: [[:Category:Anarchism by country|Anarchism by country]] -> :Category:Anarchism by…
jemhop
  • 51
  • 3
1
vote
1 answer

Lua: Globally match for stuff of the form {{{parameter}}} or {{{parameter|default}}}, capturing "pattern" and "default", without overflow

I'm trying to use Lua pattern matching in a Wikipedia module to locate instances of Mediawiki parameter syntax (e.g. {{{parameter1-a|defaultValue}}} or {{{parameter1-a|{{{alias1-a|defaultValue}}}}}}) so they can be converted into Lua-compatible…
Lemondoge
  • 959
  • 4
  • 17
1
vote
2 answers

Removing wikitext hyperlinks in Swift

I'm trying to remove Wikitext hyperlink formatting and just get the link text, but everything I've tried either deletes nothing or deletes much more than expected. Here's the general pattern: [[user interface]] → user interface [[Telephone…
David
  • 87
  • 12
1
vote
1 answer

golang wikitext parser from scratch

I am asked to build a wiki in golang. Some of the editors are familiar with the wikitext, so they want to keep it. I find it's really hard to build a wikitext parser from scratch and there's no open source golang parser. Can anyone give me some…
1
vote
1 answer

How to use a logical operator in WikiText to select a tiddler with one OR another tag?

The TiddlyWiki documentation provides an example of the tag operator: [tag[task]] This selects all tiddlers that have been tagged as task. How though would one select all tiddlers tagged with one OR another tag; so for instance I want to select all…
Concrete_Buddha
  • 556
  • 4
  • 16
1
vote
1 answer

How to use the output of a tiddlywiki widget itself as a value for another wikitext expression?

Currently I'm trying to create a macro. The macro will be used within a $list widget which will cycle through a collection of tiddlers (chosen as per certain filter criteria which themselves aren't relevant here). Within the above $list widget, for…
Keyboard Penman
  • 162
  • 1
  • 11