[ul-docs] wiki update ...

70 views
Skip to first unread message

Paul Grinberg

unread,
Apr 27, 2010, 4:29:03 PM4/27/10
to ul-...@googlegroups.com
Did you know that our wiki has the ability to do syntax highlighting for code? For example, you can do

<code lang='bash'>user@localhost: ~> ls -al
-rw-r--r--  1 gri6507 None    169 2010-04-27 12:45 try.php
-rwxrwxrwx  1 gri6507 None    194 2010-04-27 13:15 try.pl*
</code>

for bash commands. Or, for spec files, you can do

<code lang='rpmspec'>
%define libname_devel   %mklibname %{name} -d
%define staticname  %mklibname %{name} -s -d
%define ltitle  AfterStep Window Manager

Summary:    %{ltitle}
Name:       %{name}
Version:    %{version}
</code>

For examples of these usages, please take a look at the recently formatted http://docs.unity-linux.org/Packaging_Guide:Patching_RPMs. To see which syntax highlight languages are supported, see http://qbnz.com/highlighter/index.php

paul.

Jeremiah Summers

unread,
Apr 27, 2010, 5:27:43 PM4/27/10
to ul-...@googlegroups.com
pretty colors....

dillj

unread,
Apr 28, 2010, 12:17:16 AM4/28/10
to ul-...@googlegroups.com
Oooo... pretty colors...

wait,. what's the elephant doing there?

-
thnks Paul and JMan for the work you've been putting in the wiki

Kaleb

unread,
Apr 28, 2010, 9:04:50 AM4/28/10
to ul-...@googlegroups.com
With DokuWiki, you can turn the code blocks into downloadable files. Can this also be done with MediaWiki?

devnet

unread,
Apr 28, 2010, 9:54:25 AM4/28/10
to ul-...@googlegroups.com


Probably with a plugin...

But can dokuwiki make everyone feel warm and fuzzy inside like mediawiki can?  The answer is no unfortunately.  I'd rather have used dokuwiki for everything as well but more people are editing the wiki now than did before because more ppl are familiar with mediawiki.  I'm not making stuff up just to make it appear better, just stating a fact.

Kaleb

unread,
Apr 28, 2010, 10:04:59 AM4/28/10
to ul-...@googlegroups.com
On Wed, Apr 28, 2010 at 9:54 AM, devnet <dev...@gmail.com> wrote:
Probably with a plugin...

But can dokuwiki make everyone feel warm and fuzzy inside like mediawiki can?  The answer is no unfortunately.  I'd rather have used dokuwiki for everything as well but more people are editing the wiki now than did before because more ppl are familiar with mediawiki.  I'm not making stuff up just to make it appear better, just stating a fact.

Hey, I'm not saying that. I'm just saying here's some functionality of DokuWiki that I really like, can we please get this functionality on our wiki?

devnet

unread,
Apr 28, 2010, 10:27:05 AM4/28/10
to ul-...@googlegroups.com
Paul,

The functionality KD is talking about exists in Syntaxhighlighter, a project hosted on google code.  The only mediawiki plugin I'm aware of that uses this is http://www.lastengine.com/syntax-highlighter-code-colorizer-mediawiki/

See what you can do with that versus the one we currently have installed.  It should make for downloadable code blocks.

Jeremiah Summers

unread,
Apr 28, 2010, 11:41:22 AM4/28/10
to ul-...@googlegroups.com
I just mess things up everyone else just fixes them. In Arizona that's
what we're good at I hear from the media screwing up laws and trying
to force the government to fix it. Still at the very least I am proud
of my small wiki work and even my state :)

Jeremiah

Paul Grinberg

unread,
Apr 28, 2010, 12:33:54 PM4/28/10
to ul-...@googlegroups.com
I will gladly investigate this. However, my work's new content filtering is much more aggressive than the previous one. I cannot even go to that link :-) And doing it from home is going to take a bit of time (moving in just a few days ... )

paul.

gettinther

unread,
Apr 28, 2010, 5:58:43 PM4/28/10
to ul-...@googlegroups.com
Enjoy the move and don't forget to post a pic of the new house ;)

Custom Processing Unlimited

unread,
Apr 28, 2010, 11:44:02 PM4/28/10
to ul-...@googlegroups.com
make sure you smudge out the address... don't want random "disgruntals" knocking down your back door (the one's at the front are merely a distraction! :P)

--
"Custom" is NOT mass produced... then it's just a product line.
Custom Processing Unlimited

Paul Grinberg

unread,
Apr 29, 2010, 10:08:29 AM4/29/10
to ul-...@googlegroups.com
Well, I took a look at the extension that Devnet pointed out above and, unfortunately, it did not have syntax highlighting rules for several important languages that we use, not the least of which is RPM spec format. So, since we were just missing a simple functionality of "Download Code" link near the block of code, I have modified our present extension to add optionally add this feature. The full syntax for the <code> tag is actually

<code [options]>your code</code>

where options are:
lang='s'       This is the language type that explains how to highlight the code. Default is 'text'.
               See GeSHi for full list of supported syntaxes

linenumbers    Turn on line numbers for each line in your code
download       Turn on the "Download Code" link for this block of your code
tabwidth='n'   How many spaces does a TAB represent
fileurl='s'    Instead of processing the code provided between the tags, process the code at specified URL

Please feel free to play with this.  Also, ask questions about other missing features on our wiki!
paul.

Kaleb

