forked from antea/kabeja
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michele Franzin
committed
Nov 25, 2010
0 parents
commit f194575
Showing
497 changed files
with
641,026 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Binary-package: | ||
--------------- | ||
|
||
Windows: | ||
* double-click "kabeja.exe" | ||
|
||
Linux/Unix: | ||
* sh kabeja.sh | ||
or: | ||
* chmod a=rx kabeja.sh (only ones) | ||
* ./kabeja.sh | ||
|
||
Other: | ||
* java -jar launcher.jar | ||
|
||
Buidling: | ||
--------- | ||
|
||
You need Ant for building (http://ant.apache.org). | ||
|
||
If you want to build the Cocoon-block you have to copy blocks.propterties | ||
to local.blocks.properties and edit this file (set the path to the Cocoon-libraries). | ||
|
||
try: | ||
|
||
ant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
Kabeja is a small library for parsing DXF-Files and converting | ||
this to SVG. It is licensed under the Apache Software License 2.0. | ||
|
||
|
||
Limitation: | ||
----------- | ||
There are not all Entities of DXF supported yet. Text-Entities generate problems too. | ||
|
||
Supported: | ||
|
||
|
||
*Arc | ||
*Attrib | ||
*Polyline | ||
*Circle | ||
*Line | ||
*Blocks/Insert | ||
*Text | ||
*MText | ||
*LWPolyline | ||
*Solid | ||
*Trace | ||
*Ellipse | ||
*Dimension | ||
*Image | ||
*Leader | ||
*XLine | ||
*Ray | ||
*Hatch | ||
*Spline | ||
*MLine | ||
|
||
Planned: | ||
|
||
|
||
|
||
* Tolerance | ||
|
||
|
||
You can use Kabeja from CLI (Command Line Interface) or embed in your application. | ||
|
||
GUI: | ||
---- | ||
Windows: | ||
* double-click "kabeja.exe" | ||
|
||
Linux: | ||
* sh kabeja.sh | ||
|
||
or: | ||
|
||
* chmod a=rx kabeja.sh (only ones) | ||
* ./kabeja.sh | ||
|
||
Other: | ||
* java -jar launcher.jar | ||
|
||
|
||
|
||
CLI: | ||
---- | ||
in the Kabeja-folder try: | ||
|
||
* Help and pipeline list | ||
|
||
java -jar launcher.jar --help | ||
|
||
* Convert to svg | ||
|
||
java -jar launcher.jar -nogui -pipeline svg myfile.dxf result.svg | ||
|
||
* Convert to pdf|jpeg|png|... | ||
|
||
java -jar launcher.jar -nogui -pipeline <pdf|jpeg|png> myfile.dxf | ||
|
||
|
||
Normally Java uses 64 MB of your memory, to setup more use the following commandline | ||
switch: | ||
|
||
java -Xmx256m -jar ..... | ||
|
||
|
||
|
||
GUI-Viewer: | ||
----------- | ||
in the 'lib'-folder try: | ||
|
||
java -jar kabeja-svgview.jar | ||
|
||
|
||
|
||
Cocoon 2.1 (XML-Publishing-Framework http://cocoon.apache.org/2.1): | ||
------------------------------------------------------------------- | ||
|
||
Copy the 'kabeja.jar' and 'kabeja-svg2dxf-cocoon.jar' to your WEB-INF/lib-folder | ||
of your Cocoon-Webapplication. Then you can use Kabeja as Generator like: | ||
|
||
|
||
in your sitemap/subsitemap: | ||
|
||
snippet: | ||
-------- | ||
|
||
<map:components> | ||
..... | ||
<map:generators default="file"> | ||
|
||
<map:generator name="dxf2svg" src="org.kabeja.cocoon.generation.DXF2SVGGenerator"/> | ||
|
||
</map:generators> | ||
|
||
|
||
.... | ||
<map:pipelines> | ||
|
||
<map:pipeline> | ||
|
||
<map:match pattern="dxf/*.svg"> | ||
<map:generate type="dxf2svg" src="dxf/{1}.dxf"/> | ||
... | ||
<!-- transform things you need --> | ||
|
||
<map:serialize type="xml"/> | ||
</map:match> | ||
|
||
</map:pipeline> | ||
|
||
.... | ||
|
||
|
||
</map:pipelines> | ||
|
||
Note: DXF-drafts often real large drafts, so the SVGDocument will consume a lot of memory. The Generator is | ||
Cacheable so the first run will take more time. | ||
|
||
|
||
|
||
|
||
Feedback and Help | ||
----------------- | ||
|
||
Any help and feedback are greatly appreciated. | ||
|
||
Mail: [email protected] | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Dont edit this file. Make a copy | ||
# of this file to 'local.blocks.properties' | ||
# and edit only 'local.blocks.properties' | ||
# | ||
# Enable a block by changing the block.MYBLOCK to 'true' | ||
|
||
# | ||
# Cocoon block | ||
# ------------ | ||
# | ||
# the cocoon-libraries are needed. | ||
# you can simple point to a WEB-INF/lib- | ||
# folder of a cocoon-webapp | ||
|
||
block.cocoon=false | ||
block.cocoon.dependency=svg | ||
# Comment out and set the path to the webapp directory | ||
#cocoon.libs= /path/to/cocoon/webapp/WEB-INF/lib | ||
|
||
# If you want to use the deplay target | ||
# set the right path here | ||
#cocoon.webapp=/path/to/cocoon/webapp/ | ||
|
||
# | ||
# SVG Block | ||
# --------- | ||
# SVGGenerator/Viewer and tools-block | ||
# | ||
block.svg=true | ||
|
||
# | ||
# The Inkscape block | ||
# ------------------ | ||
|
||
block.inkscape=true | ||
block.inkscape.dependency=svg | ||
|
||
# Options: | ||
# native (depence on gcj or setup other java compiler) | ||
# java (default, needs a java environment to run) | ||
# mono (build depends on ikvm and .NET (mono on Linux/Unix), runs on .NET + ikvm dll's) | ||
inkscape.importfilter.type=java | ||
|
||
# You change the compiler settings here | ||
inkscape.java.compiler=gcj | ||
inkscape.java.compiler.properties= -findirect-dispatch -Wl,-Bsymbolic -O3 | ||
|
||
# | ||
# The XSLT tools block | ||
# -------------------- | ||
# | ||
# XSLT filter | ||
block.xslt=true | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project name="dxf2svg" default="dist" basedir="."> | ||
<property name="homepath" value="" /> | ||
<property name="block.releasename" value="kabeja-dxf2svg-cocoon-${releaseversion}" /> | ||
<property name="src" value="src" /> | ||
<property name="sources" value="java" /> | ||
<property name="classes" value="classes" /> | ||
<property name="test" value="test" /> | ||
<property name="build" value="build" /> | ||
<property name="dist" value="dist" /> | ||
<property name="help" value="doc" /> | ||
<property name="icons" value="icons" /> | ||
<property name="lang" value="lang" /> | ||
<property name="conf" value="conf" /> | ||
<property name="libs" value="lib" /> | ||
<property name="sample" value="sample" /> | ||
<property name="manifest" value="manifestfile" /> | ||
|
||
<property name="packages" value="packages" /> | ||
<property name="samples" value="samples" /> | ||
<property name="apidocs" value="javadoc" /> | ||
<property name="docs" value="doc" /> | ||
<property name="JarClassPath" value="" /> | ||
<property name="tempdir" value="tmp" /> | ||
<property name="tools" value="tools" /> | ||
<property name="kabeja.home" value="../.." /> | ||
<property name="cocoon.webapp" value="${cocoon.libs}/../.." /> | ||
|
||
|
||
<description> | ||
</description> | ||
|
||
|
||
<target name="init"> | ||
<tstamp /> | ||
<mkdir dir="${build}" /> | ||
<mkdir dir="${build}/${classes}" /> | ||
<mkdir dir="${dist}" /> | ||
<mkdir dir="${dist}/${libs}" /> | ||
|
||
</target> | ||
|
||
<target name="compile" depends="init"> | ||
<javac srcdir="${src}/${sources}" destdir="${build}/${classes}" target="${java.target.version}" source="${java.target.version}"> | ||
<classpath> | ||
<pathelement path="${classpath}" /> | ||
<fileset dir="${libs}"> | ||
<include name="**/*.jar" /> | ||
</fileset> | ||
<fileset dir="${cocoon.libs}/"> | ||
<include name="**/*.jar" /> | ||
</fileset> | ||
<dirset dir="${kabeja.home}/${build}/${classes}" /> | ||
<fileset dir="${kabeja.home}/${dist}/${libs}"> | ||
<include name="**/*.jar" /> | ||
</fileset> | ||
</classpath> | ||
</javac> | ||
</target> | ||
|
||
|
||
|
||
|
||
<target name="dist" depends="compile,manifest"> | ||
<jar jarfile="${kabeja.home}/${dist}/${libs}/${block.releasename}.jar" basedir="${build}/${classes}" includes="**/*" manifest="${manifest}" /> | ||
<delete file="${manifest}" /> | ||
</target> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<target name="clean"> | ||
<delete dir="${build}" /> | ||
<delete dir="${dist}" /> | ||
<delete dir="${packages}" /> | ||
<delete dir="${tempdir}" /> | ||
<delete dir="subsitemap-demo/kabeja/dxf" /> | ||
</target> | ||
|
||
<target name="javadoc"> | ||
<mkdir dir="${build}" /> | ||
<mkdir dir="${build}/${apidocs}" /> | ||
<javadoc packagenames="*.*.*" sourcepath="${src}/${sources}" destdir="${kabeja.home}/${build}/${apidocs}"> | ||
<classpath> | ||
<pathelement path="${classpath}" /> | ||
<fileset dir="${libs}"> | ||
<include name="**/*.jar" /> | ||
</fileset> | ||
<pathelement path="${build}/${classes}" /> | ||
</classpath> | ||
</javadoc> | ||
</target> | ||
|
||
|
||
<!-- new manifest section here --> | ||
<target name="manifest"> | ||
<fileset dir="${libs}" id="jar.files"> | ||
<include name="*.jar" /> | ||
</fileset> | ||
<pathconvert pathsep=" " property="jars" refid="jar.files"> | ||
<map from="${basedir}/" to="" /> | ||
</pathconvert> | ||
<manifest file="${manifest}"> | ||
<attribute name="Main-Class" value="${MainClass}" /> | ||
<attribute name="Class-Path" value="${jars}" /> | ||
</manifest> | ||
</target> | ||
|
||
|
||
<!-- for direct deploy --> | ||
<target name="deploy" depends="dist" if="cocoon.webapp"> | ||
<jar jarfile="${cocoon.libs}/${block.releasename}.jar"> | ||
<fileset dir="${build}/${classes}" /> | ||
<fileset dir="${kabeja.home}/${build}/${classes}" /> | ||
</jar> | ||
<copy todir="subsitemap-demo/kabeja/dxf"> | ||
<fileset dir="${kabeja.home}/samples/dxf"> | ||
<include name="*.dxf" /> | ||
</fileset> | ||
</copy> | ||
<mkdir dir="${cocoon.webapp}/kabeja" /> | ||
<copy todir="${cocoon.webapp}/kabeja"> | ||
<fileset dir="subsitemap-demo/kabeja"> | ||
<include name="**/*" /> | ||
<exclude name="**/cvs/*" /> | ||
<exclude name="**/cvs" /> | ||
</fileset> | ||
</copy> | ||
<copy todir="${cocoon.webapp}/WEB-INF/lib"> | ||
<fileset dir="${kabeja.home}/${dist}/${libs}"> | ||
<include name="kabeja*.jar" /> | ||
<exclude name="**/cvs/*" /> | ||
<exclude name="**/cvs" /> | ||
</fileset> | ||
</copy> | ||
|
||
</target> | ||
|
||
</project> | ||
|
Empty file.
Oops, something went wrong.