|
Project Information
Featured
Downloads
Links
|
JTexy - Port of the Texy! project to JavaTexy! is a text tool written in PHP that translates a natural text markup into a valid (X)HTML code. JTexy aims to be a fully compatible Java implementation of Texy! markup language. Also see my original Java implementation suggestion. What does it do?Converts a concise easy-to-write syntax like Title .[main-title]
*****
Hello //world!//
How are you?
I'm fine. Look at my "blog":http://www.blog.cz/. And my photo: [* img/me.png *]
Subtitle
========
/--code java
System.out.println("That's all.");
\--to XHTML: <h1 id="main-title">Title<h1>
<p>Hello <em>world!</em> How are you?
<br/>I'm fine. Look at my <a href="http://www.blog.cz/">blog</a>. And my photo: <img src="img/me.png" width="80" height="120" /></p>
<h2>Subtitle<h2>
<pre class="java"><code>System.out.println("That's all.");
</code></pre>Looks like yet-another-wiki-markup, but (J)Texy can do much more - see here, try here. Differences from Texy!
Why is Texy better than other lightweight markup languages?See Wikipedia comparison. (More later). News
Implementation progress// line parsing (8)//module = this.scriptModule = new ScriptModule(); (1)//module = this.htmlModule = new HtmlModule(); module = this.imageModule = new ImageModule(); this.registerModule( module ); module = this.phraseModule = new PhraseModule(); this.registerModule( module ); module = this.linkModule = new LinkModule(); this.registerModule( module ); (9)//module = this.emoticonModule = new EmoticonModule(); this.registerModule( module ); // block parsing module = this.paragraphModule = new ParagraphModule(); this.registerModule( module ); module = this.blockModule = new BlockModule(); this.registerModule( module ); (6)//module = this.figureModule = new FigureModule(); this.registerModule( module ); module = this.horizLineModule = new HorizontalLineModule(); this.registerModule( module ); (3)//module = this.blockQuoteModule = new BlockQuoteModule(); this.registerModule( module ); (4)//module = this.tableModule = new TableModule(); this.registerModule( module ); module = this.headingModule = new HeadingModule(); this.registerModule( module ); module = this.listModule = new ListModule(); this.registerModule( module ); // Almost done. // post process (5)//module = this.typographyModule = new TypographyModule(); (7)//module = this.longWordsModule = new LongWordsModule(); (2)//module = this.htmlOutputModule = new HtmlOutputModule(); TODOs
Maven's settings.xmlTo run the testsuite, you need to set the jtexy.phptexy.ts.dir property in settings.xml, pointing to the testsuite dir: <profile>
<id>jtexy</id>
<activation> <activeByDefault>true</activeByDefault> </activation>
<properties>
<!-- PHP Texy's testsuite. -->
<jtexy.phptexy.ts.dir>c:/java/JTexy/JTexy-google/src/phptexy20/testsuite</jtexy.phptexy.ts.dir>
<!-- JTexy testsuite. -->
<jtexy.jtexy.ts.dir>c:/java/JTexy/JTexy-google/src/test/resources/cz/dynawest/jtexy/ts</jtexy.jtexy.ts.dir>
<!-- JTexy testsuite output dir (usually points to target/ ). -->
<jtexy.jtexy.ts.out.dir>c:/java/JTexy/JTexy-google/target/ts-output</jtexy.jtexy.ts.out.dir>
</properties>
</profile>JTexy Maven repositoryTo add JTexy as a maven dependency, add the repo to your pom. <project>
...
<repositories>
<repository>
<id>jtexy-google-svn-repo</id>
<snapshots> <enabled>true</enabled> </snapshots>
<name>JTexy maven repo at Google Code</name>
<url>http://jtexy.googlecode.com/svn/maven/</url>
</repository>
</repositories>
...
<dependencies>
<dependency>
<groupId>cz.dynawest.jtexy</groupId>
<artifactId>JTexy</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
|
