debian/0000755000000000000000000000000011537204352007170 5ustar debian/rules0000755000000000000000000000114611412173057010251 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 CURVER=$(shell dpkg-parsechangelog | grep ^Version | cut -d\ -f2 | cut -d- -f1) SVNREV=$(shell echo $(CURVER) | awk -F'svn' '{print $$2}' ) %: dh $@ override_dh_auto_install: install -m755 CutyCapt $(CURDIR)/debian/cutycapt/usr/bin/cutycapt get-orig-source: svn checkout -r $(SVNREV) https://cutycapt.svn.sourceforge.net/svnroot/cutycapt/CutyCapt cutycapt find cutycapt -name ".svn" | xargs -r rm -rf tar cf cutycapt_$(CURVER).orig.tar cutycapt/ gzip -9 cutycapt_$(CURVER).orig.tar rm -rf cutycapt/ debian/dirs0000644000000000000000000000001111412156667010053 0ustar usr/bin/ debian/watch0000644000000000000000000000003711412166212010213 0ustar # nothing, it's a SVN snapshot debian/manpages0000644000000000000000000000002211412157074010700 0ustar debian/cutycapt.1 debian/README.Debian0000644000000000000000000000065111412160717011231 0ustar cutycapt for Debian ------------------- Using CutyCapt without X server You cannot use CutyCapt without an X server, but you can use e.g. Xvfb as a light-weight server if you are not running an interactive graphical desktop environment. For example, you could use: $ xvfb-run --server-args="-screen 0, 1024x768x24" cutycapt --url=... --out=... -- David Paleino Mon, 28 Jun 2010 19:21:02 +0200 debian/compat0000644000000000000000000000000211412155002010353 0ustar 7 debian/control0000644000000000000000000000136311537203750010577 0ustar Source: cutycapt Section: web Priority: optional Maintainer: David Paleino Build-Depends: debhelper (>= 7.4.12~) , libqt4-dev (>= 4.4.0) , libqtwebkit-dev , qt4-qmake Standards-Version: 3.9.1 Homepage: http://cutycapt.sourceforge.net/ Vcs-Git: git://git.debian.org/collab-maint/cutycapt.git Vcs-Browser: http://git.debian.org/?p=collab-maint/cutycapt.git;a=summary Package: cutycapt Architecture: any Depends: ${shlibs:Depends} , ${misc:Depends} Suggests: xvfb Description: utility to capture WebKit's rendering of a web page CutyCapt is a small cross-platform command-line utility to capture WebKit's rendering of a web page into a variety of vector and bitmap formats, including SVG, PDF, PS, PNG, JPEG, TIFF, GIF, and BMP. debian/copyright0000644000000000000000000000177111412156013011121 0ustar Format-Specification: http://dep.debian.net/deps/dep5 Files: * Copyright: © 2003-2010, Björn Höhrmann License: GPL-2+ Files: debian/* Copyright: © 2010, David Paleino 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/changelog0000644000000000000000000000115011537204012011030 0ustar cutycapt (0.0~svn6-3) unstable; urgency=low * Add Build-Depends on libqtwebkit-dev (Closes: #618240) -- David Paleino Sun, 13 Mar 2011 19:08:07 +0100 cutycapt (0.0~svn6-2) unstable; urgency=low * Assume http if no scheme is given on the command line (01-assume_http_as_default.patch) (Closes: #611900) * Bump Standards-Version to 3.9.1, no changes needed -- David Paleino Tue, 01 Mar 2011 12:55:57 +0100 cutycapt (0.0~svn6-1) unstable; urgency=low * Initial release (Closes: #587446) -- David Paleino Mon, 28 Jun 2010 21:22:28 +0200 debian/source/0000755000000000000000000000000011412155002010455 5ustar debian/source/format0000644000000000000000000000001411412155002011663 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000011533157222010616 5ustar debian/patches/series0000644000000000000000000000004011533157101012021 0ustar 01-assume_http_as_default.patch debian/patches/01-assume_http_as_default.patch0000644000000000000000000000353211533157222016603 0ustar From: David Paleino Subject: if no scheme is present, assume http Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611900 Forwarded: no --- CutyCapt.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) --- cutycapt.orig/CutyCapt.cpp +++ cutycapt/CutyCapt.cpp @@ -362,7 +362,7 @@ main(int argc, char *argv[]) { int argMaxWait = 90000; int argVerbosity = 0; - const char* argUrl = NULL; + QByteArray argUrl = NULL; const char* argUserStyle = NULL; const char* argUserStylePath = NULL; const char* argUserStyleString = NULL; @@ -370,6 +370,7 @@ main(int argc, char *argv[]) { const char* argInjectScript = NULL; const char* argScriptObject = NULL; QString argOut; + QUrl parsedUrl; CutyCapt::OutputFormat format = CutyCapt::OtherFormat; @@ -421,7 +422,7 @@ main(int argc, char *argv[]) { // --name=value options if (strncmp("--url", s, nlen) == 0) { - argUrl = value; + argUrl = QByteArray(value); } else if (strncmp("--min-width", s, nlen) == 0) { // TODO: add error checking here? @@ -571,14 +572,21 @@ main(int argc, char *argv[]) { } } - if (argUrl == NULL || argOut == NULL || argHelp) { + if (argUrl.isNull() || argOut == NULL || argHelp) { CaptHelp(); return EXIT_FAILURE; } + // Check if a scheme is present, if not, assume http. + parsedUrl = QUrl::fromEncoded(argUrl); + if (parsedUrl.scheme() == "") { + argUrl = "http://" + argUrl; + parsedUrl = QUrl::fromEncoded(argUrl); + } + // This used to use QUrl(argUrl) but that escapes %hh sequences // even though it should not, as URLs can assumed to be escaped. - req.setUrl( QUrl::fromEncoded(argUrl) ); + req.setUrl(parsedUrl); QString scriptProp(argScriptObject); QString scriptCode; debian/cutycapt.10000644000000000000000000000572711412160531011111 0ustar .TH CUTYCAPT 1 "June 28, 2010" .SH NAME cutycapt \- utility to capture WebKit's rendering of a web page .SH SYNOPSIS .B cutycapt .RI [ options ] \fB\-\-url=\fIhttp://www.someurl.com\fR \fB\-\-out=\fIoutput.png\fR .SH DESCRIPTION This manual page documents briefly the \fBcutycapt\fR command. .PP \fBCutyCapt\fR is a small cross-platform command-line utility to capture WebKit's rendering of a web page into a variety of vector and bitmap formats, including SVG, PDF, PS, PNG, JPEG, TIFF, GIF, and BMP. .SH OPTIONS A summary of options is included below. .TP .B \-\-help Show summary of options. .TP \fB\-\-url=\fI\fR The URL to capture (http:...|file:...|...) .TP \fB\-\-out=\fI\fR The target file (.png|pdf|ps|svg|jpeg|...) .TP \fB\-\-out-format=\fI\fR Like extension in \fB\-\-out, overrides heuristic .TP \fB\-\-min-width=\fI\fR Minimal width for the image (default: 800) .TP \fB\-\-min-height=\fI\fR Minimal height for the image (default: 600) .TP \fB\-\-max-wait=\fI\fR Don't wait more than (default: 90000, infinite: 0) .TP \fB\-\-delay=\fI\fR After successful load, wait (default: 0) .TP \fB\-\-user-style-path=\fI\fR Location of user style sheet file, if any .TP \fB\-\-user-style-string=\fI\fR User style rules specified as text .TP \fB\-\-header=\fI\fB:\fI\fR Request header; repeatable; some can't be set .TP \fB\-\-method=\fI\fR Specifies the request method (default: get) .TP \fB\-\-body-string=\fI\fR Unencoded request body (default: none) .TP \fB\-\-body-base64=\fI\fR Base64-encoded request body (default: none) .TP \fB\-\-app-name=\fI\fR Application name used in User-Agent; default is none .TP \fB\-\-app-version=\fI\fR Application version used in User-Agent; default is none .TP \fB\-\-user-agent=\fI\fR Override the User-Agent header Qt would set .TP \fB\-\-javascript=\fI\fR JavaScript execution (default: on) .TP \fB\-\-java=\fI\fR Java execution (default: unknown) .TP \fB\-\-plugins=\fI\fR Plugin execution (default: unknown) .TP \fB\-\-private-browsing=\fI\fR Private browsing (default: unknown) .TP \fB\-\-auto-load-images=\fI\fR Automatic image loading (default: on) .TP \fB\-\-js-can-open-windows=\fI\fR Script can open windows? (default: unknown) .TP \fB\-\-js-can-access-clipboard=\fI\fR Script clipboard privs (default: unknown) .TP \fB\-\-print-backgrounds=\fI\fR Backgrounds in PDF/PS output (default: off) .TP \fB\-\-zoom-factor=\fI\fR Page zoom factor (default: no zooming) .TP \fB\-\-zoom-text-only=\fI\fR Whether to zoom only the text (default: off) .TP \fB\-\-http-proxy=\fI\fR Address for HTTP proxy server (default: none) .SH AUTHOR CutyCapt was written by Björn Höhrmann . .PP This manual page was written by David Paleino , for the Debian project (and may be used by others), and is licensed under the GNU General Public License, version 2 or later. debian/README.source0000644000000000000000000000033211412173123011336 0ustar cutycapt for Debian ------------------- There is no released tarball for this package. It is a SVN snapshot taken from SourceForge. To get the tarball used for this package, use: $ debian/rules get-orig-source