Enabling reStructuredText as a Markup language in Pier

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Enabling reStructuredText as a Markup language in Pier

Offray
Hi all,

It has been really nice my re-encounter with Smalltalk using Pharo,
Seaside and Pier, and knowing that there are some important projects to
learn like Moose or Aida and Illiad. I want to make my site using Pier,
and "consolidate" my on-line presence there. Previously I have used Moin
Moin and Tiddlywiki and now I'm writing my thesis using
reStructuredText, so would be nice to have a single markup language for
all this writing and I think that this one should be reST. So the
project is giving Pier the possibility to use this as a Markup language.
I have seen that there are some projects like Helvetia and Pettit Parser
that, perhaps, may be used in this kind of project, but I really don't
know if this is feasible or where to start. So if anyone have some ideas
on this I would really like to hear them.

Thanks,

Offray
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Enabling reStructuredText as a Markup language in Pier

Lukas Renggli
Hi Offray,

> and Tiddlywiki and now I'm writing my thesis using reStructuredText, so
> would be nice to have a single markup language for all this writing and I
> think that this one should be reST. So the project is giving Pier the
> possibility to use this as a Markup language. I have seen that there are
> some projects like Helvetia and Pettit Parser that, perhaps, may be used in
> this kind of project, but I really don't know if this is feasible or where
> to start. So if anyone have some ideas on this I would really like to hear
> them.

Helvetia is about embedding languages into Smalltalk, so unless you
want to mix reST with Smalltalk Helvetia is probably not much of help
for your project.

PetitParser (that is also used in Helvetia) is a nice little parser
framework that can help you to transform reST to the Pier document
AST. For questions about PetitParser best ask in the Pharo or Moose
list, most discussion is going on there.

To support a new wiki syntax in Pier you need to provide two classes:
one converting reST to the Pier document AST, and one converting the
Pier document AST to reST. Currently in use are PRDocumentParser and
PRWikiWriter, but you can replace them by customizing the Magritte
document description.

I once tried to implement Creole (a wiki standard) as an alternative
syntax, but it didn't work out well because the syntax didn't fit the
feature set of Pier (e.g. I needed a way to parametrize links, nested
lists, etc). I don't know reST and just wanted to warn you that you
check if the syntax really fits Pier before you start :-)

Cheers,
Lukas

--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Enabling reStructuredText as a Markup language in Pier

Damien Pollet
On 14 August 2011 18:22, Lukas Renggli <[hidden email]> wrote:
>> and Tiddlywiki and now I'm writing my thesis using reStructuredText, so
>> would be nice to have a single markup language for all this writing and I
>> think that this one should be reST.

FYI, I started writing a markdown parser using PetitParser (not
specifically tied to Pier). It's far from finished, but it's a start
:)

That will probably not be of much help to your particular problem, but
having Smalltalk implementations for such popular markup syntaxes
would be really nice.

--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Enabling reStructuredText as a Markup language in Pier

Offray
Hi,

> On 14 August 2011 18:22, Lukas Renggli <[hidden email]> wrote:
>>> and Tiddlywiki and now I'm writing my thesis using reStructuredText, so
>>> would be nice to have a single markup language for all this writing and
>>> I
>>> think that this one should be reST.
>
> FYI, I started writing a markdown parser using PetitParser (not
> specifically tied to Pier). It's far from finished, but it's a start
> :)
>
> That will probably not be of much help to your particular problem, but
> having Smalltalk implementations for such popular markup syntaxes
> would be really nice.
>
> --
> Damien Pollet
> type less, do more [ | ] http://people.untyped.org/damien.pollet


Thanks Damien and Lukas for your feedback and advice. I'm reading the
seaside book and the hpi tutorial now trying to prepare myself for
Magritte and having much background to acomplish this taks. Meanwhile
seems better to start with simpler task like quiting the _s and _k part of
the url, because in a content centered site, the produce ugly urls and are
not much necesary. I will keep you posted.

Cheers,

Offray

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Enabling reStructuredText as a Markup language in Pier

Nick
Meanwhile
seems better to start with simpler task like quiting the _s and _k part of
the url, because in a content centered site, the produce ugly urls and are
not much necesary. I will keep you posted.

you can get rid of the _s by enabling cookies. (app preferenceAt: #useCookies put: true)
Pier will also try to remove the _k if possible (for example http://mysite/blog, http://mysite/about etc)
 

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Enabling reStructuredText as a Markup language in Pier

Offray
Hi,

>>
>> Meanwhile
>> seems better to start with simpler task like quiting the _s and _k part
>> of
>> the url, because in a content centered site, the produce ugly urls and
>> are
>> not much necesary. I will keep you posted.
>>
>
> you can get rid of the _s by enabling cookies. (app preferenceAt:
> #useCookies put: true)
> Pier will also try to remove the _k if possible (for example
> http://mysite/blog, http://mysite/about etc)

Thanks Nick. I don't know which object should I send that message (how
plays the role of "app" in a default pier One Click Experience setup). I'm
also taking a look at:

http://onsmalltalk.com/clean-urls-in-seaside

it seems to work also with the _k part, but just trying to override the
messages in methods in Pier gives some error messages. Is Ramon's approach
usable at Pier?

Cheers,

Offray

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Enabling reStructuredText as a Markup language in Pier

Nick

Thanks Nick. I don't know which object should I send that message (how
plays the role of "app" in a default pier One Click Experience setup).

in the one click you should be able to get the 'app' through:

WADispatcher default handlerAt: 'pier' 

OR

you can navigate to localhost:8080/config click on the pier app and in the 'General' section click on the 'Override' button for the 'Use Cookies' entry the 'apply' button as the bottom of the configuration.

 
I'm
also taking a look at:

http://onsmalltalk.com/clean-urls-in-seaside

it seems to work also with the _k part, but just trying to override the
messages in methods in Pier gives some error messages. Is Ramon's approach
usable at Pier?

I think pier already contains much of what Ramon's post discusses; once you enable cookies (it's easier to do than to write about) 

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Enabling reStructuredText as a Markup language in Pier

Offray
Hi, :-)

>> Thanks Nick. I don't know which object should I send that message (how
>> plays the role of "app" in a default pier One Click Experience setup).
>
>
> in the one click you should be able to get the 'app' through:
>
> WADispatcher default handlerAt: 'pier'
>
> OR
>
> you can navigate to localhost:8080/config click on the pier app and in the
> 'General' section click on the 'Override' button for the 'Use Cookies'
> entry
> the 'apply' button as the bottom of the configuration.
>
>
>
>> I'm
>> also taking a look at:
>>
>> http://onsmalltalk.com/clean-urls-in-seaside
>>
>> it seems to work also with the _k part, but just trying to override the
>> messages in methods in Pier gives some error messages. Is Ramon's
>> approach
>> usable at Pier?
>
>
> I think pier already contains much of what Ramon's post discusses; once
> you
> enable cookies (it's easier to do than to write about)

Thanks a lot Nick. It works like a charm.

Cheers,

Offray


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki