# NOTE: The converters are executed in alphabetical order! | |
## Hierarchy Configuration | |
## To use: uncomment and configure 01-001 lines, uncomment 4link2post... converters | |
## and choose which 4image and 4link converters you want. | |
## -- which hierarchy: choose either FilepathHierarhcy or DokuwikiHierarchy | |
## -- filepath hierarchy will simply use the filepath to determine the hierarchy | |
## -- dokuwiki hierarchy is an extension of filepath hierarchy that allows you | |
## -- more finegrained control over namespace collision resolution. | |
#DokuWiki.01.hierarchy-builder=com.atlassian.uwc.hierarchies.FilepathHierarchy | |
#DokuWiki.01.hierarchy-builder=com.atlassian.uwc.hierarchies.DokuwikiHierarchy | |
#DokuWiki.02.switch.hierarchy-builder=UseBuilder | |
## Set the ignorable ancestors property to the lowest file system directory | |
## you don't want to see in the hierarchy | |
#DokuWiki.03.filepath-hierarchy-ignorable-ancestors.property=/SET/THIS | |
#DokuWiki.04.filepath-hierarchy-ext.property= | |
## Uncomment filepath-hierarchy-matchpagename for EITHER FilepathHierarchy or | |
## DokuwikiHierarchy. Keep this set to false, as the dokuwiki hierarchy was | |
## written under the presumption that we would be comparing page titles | |
#DokuWiki.05.filepath-hierarchy-matchpagename.property=false | |
## These are the DokuwikiHierarchy specific properties. | |
## Set these to tell the dokuwikihierarchy which pages will have namespace collisions in a particular space. | |
## You don't need to say "Start" as start.txt pages are automatically renamed as their namespace's page. | |
## The key should be DokuWiki.001.collision-titles-spacekey.property=Pagenames,With,Collision,Troubles | |
## See DokuwikiHierarchy config notes in https://studio.plugins.atlassian.com/wiki/display/UWC/UWC+DokuWiki+Notes | |
#DokuWiki.001.collision-titles-spacekey.property=Set,This | |
#DokuWiki.001.collision-titles-foo.property=Bar | |
## Tell the DokuwikiHierarchy if the default home page for a node is a sibling or child file of the node. Values can be 'sibling' or 'child'. Default is 'child' | |
#DokuWiki.001.hierarchy-homepage-position.property=sibling | |
## Tell the DokuwikiHierarchy what the filename of the homepage should be without the .txt. Values can be a string (like 'start'). Leave empty or commented to specify that it should be the same as the node name. | |
#DokuWiki.001.hierarchy-homepage-dokuwiki-filename.property= | |
## Tell the DokuwikiHierarchy which spacekeys are getting what dokuwiki directories | |
## space-[spacekey].property=dir,which,will,be,in,this,space | |
## The following would be saying that file system directory with name "dir" would be associated with | |
## confluence "spacekey", and directories "foo" and "bar/foo" would be associated with spacekey "foo". | |
## Note: These do not have to be absolute pathnames. They should conform to the last relative directory listed in the | |
## pages setting | |
#DokuWiki.001.space-spacekey.property=dir | |
#DokuWiki.001.space-foo.property=foo,bar/foo | |
## The space handler will use the space- definitions above to define | |
## the spacekey for each page. If we can't identify the space that way, | |
## then we use the default space. | |
DokuWiki.001.spacehandler.class=com.atlassian.uwc.converters.dokuwiki.SpaceConverter | |
## Set the attachment directory value to a :: delimited list of media directories. It should | |
## correspond to your pages setting, but with "media" instead of "pages" as the penultimate directory | |
#DokuWiki.001.attachmentdirectory.property=/Absolute/path/to/media/dir::/Absolute/path/to/media/foo | |
# Code (needs to be early so we can tokenize the contents) | |
DokuWiki.002.code.java-regex-tokenizer=(?s)<code>(.*?)<\/code>{replace-with}{code}$1{code} | |
DokuWiki.002.code-tsql.java-regex-tokenizer=(?s)\<code (tsql)\>(.*?)<\/code>{replace-with}{code:sql}$2{code} | |
DokuWiki.002.code-type.java-regex-tokenizer=(?s)\<code ([^>]+?)\>(.*?)<\/code>{replace-with}{code:$1}$2{code} | |
DokuWiki.002.noformat.java-regex-tokenizer=(?s)%%(.*?)%%{replace-with}{noformat}$1{noformat} | |
# We do this after code because code blocks often have leading spaces and we | |
# don't want to transform a code block more than once | |
DokuWiki.003.leadingspacestocode.class=com.atlassian.uwc.converters.dokuwiki.LeadingSpacesConverter | |
# We redo this so that the results of leadingspaces are tokenized | |
DokuWiki.004.code.java-regex-tokenizer=(?s)<code>(.*?)<\/code>{replace-with}{code}$1{code} | |
DokuWiki.009.esc-lbrackets.java-regex=(?<!\[)\[(?!\[){replace-with}\\[ | |
DokuWiki.009.esc-lcurlybrace.java-regex=(?<!\{)\{(?!\{){replace-with}\\{ | |
## Tag Plugin - https://www.dokuwiki.org/plugin:tag | |
DokuWiki.010.tags.class=com.atlassian.uwc.converters.dokuwiki.TagConverter | |
# Text formating | |
DokuWiki.1bold.perl=s/\*\*([^*]+?)\*\*/*$1*/g | |
DokuWiki.1italic.perl=s/(?s)([^:])\/\/(.+?)\/\//$1_$2_/g | |
DokuWiki.1underlined.perl=s/__([^_]+?)__/+$1+/g | |
DokuWiki.1subscript.perl=s/(?s)<sub>(.*?)<\/sub>/~$1~/g | |
DokuWiki.1superscript.perl=s/(?s)<sup>(.*?)<\/sup>/\^$1\^/g | |
DokuWiki.1deleted.perl=s/(?s)<del>(.*?)<\/del>/-$1-/g | |
DokuWiki.1hr.perl=s/[ ]*-{4,}[ ]*/----/g | |
DokuWiki.1h1.java-regex=={6}(.*?)(?>={6}){replace-with}h1. $1 | |
DokuWiki.1h2.java-regex=={5}(.*?)(?>={5}){replace-with}h2. $1 | |
DokuWiki.1h3.java-regex=={4}(.*?)(?>={4}){replace-with}h3. $1 | |
DokuWiki.1h4.java-regex=={3}(.*?)(?>={3}){replace-with}h4. $1 | |
DokuWiki.1h5.java-regex=={2}(.*?)(?>={2}){replace-with}h5. $1 | |
DokuWiki.1h6cleanup.perl=s/=+(h\\d\.)/$1/g | |
# Email addresses. | |
DokuWiki.2email.perl=s/<([\w.]+@[\w.]+)>/\[mailto:$1\]/g | |
DokuWiki.2mailto-alias.java-regex-tokenizer=\[\[mailto:([^\]|\s]*)\s*\|\s*([^\]]*)\]\]{replace-with}[$2|mailto:$1] | |
DokuWiki.2mailto.java-regex-tokenizer=\[\[mailto:([^\]]*)\]\]{replace-with}[mailto:$1] | |
# ==================================================================================================================== | |
# Novotny; 27.3.2009 | |
# Remove ((Tooltips)) as there is no Confluence pendant | |
DokuWiki.2tooltips.java-regex=\(\((.*?)\)\){replace-with}\($1\) | |
# Clear text floating ~~CL~~ as there is no Confluence pendant | |
DokuWiki.2cl.java-regex=(~~CL~~){replace-with} | |
# Transform notes | |
DokuWiki.2note.java-regex=\<note\>((?s).*?)\<\/note\>{replace-with}{info}$1{info} | |
DokuWiki.2notewarning.java-regex=\<note warning\>((?s).*?)\<\/note\>{replace-with}{warning}$1{warning} | |
DokuWiki.2notetip.java-regex=\<note tip\>((?s).*?)\<\/note\>{replace-with}{tip}$1{tip} | |
DokuWiki.2noteimportant.java-regex=\<note important\>((?s).*?)\<\/note\>{replace-with}{note}$1{note} | |
# Transform german Wikipedia links: [wpde>...] | |
DokuWiki.3interwiki_wpde1.perl=s/\[\[[\\s]*wpde>([^\]\|]*)\]/[[http:\/\/de.wikipedia.org\/wiki\/$1|$1]/g | |
# Transform Wikipedia links: [wp>...|Alias] | |
DokuWiki.3interwiki_wpde2.perl=s/\[\[[\\s]*wpde>([^\|\]]*)\|([^\]]*)\]/[[http:\/\/de.wikipedia.org\/wiki\/$1|$2]/g | |
# ==================================================================================================================== | |
# Lists | |
DokuWiki.3.lists.class=com.atlassian.uwc.converters.dokuwiki.ListConverter | |
# Tables -- must be run before the image and link converters | |
DokuWiki.21.prep-colspans.class=com.atlassian.uwc.converters.dokuwiki.PrepColSpansConverter | |
DokuWiki.22.table1.perl=s/\^/||/g | |
# Interwiki links | |
# Match [...|doku>...] | |
DokuWiki.3interwiki_doku1.perl=s/\[\[[\\s]*doku>([^\|\]]*)\|([^\]]*)\]/[[http:\/\/wiki.splitbrain.org\/$1|$2]/g | |
# Match [doku>...] | |
DokuWiki.3interwiki_doku2.perl=s/\[\[[\\s]*doku>([^\]\|]*)\]/[[http:\/\/wiki.splitbrain.org\/$1|$1]/g | |
DokuWiki.3interwiki_wiki1.perl=s/\[\[[\\s]*wiki>([^\|\]]*)\|([^\]]*)\]/[[http:\/\/c2.com\/cgi\/wiki?$1|$2]/g | |
# Match [wiki>...] | |
DokuWiki.3interwiki_wiki2.perl=s/\[\[[\\s]*wiki>([^\]\|]*)\]/[[http:\/\/c2.com\/cgi\/wiki?$1|$1]/g | |
# Match [...|wp>...] | |
DokuWiki.3interwiki_wp1.perl=s/\[\[[\\s]*wp>([^\|\]]*)\|([^\]]*)\]/[[http:\/\/en.wikipedia.org\/wiki\/$1|$2]/g | |
# Match [wp>...] | |
DokuWiki.3interwiki_wp2.perl=s/\[\[[\\s]*wp>([^\]\|]*)\]/[[http:\/\/en.wikipedia.org\/wiki\/$1|$1]/g | |
# Match [[\\some\windows\share]] | |
#DokuWiki.3.winshare.java-regex=\[\[(\\\\.*?)\]\]{replace-with}[$1] | |
## Images | |
## If using DokuwikiHierarchy, comment DokuWikiImageConverter, and uncomment HierarchyImageConverter | |
#DokuWiki.4image1.class=com.atlassian.uwc.converters.dokuwiki.DokuWikiImageConverter | |
#DokuWiki.4image2.class=com.atlassian.uwc.converters.dokuwiki.HierarchyImageConverter | |
## Looks for references to images, finds the files in the attachmentdirectory | |
## updates the reference and attaches to the page | |
DokuWiki.4image2.class=com.atlassian.uwc.converters.dokuwiki.DokuwikiAttachmentConverter | |
## External links | |
## UNC Style Links - if using links like [\\path\to\file]], then uncomment | |
## the following 3 converters | |
#DokuWiki.4.illegalnames-customprotocol.property=((https?://)|(mailto:)|(file:)|(ftp:)|(\\\\))(.*) | |
#DokuWiki.4.unc-alias.java-regex-tokenizer=\[\[(\\[^\]|\s]*)\s*\|\s*([^\]]*)\]\]{replace-with}[$2|$1] | |
#DokuWiki.4.unc.java-regex-tokenizer=\[\[(\\[^\]|]*)\]\]{replace-with}[$1] | |
## If using DokuwikiHierarchy, comment DokuWikiLinkConverter, and uncomment HierarchyLinkConverter | |
## and HierarchyTitleConverter | |
DokuWiki.4link1.class=com.atlassian.uwc.converters.dokuwiki.DokuWikiLinkConverter | |
#DokuWiki.4link2.class=com.atlassian.uwc.converters.dokuwiki.HierarchyLinkConverter | |
#DokuWiki.4title.class=com.atlassian.uwc.converters.dokuwiki.HierarchyTitleConverter | |
## Uncomment these if you are using the UseBuilder hierarchy | |
#DokuWiki.4link2postalias.java-regex=\[([^|\]]+)\|[^\]]+(?>--)\s*{replace-with}[$1| | |
#DokuWiki.4link2postprocess.java-regex=\[[^\]]+(?>--)\s*{replace-with}[ | |
# Monospaced must be run after the image converters! | |
DokuWiki.5monospaced.perl=s/''([^']+)''/{{$1}}/g | |
DokuWiki.5smiley1.perl=s/:-D/:D/g | |
DokuWiki.5smiley2.perl=s/;-\)/;)/g | |
DokuWiki.5smiley3.perl=s/:\?:/(?)/g | |
DokuWiki.5smiley4.perl=s/:!:/(!)/g | |
## Extensions | |
## Csv - Uncomment this if you want the csv extension to be transformed to | |
## table plugin syntax. See http://www.dokuwiki.org/plugin:csv | |
## https://studio.plugins.atlassian.com/wiki/display/TBL/CSV+Macro | |
#DokuWiki.60.csv.java-regex=<\/?csv>{replace-with}{csv} | |
## Folded - Uncomment this if you want the folded extension to be transformed | |
## to the expand user macro http://confluence.atlassian.com/display/DISC/Expand+Text+User+Macro | |
## See: http://www.dokuwiki.org/plugin:folded | |
## and: | |
#DokuWiki.61.folded.java-regex=(?s)[+]{4,4}([^|]+)\|(.*?)[+]{4,4}{replace-with}{expand:$1}$2{expand} | |
## Discussions to Confluence comments | |
## Note: requires meta-dir property be set. See DokuWiki.7.meta-dir.property | |
DokuWiki.62.discussion-to-comments.class=com.atlassian.uwc.converters.dokuwiki.DiscussionConverter | |
DokuWiki.62.remove-discussion.java-regex=~~DISCUSSION[^~]*~~[\n]?{replace-with} | |
## Remove double backslashes at ends of newlines | |
#DokuWiki.65.doublebs.java-regex=(?m)\\\\${replace-with} | |
## User Date data | |
## Uncomment these and configure the meta-dir property if you want | |
## User and timestamp data to be retained. You will also need the | |
## hierarchy converter's filepath-hierarchy-ignorable-ancestors to be set | |
## The users-must-exist property determines whether your confluence ignores | |
## requests to user authors that don't exist - default is true. | |
## Requires UDMF Plugin https://studio.plugins.atlassian.com/wiki/display/udmf | |
#DokuWiki.7.meta-dir.property=/Set/This/To/Meta/Directory | |
#DokuWiki.7.users-must-exist.property=false | |
#DokuWiki.7.userdata.class=com.atlassian.uwc.converters.dokuwiki.DokuwikiUserDate | |
# Detokenize (code blocks) | |
DokuWiki.91.detokenizer.class=com.atlassian.uwc.converters.DetokenizerConverter | |
# Tokenize existing html tags | |
DokuWiki.92.htmltags.java-regex-tokenizer=(?s)<html>(.*?)</html>{replace-with}$1 | |
# Transform to Confluence XHTML Format as a converter | |
DokuWiki.95.confluencemarkuptoxhtml.class=com.atlassian.uwc.converters.ConfluenceMarkupToXhtml | |
# Don't allow the engine to run the transformation | |
DokuWiki.95.engine-markuptoxhtml.property=false | |
# Handle Table col and rowspans | |
DokuWiki.96.table-rowandcolspans.class=com.atlassian.uwc.converters.dokuwiki.TableRowColSpanConverter | |
# Detokenize (html tags) - we do this to address cases where the users had | |
# Dokuwiki markup and html tagged markup. DokuWiki.92 tokenized the tags before | |
# the call to get the atlassian xhtml, but then the tokens were transformed so | |
# we have to fix them with 97 and 98 before we can detokenize | |
DokuWiki.97.fixtokenizertokens-start.java-regex=<sub>(?=UWCTOKENSTART){replace-with}~ | |
DokuWiki.98.fixtokenizertokens-end.java-regex=(?<=UWCTOKENEND)</sub>{replace-with}~ | |
DokuWiki.99.detokenizer.class=com.atlassian.uwc.converters.DetokenizerConverter |