Commit 6ba109ad authored by David Paleino's avatar David Paleino Committed by Devon Kearns

Imported Debian patch 0.0~svn6-3

parent f362af68
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 <dapal@debian.org> Mon, 28 Jun 2010 19:21:02 +0200
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
cutycapt (0.0~svn6-3) unstable; urgency=low
* Add Build-Depends on libqtwebkit-dev (Closes: #618240)
-- David Paleino <dapal@debian.org> 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 <dapal@debian.org> Tue, 01 Mar 2011 12:55:57 +0100
cutycapt (0.0~svn6-1) unstable; urgency=low
* Initial release (Closes: #587446)
-- David Paleino <dapal@debian.org> Mon, 28 Jun 2010 21:22:28 +0200
Source: cutycapt
Section: web
Priority: optional
Maintainer: David Paleino <dapal@debian.org>
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.
Format-Specification: http://dep.debian.net/deps/dep5
Files: *
Copyright: © 2003-2010, Björn Höhrmann <bjoern@hoehrmann.de>
License: GPL-2+
Files: debian/*
Copyright: © 2010, David Paleino <dapal@debian.org>
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 <http://www.gnu.org/licenses/>
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".
.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<url>\fR
The URL to capture (http:...|file:...|...)
.TP
\fB\-\-out=\fI<path>\fR
The target file (.png|pdf|ps|svg|jpeg|...)
.TP
\fB\-\-out-format=\fI<f>\fR
Like extension in \fB\-\-out, overrides heuristic
.TP
\fB\-\-min-width=\fI<int>\fR
Minimal width for the image (default: 800)
.TP
\fB\-\-min-height=\fI<int>\fR
Minimal height for the image (default: 600)
.TP
\fB\-\-max-wait=\fI<ms>\fR
Don't wait more than (default: 90000, infinite: 0)
.TP
\fB\-\-delay=\fI<ms>\fR
After successful load, wait (default: 0)
.TP
\fB\-\-user-style-path=\fI<path>\fR
Location of user style sheet file, if any
.TP
\fB\-\-user-style-string=\fI<css>\fR
User style rules specified as text
.TP
\fB\-\-header=\fI<name>\fB:\fI<value>\fR
Request header; repeatable; some can't be set
.TP
\fB\-\-method=\fI<get|post|put>\fR
Specifies the request method (default: get)
.TP
\fB\-\-body-string=\fI<string>\fR
Unencoded request body (default: none)
.TP
\fB\-\-body-base64=\fI<base64>\fR
Base64-encoded request body (default: none)
.TP
\fB\-\-app-name=\fI<name>\fR
Application name used in User-Agent; default is none
.TP
\fB\-\-app-version=\fI<version>\fR
Application version used in User-Agent; default is none
.TP
\fB\-\-user-agent=\fI<string>\fR
Override the User-Agent header Qt would set
.TP
\fB\-\-javascript=\fI<on|off>\fR
JavaScript execution (default: on)
.TP
\fB\-\-java=\fI<on|off>\fR
Java execution (default: unknown)
.TP
\fB\-\-plugins=\fI<on|off>\fR
Plugin execution (default: unknown)
.TP
\fB\-\-private-browsing=\fI<on|off>\fR
Private browsing (default: unknown)
.TP
\fB\-\-auto-load-images=\fI<on|off>\fR
Automatic image loading (default: on)
.TP
\fB\-\-js-can-open-windows=\fI<on|off>\fR
Script can open windows? (default: unknown)
.TP
\fB\-\-js-can-access-clipboard=\fI<on|off>\fR
Script clipboard privs (default: unknown)
.TP
\fB\-\-print-backgrounds=\fI<on|off>\fR
Backgrounds in PDF/PS output (default: off)
.TP
\fB\-\-zoom-factor=\fI<float>\fR
Page zoom factor (default: no zooming)
.TP
\fB\-\-zoom-text-only=\fI<on|off>\fR
Whether to zoom only the text (default: off)
.TP
\fB\-\-http-proxy=\fI<url>\fR
Address for HTTP proxy server (default: none)
.SH AUTHOR
CutyCapt was written by Björn Höhrmann <bjoern@hoehrmann.de>.
.PP
This manual page was written by David Paleino <dapal@debian.org>,
for the Debian project (and may be used by others), and is licensed
under the GNU General Public License, version 2 or later.
debian/cutycapt.1
From: David Paleino <dapal@debian.org>
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;
01-assume_http_as_default.patch
#!/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/
# nothing, it's a SVN snapshot
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment