hi  dave,

i would like to contribute my textile-J plugin to roller support.

any lead developer on support project that I can contact to directly?

how can I get started? pls advise

~thinkboy


On 2007-11-26 22:37:51 +0800, Dave <[EMAIL PROTECTED]> said:

Very cool! I'll have to try this out -- I still need to fix up the
other editor plugins (e.g. Ekit) for use in 3.1 and 4.0.

Are you interested in contributing this plugin to the Roller Support
project (http://roller.dev.java.net)?

- Dave


On Nov 24, 2007 2:01 PM, Thinkboy <[EMAIL PROTECTED]> wrote:
textile4j has been inactive for a very long time, moreover many major
features are not supported . (e.g Table)

I found out another new open source java project called textile-J  in
java.net  : https://textile-j.dev.java.net/

it is really great!. it supports , almost, all of the textile syntax.
very much the same as what I mostly do in Confluence wiki in my daily
work !!!

now, I can easily sync or copy working notes from confluece wiki to my
personal Roller blog :-D

so, I created a new Roller Plugin for textile-J to replace the old
Textile4J altogether in Roller.

------------------------------------------------------------
Here is my notes to share:
------------------------------------------------------------
* svn checkout source from https://textile-j.dev.java.net/   (DO not
download the jar from "Build Download Area", it does not work !)
* cd textile-j/java/net.java.textilej
* $ant all
* net.java.textilej_1.0.0.jar will in generated in dist
* I rename "net.java.textilej_1.0.0.jar"   as "textilej_1.0.0.jar"
* copy textilej_1.0.0.jar to apache-roller-src-3.1/contrib/lib
* create the following plugin file in
/apache-roller-src-3.1/contrib/plugins/src/org/apache/roller/ui/rendering/plugins
*

cd

to apache-roller-src-3.1
* /apache-roller-src-3.1$ant all
* /apache-roller-src-3.1/contrib$ant build-contrib
* a roller-contrib.jar will be generated at:
/apache-roller-src-3.1/build/lib/roller-contrib.jar
* copy this roller-contrib.jar to
./apache-roller-3.1/webapp/roller/WEB-INF/lib/roller-contrib.jar
* configure your $TOMCAT_HOME/common/classes/roller-custom.properties

----------------------------------------
roller-custom.properties
----------------------------------------
# Weblog entry plugins
plugins.page=\
org.apache.roller.ui.rendering.plugins.ConvertLineBreaksPlugin \
,org.apache.roller.ui.rendering.plugins.TopicTagPlugin \
,org.apache.roller.ui.rendering.plugins.ObfuscateEmailPlugin \
,org.apache.roller.ui.rendering.plugins.SmileysPlugin \
,org.apache.roller.ui.rendering.plugins.TextileJPlugin


------------------------------------------------------------
source code for TextileJPlugin.java
------------------------------------------------------------
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
*  contributor license agreements.  The ASF licenses this file to You
* under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.  For additional information regarding
* copyright in this work, please see the NOTICE file in the top level
* directory of this distribution.
*/

package org.apache.roller.ui.rendering.plugins;

import java.util.Map;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.roller.pojos.WeblogEntryData;
import org.apache.roller.pojos.WebsiteData;
import org.apache.roller.business.WeblogEntryPlugin;
import net.java.textilej.parser.*;

/**
* Render text using textile engine.
*/
public class TextileJPlugin implements WeblogEntryPlugin {

private static Log mLogger = LogFactory.getLog(TextileJPlugin.class);

public String name = "TextileJ Formatter";
public String description = "Allows use of TextileJ formatting to easily ";
private TextileParser parser = new TextileParser();

public TextileJPlugin() {
mLogger.debug("Textile Plugin instantiated.");
}

public String getName() {
return name;
}


public String getDescription() {
return StringEscapeUtils.escapeJavaScript(description);
}


/**
* Init.
*/
public void init(WebsiteData website) {
// no-op
}


/**
* Convert an input string that contains text that uses the Textile
* syntax to an output string in HTML format.
*
* @param src Input string that uses Textile syntax
* @return Output string in HTML format.
*/
public String render(WeblogEntryData entry, String src ) {

String result = parser.parseToHtml(src);
return result;
}

}



Reply via email to