Re: [xwiki-users] Pygments
Thank you so much for the feedback (as always!), Vincent :-D Can't wait to try out 1.7 - looking forward to the next release! And, appreciate the tip, Jerome - these sorts of tutes reeally help a lot :-) On 11/26/08, Jerome Velociter [EMAIL PROTECTED] wrote: Lewis Denizen wrote: Hi xwiki-users, I have a question (or more of a request) regarding the upcoming Pygments support in XWiki 1.7. We currently use XWiki at work to keep an internal documentation wiki for our application. We've created a few plugins which we've used in the following fashion perfectly (XWiki 1.0 syntax): {code:sql} DECLARE myDate DATETIME SELECT myDate = '$xwiki.dateParser.parseDate( -1b, MMdd )' -- this gives us the previous business date in MMdd format ... {code} Vincent kindly gave me a heads up regarding XWiki 1.7's Pygments support (seems to be supported by running it under Jython - VERY exciting :-D). So, I was wondering... Would something like the above be supported (i.e. verbatim code, but allow velocity macros to be run inside the code block)? If not, are there any documentation out there (other than the source code) detailing steps to create an XWiki macro (found http://dev.xwiki.org/xwiki/bin/view/Drafts/Tutorial+to+Write+a+Macro+in+the+new+rendering+enginewhich does help a bit if viewed in the code viewer), This draft http://dev.xwiki.org/xwiki/bin/view/Drafts/Tutorial+to+Write+a+Macro+in+the+new+rendering+engine is actually written for XWiki Syntax 2.0, but the version on XWiki.org does not support it yet. You can copy its code (from the code viewer) to a page in syntax 2.0 to see it more comfortable. Jerome. so that maybe we can build in support for something like that? Again, thanks for the great work! ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Pygments
Hi xwiki-users, I have a question (or more of a request) regarding the upcoming Pygments support in XWiki 1.7. We currently use XWiki at work to keep an internal documentation wiki for our application. We've created a few plugins which we've used in the following fashion perfectly (XWiki 1.0 syntax): {code:sql} DECLARE myDate DATETIME SELECT myDate = '$xwiki.dateParser.parseDate( -1b, MMdd )' -- this gives us the previous business date in MMdd format ... {code} Vincent kindly gave me a heads up regarding XWiki 1.7's Pygments support (seems to be supported by running it under Jython - VERY exciting :-D). So, I was wondering... Would something like the above be supported (i.e. verbatim code, but allow velocity macros to be run inside the code block)? If not, are there any documentation out there (other than the source code) detailing steps to create an XWiki macro (found http://dev.xwiki.org/xwiki/bin/view/Drafts/Tutorial+to+Write+a+Macro+in+the+new+rendering+enginewhich does help a bit if viewed in the code viewer), so that maybe we can build in support for something like that? Again, thanks for the great work! ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Pygments
Hi Lewis, On Nov 25, 2008, at 5:39 PM, Lewis Denizen wrote: Hi xwiki-users, I have a question (or more of a request) regarding the upcoming Pygments support in XWiki 1.7. We currently use XWiki at work to keep an internal documentation wiki for our application. We've created a few plugins which we've used in the following fashion perfectly (XWiki 1.0 syntax): {code:sql} DECLARE myDate DATETIME SELECT myDate = '$xwiki.dateParser.parseDate( -1b, MMdd )' -- this gives us the previous business date in MMdd format ... {code} Vincent kindly gave me a heads up regarding XWiki 1.7's Pygments support (seems to be supported by running it under Jython - VERY exciting :- D). So, I was wondering... Would something like the above be supported (i.e. verbatim code, but allow velocity macros to be run inside the code block)? Sure. You'd write: {{velocity}}{{code language=sql}} DECLARE myDate DATETIME SELECT myDate = '$xwiki.dateParser.parseDate( -1b, MMdd )' -- this gives us the previous business date in MMdd format ... {{/code}}{{/velocity}} If not, are there any documentation out there (other than the source code) detailing steps to create an XWiki macro (found http://dev.xwiki.org/xwiki/bin/view/Drafts/Tutorial+to+Write+a+Macro+in+the+new+rendering+enginewhich does help a bit if viewed in the code viewer), so that maybe we can build in support for something like that? Again, thanks for the great work! We don't have a tutorial for writing macros yet but that'll come. Anyone interested to help is welcome to work on this. That'd help a lot. Currently the easiest way to learn how to write a macro is to check out xwiki source tree and look at how the current macros are implemented. Thanks -Vincent ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Pygments
On Nov 25, 2008, at 5:57 PM, Vincent Massol wrote: Hi Lewis, On Nov 25, 2008, at 5:39 PM, Lewis Denizen wrote: Hi xwiki-users, I have a question (or more of a request) regarding the upcoming Pygments support in XWiki 1.7. We currently use XWiki at work to keep an internal documentation wiki for our application. We've created a few plugins which we've used in the following fashion perfectly (XWiki 1.0 syntax): {code:sql} DECLARE myDate DATETIME SELECT myDate = '$xwiki.dateParser.parseDate( -1b, MMdd )' -- this gives us the previous business date in MMdd format ... {code} Vincent kindly gave me a heads up regarding XWiki 1.7's Pygments support (seems to be supported by running it under Jython - VERY exciting :- D). So, I was wondering... Would something like the above be supported (i.e. verbatim code, but allow velocity macros to be run inside the code block)? Sure. You'd write: {{velocity}}{{code language=sql}} DECLARE myDate DATETIME SELECT myDate = '$xwiki.dateParser.parseDate( -1b, MMdd )' -- this gives us the previous business date in MMdd format ... {{/code}}{{/velocity}} Actually even better the code macro automatically guesses the language if you don't pass it! :) -Vincent If not, are there any documentation out there (other than the source code) detailing steps to create an XWiki macro (found http://dev.xwiki.org/xwiki/bin/view/Drafts/Tutorial+to+Write+a+Macro+in+the+new+rendering+enginewhich does help a bit if viewed in the code viewer), so that maybe we can build in support for something like that? Again, thanks for the great work! We don't have a tutorial for writing macros yet but that'll come. Anyone interested to help is welcome to work on this. That'd help a lot. Currently the easiest way to learn how to write a macro is to check out xwiki source tree and look at how the current macros are implemented. Thanks -Vincent ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Pygments
Lewis Denizen wrote: Hi xwiki-users, I have a question (or more of a request) regarding the upcoming Pygments support in XWiki 1.7. We currently use XWiki at work to keep an internal documentation wiki for our application. We've created a few plugins which we've used in the following fashion perfectly (XWiki 1.0 syntax): {code:sql} DECLARE myDate DATETIME SELECT myDate = '$xwiki.dateParser.parseDate( -1b, MMdd )' -- this gives us the previous business date in MMdd format ... {code} Vincent kindly gave me a heads up regarding XWiki 1.7's Pygments support (seems to be supported by running it under Jython - VERY exciting :-D). So, I was wondering... Would something like the above be supported (i.e. verbatim code, but allow velocity macros to be run inside the code block)? If not, are there any documentation out there (other than the source code) detailing steps to create an XWiki macro (found http://dev.xwiki.org/xwiki/bin/view/Drafts/Tutorial+to+Write+a+Macro+in+the+new+rendering+enginewhich does help a bit if viewed in the code viewer), This draft http://dev.xwiki.org/xwiki/bin/view/Drafts/Tutorial+to+Write+a+Macro+in+the+new+rendering+engine is actually written for XWiki Syntax 2.0, but the version on XWiki.org does not support it yet. You can copy its code (from the code viewer) to a page in syntax 2.0 to see it more comfortable. Jerome. so that maybe we can build in support for something like that? Again, thanks for the great work! ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users