[Pimki-users] register as developper for Pimki

Nicolas Delsaux nicolas.delsaux at gmail.com
Mon Nov 13 14:53:31 EST 2006


On 11/9/06, Assaph Mehr <assaph at gmail.com> wrote:
> Hi Nicolas,
>
>
> * Prepare the database
>
> Run 'rake migrate' from the project root. This should create and
> initialise the DB as db/dev.db3.
> (I'm betting this is the step you missed ;)

Obviously, you were right.
Well, in fact, there were also issues regarding dependancies, issues
that I solved using Locomotive (since I'm quite a Mac newbie, I had
weird issues regardin the install of sqlite-ruby package and the lack
of a valid ruby.h file).
>
> * Start the application
>
> Hopefully it should work. if not, send me the development.log.

Oh my god, it's alive, it's ALIVE :-)
>
> Looking forward to your feedback.

Nice new stylesheet.
So, now, i must do a svn update to sync with latest news, and start
coding my own features.
Besides, I''ve noticed in the instiki doc that there already exists a
footnote system, but not working like mine : the main difference is
that I add the footnote directly where its calling link appears,
allowing me not to handle those crazy numbers.
In fact, it's a port of docbook system making my footnotes look like :
My text needs a footnote<footnote>And here is the footnote</footnote>.

Do you think it could be added, since I find this system really cleaner ?
So, i must now check my suggested features and choose the one to work
on first ...
Well, the look was quite long, since dyndns seems to have borken my
nicolas-delsaux.homelinux.net website, which runs a pimki 1.8.2
containing all feature descriptions and details.

So .. I think i could start by taking a look at code syntax highlight.
Candidates highlighters are

http://rubyforge.org/projects/syntax
http://rd.cycnus.de/coderay/

I have a little preference for coderay, since it's more adapted to my
needs, which include Java, Javascript, XML, ... and Ruby of course.

So ... from what I can imagine (never forget I'm a complete Ruby
newbie), the first step would be to download my candidate (say
coderay) as a gem (like says the doc)

For the rendering, I have choose to use the method already used in my
good lod wordpress plugin :
a square bracketed tag at the begining, and the closing one at the end
and inside the code, like in
[RUBY]
 require 'coderay'

 tokens = CodeRay.scan "puts 'Hello, world!'", :ruby
 page = tokens.html :line_numbers => :inline, :wrap => :page
 puts page
[/RUBY]

>From what I've seen, i believe it should only be a rendering modification.
I guess it could be a custom chunk element ...
Sidenote : I believe this chunk system could also be used for my SF library

So, I create one more chunk with simple beta code :

# Chunk for including syntax highlighted computer code.
# This chunk uses the coderay library
class SyntacticHighlightChunk < Chunk
	SYNTAX_HIGHLIGHT_PATTERN = Regexp.new('RUBY', Regexp::MULTILINE)
	def self.pattern() SYNTAX_HIGHLIGHT_PATTERN end
	
	def resolved_text(view) 'toto' end
end

More due to my lack of skill on regexp than anything else
Besides, one should implement here a kind of proxy system like the one
mentionned in one of the ruby blogs I read ... that's it : eigenvalue
: http://eigenclass.org/hiki.rb?cmd=view&p=ruby+plugins&key=plugin

So, back to my code ...
I added my chunk to the POST_ENGINE ones and reloaded my page and
nothing happens.
Well, that may be called a bad karma.

To be continued ...

> Cheers,
> Assaph
>


-- 
Nicolas Delsaux
N'imprimez ce mail que si vous ne savez pas le lire sur l'écran : les
électrons se recyclent bien, le papier, beaucoup moins bien.


More information about the Pimki-users mailing list