Changes between Initial Version and Version 1 of ExtractUrlPlugin


Ignore:
Timestamp:
Nov 11, 2008, 10:46:23 PM (15 years ago)
Author:
Martin Scharrer
Comment:

New hack ExtractUrlPlugin, created by martin_s

Legend:

Unmodified
Added
Removed
Modified
  • ExtractUrlPlugin

    v1 v1  
     1= Plug-in to extract URL from TracWiki links in Plug-ins and Macros =
     2
     3== Description ==
     4
     5This plug-in provides the function `extract_url` which can be used in Trac plug-ins and macros to extract th URL of any TracWiki link for e.g. generation of links in produced HTML code.
     6
     7= Usage =
     8{{{
     9#!python
     10from tracextracturl import extract_url
     11# ...
     12  url = extract_url (env, context, wikilink, raw=False)
     13}}}
     14The argument `raw` controls if the returned link should point to a brows-able (False) or download-able (True) target. The second one can be used in image or similar tags.
     15
     16
     17
     18
     19
     20== Bugs/Feature Requests ==
     21
     22Existing bugs and feature requests for ExtractUrlPlugin are
     23[report:9?COMPONENT=ExtractUrlPlugin here].
     24
     25If you have any issues, create a
     26[http://trac-hacks.org/newticket?component=ExtractUrlPlugin&owner=martin_s new ticket].
     27
     28== Download ==
     29
     30Download the zipped source from [download:extracturlplugin here].
     31
     32== Source ==
     33
     34You can check out ExtractUrlPlugin from [http://trac-hacks.org/svn/extracturlplugin here] using Subversion, or [source:extracturlplugin browse the source] with Trac.
     35
     36== Example ==
     37
     38{{{
     39#!python
     40from tracextracturl import extract_url
     41
     42def MyMacro(WikiMacroBase):
     43  def expand_macro (self, formatter, name, content):
     44     # e.g. wikilink = 'wiki:WikiStart'
     45     url = extract_url(self.env, formatter.context, wikilink)
     46}}}
     47
     48
     49== Recent Changes ==
     50
     51[[ChangeLog(extracturlplugin, 3)]]
     52
     53== Author/Contributors ==
     54
     55'''Author:''' [wiki:martin_s] [[BR]]
     56'''Contributors:'''