Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » mediawiki templates and wikitext
mediawiki templates and wikitext [message #557803] Thu, 09 September 2010 02:40 Go to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
I am using local mediawiki files and transform them to Eclipse help.
My question is if there is support to use mediawiki templates when files
are local in my workspace?

I am copying snippets from an existing wiki, and one template that is in
use there looks like this:

|style="font-weight:bold;font-family:monospace;{{{style}}}"|{{{1}}}

The template is called 'command' and is used like this on the wiki page:
{{Command|unzip}}

I do not want to include all those formatting instructions directly in
the mediawiki file, so hoping templates can be used, or that someone has
other suggestions. (There is probably a simple solution to the specific
template above such as '''<code>unzip</code>''' or something, but this
was just an example).

Regards
- henrik
Re: mediawiki templates and wikitext [message #558005 is a reply to message #557803] Thu, 09 September 2010 18:16 Go to previous messageGo to next message
David Green is currently offline David GreenFriend
Messages: 136
Registered: July 2009
Senior Member
Henrik,

WikiText provides API for providing a means to resolve templates. The
following may help you:

org.eclipse.mylyn.wikitext.mediawiki.core.TemplateResolver
org.eclipse.mylyn.wikitext.mediawiki.core.MediaWikiLanguage. setTemplateProviders(List <TemplateResolver>)

So far these have not been exposed in Ant tasks.

I had thought that a file-based template resolver would be useful, where
a folder could be specified in which files correspond to templates (in
your case, Command.mediawiki) however I didn't get around to
implementing it.

Feel free to contribute something in this area!

David

On 9/8/2010 7:40 PM, Henrik Lindberg wrote:
> I am using local mediawiki files and transform them to Eclipse help.
> My question is if there is support to use mediawiki templates when files
> are local in my workspace?
>
> I am copying snippets from an existing wiki, and one template that is in
> use there looks like this:
>
> |style="font-weight:bold;font-family:monospace;{{{style}}}"|{{{1}}}
>
> The template is called 'command' and is used like this on the wiki page:
> {{Command|unzip}}
>
> I do not want to include all those formatting instructions directly in
> the mediawiki file, so hoping templates can be used, or that someone has
> other suggestions. (There is probably a simple solution to the specific
> template above such as '''<code>unzip</code>''' or something, but this
> was just an example).
>
> Regards
> - henrik
Re: mediawiki templates and wikitext [message #558217 is a reply to message #558005] Fri, 10 September 2010 12:43 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Thanks David.
For now I went with the simpler solution of changing the content. Next
time it may not be as straight forward and I may end up implementing
local template support...

Regards
- henrik

On 9/9/10 8:16 PM, David Green wrote:
>
> Henrik,
>
> WikiText provides API for providing a means to resolve templates. The
> following may help you:
>
> org.eclipse.mylyn.wikitext.mediawiki.core.TemplateResolver
> org.eclipse.mylyn.wikitext.mediawiki.core.MediaWikiLanguage. setTemplateProviders(List <TemplateResolver>)
>
>
> So far these have not been exposed in Ant tasks.
>
> I had thought that a file-based template resolver would be useful, where
> a folder could be specified in which files correspond to templates (in
> your case, Command.mediawiki) however I didn't get around to
> implementing it.
>
> Feel free to contribute something in this area!
>
> David
>
> On 9/8/2010 7:40 PM, Henrik Lindberg wrote:
>> I am using local mediawiki files and transform them to Eclipse help.
>> My question is if there is support to use mediawiki templates when files
>> are local in my workspace?
>>
>> I am copying snippets from an existing wiki, and one template that is in
>> use there looks like this:
>>
>> |style="font-weight:bold;font-family:monospace;{{{style}}}"|{{{1}}}
>>
>> The template is called 'command' and is used like this on the wiki page:
>> {{Command|unzip}}
>>
>> I do not want to include all those formatting instructions directly in
>> the mediawiki file, so hoping templates can be used, or that someone has
>> other suggestions. (There is probably a simple solution to the specific
>> template above such as '''<code>unzip</code>''' or something, but this
>> was just an example).
>>
>> Regards
>> - henrik
>
Re: mediawiki templates and wikitext [message #602107 is a reply to message #557803] Thu, 09 September 2010 18:16 Go to previous message
David Green is currently offline David GreenFriend
Messages: 136
Registered: July 2009
Senior Member
Henrik,

WikiText provides API for providing a means to resolve templates. The
following may help you:

org.eclipse.mylyn.wikitext.mediawiki.core.TemplateResolver
org.eclipse.mylyn.wikitext.mediawiki.core.MediaWikiLanguage. setTemplateProviders(List <TemplateResolver>)

So far these have not been exposed in Ant tasks.

I had thought that a file-based template resolver would be useful, where
a folder could be specified in which files correspond to templates (in
your case, Command.mediawiki) however I didn't get around to
implementing it.

Feel free to contribute something in this area!

David

On 9/8/2010 7:40 PM, Henrik Lindberg wrote:
> I am using local mediawiki files and transform them to Eclipse help.
> My question is if there is support to use mediawiki templates when files
> are local in my workspace?
>
> I am copying snippets from an existing wiki, and one template that is in
> use there looks like this:
>
> |style="font-weight:bold;font-family:monospace;{{{style}}}"|{{{1}}}
>
> The template is called 'command' and is used like this on the wiki page:
> {{Command|unzip}}
>
> I do not want to include all those formatting instructions directly in
> the mediawiki file, so hoping templates can be used, or that someone has
> other suggestions. (There is probably a simple solution to the specific
> template above such as '''<code>unzip</code>''' or something, but this
> was just an example).
>
> Regards
> - henrik
Re: mediawiki templates and wikitext [message #602122 is a reply to message #558005] Fri, 10 September 2010 12:43 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Thanks David.
For now I went with the simpler solution of changing the content. Next
time it may not be as straight forward and I may end up implementing
local template support...

Regards
- henrik

On 9/9/10 8:16 PM, David Green wrote:
>
> Henrik,
>
> WikiText provides API for providing a means to resolve templates. The
> following may help you:
>
> org.eclipse.mylyn.wikitext.mediawiki.core.TemplateResolver
> org.eclipse.mylyn.wikitext.mediawiki.core.MediaWikiLanguage. setTemplateProviders(List <TemplateResolver>)
>
>
> So far these have not been exposed in Ant tasks.
>
> I had thought that a file-based template resolver would be useful, where
> a folder could be specified in which files correspond to templates (in
> your case, Command.mediawiki) however I didn't get around to
> implementing it.
>
> Feel free to contribute something in this area!
>
> David
>
> On 9/8/2010 7:40 PM, Henrik Lindberg wrote:
>> I am using local mediawiki files and transform them to Eclipse help.
>> My question is if there is support to use mediawiki templates when files
>> are local in my workspace?
>>
>> I am copying snippets from an existing wiki, and one template that is in
>> use there looks like this:
>>
>> |style="font-weight:bold;font-family:monospace;{{{style}}}"|{{{1}}}
>>
>> The template is called 'command' and is used like this on the wiki page:
>> {{Command|unzip}}
>>
>> I do not want to include all those formatting instructions directly in
>> the mediawiki file, so hoping templates can be used, or that someone has
>> other suggestions. (There is probably a simple solution to the specific
>> template above such as '''<code>unzip</code>''' or something, but this
>> was just an example).
>>
>> Regards
>> - henrik
>
Previous Topic:How to retrieve context-artifacts and change them
Next Topic:mediawiki to help - links questions
Goto Forum:
  


Current Time: Tue Apr 16 10:41:37 GMT 2024

Powered by FUDForum. Page generated in 0.32254 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top