debian/0000755000000000000000000000000011533152522007165 5ustar debian/rules0000755000000000000000000000244411533151561010253 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export JAVA_HOME=/usr/lib/jvm/default-java export CLASSPATH=/usr/share/java/junit4.jar:$(JAVA_HOME)/lib/tools.jar:/usr/share/java/commons-cli.jar:/usr/share/java/batik-bridge.jar:/usr/share/java/batik-dom.jar:/usr/share/java/batik-gvt.jar:/usr/share/java/batik-svg-dom.jar:/usr/share/java/batik-awt-util.jar:/usr/share/java/xml-apis-ext.jar:/usr/share/java/batik-libs.jar:/usr/share/java/jericho-html.jar DEBVER=$(shell dpkg-parsechangelog | grep ^Version | cut -d\ -f2 | cut -d- -f1) UPVER=$(shell echo $(DEBVER) | cut -d+ -f1) %: dh --with javahelper $@ override_dh_auto_clean: dh_auto_clean rm -rf ditaa.jar override_dh_installchangelogs: dh_installchangelogs HISTORY override_jh_depends: jh_depends -Xopenjdk-6-jdk get-orig-source: uscan --verbose \ --download-version $(UPVER) \ --force-download \ --rename \ --repack \ --destdir . tar xvf ditaa_$(UPVER).orig.tar.gz find ditaa-$(UPVER)/ -name "*.jar" -delete find ditaa-$(UPVER)/ -name "*.zip" -delete rm -rf ditaa-$(UPVER)/src/au/ \ ditaa-$(UPVER)/.classpath \ ditaa-$(UPVER)/.project tar cf ditaa_$(DEBVER).orig.tar ditaa-$(UPVER)/ gzip -9 ditaa_$(DEBVER).orig.tar rm -rf ditaa_$(UPVER).orig.tar.gz ditaa-$(UPVER)/ debian/links0000644000000000000000000000005011361674616010237 0ustar usr/share/ditaa/ditaa.jar usr/bin/ditaa debian/install0000644000000000000000000000003311361654522010560 0ustar ditaa.jar usr/share/ditaa/ debian/watch0000644000000000000000000000015311361676442010230 0ustar version=3 opts=uversionmangle=s/_/\./,dversionmangle=s/\+ds1// \ http://sf.net/ditaa/ditaa(\d+.*)-src\.zip debian/manpages0000644000000000000000000000001711361677120010706 0ustar debian/ditaa.1 debian/compat0000644000000000000000000000000211533152050010357 0ustar 7 debian/control0000644000000000000000000000173511533152004010571 0ustar Source: ditaa Section: graphics Priority: optional Maintainer: David Paleino Build-Depends: debhelper (>= 7.0.50~) , javahelper (>= 0.20~) , default-jdk , fastjar , junit4 , libcommons-cli-java , libbatik-java , libxml-commons-external-java , libjericho-html-java (>= 3.1) Standards-Version: 3.9.1 Homepage: http://ditaa.org Vcs-Git: git://git.debian.org/collab-maint/ditaa.git Vcs-Browser: http://git.debian.org/?p=collab-maint/ditaa.git;a=summary Package: ditaa Architecture: all Depends: ${misc:Depends} , ${java:Depends} , libjericho-html-java (>= 3.1) , default-jdk | java6-sdk Description: convert ASCII diagrams into proper bitmap graphics DiTAA is a small command-line utility that can convert diagrams drawn using ASCII art ("drawings" that contain characters that resemble lines, like | / and -), into proper bitmap graphics. . DiTAA also uses special markup syntax to increase the possibilities of shapes and symbols that can be rendered. debian/copyright0000644000000000000000000000221711361655650011133 0ustar Format-Specification: http://dep.debian.net/deps/dep5 Upstream-Name: DiTAA Files: debian/* Copyright: © 2010, David Paleino License: GPL-2+ Files: src/org/stathissideris/ascii2image/core/JavadocTaglet.java Copyright: © 2006, Nordic Growth Market NGM AB, Mikael Brannstrom License: GPL-2+ Files: * Copyright: © 2004-2009, Efstathios Sideris License: GPL-2+ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see X-Comment: on Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/changelog0000644000000000000000000000165011533152142011037 0ustar ditaa (0.9+ds1-3) unstable; urgency=low * debian/patches/01-fix_jericho_API.patch: re-added DEP-3 header * Depend on "default-jdk | java6-sdk" instead of hardcoding openjdk-6-jdk, this overrides the package detected by jh_depends (Closes: #606266) * Bump Standards-Version to 3.9.1, no changes needed -- David Paleino Tue, 01 Mar 2011 12:11:29 +0100 ditaa (0.9+ds1-2) unstable; urgency=low * debian/patches/01-fix_jericho_API.patch refreshed, use jericho 3.1 API (Closes: #581325) * debian/control: - Build-Depends on libjerico-html-java bumped to >= 3.1 - ease backporters' life appending "~" to debhelper's version - added runtime dependency on jericho -- David Paleino Wed, 12 May 2010 23:43:42 +0200 ditaa (0.9+ds1-1) unstable; urgency=low * Initial release (Closes: #577020) -- David Paleino Thu, 15 Apr 2010 23:38:02 +0200 debian/source/0000755000000000000000000000000011361646525010477 5ustar debian/source/format0000644000000000000000000000001411361646525011705 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000011372626377010633 5ustar debian/patches/series0000644000000000000000000000011111372617422012030 0ustar 00-fix_imports.patch 01-fix_jericho_API.patch 02-fix_usage_message.patch debian/patches/00-fix_imports.patch0000644000000000000000000000173311361655061014426 0ustar From: David Paleino Subject: fix imports Forwarded: no --- src/org/stathissideris/ascii2image/graphics/ImageHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- ditaa.orig/src/org/stathissideris/ascii2image/graphics/ImageHandler.java +++ ditaa/src/org/stathissideris/ascii2image/graphics/ImageHandler.java @@ -45,8 +45,8 @@ import org.apache.batik.bridge.GVTBuilde import org.apache.batik.bridge.UserAgentAdapter; import org.apache.batik.dom.svg.SAXSVGDocumentFactory; import org.apache.batik.dom.util.DocumentFactory; -import org.apache.batik.ext.awt.image.codec.PNGEncodeParam; -import org.apache.batik.ext.awt.image.codec.PNGImageEncoder; +import org.apache.batik.ext.awt.image.codec.png.PNGEncodeParam; +import org.apache.batik.ext.awt.image.codec.png.PNGImageEncoder; import org.apache.batik.gvt.GraphicsNode; import org.apache.batik.gvt.renderer.ConcreteImageRendererFactory; import org.apache.batik.gvt.renderer.ImageRenderer; debian/patches/01-fix_jericho_API.patch0000644000000000000000000000450711372626377015062 0ustar From: David Paleino Subject: port from jericho 1.4 (the embedded one) to Debian's copy. Forwarded: no --- src/org/stathissideris/ascii2image/core/HTMLConverter.java | 22 ++++++------- 1 file changed, 11 insertions(+), 11 deletions(-) --- ditaa.orig/src/org/stathissideris/ascii2image/core/HTMLConverter.java +++ ditaa/src/org/stathissideris/ascii2image/core/HTMLConverter.java @@ -44,12 +44,11 @@ import org.stathissideris.ascii2image.gr import org.stathissideris.ascii2image.text.StringUtils; import org.stathissideris.ascii2image.text.TextGrid; -import au.id.jericho.lib.html.Attribute; -import au.id.jericho.lib.html.Element; -import au.id.jericho.lib.html.OutputDocument; -import au.id.jericho.lib.html.Source; -import au.id.jericho.lib.html.StartTag; -import au.id.jericho.lib.html.StringOutputSegment; +import net.htmlparser.jericho.Attribute; +import net.htmlparser.jericho.Element; +import net.htmlparser.jericho.OutputDocument; +import net.htmlparser.jericho.Source; +import net.htmlparser.jericho.StartTag; /** * @@ -109,12 +108,12 @@ public class HTMLConverter extends HTMLE System.out.print("Convering HTML file ("+filename+" -> "+targetFilename+")... "); Source source = new Source(htmlText); - OutputDocument outputDocument = new OutputDocument(htmlText); + OutputDocument outputDocument = new OutputDocument(source); int index = 1; HashMap diagramList = new HashMap(); - List linkStartTags = source.findAllElements("pre"); + List linkStartTags = source.getAllStartTags("pre"); Iterator it = linkStartTags.iterator(); while (it.hasNext()) { Element element = (Element) it.next(); @@ -137,8 +136,8 @@ public class HTMLConverter extends HTMLE index++; } - outputDocument.add(new StringOutputSegment(element, "")); - diagramList.put(URL, element.getContent().getSourceText()); + outputDocument.replace(element, ""); + diagramList.put(URL, element.getContent().getTextExtractor().toString()); } } @@ -152,7 +151,7 @@ public class HTMLConverter extends HTMLE FileWriter out; try { out = new FileWriter(targetFilename); - outputDocument.output(out); + outputDocument.writeTo(out); //out.flush(); //out.close(); } catch (IOException e2) { debian/patches/02-fix_usage_message.patch0000644000000000000000000000260511361700347015540 0ustar From: David Paleino Subject: fix usage message Forwarded: no --- src/org/stathissideris/ascii2image/core/CommandLineConverter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- ditaa.orig/src/org/stathissideris/ascii2image/core/CommandLineConverter.java +++ ditaa/src/org/stathissideris/ascii2image/core/CommandLineConverter.java @@ -120,13 +120,13 @@ public class CommandLineConverter { } catch (org.apache.commons.cli.ParseException e) { System.err.println(e.getMessage()); - new HelpFormatter().printHelp("java -jar ditaa.jar [outfile]", cmdLnOptions, true); + new HelpFormatter().printHelp("ditaa [outfile]", cmdLnOptions, true); System.exit(2); } if(cmdLine.hasOption("help") || args.length == 0 ){ - new HelpFormatter().printHelp("java -jar ditaa.jar [outfile]", cmdLnOptions, true); + new HelpFormatter().printHelp("ditaa [outfile]", cmdLnOptions, true); System.exit(0); } @@ -142,7 +142,7 @@ public class CommandLineConverter { if(args.length == 0) { System.err.println("Error: Please provide the input file filename"); - new HelpFormatter().printHelp("java -jar ditaa.jar [outfile]", cmdLnOptions, true); + new HelpFormatter().printHelp("ditaa [outfile]", cmdLnOptions, true); System.exit(2); } debian/javabuild0000644000000000000000000000002311361655671011060 0ustar ditaa.jar src/org/ debian/README.source0000644000000000000000000000037311361655625011362 0ustar ditaa for Debian ---------------- The original tarball has been modified to exclude pre-built .jar files and an embedded copy of libjericho-html-java. To obtain the tarball used for the Debian package, please do: $ debian/rules get-orig-source debian/manifest0000644000000000000000000000074311361654634010734 0ustar usr/share/ditaa/ditaa.jar: Main-Class: org.stathissideris.ascii2image.core.CommandLineConverter Debian-Java-Home: /usr/lib/jvm/default-java Class-Path: /usr/share/java/junit4.jar /usr/lib/jvm/java-6-openjdk/lib/tools.jar /usr/share/java/commons-cli.jar /usr/share/java/batik-bridge.jar /usr/share/java/batik-dom.jar /usr/share/java/batik-gvt.jar /usr/share/java/batik-svg-dom.jar /usr/share/java/batik-awt-util.jar /usr/share/java/xml-apis-ext.jar /usr/share/java/batik-libs.jar debian/ditaa.10000644000000000000000000000411511361700060010325 0ustar .TH DITAA 1 "April 15, 2010" .SH NAME ditaa \- convert ASCII diagrams into proper bitmap graphics .SH SYNOPSIS .B ditaa .RI [ options ] " input " [ output ] .SH DESCRIPTION This manual page documents briefly the \fBditaa\fR command. .PP \fBDiTAA\fR is a small command-line utility that can convert diagrams drawn using ASCII art ("drawings" that contain characters that resemble lines, like | / and -), into proper bitmap graphics. .PP DiTAA also uses special markup syntax to increase the possibilities of shapes and symbols that can be rendered. .SH OPTIONS .TP .B \-\-help Show summary of options. .TP .B \-v, \-\-verbose Makes ditaa more verbose. .TP .B \-A, \-\-no\-antialias Turns anti-aliasing off. .TP .B \-d, \-\-debug Renders the debug grid over the resulting image. .TP .B \-E, \-\-no\-separation Prevents the separation of common edges of shapes. .TP \fB\-e\fR \fIENCODING\fR, \fB\-\-encoding\fR \fIENCODING\fR The encoding of the input file. .TP .B \-h, \-\-html In this case the input is an HTML file. The contents of the \fI
\fR
tags are rendered as diagrams and saved in the images directory and a new HTML file is
produced with the appropriate  tags.
.TP
.B \-o, \-\-overwrite
If the filename of the destination image already exists, an alternative name is chosen.
If the overwrite option is selected, the image file is instead overwriten.
.TP
.B \-r, \-\-round\-corners
Causes all corners to be rendered as round corners.
.TP
\fB\-s\fR \fISCALE\fR, \fB\-\-scale\fR \fISCALE\fR
A natural number that determines the size of the rendered image. The units are fractions of
the default size (2.5 renders 1.5 times bigger than the default).
.TP
.B \-S, \-\-no\-shadows
Turns off the drop-shadow effect.
.TP
\fB\-t\fR \fITABS\fR, \fB\-\-tabs\fR \fITABS\fR
Tabs are normally interpreted as 8 spaces but it is possible to change that using this
option. It is not advisable to use tabs in your diagrams.
.SH AUTHOR
DiTAA was written by Efstathios (Stathis) Sideris.
.PP
This manual page was written by David Paleino ,
for the Debian project (and may be used by others).