unread,
Apr 29, 2010, 10:10:32 AM4/29/10
to ul-...@googlegroups.com
On Thu, Apr 29, 2010 at 10:08 AM, Paul Grinberg <gri...@gmail.com> wrote:
Well, I took a look at the extension that Devnet pointed out above and, unfortunately, it did not have syntax highlighting rules for several important languages that we use, not the least of which is RPM spec format. So, since we were just missing a simple functionality of "Download Code" link near the block of code, I have modified our present extension to add optionally add this feature. The full syntax for the <code> tag is actually 

<code [options]>your code</code>

where options are:
lang='s'       This is the language type that explains how to highlight the code. Default is 'text'.
               See GeSHi for full list of supported syntaxes

linenumbers    Turn on line numbers for each line in your code
download       Turn on the "Download Code" link for this block of your code
tabwidth='n'   How many spaces does a TAB represent
fileurl='s'    Instead of processing the code provided between the tags, process the code at specified URL

Please feel free to play with this.  Also, ask questions about other missing features on our wiki!
paul.

Sweet! Thank you, Paul!

spiralofhope

unread,
Aug 22, 2010, 1:32:10 PM8/22/10
to ul-...@googlegroups.com
On Thu, 29 Apr 2010 09:08:29 -0500
Paul Grinberg <gri...@gmail.com> wrote:

> Well, I took a look at the extension that Devnet pointed out above
> and, unfortunately, it did not have syntax highlighting rules for
> several important languages that we use, not the least of which is
> RPM spec format.

I'm not sure if this was the extension that you're using or not. If
not, it's been on my todo list for some time now:
http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi

When googling, I saw that it does support RPM:
http://www.google.ca/search?hl=en&q=geshi+RPM+Specification+File
.. however, I cannot find an RPM reference on the extension's home page
like Google says I should.


I'm personally migrating away from MediaWiki, and I'll probably end up
with something nice and simple like:
http://alexgorbatchev.com/SyntaxHighlighter/

Paul Grinberg

unread,
Aug 23, 2010, 10:20:16 AM8/23/10
to ul-...@googlegroups.com
On Sun, Aug 22, 2010 at 12:32 PM, spiralofhope <spiral...@gmail.com> wrote:
On Thu, 29 Apr 2010 09:08:29 -0500
Paul Grinberg <gri...@gmail.com> wrote:

> Well, I took a look at the extension that Devnet pointed out above
> and, unfortunately, it did not have syntax highlighting rules for
> several important languages that we use, not the least of which is
> RPM spec format.

I'm not sure if this was the extension that you're using or not.  If
not, it's been on my todo list for some time now:
http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi

Nope - that extension didn't have the features that I felt that we needed. It just so happens that in the past, I had written a different extension using GeSHi, so we are using that one. You can always check the details of the installed extensions on http://docs.unity-linux.org/Special:Version

When googling, I saw that it does support RPM:
http://www.google.ca/search?hl=en&q=geshi+RPM+Specification+File
.. however, I cannot find an RPM reference on the extension's home page
like Google says I should.

Support of RPM Spec file format was something that I had asked from GeSHi developers a long time ago. They never responded. Since I didn't find any other syntax highlighter that handled this format and still integrated nicely into a wiki, I simply wrote the syntax file for this format and submitted it to GeSHi developers. I have no idea whether or not they plan to incorporate it into a release in the future.
 

I'm personally migrating away from MediaWiki, and I'll probably end up
with something nice and simple like:
http://alexgorbatchev.com/SyntaxHighlighter/

The preferred choice for a wiki is always up for debate ...

dillj

unread,
Aug 23, 2010, 11:59:35 AM8/23/10
to ul-...@googlegroups.com
wow, way to resurect a thread!

Paul Grinberg

unread,
Aug 23, 2010, 1:46:18 PM8/23/10
to ul-...@googlegroups.com
On Mon, Aug 23, 2010 at 10:59 AM, dillj <the....@gmail.com> wrote:
wow, way to resurect a thread!


On Mon, Aug 23, 2010 at 4:20 PM, Paul Grinberg <gri...@gmail.com> wrote:
On Sun, Aug 22, 2010 at 12:32 PM, spiralofhope <spiral...@gmail.com> wrote:
On Thu, 29 Apr 2010 09:08:29 -0500
Paul Grinberg <gri...@gmail.com> wrote:

> Well, I took a look at the extension that Devnet pointed out above
> and, unfortunately, it did not have syntax highlighting rules for
> several important languages that we use, not the least of which is
> RPM spec format.

I'm not sure if this was the extension that you're using or not.  If
not, it's been on my todo list for some time now:
http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi

Nope - that extension didn't have the features that I felt that we needed. It just so happens that in the past, I had written a different extension using GeSHi, so we are using that one. You can always check the details of the installed extensions on http://docs.unity-linux.org/Special:Version

When googling, I saw that it does support RPM:
http://www.google.ca/search?hl=en&q=geshi+RPM+Specification+File
.. however, I cannot find an RPM reference on the extension's home page
like Google says I should.

Support of RPM Spec file format was something that I had asked from GeSHi developers a long time ago. They never responded. Since I didn't find any other syntax highlighter that handled this format and still integrated nicely into a wiki, I simply wrote the syntax file for this format and submitted it to GeSHi developers. I have no idea whether or not they plan to incorporate it into a release in the future.

To my pleasant surprise, I've discovered that GeSHi, at least in their latest version, is distributing my rpmspec.php file. In other words, any wiki extension using GeSHi as the syntax highlighter should work now.
 

spiralofhope

unread,
Aug 28, 2010, 11:26:25 AM8/28/10
to ul-...@googlegroups.com
Sweet!
Reply all
Reply to author
Forward
0 new messages