Commit 2841e527 authored by Jeremy Sanders's avatar Jeremy Sanders

Updated version 3.0 from 'upstream/3.0'

with Debian dir 5e9539405959b159b756cad9e5ac2b8d422afef3
parents 080ea1cd 399aa298
This diff is collapsed.
Just some notes on the interface design...
------------------------------------------
AddGraph('function', 'x**2', name='fn')
AddGraph('xy', 'x', 'y', name='data')
(alias AG)
AddContainer('grid', columns=3)
(alias AC)
List() - list graphs in current container
(alias L)
Save('filename.rap')
Load('filename.rap')
WriteFile('eps', 'filename.eps')
(alias WF)
Change('fn')
(alias C)
GraphUp()
(alias U)
ReadFile('descriptor', 'filename.dat')
(alias RF)
SetData('x', numarray, symerr=var1, negerr=var2, poserr=var2)
Attribute('AxisLabel.text', 'axis')
(alias A)
AttributeAxis('x', 'AxisLabel.text', 'axis')
(alias AA)
#!/usr/bin/env bash
# Copyright (C) 2009 Jeremy S. Sanders
############################################################################
# Copyright (C) 2017 Jeremy S. Sanders
# Email: Jeremy Sanders <jeremy@jeremysanders.net>
#
# This program is free software; you can redistribute it and/or modify
......@@ -15,20 +15,46 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
##############################################################################
############################################################################
# generate the output manual files from the input docbook file
# uses xmlto and fop
verfile=../VERSION
RELEASE=$(shell cat $(verfile))
mansources=$(shell find manual-source -name *.rst)
# DO NOT EDIT THE OUTPUT FILES!
all: man manual
# this is pretty ugly
xmlto html-nochunks -m config.xsl manual.xml
xmlto text manual.xml
############################################################################
# man pages
xmlto fo manual.xml
fop manual.fo -pdf manual.pdf
%.1: %.pod $(verfile)
pod2man --release=$(RELEASE) --center="Veusz" $< > $@
release=$(cat ../VERSION)
pod2man --release=${release} --center="Veusz" veusz.pod > veusz.1
pod2man --release=${release} --center="Veusz" veusz_listen.pod > veusz_listen.1
%.man.txt: %.1
MANWIDTH=76 man ./$< > $@
man: man-page/veusz.1 man-page/veusz.man.txt
############################################################################
# manual
manual-pdf: manual/pdf/veusz.pdf
manual-html: manual/html/index.html
manual/pdf/veusz.pdf: $(mansources) $(verfile)
make -C manual-source latexpdf
mkdir -p manual/pdf
mv manual/latex/veusz.pdf manual/pdf/
rm -rf manual/latex/
manual/html/index.html: $(mansources) $(verfile)
make -C manual-source html
manual: manual-html manual-pdf
rm -rf manual/doctrees/
############################################################################
clean:
rm -f man-page/*.1 man-page/*.man.txt
make -C manual-source clean
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:param name="use.id.as.filename" select="'1'"/>
<xsl:param name="admon.graphics" select="'1'"/>
<xsl:param name="admon.graphics.path"></xsl:param>
<xsl:param name="chunk.section.depth" select="0"></xsl:param>
<xsl:param name="html.stylesheet" select="'manual.css'"/>
<xsl:param name="section.autolabel" select="1"></xsl:param>
<xsl:param name="chapter.autolabel" select="1"></xsl:param>
</xsl:stylesheet>
# Copyright (C) 2010 Jeremy S. Sanders
# Email: Jeremy Sanders <jeremy@jeremysanders.net>
#
# This program 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 program 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, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
##############################################################################
"""
Document veusz widget types and settings
Creates an xml file designed to be processed into a web page using xsl
"""
from __future__ import division, print_function
import re
import veusz.widgets as widgets
import veusz.document as document
import veusz.setting as setting
#import cElementTree as ET
#import elementtree.ElementTree as ET
import xml.etree.ElementTree as ET
def processSetting(parent, setn):
"""Convert setting to xml element."""
setnxml = ET.SubElement(parent, "setting")
ET.SubElement(setnxml, "apiname").text = setn.name
ET.SubElement(setnxml, "displayname").text = setn.usertext
ET.SubElement(setnxml, "description").text = setn.descr
ET.SubElement(setnxml, "formatting").text = str(setn.formatting)
typename = str(type(setn))
typename = re.match(r"^<class '(.*)'>$",
typename).group(1)
typename = typename.split('.')[-1]
ET.SubElement(setnxml, "type").text = typename
# show list of possible choices if there is one
if isinstance(setn, setting.Choice):
for choice in setn.vallist:
ET.SubElement(setnxml, "choice").text = choice
if not isinstance(setn.default, setting.ReferenceBase):
ET.SubElement(setnxml, "default").text = setn.toText()
else:
ET.SubElement(setnxml, "default").text = "to reference"
def processSettings(parent, setns):
"""Convert setting to xml element."""
setnsxml = ET.SubElement(parent, "settings")
ET.SubElement(setnsxml, "apiname").text = setns.name
ET.SubElement(setnsxml, "displayname").text = setns.usertext
ET.SubElement(setnsxml, "description").text = setns.descr
for s in setns.getSettingList():
processSetting(setnsxml, s)
def processWidgetType(root, name):
"""Produce documentation for a widget type."""
widgetxml = ET.SubElement(root, "widget")
klass = document.thefactory.getWidgetClass(name)
print(klass)
ET.SubElement(widgetxml, "apiname").text = name
try:
ET.SubElement(widgetxml, "description").text = klass.description
except AttributeError:
pass
for parent in [k for k in klass.allowedParentTypes() if k is not None]:
ET.SubElement(widgetxml, "allowedparent").text = parent.typename
ET.SubElement(widgetxml, "usercreation").text = str(klass.allowusercreation)
thesettings = setting.Settings('')
klass.addSettings(thesettings)
#for s in thesettings.getSettingList():
processSettings(widgetxml, thesettings)
for s in thesettings.getSettingsList():
processSettings(widgetxml, s)
def indent(elem, level=0):
"""Indent output, from elementtree manual."""
i = "\n" + level*" "
if len(elem):
if not elem.text or not elem.text.strip():
elem.text = i + " "
if not elem.tail or not elem.tail.strip():
elem.tail = i
for elem in elem:
indent(elem, level+1)
if not elem.tail or not elem.tail.strip():
elem.tail = i
else:
if level and (not elem.tail or not elem.tail.strip()):
elem.tail = i
def addXSL(filename):
f = open(filename)
l = f.readlines()
f.close()
l.insert(1, '<?xml-stylesheet type="text/xsl" href="widget_doc.xsl"?>\n')
f = open(filename, 'w')
f.writelines(l)
f.close()
def main():
widgettypes = document.thefactory.listWidgets()
root = ET.Element("widgets")
for wt in widgettypes:
processWidgetType(root, wt)
tree = ET.ElementTree(root)
indent(root)
tree.write('widget_doc.xml', encoding="utf8")
addXSL('widget_doc.xml')
if __name__ == '__main__':
main()
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
......@@ -38,26 +38,31 @@
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
. nr % 0
. rr F
.\}
.el \{\
.if !\nF .nr F 0
.if \nF>0 \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
......@@ -124,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "VEUSZ 1"
.TH VEUSZ 1 "2014-01-09" "1.20.1" "Veusz"
.TH VEUSZ 1 "2018-04-22" "3.0" "Veusz"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......@@ -155,8 +160,7 @@ with Veusz commands if they come from a trusted source.
.IP "\fB\-\-listen\fR" 8
.IX Item "--listen"
Read Veusz commands from stdin, executing them, then writing the
results to stdout. This option is intended to replace the veusz_listen
standalone program.
results to stdout. This option replaces the old veusz_listen.
.Sp
In this mode Veusz does not read any input documents, but will use the
first argument to the program as the window title, if given.
......@@ -167,10 +171,23 @@ but execute them quietly.
.IP "\fB\-\-export\fR=\fI\s-1FILE\s0\fR" 8
.IX Item "--export=FILE"
Export the next Veusz document file on the command line to the
graphics file \fI\s-1FILE\s0\fR. Supported file types include \s-1EPS\s0, \s-1PDF\s0, \s-1SVG\s0,
\&\s-1PNG\s0, \s-1BMP\s0, \s-1JPG\s0 and \s-1XPM\s0. The extension of the output file is used to
graphics file \fI\s-1FILE\s0\fR. Supported file types include \s-1EPS, PDF, SVG,
PNG, BMP, JPG\s0 and \s-1XPM.\s0 The extension of the output file is used to
determine the output file format. There should be as many export
options specified as input Veusz documents on the command line.
.IP "\fB\-\-export\-option\fR=\fI\s-1OPT\s0\fR" 8
.IX Item "--export-option=OPT"
Adds the option given when exporting. Supported options are dpi=\fI\s-1DPI\s0\fR
giving the resolution for bitmap output files (default 100),
color=True/False to switch to monochrome output (default True),
page=[\fIX\fR,...] gives a list of pages to export (default [0]), where
the page numbers are numbered from 0, antialias=True/False enables or
disables antialiasing in bitmap output files (default True),
quality=\fI\s-1VAL\s0\fR gives the \s-1JPEG\s0 quality value (default 85),
backcolor='\fI#RRGGBBAA\fR' gives the background color of bitmap files
(default '#ffffff00'), pdfdpi=\fI\s-1DPI\s0\fR gives the \s-1DPI\s0 when outputing to
\&\s-1PDF\s0 files (default 150) and svgtextastext=True/False outputs text in
\&\s-1SVG\s0 files as text, rather than as curves (default False).
.IP "\fB\-\-plugin\fR=\fI\s-1FILE\s0\fR" 8
.IX Item "--plugin=FILE"
Loads the Veusz plugin \fI\s-1FILE\s0\fR when starting Veusz. This option
......@@ -184,7 +201,7 @@ Displays the options to the program and exits.
Displays information about the currently installed version and exits.
.SH "BUGS"
.IX Header "BUGS"
Please report bugs at https://gna.org/bugs/?group=veusz
Please report bugs at https://github.com/veusz/veusz/issues
.SH "AUTHORS"
.IX Header "AUTHORS"
\&\fBVeusz\fR was written by Jeremy Sanders <jeremy@jeremysanders.net>.
......@@ -192,7 +209,7 @@ Please report bugs at https://gna.org/bugs/?group=veusz
This manual page was written by Jeremy Sanders <jeremy@jeremysanders.net>.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (C) 2003\-2014 Jeremy Sanders <jeremy@jeremysanders.net>.
Copyright (C) 2003\-2018 Jeremy Sanders <jeremy@jeremysanders.net>.
.PP
This program is free software; you can redistribute it and/or modify it
under the terms of the \s-1GNU\s0 General Public License as published by the
......
VEUSZ(1) Veusz VEUSZ(1)
NAME
Veusz - a scientific plotting and graphing application.
SYNOPSIS
veusz [options] [document.vsz]...
DESCRIPTION
Veusz is a scientific plotting and graphing package. It is designed
to create publication-ready output in a variety of different output
formats. Graphs are built-up combining plotting widgets. Veusz has
a GUI user interface (started with the "veusz" command), a Python
module interface and a scripting interface.
If started without command line arguments, Veusz will open up with
a new empty document. The program will otherwise open the listed
documents.
OPTIONS
--unsafe-mode
Do not check opened scripts for the presence of unsafe
Python commands. This allows you to create or open complete
Python scripts with Veusz commands if they come from a
trusted source.
--listen
Read Veusz commands from stdin, executing them, then
writing the results to stdout. This option replaces the old
veusz_listen.
In this mode Veusz does not read any input documents, but
will use the first argument to the program as the window
title, if given.
--quiet If in listening mode, do not open a window before running
commands, but execute them quietly.
--export=FILE
Export the next Veusz document file on the command line to
the graphics file FILE. Supported file types include EPS,
PDF, SVG, PNG, BMP, JPG and XPM. The extension of the
output file is used to determine the output file format.
There should be as many export options specified as input
Veusz documents on the command line.
--export-option=OPT
Adds the option given when exporting. Supported options are
dpi=DPI giving the resolution for bitmap output files
(default 100), color=True/False to switch to monochrome
output (default True), page=[X,...] gives a list of pages
to export (default [0]), where the page numbers are
numbered from 0, antialias=True/False enables or disables
antialiasing in bitmap output files (default True),
quality=VAL gives the JPEG quality value (default 85),
backcolor='#RRGGBBAA' gives the background color of bitmap
files (default '#ffffff00'), pdfdpi=DPI gives the DPI when
outputing to PDF files (default 150) and
svgtextastext=True/False outputs text in SVG files as text,
rather than as curves (default False).
--plugin=FILE
Loads the Veusz plugin FILE when starting Veusz. This
option provides a per-session alternative to adding the
plugin in the preferences dialog box.
--help Displays the options to the program and exits.
--version
Displays information about the currently installed version
and exits.
BUGS
Please report bugs at https://github.com/veusz/veusz/issues
AUTHORS
Veusz was written by Jeremy Sanders <jeremy@jeremysanders.net>.
This manual page was written by Jeremy Sanders
<jeremy@jeremysanders.net>.
COPYRIGHT
Copyright (C) 2003-2018 Jeremy Sanders <jeremy@jeremysanders.net>.
This program 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, or (at
your option) any later version.
On Debian GNU/Linux systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
3.0 2018-04-22 VEUSZ(1)
......@@ -31,8 +31,7 @@ with Veusz commands if they come from a trusted source.
=item B<--listen>
Read Veusz commands from stdin, executing them, then writing the
results to stdout. This option is intended to replace the veusz_listen
standalone program.
results to stdout. This option replaces the old veusz_listen.
In this mode Veusz does not read any input documents, but will use the
first argument to the program as the window title, if given.
......@@ -50,6 +49,20 @@ PNG, BMP, JPG and XPM. The extension of the output file is used to
determine the output file format. There should be as many export
options specified as input Veusz documents on the command line.
=item B<--export-option>=I<OPT>
Adds the option given when exporting. Supported options are dpi=I<DPI>
giving the resolution for bitmap output files (default 100),
color=True/False to switch to monochrome output (default True),
page=[I<X>,...] gives a list of pages to export (default [0]), where
the page numbers are numbered from 0, antialias=True/False enables or
disables antialiasing in bitmap output files (default True),
quality=I<VAL> gives the JPEG quality value (default 85),
backcolor='I<#RRGGBBAA>' gives the background color of bitmap files
(default '#ffffff00'), pdfdpi=I<DPI> gives the DPI when outputing to
PDF files (default 150) and svgtextastext=True/False outputs text in
SVG files as text, rather than as curves (default False).
=item B<--plugin>=I<FILE>
Loads the Veusz plugin I<FILE> when starting Veusz. This option
......@@ -68,7 +81,7 @@ Displays information about the currently installed version and exits.
=head1 BUGS
Please report bugs at https://gna.org/bugs/?group=veusz
Please report bugs at https://github.com/veusz/veusz/issues
=head1 AUTHORS
......@@ -78,7 +91,7 @@ This manual page was written by Jeremy Sanders <jeremy@jeremysanders.net>.
=head1 COPYRIGHT
Copyright (C) 2003-2014 Jeremy Sanders <jeremy@jeremysanders.net>.
Copyright (C) 2003-2018 Jeremy Sanders <jeremy@jeremysanders.net>.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
......
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = ../manual
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)