mirror of https://github.com/interlegis/sigi.git
Lude Ribeiro
3 years ago
37 changed files with 3534 additions and 963 deletions
@ -0,0 +1,8 @@ |
|||
home = /usr |
|||
implementation = CPython |
|||
version_info = 3.8.10.final.0 |
|||
virtualenv = 20.0.17 |
|||
include-system-site-packages = false |
|||
base-prefix = /usr |
|||
base-exec-prefix = /usr |
|||
base-executable = /usr/bin/python3 |
@ -0,0 +1,142 @@ |
|||
******* |
|||
Install |
|||
******* |
|||
|
|||
PyGraphviz requires: |
|||
|
|||
- Python (version 3.7, 3.8, or 3.9) |
|||
- `Graphviz <https://www.graphviz.org/>`_ (version 2.42 or later) |
|||
- C/C++ Compiler |
|||
|
|||
.. note:: |
|||
These instructions assume you have Python and a C/C++ Compiler on your computer. |
|||
|
|||
.. warning:: |
|||
We recommend avoiding Anaconda and conda-forge to install Graphviz and PyGraphviz. |
|||
|
|||
Recommended |
|||
=========== |
|||
|
|||
We recommend installing Python packages using `pip and virtual environments |
|||
<https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/>`_. |
|||
|
|||
Linux |
|||
----- |
|||
|
|||
We recommend installing Graphviz using your Linux system's package manager. |
|||
Below are examples for some popular distributions. |
|||
|
|||
Ubuntu and Debian |
|||
~~~~~~~~~~~~~~~~~ |
|||
|
|||
.. code-block:: console |
|||
|
|||
$ sudo apt-get install graphviz graphviz-dev |
|||
$ pip install pygraphviz |
|||
|
|||
Fedora and Red Hat |
|||
~~~~~~~~~~~~~~~~~~ |
|||
|
|||
You may need to replace ``dnf`` with ``yum`` in the example below. |
|||
|
|||
.. code-block:: console |
|||
|
|||
$ sudo dnf install graphviz graphviz-devel |
|||
$ pip install pygraphviz |
|||
|
|||
macOS |
|||
----- |
|||
|
|||
We recommend installing Graphviz using the Homebrew package manager for macOS. |
|||
|
|||
Homebrew |
|||
~~~~~~~~ |
|||
|
|||
.. code-block:: console |
|||
|
|||
$ brew install graphviz |
|||
$ pip install pygraphviz |
|||
|
|||
Advanced |
|||
======== |
|||
|
|||
The two main difficulties are |
|||
1. installing Graphviz and |
|||
2. informing pip where Graphviz is installed. |
|||
|
|||
Providing path to Graphviz |
|||
-------------------------- |
|||
|
|||
If you've installed Graphviz and ``pip`` is unable to find Graphviz, then you need to |
|||
provide ``pip`` with the path(s) where it can find Graphviz. |
|||
To do this, you first need to figure out where the binary files, includes files, and |
|||
library files for Graphviz are located on your file system. |
|||
|
|||
Once you know where you've installed Graphviz, you will need to do something like |
|||
the following. There is an additional example using Chocolatey on Windows further |
|||
down the page. |
|||
|
|||
MacPorts |
|||
~~~~~~~~ |
|||
|
|||
.. note:: ``port install graphviz-devel`` installs an old developer release of Graphviz. |
|||
Hopefully, the MacPorts packagers will update Graphviz to a recent release. |
|||
Once that happens, you may want to use ``port install graphviz`` instead of |
|||
``port install graphviz-devel`` below. |
|||
There is an open ticket to upgrade MacPorts to version 2.46.0 here: |
|||
https://trac.macports.org/ticket/62165 |
|||
|
|||
.. code-block:: console |
|||
|
|||
$ port install graphviz-devel |
|||
$ pip install --global-option=build_ext \ |
|||
--global-option="-I/opt/local/include/" \ |
|||
--global-option="-L/opt/local/lib/" \ |
|||
pygraphviz |
|||
|
|||
.. _windows-install: |
|||
|
|||
Windows |
|||
------- |
|||
|
|||
Historically, installing Graphviz and PyGraphviz on Windows has been challenging. |
|||
Fortunately, the Graphviz developers are working to fix this and |
|||
their recent releases have much improved the situation. |
|||
|
|||
For this reason, PyGraphviz 1.7 only supports Graphviz 2.46.0 or higher on Windows. |
|||
We recommend either manually installing the official binary release of Graphviz or |
|||
using `Chocolatey <https://chocolatey.org/>`_, which has been updated to Graphviz 2.46.0. |
|||
|
|||
You may also need to install Visual C/C++, e.g. from here: |
|||
https://visualstudio.microsoft.com/visual-cpp-build-tools/ |
|||
|
|||
Assuming you have Python and Visual C/C++ installed, |
|||
we believe the following should work on Windows 10 (64 bit) using PowerShell. |
|||
|
|||
Manual download |
|||
~~~~~~~~~~~~~~~ |
|||
|
|||
1. Download and install 2.46.0 for Windows 10 (64-bit): |
|||
`stable_windows_10_cmake_Release_x64_graphviz-install-2.46.0-win64.exe |
|||
<https://gitlab.com/graphviz/graphviz/-/package_files/6164164/download>`_. |
|||
2. Install PyGraphviz via |
|||
|
|||
.. code-block:: console |
|||
|
|||
PS C:\> python -m pip install --global-option=build_ext ` |
|||
--global-option="-IC:\Program Files\Graphviz\include" ` |
|||
--global-option="-LC:\Program Files\Graphviz\lib" ` |
|||
pygraphviz |
|||
|
|||
Chocolatey |
|||
~~~~~~~~~~ |
|||
|
|||
.. code-block:: console |
|||
|
|||
PS C:\> choco install graphviz |
|||
PS C:\> python -m pip install --global-option=build_ext ` |
|||
--global-option="-IC:\Program Files\Graphviz\include" ` |
|||
--global-option="-LC:\Program Files\Graphviz\lib" ` |
|||
pygraphviz |
|||
|
|||
.. include:: reference/faq.rst |
@ -0,0 +1,30 @@ |
|||
""" |
|||
Attributes |
|||
---------- |
|||
|
|||
Example illustrating how to set node, edge, and graph attributes for |
|||
visualization. |
|||
""" |
|||
|
|||
import pygraphviz as pgv |
|||
|
|||
# strict (no parallel edges) |
|||
# digraph |
|||
# with attribute rankdir set to 'LR' |
|||
A = pgv.AGraph(directed=True, strict=True, rankdir="LR") |
|||
# add node 1 with color red |
|||
A.add_node(1, color="red") |
|||
A.add_node(5, color="blue") |
|||
# add some edges |
|||
A.add_edge(1, 2, color="green") |
|||
A.add_edge(2, 3) |
|||
A.add_edge(1, 3) |
|||
A.add_edge(3, 4) |
|||
A.add_edge(3, 5) |
|||
A.add_edge(3, 6) |
|||
A.add_edge(4, 6) |
|||
# adjust a graph parameter |
|||
A.graph_attr["epsilon"] = "0.001" |
|||
print(A.string()) # print dot file to standard output |
|||
A.layout("dot") # layout with dot |
|||
A.draw("foo.png") # write to file |
@ -0,0 +1,98 @@ |
|||
""" |
|||
Knuth Miles |
|||
=========== |
|||
|
|||
An example that shows how to add your own positions to nodes |
|||
and have graphviz "neato" position the edges. |
|||
|
|||
miles_graph() returns an undirected graph over the 128 US cities from |
|||
the datafile miles_dat.txt. |
|||
|
|||
This example is described in Section 1.1 in Knuth's book [1]_ [2]_. |
|||
|
|||
The data used in this example is copied from [2]_. The filename and |
|||
header have been modified to adhere to the request of the author to |
|||
not corrupt the original source file content and name. |
|||
|
|||
References. |
|||
----------- |
|||
.. [1] Donald E. Knuth, |
|||
"The Stanford GraphBase: A Platform for Combinatorial Computing", |
|||
ACM Press, New York, 1993. |
|||
.. [2] http://www-cs-faculty.stanford.edu/~knuth/sgb.html |
|||
""" |
|||
|
|||
__author__ = """Aric Hagberg (aric.hagberg@gmail.com)""" |
|||
|
|||
|
|||
def miles_graph(): |
|||
"""Return a graph from the data in miles_dat.txt. |
|||
|
|||
Edges are made between cities that are less then 300 miles apart. |
|||
""" |
|||
import math |
|||
import re |
|||
import gzip |
|||
|
|||
G = pgv.AGraph(name="miles_dat") |
|||
G.node_attr["shape"] = "circle" |
|||
G.node_attr["fixedsize"] = "true" |
|||
G.node_attr["fontsize"] = "8" |
|||
G.node_attr["style"] = "filled" |
|||
G.graph_attr["outputorder"] = "edgesfirst" |
|||
G.graph_attr["label"] = "miles_dat" |
|||
G.graph_attr["ratio"] = "1.0" |
|||
G.edge_attr["color"] = "#1100FF" |
|||
G.edge_attr["style"] = "setlinewidth(2)" |
|||
|
|||
cities = [] |
|||
for line in gzip.open("miles_dat.txt.gz", "rt"): |
|||
if line.startswith("*"): # skip comments |
|||
continue |
|||
numfind = re.compile(r"^\d+") |
|||
|
|||
if numfind.match(line): # this line is distances |
|||
dist = line.split() |
|||
for d in dist: |
|||
if float(d) < 300: # connect if closer then 300 miles |
|||
G.add_edge(city, cities[i]) |
|||
i = i + 1 |
|||
else: # this line is a city, position, population |
|||
i = 1 |
|||
(city, coordpop) = line.split("[") |
|||
cities.insert(0, city) |
|||
(coord, pop) = coordpop.split("]") |
|||
(y, x) = coord.split(",") |
|||
G.add_node(city) |
|||
n = G.get_node(city) |
|||
# assign positions, scale to be something reasonable in points |
|||
n.attr["pos"] = "%f,%f)" % ( |
|||
-(float(x) - 7000) / 10.0, |
|||
(float(y) - 2000) / 10.0, |
|||
) |
|||
# assign node size, in sqrt of 1,000,000's of people |
|||
d = math.sqrt(float(pop) / 1000000.0) |
|||
n.attr["height"] = "%s" % (d / 2) |
|||
n.attr["width"] = "%s" % (d / 2) |
|||
# assign node color |
|||
n.attr["fillcolor"] = "#0000%2x" % (int(d * 256)) |
|||
# empty labels |
|||
n.attr["label"] = " " |
|||
|
|||
return G |
|||
|
|||
|
|||
if __name__ == "__main__": |
|||
import warnings |
|||
import pygraphviz as pgv |
|||
|
|||
# ignore Graphviz warning messages |
|||
warnings.simplefilter("ignore", RuntimeWarning) |
|||
|
|||
G = miles_graph() |
|||
print("Loaded miles_dat.txt containing 128 cities.") |
|||
|
|||
G.write("miles.dot") |
|||
print("Wrote miles.dot") |
|||
G.draw("miles.png", prog="neato", args="-n2") |
|||
print("Wrote miles.png") |
@ -0,0 +1,30 @@ |
|||
""" |
|||
Basic |
|||
===== |
|||
|
|||
A simple example to create a graphviz dot file and draw a graph. |
|||
""" |
|||
# Copyright (C) 2006 by |
|||
# Aric Hagberg <hagberg@lanl.gov> |
|||
# Dan Schult <dschult@colgate.edu> |
|||
# Manos Renieris, http://www.cs.brown.edu/~er/ |
|||
# Distributed with BSD license. |
|||
# All rights reserved, see LICENSE for details. |
|||
|
|||
|
|||
__author__ = """Aric Hagberg (hagberg@lanl.gov)""" |
|||
|
|||
import pygraphviz as pgv |
|||
|
|||
A = pgv.AGraph() |
|||
|
|||
A.add_edge(1, 2) |
|||
A.add_edge(2, 3) |
|||
A.add_edge(1, 3) |
|||
|
|||
print(A.string()) # print to screen |
|||
A.write("simple.dot") # write to simple.dot |
|||
|
|||
B = pgv.AGraph("simple.dot") # create a new graph from file |
|||
B.layout() # layout with default (neato) |
|||
B.draw("simple.png") # draw png |
@ -0,0 +1,37 @@ |
|||
""" |
|||
Star |
|||
==== |
|||
|
|||
Create and draw a star with varying node properties. |
|||
""" |
|||
# Copyright (C) 2006 by |
|||
# Aric Hagberg <hagberg@lanl.gov> |
|||
# Dan Schult <dschult@colgate.edu> |
|||
# Manos Renieris, http://www.cs.brown.edu/~er/ |
|||
# Distributed with BSD license. |
|||
# All rights reserved, see LICENSE for details. |
|||
|
|||
|
|||
__author__ = """Aric Hagberg (hagberg@lanl.gov)""" |
|||
|
|||
from pygraphviz import * |
|||
|
|||
A = AGraph() |
|||
|
|||
# set some default node attributes |
|||
A.node_attr["style"] = "filled" |
|||
A.node_attr["shape"] = "circle" |
|||
A.node_attr["fixedsize"] = "true" |
|||
A.node_attr["fontcolor"] = "#FFFFFF" |
|||
|
|||
# make a star in shades of red |
|||
for i in range(1, 16): |
|||
A.add_edge(0, i) |
|||
n = A.get_node(i) |
|||
n.attr["fillcolor"] = "#%2x0000" % (i * 16) |
|||
n.attr["height"] = "%s" % (i / 16.0 + 0.5) |
|||
n.attr["width"] = "%s" % (i / 16.0 + 0.5) |
|||
|
|||
print(A.string()) # print to screen |
|||
A.write("star.dot") # write to simple.dot |
|||
A.draw("star.png", prog="circo") # draw to png using circo layout |
@ -0,0 +1,23 @@ |
|||
""" |
|||
Subgraph |
|||
======== |
|||
|
|||
Specify a subgraph in pygraphviz. |
|||
""" |
|||
|
|||
import pygraphviz as pgv |
|||
|
|||
A = pgv.AGraph() |
|||
# add some edges |
|||
A.add_edge(1, 2) |
|||
A.add_edge(2, 3) |
|||
A.add_edge(1, 3) |
|||
A.add_edge(3, 4) |
|||
A.add_edge(3, 5) |
|||
A.add_edge(3, 6) |
|||
A.add_edge(4, 6) |
|||
# make a subgraph with rank='same' |
|||
B = A.add_subgraph([4, 5, 6], name="s1", rank="same") |
|||
B.graph_attr["rank"] = "same" |
|||
print(A.string()) # print dot file to standard output |
|||
A.draw("subgraph.png", prog="neato") |
@ -0,0 +1,49 @@ |
|||
#!/usr/bin/env python |
|||
""" |
|||
Simple example for rendering a graph with the Django web framework. |
|||
See |
|||
http://www.djangoproject.com/ |
|||
and |
|||
http://www.djangobook.com/en/beta/chapter11/ |
|||
|
|||
""" |
|||
# Copyright (C) 2007 by |
|||
# Aric Hagberg <hagberg@lanl.gov> |
|||
# Dan Schult <dschult@colgate.edu> |
|||
# Manos Renieris, http://www.cs.brown.edu/~er/ |
|||
# Distributed with BSD license. |
|||
# All rights reserved, see LICENSE for details. |
|||
|
|||
|
|||
__author__ = """Aric Hagberg (hagberg@lanl.gov)""" |
|||
|
|||
try: |
|||
from django.http import HttpResponse |
|||
except ImportError: # this won't run without Django, print message |
|||
print("Django not found.") |
|||
|
|||
|
|||
def pygraphviz_graph(request): |
|||
import pygraphviz as P |
|||
|
|||
A = P.AGraph() # init empty graph |
|||
# set some default node attributes |
|||
A.node_attr["style"] = "filled" |
|||
A.node_attr["shape"] = "circle" |
|||
# Add edges (and nodes) |
|||
A.add_edge(1, 2) |
|||
A.add_edge(2, 3) |
|||
A.add_edge(1, 3) |
|||
A.layout() # layout with default (neato) |
|||
png = A.draw(format="png") # draw png |
|||
return HttpResponse(png, mimetype="image/png") |
|||
|
|||
|
|||
if __name__ == "__main__": |
|||
print( |
|||
"""This code works with the Django web framework |
|||
and should run as a django "view". |
|||
See djangoproject.com for info. |
|||
|
|||
""" |
|||
) |
@ -0,0 +1,31 @@ |
|||
""" |
|||
Example showing use of unicode and UTF-8 encoding. |
|||
""" |
|||
|
|||
|
|||
import pygraphviz as pgv |
|||
|
|||
# specify UTF-8 encoding (it is the default) |
|||
A = pgv.AGraph(encoding="UTF-8") |
|||
|
|||
# nodes, attributes, etc can be strings or unicode |
|||
A.add_node(1, label="plain string") |
|||
A.add_node(2, label="unicode") |
|||
|
|||
# you can enter unicode text as |
|||
hello = "Здравствуйте!" |
|||
A.add_node(3, label=hello) |
|||
|
|||
# or using unicode code points |
|||
hello = "\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435!" |
|||
A.add_node(hello) # unicode node label |
|||
|
|||
goodbye = "До свидания" |
|||
A.add_edge(1, hello, key=goodbye) |
|||
|
|||
A.add_edge("שלום", hello) |
|||
# A.add_edge(1,3,hello="こんにちは / コンニチハ") |
|||
A.add_edge(1, "こんにちは") |
|||
|
|||
print(A) # print to screen |
|||
A.write("utf8.dot") # write to simple.dot |
@ -0,0 +1,270 @@ |
|||
.\" Title: csv2ods |
|||
.\" Author: Agustin Henze <agustinhenze at gmail.com> |
|||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> |
|||
.\" Date: 01/04/2009 |
|||
.\" Manual: User commands |
|||
.\" Source: odfpy |
|||
.\" Language: English |
|||
.\" |
|||
.TH "CSV2ODS" "1" "01/04/2009" "odfpy" "User commands" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * (re)Define some macros |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" toupper - uppercase a string (locale-aware) |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de toupper |
|||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ |
|||
\\$* |
|||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH-xref - format a cross-reference to an SH section |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de SH-xref |
|||
.ie n \{\ |
|||
.\} |
|||
.toupper \\$* |
|||
.el \{\ |
|||
\\$* |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH - level-one heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SH |
|||
.\" put an extra blank line of space above the head in non-TTY output |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.HTML-TAG ".NH \\n[an-level]" |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
\." make the size of the head bigger |
|||
.ps +3 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.ie n \{\ |
|||
.\" if n (TTY output), use uppercase |
|||
.toupper \\$* |
|||
.\} |
|||
.el \{\ |
|||
.nr an-break-flag 0 |
|||
.\" if not n (not TTY), use normal case (not uppercase) |
|||
\\$1 |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.\" if not n (not TTY), put a border/line under subheading |
|||
.sp -.6 |
|||
\l'\n(.lu' |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SS - level-two heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SS |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[IN]u |
|||
.ti \\n[SN]u |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.ps \\n[PS-SS]u |
|||
\." make the size of the head bigger |
|||
.ps +2 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.if \\n[.$] \&\\$* |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BB/BE - put background/screen (filled box) around block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BB |
|||
.if t \{\ |
|||
.sp -.5 |
|||
.br |
|||
.in +2n |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EB |
|||
.if t \{\ |
|||
.if "\\$2"adjust-for-leading-newline" \{\ |
|||
.sp -1 |
|||
.\} |
|||
.br |
|||
.di |
|||
.in |
|||
.ll |
|||
.gcolor |
|||
.nr BW \\n(.lu-\\n(.i |
|||
.nr BH \\n(dn+.5v |
|||
.ne \\n(BHu+.5v |
|||
.ie "\\$2"adjust-for-leading-newline" \{\ |
|||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.el \{\ |
|||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.in 0 |
|||
.sp -.5v |
|||
.nf |
|||
.BX |
|||
.in |
|||
.sp .5v |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BM/EM - put colored marker in margin next to block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BM |
|||
.if t \{\ |
|||
.br |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EM |
|||
.if t \{\ |
|||
.br |
|||
.di |
|||
.ll |
|||
.gcolor |
|||
.nr BH \\n(dn |
|||
.ne \\n(BHu |
|||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] |
|||
.in 0 |
|||
.nf |
|||
.BX |
|||
.in |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.SH "Name" |
|||
csv2ods \- Create OpenDocument spreadsheet from comma separated values |
|||
.SH "Synopsis" |
|||
.fam C |
|||
.HP \w'\fBcsv2ods\fR\ 'u |
|||
\fBcsv2ods\fR \-i\ \fIfile\&.csv\fR \-o\ \fIfile\&.ods\fR |
|||
.fam |
|||
.SH "Description" |
|||
.PP |
|||
This program reads a file in CSV format \- table of columns delimited by commas, tabs or any other character\&. It then creates a spreadsheet\&. If a value looks like a number the cell is formatted as a number as well\&. |
|||
.SH "Options" |
|||
.PP |
|||
\-\-version |
|||
.RS 4 |
|||
Show program\'s version number and exit |
|||
.RE |
|||
.PP |
|||
\-h, \-\-help |
|||
.RS 4 |
|||
Show help message and exit |
|||
.RE |
|||
.PP |
|||
\-i \fIINPUT\fR, \-\-input=\fIINPUT\fR |
|||
.RS 4 |
|||
File input in csv\&. |
|||
.RE |
|||
.PP |
|||
\-o \fIOUTPUT\fR, \-\-output=\fIOUTPUT\fR |
|||
.RS 4 |
|||
File output in ods\&. |
|||
.RE |
|||
.PP |
|||
\-d \fIDELIMITER\fR, \-\-delimiter=\fIDELIMITER\fR |
|||
.RS 4 |
|||
Specifies a one\-character string to use as the field separator\&. It defaults to ","\&. |
|||
.RE |
|||
.PP |
|||
\-c \fIENCODING\fR, \-\-encoding=\fIENCODING\fR |
|||
.RS 4 |
|||
Specifies the encoding the file csv\&. It defaults to utf\-8\&. |
|||
.RE |
|||
.PP |
|||
\-t \fITABLENAME\fR, \-\-table=\fITABLENAME\fR |
|||
.RS 4 |
|||
The table name in the output file\&. |
|||
.RE |
|||
.PP |
|||
\-s \fISKIPINITIALSPACE\fR, \-\-skipinitialspace=\fISKIPINITIALSPACE\fR |
|||
.RS 4 |
|||
Specifies how to interpret whitespace which immediately follows a delimiter\&. It defaults to False, which means that whitespace immediately following a delimiter is part of the following field\&. |
|||
.RE |
|||
.PP |
|||
\-l \fILINETERMINATOR\fR, \-\-lineterminator=\fILINETERMINATOR\fR |
|||
.RS 4 |
|||
Specifies the character sequence which should terminate rows\&. |
|||
.RE |
|||
.PP |
|||
\-q \fIQUOTING\fR, \-\-quoting=\fIQUOTING\fR |
|||
.RS 4 |
|||
It can take on any of the following module constants: 0 = QUOTE_MINIMAL means only when required, for example, when a field contains either the quotechar or the delimiter\&. 1 = QUOTE_ALL means that quotes are always placed around fields\&. 2 = QUOTE_NONNUMERIC means that quotes are always placed around fields which do not parse as integers or floating point numbers\&. 3 = QUOTE_NONE means that quotes are never placed around fields\&. It defaults is QUOTE_MINIMAL\&. |
|||
.RE |
|||
.PP |
|||
\-e \fIESCAPECHAR\fR, \-\-escapechar=\fIESCAPECHAR\fR |
|||
.RS 4 |
|||
Specifies a one\-character string used to escape the delimiter when quoting is set to QUOTE_NONE\&. |
|||
.RE |
|||
.PP |
|||
\-r \fIQUOTECHAR\fR, \-\-quotechar=\fIQUOTECHAR\fR |
|||
.RS 4 |
|||
Specifies a one\-character string to use as the quoting character\&. It defaults to "\&. |
|||
.RE |
|||
.SH "Example" |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.fam C |
|||
.ps -1 |
|||
.nf |
|||
.if t \{\ |
|||
.sp -1 |
|||
.\} |
|||
.BB lightgray adjust-for-leading-newline |
|||
.sp -1 |
|||
|
|||
csv2ods \-i /etc/passwd \-o accounts\&.odt \-d: |
|||
.EB lightgray adjust-for-leading-newline |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.fi |
|||
.fam |
|||
.ps +1 |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.SH "Author" |
|||
.PP |
|||
\fBAgustin Henze\fR <\&agustinhenze at gmail\&.com\&> |
|||
.RS 4 |
|||
Original author of csv\-ods\&.py |
|||
.RE |
Binary file not shown.
@ -0,0 +1,232 @@ |
|||
.\" Title: mailodf |
|||
.\" Author: S\(/oren Roug |
|||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> |
|||
.\" Date: 03/15/2009 |
|||
.\" Manual: User commands |
|||
.\" Source: odfpy |
|||
.\" Language: English |
|||
.\" |
|||
.TH "MAILODF" "1" "03/15/2009" "odfpy" "User commands" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * (re)Define some macros |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" toupper - uppercase a string (locale-aware) |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de toupper |
|||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ |
|||
\\$* |
|||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH-xref - format a cross-reference to an SH section |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de SH-xref |
|||
.ie n \{\ |
|||
.\} |
|||
.toupper \\$* |
|||
.el \{\ |
|||
\\$* |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH - level-one heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SH |
|||
.\" put an extra blank line of space above the head in non-TTY output |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.HTML-TAG ".NH \\n[an-level]" |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
\." make the size of the head bigger |
|||
.ps +3 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.ie n \{\ |
|||
.\" if n (TTY output), use uppercase |
|||
.toupper \\$* |
|||
.\} |
|||
.el \{\ |
|||
.nr an-break-flag 0 |
|||
.\" if not n (not TTY), use normal case (not uppercase) |
|||
\\$1 |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.\" if not n (not TTY), put a border/line under subheading |
|||
.sp -.6 |
|||
\l'\n(.lu' |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SS - level-two heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SS |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[IN]u |
|||
.ti \\n[SN]u |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.ps \\n[PS-SS]u |
|||
\." make the size of the head bigger |
|||
.ps +2 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.if \\n[.$] \&\\$* |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BB/BE - put background/screen (filled box) around block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BB |
|||
.if t \{\ |
|||
.sp -.5 |
|||
.br |
|||
.in +2n |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EB |
|||
.if t \{\ |
|||
.if "\\$2"adjust-for-leading-newline" \{\ |
|||
.sp -1 |
|||
.\} |
|||
.br |
|||
.di |
|||
.in |
|||
.ll |
|||
.gcolor |
|||
.nr BW \\n(.lu-\\n(.i |
|||
.nr BH \\n(dn+.5v |
|||
.ne \\n(BHu+.5v |
|||
.ie "\\$2"adjust-for-leading-newline" \{\ |
|||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.el \{\ |
|||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.in 0 |
|||
.sp -.5v |
|||
.nf |
|||
.BX |
|||
.in |
|||
.sp .5v |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BM/EM - put colored marker in margin next to block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BM |
|||
.if t \{\ |
|||
.br |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EM |
|||
.if t \{\ |
|||
.br |
|||
.di |
|||
.ll |
|||
.gcolor |
|||
.nr BH \\n(dn |
|||
.ne \\n(BHu |
|||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] |
|||
.in 0 |
|||
.nf |
|||
.BX |
|||
.in |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.SH "Name" |
|||
mailodf \- Email ODF file as HTML archive |
|||
.SH "Synopsis" |
|||
.fam C |
|||
.HP \w'\fBmailodf\fR\ 'u |
|||
\fBmailodf\fR [\-f\ \fIfrom\fR] [\-s\ \fIsubject\fR] \fIinputfile\fR \fIrecipients\fR... |
|||
.fam |
|||
.SH "Description" |
|||
.PP |
|||
mailodf is a program that will create a MIME\-encapsulated web archive and then sends it as an email\&. Most email programs that understand HTML understands this format\&. |
|||
.PP |
|||
|
|||
\(lqInputfile\(rq |
|||
is assumed to be an OpenDocument file of text, spreadsheet or presentation type\&. |
|||
.SH "References" |
|||
.RS 4 |
|||
HTTRACK (http://www\&.httrack\&.com/) can create such archives with the \-%M option\&. |
|||
.RE |
|||
.RS 4 |
|||
http://en\&.wikipedia\&.org/wiki/MHTML |
|||
.RE |
|||
.RS 4 |
|||
http://www\&.dsv\&.su\&.se/~jpalme/ietf/mhtml\&.html |
|||
.RE |
|||
.RS 4 |
|||
http://users\&.otenet\&.gr/~geosp/kmhtconvert/ |
|||
.RE |
|||
.RS 4 |
|||
http://www\&.faqs\&.org/rfcs/rfc2557\&.html |
|||
.RE |
|||
.SH "Example" |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.fam C |
|||
.ps -1 |
|||
.nf |
|||
.if t \{\ |
|||
.sp -1 |
|||
.\} |
|||
.BB lightgray adjust-for-leading-newline |
|||
.sp -1 |
|||
|
|||
mailodf \-f lars\&.oppermann@sun\&.com \-s "F\&.Y\&.I" odf\-file |
|||
.EB lightgray adjust-for-leading-newline |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.fi |
|||
.fam |
|||
.ps +1 |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.SH "See Also" |
|||
.PP |
|||
odf2mht |
|||
.SH "Author" |
|||
.PP |
|||
\fBS\(/oren Roug\fR |
|||
.RS 4 |
|||
Original author |
|||
.RE |
@ -0,0 +1,239 @@ |
|||
.\" Title: odf2mht |
|||
.\" Author: S\(/oren Roug |
|||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> |
|||
.\" Date: 03/15/2009 |
|||
.\" Manual: User commands |
|||
.\" Source: odfpy |
|||
.\" Language: English |
|||
.\" |
|||
.TH "ODF2MHT" "1" "03/15/2009" "odfpy" "User commands" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * (re)Define some macros |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" toupper - uppercase a string (locale-aware) |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de toupper |
|||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ |
|||
\\$* |
|||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH-xref - format a cross-reference to an SH section |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de SH-xref |
|||
.ie n \{\ |
|||
.\} |
|||
.toupper \\$* |
|||
.el \{\ |
|||
\\$* |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH - level-one heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SH |
|||
.\" put an extra blank line of space above the head in non-TTY output |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.HTML-TAG ".NH \\n[an-level]" |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
\." make the size of the head bigger |
|||
.ps +3 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.ie n \{\ |
|||
.\" if n (TTY output), use uppercase |
|||
.toupper \\$* |
|||
.\} |
|||
.el \{\ |
|||
.nr an-break-flag 0 |
|||
.\" if not n (not TTY), use normal case (not uppercase) |
|||
\\$1 |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.\" if not n (not TTY), put a border/line under subheading |
|||
.sp -.6 |
|||
\l'\n(.lu' |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SS - level-two heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SS |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[IN]u |
|||
.ti \\n[SN]u |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.ps \\n[PS-SS]u |
|||
\." make the size of the head bigger |
|||
.ps +2 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.if \\n[.$] \&\\$* |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BB/BE - put background/screen (filled box) around block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BB |
|||
.if t \{\ |
|||
.sp -.5 |
|||
.br |
|||
.in +2n |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EB |
|||
.if t \{\ |
|||
.if "\\$2"adjust-for-leading-newline" \{\ |
|||
.sp -1 |
|||
.\} |
|||
.br |
|||
.di |
|||
.in |
|||
.ll |
|||
.gcolor |
|||
.nr BW \\n(.lu-\\n(.i |
|||
.nr BH \\n(dn+.5v |
|||
.ne \\n(BHu+.5v |
|||
.ie "\\$2"adjust-for-leading-newline" \{\ |
|||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.el \{\ |
|||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.in 0 |
|||
.sp -.5v |
|||
.nf |
|||
.BX |
|||
.in |
|||
.sp .5v |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BM/EM - put colored marker in margin next to block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BM |
|||
.if t \{\ |
|||
.br |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EM |
|||
.if t \{\ |
|||
.br |
|||
.di |
|||
.ll |
|||
.gcolor |
|||
.nr BH \\n(dn |
|||
.ne \\n(BHu |
|||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] |
|||
.in 0 |
|||
.nf |
|||
.BX |
|||
.in |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.SH "Name" |
|||
odf2mht \- Convert ODF to HTML archive |
|||
.SH "Synopsis" |
|||
.fam C |
|||
.HP \w'\fBodf2mht\fR\ 'u |
|||
\fBodf2mht\fR \fIpath\fR |
|||
.fam |
|||
.SH "Description" |
|||
.PP |
|||
\fBOdf2mht\fR |
|||
is a program that will create a MIME\-encapsulated web archive (\&.mht) format where images are preserved\&. The file can be read by Internet Explorer, MS\-Word and many email programs such as MS\-Outlook\&. It will write the web archive to stdout\&. |
|||
.PP |
|||
|
|||
\(lqPath\(rq |
|||
is assumed to be an OpenDocument file of text, spreadsheet or presentation type\&. |
|||
.SH "References" |
|||
.RS 4 |
|||
HTTRACK (http://www\&.httrack\&.com/) can create such archives with the \-%M option\&. |
|||
.RE |
|||
.RS 4 |
|||
http://en\&.wikipedia\&.org/wiki/MHTML |
|||
.RE |
|||
.RS 4 |
|||
http://www\&.dsv\&.su\&.se/~jpalme/ietf/mhtml\&.html |
|||
.RE |
|||
.RS 4 |
|||
http://users\&.otenet\&.gr/~geosp/kmhtconvert/ |
|||
.RE |
|||
.RS 4 |
|||
http://www\&.faqs\&.org/rfcs/rfc2557\&.html |
|||
.RE |
|||
.SH "Example" |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.fam C |
|||
.ps -1 |
|||
.nf |
|||
.if t \{\ |
|||
.sp -1 |
|||
.\} |
|||
.BB lightgray adjust-for-leading-newline |
|||
.sp -1 |
|||
|
|||
odf2mht example\&.odt >example\&.mht |
|||
.EB lightgray adjust-for-leading-newline |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.fi |
|||
.fam |
|||
.ps +1 |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.SH "Bugs" |
|||
.PP |
|||
IE6 seems to have problems with large MHT files\&. |
|||
.SH "See Also" |
|||
.PP |
|||
|
|||
\fBodftools\fR(1), |
|||
\fBodf2war\fR(1), |
|||
\fBmailodf\fR(1) |
|||
.SH "Author" |
|||
.PP |
|||
\fBS\(/oren Roug\fR |
|||
.RS 4 |
|||
Original author |
|||
.RE |
@ -0,0 +1,221 @@ |
|||
.\" Title: odf2xhtml |
|||
.\" Author: S\(/oren Roug |
|||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> |
|||
.\" Date: 01/04/2009 |
|||
.\" Manual: User commands |
|||
.\" Source: odfpy |
|||
.\" Language: English |
|||
.\" |
|||
.TH "ODF2XHTML" "1" "01/04/2009" "odfpy" "User commands" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * (re)Define some macros |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" toupper - uppercase a string (locale-aware) |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de toupper |
|||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ |
|||
\\$* |
|||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH-xref - format a cross-reference to an SH section |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de SH-xref |
|||
.ie n \{\ |
|||
.\} |
|||
.toupper \\$* |
|||
.el \{\ |
|||
\\$* |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH - level-one heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SH |
|||
.\" put an extra blank line of space above the head in non-TTY output |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.HTML-TAG ".NH \\n[an-level]" |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
\." make the size of the head bigger |
|||
.ps +3 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.ie n \{\ |
|||
.\" if n (TTY output), use uppercase |
|||
.toupper \\$* |
|||
.\} |
|||
.el \{\ |
|||
.nr an-break-flag 0 |
|||
.\" if not n (not TTY), use normal case (not uppercase) |
|||
\\$1 |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.\" if not n (not TTY), put a border/line under subheading |
|||
.sp -.6 |
|||
\l'\n(.lu' |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SS - level-two heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SS |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[IN]u |
|||
.ti \\n[SN]u |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.ps \\n[PS-SS]u |
|||
\." make the size of the head bigger |
|||
.ps +2 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.if \\n[.$] \&\\$* |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BB/BE - put background/screen (filled box) around block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BB |
|||
.if t \{\ |
|||
.sp -.5 |
|||
.br |
|||
.in +2n |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EB |
|||
.if t \{\ |
|||
.if "\\$2"adjust-for-leading-newline" \{\ |
|||
.sp -1 |
|||
.\} |
|||
.br |
|||
.di |
|||
.in |
|||
.ll |
|||
.gcolor |
|||
.nr BW \\n(.lu-\\n(.i |
|||
.nr BH \\n(dn+.5v |
|||
.ne \\n(BHu+.5v |
|||
.ie "\\$2"adjust-for-leading-newline" \{\ |
|||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.el \{\ |
|||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.in 0 |
|||
.sp -.5v |
|||
.nf |
|||
.BX |
|||
.in |
|||
.sp .5v |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BM/EM - put colored marker in margin next to block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BM |
|||
.if t \{\ |
|||
.br |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EM |
|||
.if t \{\ |
|||
.br |
|||
.di |
|||
.ll |
|||
.gcolor |
|||
.nr BH \\n(dn |
|||
.ne \\n(BHu |
|||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] |
|||
.in 0 |
|||
.nf |
|||
.BX |
|||
.in |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.SH "Name" |
|||
odf2xhtml \- Convert ODF to HTML |
|||
.SH "Synopsis" |
|||
.fam C |
|||
.HP \w'\fBodf2xhtml\fR\ 'u |
|||
\fBodf2xhtml\fR [\-e] \fIpath\fR |
|||
.fam |
|||
.SH "Description" |
|||
.PP |
|||
\fBodf2xhtml\fR |
|||
is a program that will create a webpage (\&.html) from the input file and will write the webpage to stdout\&. |
|||
.PP |
|||
"Path" is assumed to be an OpenDocument file of text, spreadsheet or presentation type\&. |
|||
.SH "Options" |
|||
.PP |
|||
\-p, \-\-plain |
|||
.RS 4 |
|||
The \-p flag will generate HTML without CSS\&. |
|||
.RE |
|||
.SH "Example" |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.fam C |
|||
.ps -1 |
|||
.nf |
|||
.if t \{\ |
|||
.sp -1 |
|||
.\} |
|||
.BB lightgray adjust-for-leading-newline |
|||
.sp -1 |
|||
|
|||
odf2xhtml odf\-file |
|||
.EB lightgray adjust-for-leading-newline |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.fi |
|||
.fam |
|||
.ps +1 |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.SH "See Also" |
|||
.PP |
|||
\fBodf2mht\fR(1) |
|||
.SH "Author" |
|||
.PP |
|||
\fBS\(/oren Roug\fR |
|||
.RS 4 |
|||
Original author |
|||
.RE |
@ -0,0 +1,231 @@ |
|||
.\" Title: odf2xml |
|||
.\" Author: S\(/oren Roug |
|||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> |
|||
.\" Date: 01/04/2009 |
|||
.\" Manual: User commands |
|||
.\" Source: odfpy |
|||
.\" Language: English |
|||
.\" |
|||
.TH "ODF2XML" "1" "01/04/2009" "odfpy" "User commands" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * (re)Define some macros |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" toupper - uppercase a string (locale-aware) |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de toupper |
|||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ |
|||
\\$* |
|||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH-xref - format a cross-reference to an SH section |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de SH-xref |
|||
.ie n \{\ |
|||
.\} |
|||
.toupper \\$* |
|||
.el \{\ |
|||
\\$* |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH - level-one heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SH |
|||
.\" put an extra blank line of space above the head in non-TTY output |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.HTML-TAG ".NH \\n[an-level]" |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
\." make the size of the head bigger |
|||
.ps +3 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.ie n \{\ |
|||
.\" if n (TTY output), use uppercase |
|||
.toupper \\$* |
|||
.\} |
|||
.el \{\ |
|||
.nr an-break-flag 0 |
|||
.\" if not n (not TTY), use normal case (not uppercase) |
|||
\\$1 |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.\" if not n (not TTY), put a border/line under subheading |
|||
.sp -.6 |
|||
\l'\n(.lu' |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SS - level-two heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SS |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[IN]u |
|||
.ti \\n[SN]u |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.ps \\n[PS-SS]u |
|||
\." make the size of the head bigger |
|||
.ps +2 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.if \\n[.$] \&\\$* |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BB/BE - put background/screen (filled box) around block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BB |
|||
.if t \{\ |
|||
.sp -.5 |
|||
.br |
|||
.in +2n |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EB |
|||
.if t \{\ |
|||
.if "\\$2"adjust-for-leading-newline" \{\ |
|||
.sp -1 |
|||
.\} |
|||
.br |
|||
.di |
|||
.in |
|||
.ll |
|||
.gcolor |
|||
.nr BW \\n(.lu-\\n(.i |
|||
.nr BH \\n(dn+.5v |
|||
.ne \\n(BHu+.5v |
|||
.ie "\\$2"adjust-for-leading-newline" \{\ |
|||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.el \{\ |
|||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.in 0 |
|||
.sp -.5v |
|||
.nf |
|||
.BX |
|||
.in |
|||
.sp .5v |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BM/EM - put colored marker in margin next to block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BM |
|||
.if t \{\ |
|||
.br |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EM |
|||
.if t \{\ |
|||
.br |
|||
.di |
|||
.ll |
|||
.gcolor |
|||
.nr BH \\n(dn |
|||
.ne \\n(BHu |
|||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] |
|||
.in 0 |
|||
.nf |
|||
.BX |
|||
.in |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.SH "Name" |
|||
odf2xml \- Create OpenDocument XML file from OD? package |
|||
.SH "Synopsis" |
|||
.fam C |
|||
.HP \w'\fBodf2xml\fR\ 'u |
|||
\fBodf2xml\fR [\-e] [\-o\ \fIoutputfile\fR] [\fIinputfile\fR] |
|||
.fam |
|||
.SH "Description" |
|||
.PP |
|||
OpenDocument can be a complete office document in a single XML file\&. The script will take an OpenDocument and create an XML file This is mainly useful XML processors such as XSL transformation\&. |
|||
.PP |
|||
.PP |
|||
"Inputfile" is assumed to be an OpenDocument file\&. If there is no inputfile, the program will read from standard input\&. |
|||
.SH "Options" |
|||
.PP |
|||
\-e |
|||
.RS 4 |
|||
Normally, images that are stored in the archive in the Pictures folder are ignored\&. Using the \-e flag will |
|||
\fIembed\fR |
|||
the images in the XML as base64\&. |
|||
.RE |
|||
.PP |
|||
\-o \fIoutputfile\fR |
|||
.RS 4 |
|||
If output file is not specified output will be to standard out\&. |
|||
.RE |
|||
.SH "Example" |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.fam C |
|||
.ps -1 |
|||
.nf |
|||
.if t \{\ |
|||
.sp -1 |
|||
.\} |
|||
.BB lightgray adjust-for-leading-newline |
|||
.sp -1 |
|||
|
|||
odf2xml \-o file\&.xml testdocument\&.odt |
|||
.EB lightgray adjust-for-leading-newline |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.fi |
|||
.fam |
|||
.ps +1 |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.SH "See Also" |
|||
.PP |
|||
\fBxml2odf\fR(1) |
|||
.SH "Bugs" |
|||
.PP |
|||
Doesn\'t handle external data \-\- images and such\&. |
|||
.SH "Author" |
|||
.PP |
|||
\fBS\(/oren Roug\fR |
|||
.RS 4 |
|||
Original author |
|||
.RE |
@ -0,0 +1,227 @@ |
|||
.\" Title: odfimgimport |
|||
.\" Author: S\(/oren Roug |
|||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> |
|||
.\" Date: 01/04/2009 |
|||
.\" Manual: User commands |
|||
.\" Source: odfpy |
|||
.\" Language: English |
|||
.\" |
|||
.TH "ODFIMGIMPORT" "1" "01/04/2009" "odfpy" "User commands" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * (re)Define some macros |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" toupper - uppercase a string (locale-aware) |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de toupper |
|||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ |
|||
\\$* |
|||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH-xref - format a cross-reference to an SH section |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de SH-xref |
|||
.ie n \{\ |
|||
.\} |
|||
.toupper \\$* |
|||
.el \{\ |
|||
\\$* |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH - level-one heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SH |
|||
.\" put an extra blank line of space above the head in non-TTY output |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.HTML-TAG ".NH \\n[an-level]" |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
\." make the size of the head bigger |
|||
.ps +3 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.ie n \{\ |
|||
.\" if n (TTY output), use uppercase |
|||
.toupper \\$* |
|||
.\} |
|||
.el \{\ |
|||
.nr an-break-flag 0 |
|||
.\" if not n (not TTY), use normal case (not uppercase) |
|||
\\$1 |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.\" if not n (not TTY), put a border/line under subheading |
|||
.sp -.6 |
|||
\l'\n(.lu' |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SS - level-two heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SS |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[IN]u |
|||
.ti \\n[SN]u |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.ps \\n[PS-SS]u |
|||
\." make the size of the head bigger |
|||
.ps +2 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.if \\n[.$] \&\\$* |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BB/BE - put background/screen (filled box) around block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BB |
|||
.if t \{\ |
|||
.sp -.5 |
|||
.br |
|||
.in +2n |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EB |
|||
.if t \{\ |
|||
.if "\\$2"adjust-for-leading-newline" \{\ |
|||
.sp -1 |
|||
.\} |
|||
.br |
|||
.di |
|||
.in |
|||
.ll |
|||
.gcolor |
|||
.nr BW \\n(.lu-\\n(.i |
|||
.nr BH \\n(dn+.5v |
|||
.ne \\n(BHu+.5v |
|||
.ie "\\$2"adjust-for-leading-newline" \{\ |
|||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.el \{\ |
|||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.in 0 |
|||
.sp -.5v |
|||
.nf |
|||
.BX |
|||
.in |
|||
.sp .5v |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BM/EM - put colored marker in margin next to block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BM |
|||
.if t \{\ |
|||
.br |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EM |
|||
.if t \{\ |
|||
.br |
|||
.di |
|||
.ll |
|||
.gcolor |
|||
.nr BH \\n(dn |
|||
.ne \\n(BHu |
|||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] |
|||
.in 0 |
|||
.nf |
|||
.BX |
|||
.in |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.SH "Name" |
|||
odfimgimport \- Import external images |
|||
.SH "Synopsis" |
|||
.fam C |
|||
.HP \w'\fBodfimgimport\fR\ 'u |
|||
\fBodfimgimport\fR [\-q] [\-o\ \fIoutputfile\fR] [\fIinputfile\fR] |
|||
.fam |
|||
.SH "Description" |
|||
.PP |
|||
If you copy and paste html from your webbrowser to your word processor, the pictures in the pasted text will still load the images from the Internet\&. This script will import all images into the OpenDocument file\&. |
|||
.PP |
|||
If you don\'t provide an input file, the program will read from stdin\&. If the program reads from stdin, it might not know how to resolve relative filenames\&. If you don\'t provide an output file, the program will import the pictures into the input file\&. |
|||
.SH "Options" |
|||
.PP |
|||
\-q |
|||
.RS 4 |
|||
If there are images that can\'t be imported, odfimgimport will write how many has failed\&. The \-q flag will prevent that\&. |
|||
.RE |
|||
.PP |
|||
\-v |
|||
.RS 4 |
|||
Verbose: Prints the URL of every image it tries to import and the result\&. |
|||
.RE |
|||
.PP |
|||
\-o \fIoutputfile\fR |
|||
.RS 4 |
|||
The file to save the output to\&. "\-" is stdout\&. Defaults to the input file\&. |
|||
.RE |
|||
.SH "Example" |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.fam C |
|||
.ps -1 |
|||
.nf |
|||
.if t \{\ |
|||
.sp -1 |
|||
.\} |
|||
.BB lightgray adjust-for-leading-newline |
|||
.sp -1 |
|||
|
|||
odfimgimport \-v \-o newfile\&.odt oldfile\&.odt |
|||
.EB lightgray adjust-for-leading-newline |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.fi |
|||
.fam |
|||
.ps +1 |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.SH "Author" |
|||
.PP |
|||
\fBS\(/oren Roug\fR |
|||
.RS 4 |
|||
Original author |
|||
.RE |
@ -0,0 +1,217 @@ |
|||
.\" Title: odflint |
|||
.\" Author: S\(/oren Roug |
|||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> |
|||
.\" Date: 03/15/2009 |
|||
.\" Manual: User commands |
|||
.\" Source: odfpy |
|||
.\" Language: English |
|||
.\" |
|||
.TH "ODFLINT" "1" "03/15/2009" "odfpy" "User commands" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * (re)Define some macros |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" toupper - uppercase a string (locale-aware) |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de toupper |
|||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ |
|||
\\$* |
|||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH-xref - format a cross-reference to an SH section |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de SH-xref |
|||
.ie n \{\ |
|||
.\} |
|||
.toupper \\$* |
|||
.el \{\ |
|||
\\$* |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH - level-one heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SH |
|||
.\" put an extra blank line of space above the head in non-TTY output |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.HTML-TAG ".NH \\n[an-level]" |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
\." make the size of the head bigger |
|||
.ps +3 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.ie n \{\ |
|||
.\" if n (TTY output), use uppercase |
|||
.toupper \\$* |
|||
.\} |
|||
.el \{\ |
|||
.nr an-break-flag 0 |
|||
.\" if not n (not TTY), use normal case (not uppercase) |
|||
\\$1 |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.\" if not n (not TTY), put a border/line under subheading |
|||
.sp -.6 |
|||
\l'\n(.lu' |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SS - level-two heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SS |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[IN]u |
|||
.ti \\n[SN]u |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.ps \\n[PS-SS]u |
|||
\." make the size of the head bigger |
|||
.ps +2 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.if \\n[.$] \&\\$* |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BB/BE - put background/screen (filled box) around block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BB |
|||
.if t \{\ |
|||
.sp -.5 |
|||
.br |
|||
.in +2n |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EB |
|||
.if t \{\ |
|||
.if "\\$2"adjust-for-leading-newline" \{\ |
|||
.sp -1 |
|||
.\} |
|||
.br |
|||
.di |
|||
.in |
|||
.ll |
|||
.gcolor |
|||
.nr BW \\n(.lu-\\n(.i |
|||
.nr BH \\n(dn+.5v |
|||
.ne \\n(BHu+.5v |
|||
.ie "\\$2"adjust-for-leading-newline" \{\ |
|||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.el \{\ |
|||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.in 0 |
|||
.sp -.5v |
|||
.nf |
|||
.BX |
|||
.in |
|||
.sp .5v |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BM/EM - put colored marker in margin next to block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BM |
|||
.if t \{\ |
|||
.br |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EM |
|||
.if t \{\ |
|||
.br |
|||
.di |
|||
.ll |
|||
.gcolor |
|||
.nr BH \\n(dn |
|||
.ne \\n(BHu |
|||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] |
|||
.in 0 |
|||
.nf |
|||
.BX |
|||
.in |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.SH "Name" |
|||
odflint \- Check ODF file for problems |
|||
.SH "Synopsis" |
|||
.fam C |
|||
.HP \w'\fBodflint\fR\ 'u |
|||
\fBodflint\fR \fIpath\fR |
|||
.fam |
|||
.SH "Description" |
|||
.PP |
|||
\fBodflint\fR |
|||
is a program that will check an ODF file and give warning if it finds something suspect\&. It is not able to make a full validation due to the complexity of the schema\&. |
|||
.PP |
|||
|
|||
\(lqPath\(rq |
|||
is assumed to be an OpenDocument file of text, spreadsheet or presentation type\&. |
|||
.SH "Example" |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.fam C |
|||
.ps -1 |
|||
.nf |
|||
.if t \{\ |
|||
.sp -1 |
|||
.\} |
|||
.BB lightgray adjust-for-leading-newline |
|||
.sp -1 |
|||
|
|||
odflint odf\-file |
|||
.EB lightgray adjust-for-leading-newline |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.fi |
|||
.fam |
|||
.ps +1 |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.SH "Bugs" |
|||
.PP |
|||
Validates all versions of ODF as if they are version 1\&.1\&. You\'ll therefore get some false positives if you check files that aren\'t generated by odfpy scripts\&. |
|||
.SH "Author" |
|||
.PP |
|||
\fBS\(/oren Roug\fR |
|||
.RS 4 |
|||
Original author |
|||
.RE |
@ -0,0 +1,277 @@ |
|||
.\" Title: odfmeta |
|||
.\" Author: S\(/oren Roug |
|||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> |
|||
.\" Date: 03/15/2009 |
|||
.\" Manual: User commands |
|||
.\" Source: odfpy |
|||
.\" Language: English |
|||
.\" |
|||
.TH "ODFMETA" "1" "03/15/2009" "odfpy" "User commands" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * (re)Define some macros |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" toupper - uppercase a string (locale-aware) |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de toupper |
|||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ |
|||
\\$* |
|||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH-xref - format a cross-reference to an SH section |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de SH-xref |
|||
.ie n \{\ |
|||
.\} |
|||
.toupper \\$* |
|||
.el \{\ |
|||
\\$* |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH - level-one heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SH |
|||
.\" put an extra blank line of space above the head in non-TTY output |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.HTML-TAG ".NH \\n[an-level]" |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
\." make the size of the head bigger |
|||
.ps +3 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.ie n \{\ |
|||
.\" if n (TTY output), use uppercase |
|||
.toupper \\$* |
|||
.\} |
|||
.el \{\ |
|||
.nr an-break-flag 0 |
|||
.\" if not n (not TTY), use normal case (not uppercase) |
|||
\\$1 |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.\" if not n (not TTY), put a border/line under subheading |
|||
.sp -.6 |
|||
\l'\n(.lu' |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SS - level-two heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SS |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[IN]u |
|||
.ti \\n[SN]u |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.ps \\n[PS-SS]u |
|||
\." make the size of the head bigger |
|||
.ps +2 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.if \\n[.$] \&\\$* |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BB/BE - put background/screen (filled box) around block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BB |
|||
.if t \{\ |
|||
.sp -.5 |
|||
.br |
|||
.in +2n |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EB |
|||
.if t \{\ |
|||
.if "\\$2"adjust-for-leading-newline" \{\ |
|||
.sp -1 |
|||
.\} |
|||
.br |
|||
.di |
|||
.in |
|||
.ll |
|||
.gcolor |
|||
.nr BW \\n(.lu-\\n(.i |
|||
.nr BH \\n(dn+.5v |
|||
.ne \\n(BHu+.5v |
|||
.ie "\\$2"adjust-for-leading-newline" \{\ |
|||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.el \{\ |
|||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.in 0 |
|||
.sp -.5v |
|||
.nf |
|||
.BX |
|||
.in |
|||
.sp .5v |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BM/EM - put colored marker in margin next to block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BM |
|||
.if t \{\ |
|||
.br |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EM |
|||
.if t \{\ |
|||
.br |
|||
.di |
|||
.ll |
|||
.gcolor |
|||
.nr BH \\n(dn |
|||
.ne \\n(BHu |
|||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] |
|||
.in 0 |
|||
.nf |
|||
.BX |
|||
.in |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.SH "Name" |
|||
odfmeta \- List or change the metadata of an ODF file |
|||
.SH "Synopsis" |
|||
.fam C |
|||
.HP \w'\fBodfmeta\fR\ 'u |
|||
\fBodfmeta\fR [\-l] [\-v] [\-V] [\-c] [\-d] [\-x\ \fImetafield\fR...] [\-X\ \fImetafield\fR...] [\-a\ \fImetafield\fR...] [\-A\ \fImetafield\fR...] [\-I\ \fImetafield\fR...] [\-o\ \fIpath\fR] \fIpath\fR |
|||
.fam |
|||
.SH "Description" |
|||
.PP |
|||
\fBodfmeta\fR |
|||
is a program that will list or change the metadata in an OpenDocument file\&. This is useful for version control systems\&. You can change title, keywords, description etc\&. |
|||
.PP |
|||
|
|||
\(lqPath\(rq |
|||
is assumed to be an OpenDocument file of text, spreadsheet or presentation type\&. |
|||
.SH "Options" |
|||
.PP |
|||
\-l |
|||
.RS 4 |
|||
List (extract) all known metadata fields\&. |
|||
.RE |
|||
.PP |
|||
\-v or \-V |
|||
.RS 4 |
|||
Print the version number of the ODF document |
|||
\fIformat\fR\&. If you use \-V it will print "version:" before the number for compatibility with \-X\&. The version number can\'t be modified\&. |
|||
.RE |
|||
.PP |
|||
\-c |
|||
.RS 4 |
|||
Make field values continous by normalizing white space\&. Might be convenient when postprocessing with standard (line oriented) text utilities\&. |
|||
.RE |
|||
.PP |
|||
\-d |
|||
.RS 4 |
|||
Update the modification date to the current date and time\&. |
|||
.RE |
|||
.PP |
|||
\-x \fImetafield\fR |
|||
.RS 4 |
|||
Extract the contents of this metafield from the file\&. Known field names are creation\-date, creator, date, description, editing\-cycles, editing\-duration, generator, initial\-creator, keyword, language, print\-date, printed\-by, subject, title, user\-defined\&. All other names are assumed to be user defined\&. |
|||
.RE |
|||
.PP |
|||
\-X \fImetafield\fR |
|||
.RS 4 |
|||
Same as \-x, but also preserves/includes the field name\&. |
|||
.RE |
|||
.PP |
|||
\-a \fImetafield\fR |
|||
.RS 4 |
|||
Append a custom metafield to the metadata; but only if a similar field does not exist yet\&. |
|||
.RE |
|||
.PP |
|||
\-A \fImetafield\fR |
|||
.RS 4 |
|||
Append a custom metafield to the metadata in any case\&. |
|||
.RE |
|||
.PP |
|||
\-I \fImetafield\fR |
|||
.RS 4 |
|||
Append a custom metafield to the metadata and remove any existing similar field\&. |
|||
.RE |
|||
.PP |
|||
\-o \fIpath\fR |
|||
.RS 4 |
|||
Filename to write modified ODT file to\&. If no |
|||
\fB\-o\fR |
|||
option is provided, the ODT file will be written to stdout\&. |
|||
.RE |
|||
.SH "Examples" |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.fam C |
|||
.ps -1 |
|||
.nf |
|||
.if t \{\ |
|||
.sp -1 |
|||
.\} |
|||
.BB lightgray adjust-for-leading-newline |
|||
.sp -1 |
|||
|
|||
odfmeta \-l odf\-file\&.odt |
|||
odfmeta \-I "title:The Little Engine That Could" \-A subject:I\-think\-I\-can \-o newfile\&.odt source\&.odt |
|||
.EB lightgray adjust-for-leading-newline |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.fi |
|||
.fam |
|||
.ps +1 |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.SH "See Also" |
|||
.PP |
|||
|
|||
\fBformail\fR(1), |
|||
\fBid3tag\fR(1) |
|||
.SH "Bugs" |
|||
.PP |
|||
All known versions of OpenOffice\&.org keep only four <meta:user\-defined> elements\&. If you add more than those, you\'ll loose them next time you save with OpenOffice\&.org\&. KOffice keeps only one <meta:keyword> element\&. |
|||
.SH "Author" |
|||
.PP |
|||
\fBS\(/oren Roug\fR |
|||
.RS 4 |
|||
Original author |
|||
.RE |
@ -0,0 +1,213 @@ |
|||
.\" Title: odfoutline |
|||
.\" Author: S\(/oren Roug |
|||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> |
|||
.\" Date: 03/15/2009 |
|||
.\" Manual: User commands |
|||
.\" Source: odfpy |
|||
.\" Language: English |
|||
.\" |
|||
.TH "ODFOUTLINE" "1" "03/15/2009" "odfpy" "User commands" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * (re)Define some macros |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" toupper - uppercase a string (locale-aware) |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de toupper |
|||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ |
|||
\\$* |
|||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH-xref - format a cross-reference to an SH section |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de SH-xref |
|||
.ie n \{\ |
|||
.\} |
|||
.toupper \\$* |
|||
.el \{\ |
|||
\\$* |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH - level-one heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SH |
|||
.\" put an extra blank line of space above the head in non-TTY output |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.HTML-TAG ".NH \\n[an-level]" |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
\." make the size of the head bigger |
|||
.ps +3 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.ie n \{\ |
|||
.\" if n (TTY output), use uppercase |
|||
.toupper \\$* |
|||
.\} |
|||
.el \{\ |
|||
.nr an-break-flag 0 |
|||
.\" if not n (not TTY), use normal case (not uppercase) |
|||
\\$1 |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.\" if not n (not TTY), put a border/line under subheading |
|||
.sp -.6 |
|||
\l'\n(.lu' |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SS - level-two heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SS |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[IN]u |
|||
.ti \\n[SN]u |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.ps \\n[PS-SS]u |
|||
\." make the size of the head bigger |
|||
.ps +2 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.if \\n[.$] \&\\$* |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BB/BE - put background/screen (filled box) around block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BB |
|||
.if t \{\ |
|||
.sp -.5 |
|||
.br |
|||
.in +2n |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EB |
|||
.if t \{\ |
|||
.if "\\$2"adjust-for-leading-newline" \{\ |
|||
.sp -1 |
|||
.\} |
|||
.br |
|||
.di |
|||
.in |
|||
.ll |
|||
.gcolor |
|||
.nr BW \\n(.lu-\\n(.i |
|||
.nr BH \\n(dn+.5v |
|||
.ne \\n(BHu+.5v |
|||
.ie "\\$2"adjust-for-leading-newline" \{\ |
|||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.el \{\ |
|||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.in 0 |
|||
.sp -.5v |
|||
.nf |
|||
.BX |
|||
.in |
|||
.sp .5v |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BM/EM - put colored marker in margin next to block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BM |
|||
.if t \{\ |
|||
.br |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EM |
|||
.if t \{\ |
|||
.br |
|||
.di |
|||
.ll |
|||
.gcolor |
|||
.nr BH \\n(dn |
|||
.ne \\n(BHu |
|||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] |
|||
.in 0 |
|||
.nf |
|||
.BX |
|||
.in |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.SH "Name" |
|||
odfoutline \- Show outline of OpenDocument |
|||
.SH "Synopsis" |
|||
.fam C |
|||
.HP \w'\fBodfoutline\fR\ 'u |
|||
\fBodfoutline\fR \fIpath\fR |
|||
.fam |
|||
.SH "Description" |
|||
.PP |
|||
odfoutline is a simple program that will show the headings in the file and the level the heading is\&. |
|||
.PP |
|||
|
|||
\(lqPath\(rq |
|||
is assumed to be an OpenDocument file of text, spreadsheet or presentation type\&. |
|||
.SH "Example" |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.fam C |
|||
.ps -1 |
|||
.nf |
|||
.if t \{\ |
|||
.sp -1 |
|||
.\} |
|||
.BB lightgray adjust-for-leading-newline |
|||
.sp -1 |
|||
|
|||
odfoutline odf\-file |
|||
.EB lightgray adjust-for-leading-newline |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.fi |
|||
.fam |
|||
.ps +1 |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.SH "Author" |
|||
.PP |
|||
\fBS\(/oren Roug\fR |
|||
.RS 4 |
|||
Original author |
|||
.RE |
@ -0,0 +1,267 @@ |
|||
.\" Title: odfuserfield |
|||
.\" Author: S\(/oren Roug |
|||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> |
|||
.\" Date: 03/15/2009 |
|||
.\" Manual: User commands |
|||
.\" Source: odfpy |
|||
.\" Language: English |
|||
.\" |
|||
.TH "ODFUSERFIELD" "1" "03/15/2009" "odfpy" "User commands" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * (re)Define some macros |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" toupper - uppercase a string (locale-aware) |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de toupper |
|||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ |
|||
\\$* |
|||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH-xref - format a cross-reference to an SH section |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de SH-xref |
|||
.ie n \{\ |
|||
.\} |
|||
.toupper \\$* |
|||
.el \{\ |
|||
\\$* |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH - level-one heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SH |
|||
.\" put an extra blank line of space above the head in non-TTY output |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.HTML-TAG ".NH \\n[an-level]" |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
\." make the size of the head bigger |
|||
.ps +3 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.ie n \{\ |
|||
.\" if n (TTY output), use uppercase |
|||
.toupper \\$* |
|||
.\} |
|||
.el \{\ |
|||
.nr an-break-flag 0 |
|||
.\" if not n (not TTY), use normal case (not uppercase) |
|||
\\$1 |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.\" if not n (not TTY), put a border/line under subheading |
|||
.sp -.6 |
|||
\l'\n(.lu' |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SS - level-two heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SS |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[IN]u |
|||
.ti \\n[SN]u |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.ps \\n[PS-SS]u |
|||
\." make the size of the head bigger |
|||
.ps +2 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.if \\n[.$] \&\\$* |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BB/BE - put background/screen (filled box) around block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BB |
|||
.if t \{\ |
|||
.sp -.5 |
|||
.br |
|||
.in +2n |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EB |
|||
.if t \{\ |
|||
.if "\\$2"adjust-for-leading-newline" \{\ |
|||
.sp -1 |
|||
.\} |
|||
.br |
|||
.di |
|||
.in |
|||
.ll |
|||
.gcolor |
|||
.nr BW \\n(.lu-\\n(.i |
|||
.nr BH \\n(dn+.5v |
|||
.ne \\n(BHu+.5v |
|||
.ie "\\$2"adjust-for-leading-newline" \{\ |
|||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.el \{\ |
|||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.in 0 |
|||
.sp -.5v |
|||
.nf |
|||
.BX |
|||
.in |
|||
.sp .5v |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BM/EM - put colored marker in margin next to block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BM |
|||
.if t \{\ |
|||
.br |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EM |
|||
.if t \{\ |
|||
.br |
|||
.di |
|||
.ll |
|||
.gcolor |
|||
.nr BH \\n(dn |
|||
.ne \\n(BHu |
|||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] |
|||
.in 0 |
|||
.nf |
|||
.BX |
|||
.in |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.SH "Name" |
|||
odfuserfield \- List or change the user\-field declarations in an ODF file |
|||
.SH "Synopsis" |
|||
.fam C |
|||
.HP \w'\fBodfuserfield\fR\ 'u |
|||
\fBodfuserfield\fR [\-l] [\-L] [\-x\ \fIfield\fR...] [\-X\ \fIfield\fR...] [\-s\ \fIfield:value\fR...] [\-o\ \fIpath\fR] \fIpath\fR |
|||
.fam |
|||
.SH "Description" |
|||
.PP |
|||
|
|||
\fBOdfuserfield\fR |
|||
is a program that will list or change the user variable declarations in an OpenDocument file\&. There are two kinds of variables in OpenDocument\&. Simple variables can take different values at different positions, throughout a document\&. User variables have the same value throughout a document\&. Due to the latter\'s global nature it is safe to change them with an external application\&. |
|||
.PP |
|||
Use |
|||
\fBodfuserfield\fR |
|||
to fill out form letters before printing or giving to the user\&. |
|||
.PP |
|||
|
|||
\(lqPath\(rq |
|||
is assumed to be an OpenDocument file of text, spreadsheet or presentation type\&. |
|||
.SH "Options" |
|||
.PP |
|||
\-l |
|||
.RS 4 |
|||
List (extract) all known user\-fields\&. |
|||
.RE |
|||
.PP |
|||
\-L |
|||
.RS 4 |
|||
List (extract) all known user\-fields with type and value\&. |
|||
.RE |
|||
.PP |
|||
\-x \fIfield\fR |
|||
.RS 4 |
|||
Extract the contents of this field from the file\&. |
|||
.RE |
|||
.PP |
|||
\-X \fIfield\fR |
|||
.RS 4 |
|||
Same as \-x, but also preserves/includes the field name and type\&. |
|||
.RE |
|||
.PP |
|||
\-s \fIfield:value\fR |
|||
.RS 4 |
|||
Set the value of an existing user field\&. The field type will be the same\&. |
|||
.RE |
|||
.PP |
|||
\-o \fIpath\fR |
|||
.RS 4 |
|||
Filename to write modified ODT file to\&. If no |
|||
\fB\-o\fR |
|||
option is provided, the ODT file will be written to stdout\&. |
|||
.RE |
|||
.SH "Example" |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.fam C |
|||
.ps -1 |
|||
.nf |
|||
.if t \{\ |
|||
.sp -1 |
|||
.\} |
|||
.BB lightgray adjust-for-leading-newline |
|||
.sp -1 |
|||
|
|||
odfuserfield \-L odf\-file |
|||
.EB lightgray adjust-for-leading-newline |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.fi |
|||
.fam |
|||
.ps +1 |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.SH "See Also" |
|||
.PP |
|||
|
|||
\fBformail\fR(1), |
|||
\fBid3tag\fR(1) |
|||
.SH "Todo" |
|||
.PP |
|||
Implement formulas\&. See OpenDocument v1\&.0 specification section 6\&.3\&.5\&. This requires a different syntax for \-s arguments\&. |
|||
.SH "Authors" |
|||
.PP |
|||
\fBS\(/oren Roug\fR |
|||
.RS 4 |
|||
Original author |
|||
.RE |
|||
.PP |
|||
\fBMichael Howitz\fR |
|||
.br |
|||
gocept gmbh & co\&. kg |
|||
.RS 4 |
|||
Refactoring |
|||
.RE |
@ -0,0 +1,225 @@ |
|||
.Dd May 18, 2004 |
|||
.\" ttx is not specific to any OS, but contrary to what groff_mdoc(7) |
|||
.\" seems to imply, entirely omitting the .Os macro causes 'BSD' to |
|||
.\" be used, so I give a zero-width space as its argument. |
|||
.Os \& |
|||
.\" The "FontTools Manual" argument apparently has no effect in |
|||
.\" groff 1.18.1. I think it is a bug in the -mdoc groff package. |
|||
.Dt TTX 1 "FontTools Manual" |
|||
.Sh NAME |
|||
.Nm ttx |
|||
.Nd tool for manipulating TrueType and OpenType fonts |
|||
.Sh SYNOPSIS |
|||
.Nm |
|||
.Bk |
|||
.Op Ar option ... |
|||
.Ek |
|||
.Bk |
|||
.Ar file ... |
|||
.Ek |
|||
.Sh DESCRIPTION |
|||
.Nm |
|||
is a tool for manipulating TrueType and OpenType fonts. It can convert |
|||
TrueType and OpenType fonts to and from an |
|||
.Tn XML Ns -based format called |
|||
.Tn TTX . |
|||
.Tn TTX |
|||
files have a |
|||
.Ql .ttx |
|||
extension. |
|||
.Pp |
|||
For each |
|||
.Ar file |
|||
argument it is given, |
|||
.Nm |
|||
detects whether it is a |
|||
.Ql .ttf , |
|||
.Ql .otf |
|||
or |
|||
.Ql .ttx |
|||
file and acts accordingly: if it is a |
|||
.Ql .ttf |
|||
or |
|||
.Ql .otf |
|||
file, it generates a |
|||
.Ql .ttx |
|||
file; if it is a |
|||
.Ql .ttx |
|||
file, it generates a |
|||
.Ql .ttf |
|||
or |
|||
.Ql .otf |
|||
file. |
|||
.Pp |
|||
By default, every output file is created in the same directory as the |
|||
corresponding input file and with the same name except for the |
|||
extension, which is substituted appropriately. |
|||
.Nm |
|||
never overwrites existing files; if necessary, it appends a suffix to |
|||
the output file name before the extension, as in |
|||
.Pa Arial#1.ttf . |
|||
.Ss "General options" |
|||
.Bl -tag -width ".Fl t Ar table" |
|||
.It Fl h |
|||
Display usage information. |
|||
.It Fl d Ar dir |
|||
Write the output files to directory |
|||
.Ar dir |
|||
instead of writing every output file to the same directory as the |
|||
corresponding input file. |
|||
.It Fl o Ar file |
|||
Write the output to |
|||
.Ar file |
|||
instead of writing it to the same directory as the |
|||
corresponding input file. |
|||
.It Fl v |
|||
Be verbose. Write more messages to the standard output describing what |
|||
is being done. |
|||
.It Fl a |
|||
Allow virtual glyphs ID's on compile or decompile. |
|||
.El |
|||
.Ss "Dump options" |
|||
The following options control the process of dumping font files |
|||
(TrueType or OpenType) to |
|||
.Tn TTX |
|||
files. |
|||
.Bl -tag -width ".Fl t Ar table" |
|||
.It Fl l |
|||
List table information. Instead of dumping the font to a |
|||
.Tn TTX |
|||
file, display minimal information about each table. |
|||
.It Fl t Ar table |
|||
Dump table |
|||
.Ar table . |
|||
This option may be given multiple times to dump several tables at |
|||
once. When not specified, all tables are dumped. |
|||
.It Fl x Ar table |
|||
Exclude table |
|||
.Ar table |
|||
from the list of tables to dump. This option may be given multiple |
|||
times to exclude several tables from the dump. The |
|||
.Fl t |
|||
and |
|||
.Fl x |
|||
options are mutually exclusive. |
|||
.It Fl s |
|||
Split tables. Dump each table to a separate |
|||
.Tn TTX |
|||
file and write (under the name that would have been used for the output |
|||
file if the |
|||
.Fl s |
|||
option had not been given) one small |
|||
.Tn TTX |
|||
file containing references to the individual table dump files. This |
|||
file can be used as input to |
|||
.Nm |
|||
as long as the referenced files can be found in the same directory. |
|||
.It Fl i |
|||
.\" XXX: I suppose OpenType programs (exist and) are also affected. |
|||
Don't disassemble TrueType instructions. When this option is specified, |
|||
all TrueType programs (glyph programs, the font program and the |
|||
pre-program) are written to the |
|||
.Tn TTX |
|||
file as hexadecimal data instead of |
|||
assembly. This saves some time and results in smaller |
|||
.Tn TTX |
|||
files. |
|||
.It Fl y Ar n |
|||
When decompiling a TrueType Collection (TTC) file, |
|||
decompile font number |
|||
.Ar n , |
|||
starting from 0. |
|||
.El |
|||
.Ss "Compilation options" |
|||
The following options control the process of compiling |
|||
.Tn TTX |
|||
files into font files (TrueType or OpenType): |
|||
.Bl -tag -width ".Fl t Ar table" |
|||
.It Fl m Ar fontfile |
|||
Merge the input |
|||
.Tn TTX |
|||
file |
|||
.Ar file |
|||
with |
|||
.Ar fontfile . |
|||
No more than one |
|||
.Ar file |
|||
argument can be specified when this option is used. |
|||
.It Fl b |
|||
Don't recalculate glyph bounding boxes. Use the values in the |
|||
.Tn TTX |
|||
file as is. |
|||
.El |
|||
.Sh "THE TTX FILE FORMAT" |
|||
You can find some information about the |
|||
.Tn TTX |
|||
file format in |
|||
.Pa documentation.html . |
|||
In particular, you will find in that file the list of tables understood by |
|||
.Nm |
|||
and the relations between TrueType GlyphIDs and the glyph names used in |
|||
.Tn TTX |
|||
files. |
|||
.Sh EXAMPLES |
|||
In the following examples, all files are read from and written to the |
|||
current directory. Additionally, the name given for the output file |
|||
assumes in every case that it did not exist before |
|||
.Nm |
|||
was invoked. |
|||
.Pp |
|||
Dump the TrueType font contained in |
|||
.Pa FreeSans.ttf |
|||
to |
|||
.Pa FreeSans.ttx : |
|||
.Pp |
|||
.Dl ttx FreeSans.ttf |
|||
.Pp |
|||
Compile |
|||
.Pa MyFont.ttx |
|||
into a TrueType or OpenType font file: |
|||
.Pp |
|||
.Dl ttx MyFont.ttx |
|||
.Pp |
|||
List the tables in |
|||
.Pa FreeSans.ttf |
|||
along with some information: |
|||
.Pp |
|||
.Dl ttx -l FreeSans.ttf |
|||
.Pp |
|||
Dump the |
|||
.Sq cmap |
|||
table from |
|||
.Pa FreeSans.ttf |
|||
to |
|||
.Pa FreeSans.ttx : |
|||
.Pp |
|||
.Dl ttx -t cmap FreeSans.ttf |
|||
.Sh NOTES |
|||
On MS\-Windows and MacOS, |
|||
.Nm |
|||
is available as a graphical application to which files can be dropped. |
|||
.Sh SEE ALSO |
|||
.Pa documentation.html |
|||
.Pp |
|||
.Xr fontforge 1 , |
|||
.Xr ftinfo 1 , |
|||
.Xr gfontview 1 , |
|||
.Xr xmbdfed 1 , |
|||
.Xr Font::TTF 3pm |
|||
.Sh AUTHORS |
|||
.Nm |
|||
was written by |
|||
.An -nosplit |
|||
.An "Just van Rossum" Aq just@letterror.com . |
|||
.Pp |
|||
This manual page was written by |
|||
.An "Florent Rougon" Aq f.rougon@free.fr |
|||
for the Debian GNU/Linux system based on the existing FontTools |
|||
documentation. It may be freely used, modified and distributed without |
|||
restrictions. |
|||
.\" For Emacs: |
|||
.\" Local Variables: |
|||
.\" fill-column: 72 |
|||
.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[ \n]*" |
|||
.\" sentence-end-double-space: t |
|||
.\" End: |
@ -0,0 +1,235 @@ |
|||
.\" Title: xml2odf |
|||
.\" Author: S\(/oren Roug |
|||
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> |
|||
.\" Date: 03/15/2009 |
|||
.\" Manual: User commands |
|||
.\" Source: odfpy |
|||
.\" Language: English |
|||
.\" |
|||
.TH "XML2ODF" "1" "03/15/2009" "odfpy" "User commands" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * (re)Define some macros |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" toupper - uppercase a string (locale-aware) |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de toupper |
|||
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ |
|||
\\$* |
|||
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH-xref - format a cross-reference to an SH section |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de SH-xref |
|||
.ie n \{\ |
|||
.\} |
|||
.toupper \\$* |
|||
.el \{\ |
|||
\\$* |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SH - level-one heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SH |
|||
.\" put an extra blank line of space above the head in non-TTY output |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.HTML-TAG ".NH \\n[an-level]" |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
\." make the size of the head bigger |
|||
.ps +3 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.ie n \{\ |
|||
.\" if n (TTY output), use uppercase |
|||
.toupper \\$* |
|||
.\} |
|||
.el \{\ |
|||
.nr an-break-flag 0 |
|||
.\" if not n (not TTY), use normal case (not uppercase) |
|||
\\$1 |
|||
.in \\n[an-margin]u |
|||
.ti 0 |
|||
.\" if not n (not TTY), put a border/line under subheading |
|||
.sp -.6 |
|||
\l'\n(.lu' |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" SS - level-two heading that works better for non-TTY output |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de1 SS |
|||
.sp \\n[PD]u |
|||
.nr an-level 1 |
|||
.set-an-margin |
|||
.nr an-prevailing-indent \\n[IN] |
|||
.fi |
|||
.in \\n[IN]u |
|||
.ti \\n[SN]u |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.ps \\n[PS-SS]u |
|||
\." make the size of the head bigger |
|||
.ps +2 |
|||
.ft B |
|||
.ne (2v + 1u) |
|||
.if \\n[.$] \&\\$* |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BB/BE - put background/screen (filled box) around block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BB |
|||
.if t \{\ |
|||
.sp -.5 |
|||
.br |
|||
.in +2n |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EB |
|||
.if t \{\ |
|||
.if "\\$2"adjust-for-leading-newline" \{\ |
|||
.sp -1 |
|||
.\} |
|||
.br |
|||
.di |
|||
.in |
|||
.ll |
|||
.gcolor |
|||
.nr BW \\n(.lu-\\n(.i |
|||
.nr BH \\n(dn+.5v |
|||
.ne \\n(BHu+.5v |
|||
.ie "\\$2"adjust-for-leading-newline" \{\ |
|||
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.el \{\ |
|||
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] |
|||
.\} |
|||
.in 0 |
|||
.sp -.5v |
|||
.nf |
|||
.BX |
|||
.in |
|||
.sp .5v |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.\" BM/EM - put colored marker in margin next to block of text |
|||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|||
.de BM |
|||
.if t \{\ |
|||
.br |
|||
.ll -2n |
|||
.gcolor red |
|||
.di BX |
|||
.\} |
|||
.. |
|||
.de EM |
|||
.if t \{\ |
|||
.br |
|||
.di |
|||
.ll |
|||
.gcolor |
|||
.nr BH \\n(dn |
|||
.ne \\n(BHu |
|||
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[] |
|||
.in 0 |
|||
.nf |
|||
.BX |
|||
.in |
|||
.fi |
|||
.\} |
|||
.. |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.SH "Name" |
|||
xml2odf \- Create ODF package from OpenDocument in XML form |
|||
.SH "Synopsis" |
|||
.fam C |
|||
.HP \w'\fBxml2odf\fR\ 'u |
|||
\fBxml2odf\fR [\-o\ \fIoutputfile\fR] [\-s] [\fIinputfile\fR] |
|||
.fam |
|||
.SH "Description" |
|||
.PP |
|||
OpenDocument can be a complete office document in a single XML file\&. The script will take such a document and create a package\&. This is mainly useful as a postprocesser of a program producing XML, such as a stylesheet\&. |
|||
.PP |
|||
|
|||
\(lqInputfile\(rq |
|||
is assumed to be an OpenDocument file in XML form\&. If there is no inputfile, the program will read from standard input\&. The flag \-s adds correct suffix to the filename according to what mime type is found in the XML file, in cause you don\'t know already what document type you are packaging\&. |
|||
.PP |
|||
If output file is not specified output will be to standard out\&. |
|||
.PP |
|||
Section 2\&.1\&.1 of |
|||
Open Document Format for Office Applications |
|||
says that the [content\&.xml] file contains the document content, along with the |
|||
\fIautomatic styles\fR |
|||
needed for the document content\&. The [styles\&.xml] file contains all the named styles of a document, along with the |
|||
\fIautomatic styles\fR |
|||
needed for the named styles\&. The application doesn\'t know which automatic style is needed for what, so it puts the same set of automatic styles into both files\&. |
|||
.PP |
|||
One could assume that the inverse operation would be easier, but OpenOffice\&.org is quite happy to use the same names for two different automatic styles\&. For instance, a style used inside <style:footer> can have the same name as one used inside <office:text> but be a different paragraph style\&. This is reported as bug #90494 (http://www\&.openoffice\&.org/issues/show_bug\&.cgi?id=90494) |
|||
.SH "Example" |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.fam C |
|||
.ps -1 |
|||
.nf |
|||
.if t \{\ |
|||
.sp -1 |
|||
.\} |
|||
.BB lightgray adjust-for-leading-newline |
|||
.sp -1 |
|||
|
|||
xml2odf \-o testdocument \-s xml\-file |
|||
.EB lightgray adjust-for-leading-newline |
|||
.if t \{\ |
|||
.sp 1 |
|||
.\} |
|||
.fi |
|||
.fam |
|||
.ps +1 |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.SH "See Also" |
|||
.PP |
|||
|
|||
\fBodftools\fR(1), |
|||
\fBodf2xml\fR(1) |
|||
.SH "Bugs" |
|||
.PP |
|||
Doesn\'t handle external data \-\- images and such\&. |
|||
.PP |
|||
The library used for the parsing of XML expands empty elements from <element/> to <element></element>\&. It should not have an effect on the document parsing\&. |
|||
.SH "Author" |
|||
.PP |
|||
\fBS\(/oren Roug\fR |
|||
.RS 4 |
|||
Original author |
|||
.RE |
@ -1,179 +0,0 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from geraldo import Report, DetailBand, Label, ObjectValue, ReportGroup, ReportBand, landscape, SubReport, BAND_WIDTH, SystemField |
|||
from geraldo.graphics import Image |
|||
|
|||
from django.templatetags.static import static |
|||
from django.utils.translation import gettext as _ |
|||
from reportlab.lib.enums import TA_CENTER |
|||
from reportlab.lib.pagesizes import A4 |
|||
from reportlab.lib.units import cm |
|||
|
|||
from sigi.apps.relatorios.reports import ReportDefault |
|||
|
|||
|
|||
def string_to_cm(texto): |
|||
tamanho = 0 |
|||
minEspeciais = { |
|||
'f': 0.1, |
|||
'i': 0.05, |
|||
'j': 0.05, |
|||
'l': 0.05, |
|||
'm': 0.2, |
|||
'r': 0.1, |
|||
't': 0.15, |
|||
} |
|||
maiuEspeciais = { |
|||
'I': 0.05, |
|||
'J': 0.15, |
|||
'L': 0.15, |
|||
'P': 0.15, |
|||
} |
|||
for c in texto: |
|||
if c > 'a' and c < 'z': |
|||
if c in minEspeciais: |
|||
tamanho += minEspeciais[c] |
|||
else: |
|||
tamanho += 0.17 |
|||
else: |
|||
if c in maiuEspeciais: |
|||
tamanho += maiuEspeciais[c] |
|||
else: |
|||
tamanho += 0.2 |
|||
return tamanho |
|||
|
|||
|
|||
def label_text(text): |
|||
return "%s: " % text |
|||
|
|||
|
|||
class CasasLegislativasLabels(Report): |
|||
|
|||
""" |
|||
Usage example:: |
|||
|
|||
>>> from geraldo.generators import PDFGenerator |
|||
>>> queryset = Orgao.objects.filter(municipio__uf__sigla='MG') |
|||
>>> report = LabelsReport(queryset) |
|||
>>> report.generate_by(PDFGenerator, filename='./inline-detail-report.pdf') |
|||
|
|||
""" |
|||
formato = '' |
|||
label_margin_top = 0.6 |
|||
label_margin_left = 0.2 |
|||
label_margin_right = 0.2 |
|||
largura_etiqueta = 6.9 |
|||
altura_etiqueta = 3.25 |
|||
tamanho_fonte = 6 |
|||
delta = start = 0.5 |
|||
|
|||
def __init__(self, queryset, formato): |
|||
super(CasasLegislativasLabels, self).__init__(queryset=queryset) |
|||
self.formato = formato |
|||
self.page_size = A4 |
|||
|
|||
if formato == '3x9_etiqueta': |
|||
self.margin_top = 0.25 * cm |
|||
self.margin_bottom = 0.0 * cm |
|||
self.margin_left = 0.2 * cm |
|||
self.margin_right = 0.0 * cm |
|||
self.delta = 0.3 |
|||
self.start = 0 |
|||
self.label_margin_top = 0.35 |
|||
self.label_margin_left = 0.4 |
|||
self.label_margin_right = 0.2 |
|||
else: |
|||
self.margin_top = 0.8 * cm |
|||
self.margin_bottom = 0.8 * cm |
|||
self.margin_left = 0.4 * cm |
|||
self.margin_right = 0.4 * cm |
|||
self.largura_etiqueta = 9.9 |
|||
self.altura_etiqueta = 5.6 |
|||
self.tamanho_fonte = 11 |
|||
self.label_margin_top = 0.5 |
|||
self.label_margin_left = 0.5 |
|||
self.label_margin_right = 0.5 |
|||
|
|||
calc_width = (self.largura_etiqueta - self.label_margin_left - self.label_margin_right) * cm |
|||
calc_height = lambda rows: (self.delta * rows) * cm |
|||
calc_top = lambda row: (self.label_margin_top + row * self.delta) * cm |
|||
calc_left = self.label_margin_left * cm |
|||
|
|||
my_elements = [ |
|||
Label( |
|||
text=label_text(_('A Sua Excelência o(a) Senhor(a)')), |
|||
top=calc_top(0), left=calc_left, width=calc_width, |
|||
), |
|||
ObjectValue( |
|||
attribute_name='presidente', |
|||
top=calc_top(1), left=calc_left, width=calc_width, |
|||
get_value=lambda instance: |
|||
unicode(instance.presidente or "").upper() |
|||
), |
|||
ObjectValue( |
|||
attribute_name='nome', |
|||
top=calc_top(2), left=calc_left, width=calc_width, height=calc_height(2), |
|||
get_value=lambda instance: |
|||
(_("Presidente da %s") % instance.nome) |
|||
), |
|||
ObjectValue( |
|||
attribute_name='logradouro', |
|||
top=calc_top(4), left=calc_left, width=calc_width, height=calc_height(2), |
|||
get_value=lambda instance: |
|||
"%s - %s - %s." % (instance.logradouro, instance.bairro, instance.municipio), |
|||
), |
|||
|
|||
ObjectValue( |
|||
attribute_name='cep', |
|||
top=calc_top(8), left=calc_left, width=calc_width, |
|||
get_value=lambda instance: "%s: %s" % (_("CEP"), instance.cep) |
|||
), |
|||
] |
|||
self.band_detail = DetailBand( |
|||
width=(self.largura_etiqueta) * cm, |
|||
height=(self.altura_etiqueta) * cm, |
|||
elements=my_elements, |
|||
display_inline=True, |
|||
default_style={'fontName': 'Helvetica', 'fontSize': self.tamanho_fonte}) |
|||
|
|||
|
|||
class CasasLegislativasLabelsSemPresidente(CasasLegislativasLabels): |
|||
|
|||
def __init__(self, queryset, formato): |
|||
super(CasasLegislativasLabelsSemPresidente, self).__init__(queryset=queryset, formato=formato) |
|||
|
|||
calc_width = (self.largura_etiqueta - self.label_margin_left - self.label_margin_right) * cm |
|||
calc_height = lambda rows: (self.delta * rows) * cm |
|||
calc_top = lambda row: (self.label_margin_top + row * self.delta) * cm |
|||
calc_left = self.label_margin_left * cm |
|||
|
|||
my_elements = [ |
|||
Label( |
|||
text=label_text(_('A Sua Excelência o(a) Senhor(a)')), |
|||
top=calc_top(0), left=calc_left, width=calc_width, |
|||
), |
|||
ObjectValue( |
|||
attribute_name='nome', |
|||
top=calc_top(1), left=calc_left, width=calc_width, height=calc_height(2), |
|||
get_value=lambda instance: |
|||
(_("Presidente da %s") % instance.nome) |
|||
), |
|||
ObjectValue( |
|||
attribute_name='logradouro', |
|||
top=calc_top(3), left=calc_left, width=calc_width, height=calc_height(2), |
|||
get_value=lambda instance: |
|||
"%s - %s - %s." % (instance.logradouro, instance.bairro, instance.municipio), |
|||
), |
|||
|
|||
ObjectValue( |
|||
attribute_name='cep', |
|||
top=calc_top(8), left=calc_left, width=calc_width, |
|||
get_value=lambda instance: "%s: %s" % (_("CEP"), instance.cep) |
|||
), |
|||
] |
|||
self.band_detail = DetailBand( |
|||
width=(self.largura_etiqueta) * cm, |
|||
height=(self.altura_etiqueta) * cm, |
|||
elements=my_elements, |
|||
display_inline=True, |
|||
default_style={'fontName': 'Helvetica', 'fontSize': self.tamanho_fonte}) |
|||
|
@ -1 +0,0 @@ |
|||
{% extends "change_form_with_report_and_labels.html" %} |
@ -1,164 +0,0 @@ |
|||
{% load i18n admin_static admin_modify bootstrapped_goodies_tags %} |
|||
<div class="_inline-group" id="{{ inline_admin_formset.formset.prefix }}-group"> |
|||
<div class="tabular inline-related {% if forloop.last %}last-related{% endif %}"> |
|||
{{ inline_admin_formset.formset.management_form }} |
|||
<fieldset class="module"> |
|||
<h2>{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}</h2> |
|||
{{ inline_admin_formset.formset.non_form_errors }} |
|||
<table class="table table-striped table-bordered"> |
|||
<thead><tr> |
|||
{% for field in inline_admin_formset.fields %} |
|||
{% if not field.widget.is_hidden %} |
|||
<th{% if forloop.first %} colspan="2"{% endif %}{% if field.required %} class="required"{% endif %}>{{ field.label|capfirst }} |
|||
{% if field.help_text %}<i class="glyphicon glyphicon-comment help help-tooltip" style="margin-left: 4px;" alt="({{ field.help_text|striptags }})" title="{{ field.help_text|striptags }}"></i>{% endif %} |
|||
</th> |
|||
{% endif %} |
|||
{% endfor %} |
|||
{% if inline_admin_formset.formset.can_delete %}<th>{% trans "Delete?" %}</th>{% endif %} |
|||
</tr></thead> |
|||
|
|||
<tbody> |
|||
{% for inline_admin_form in inline_admin_formset %} |
|||
{% if inline_admin_form.form.non_field_errors %} |
|||
<tr><td colspan="{{ inline_admin_form|cell_count }}">{{ inline_admin_form.form.non_field_errors }}</td></tr> |
|||
{% endif %} |
|||
<tr class="form-row {% cycle "row1" "row2" %} {% if inline_admin_form.original or inline_admin_form.show_url %}has_original{% endif %}{% if forloop.last %} empty-form{% endif %}" |
|||
id="{{ inline_admin_formset.formset.prefix }}-{% if not forloop.last %}{{ forloop.counter0 }}{% else %}empty{% endif %}"> |
|||
<td class="original"> |
|||
{% if inline_admin_formset.opts.sortable_field_name %} |
|||
<span class="btn btn-default btn-xs drag-handler pull-left"><i class="glyphicon glyphicon-move"></i></span> |
|||
{% endif %} |
|||
{% if inline_admin_form.original or inline_admin_form.show_url %}<p> |
|||
{% if inline_admin_form.original %} {{ inline_admin_form.original }}{% endif %} |
|||
{% if inline_admin_form.show_url %}<a href="../../../r/{{ inline_admin_form.original_content_type_id }}/{{ inline_admin_form.original.id }}/">{% trans "View on site" %}</a>{% endif %} |
|||
</p>{% endif %} |
|||
{% if inline_admin_form.has_auto_field or inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %} |
|||
{{ inline_admin_form.fk_field.field }} |
|||
{% spaceless %} |
|||
{% for fieldset in inline_admin_form %} |
|||
{% for line in fieldset %} |
|||
{% for field in line %} |
|||
{% if field.is_hidden %} {{ field.field }} {% endif %} |
|||
{% endfor %} |
|||
{% endfor %} |
|||
{% endfor %} |
|||
{% endspaceless %} |
|||
</td> |
|||
{% for fieldset in inline_admin_form %} |
|||
{% for line in fieldset %} |
|||
{% for field in line %} |
|||
<td{% if field.field.name %} class="field-{{ field.field.name }}"{% endif %}> |
|||
{% if field.is_readonly %} |
|||
<p>{{ field.contents }}</p> |
|||
{% else %} |
|||
{% if field.errors %} |
|||
<div class="alert alert-danger">{{ field.errors|striptags }}</div> |
|||
{% endif %} |
|||
{% dab_field_rendering field.field %} |
|||
{% endif %} |
|||
</td> |
|||
{% endfor %} |
|||
{% endfor %} |
|||
{% endfor %} |
|||
{% if inline_admin_formset.formset.can_delete %} |
|||
<td class="delete">{% if inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }}{% endif %}</td> |
|||
{% endif %} |
|||
</tr> |
|||
{% endfor %} |
|||
<tr><td colspan="100"> |
|||
<a href="{% url 'admin:convenios_convenio_add' %}?casa_legislativa={{original.pk|safe}}"> |
|||
<span class="glyphicon glyphicon-plus"></span>{% blocktrans with inline_admin_formset.opts.verbose_name|capfirst as verbose_name %}Add another {{ verbose_name }}{% endblocktrans %} |
|||
</a> |
|||
</td></tr> |
|||
</tbody> |
|||
</table> |
|||
</fieldset> |
|||
</div> |
|||
</div> |
|||
|
|||
<script type="text/javascript"> |
|||
(function($) { |
|||
$(document).ready(function($) { |
|||
var rows = "#{{ inline_admin_formset.formset.prefix }}-group .tabular.inline-related tbody tr"; |
|||
var alternatingRows = function(row) { |
|||
$(rows).not(".add-row").removeClass("row1 row2") |
|||
.filter(":even").addClass("row1").end() |
|||
.filter(rows + ":odd").addClass("row2"); |
|||
} |
|||
var reinitDateTimeShortCuts = function() { |
|||
// Reinitialize the calendar and clock widgets by force |
|||
if (typeof DateTimeShortcuts != "undefined") { |
|||
$(".datetimeshortcuts").remove(); |
|||
DateTimeShortcuts.init(); |
|||
} |
|||
} |
|||
var updateSelectFilter = function() { |
|||
// If any SelectFilter widgets are a part of the new form, |
|||
// instantiate a new SelectFilter instance for it. |
|||
if (typeof SelectFilter != "undefined"){ |
|||
$(".selectfilter").each(function(index, value){ |
|||
var namearr = value.name.split('-'); |
|||
SelectFilter.init(value.id, namearr[namearr.length-1], false, "{% static "admin/" %}"); |
|||
}); |
|||
$(".selectfilterstacked").each(function(index, value){ |
|||
var namearr = value.name.split('-'); |
|||
SelectFilter.init(value.id, namearr[namearr.length-1], true, "{% static "admin/" %}"); |
|||
}); |
|||
} |
|||
} |
|||
var initPrepopulatedFields = function(row) { |
|||
row.find('.prepopulated_field').each(function() { |
|||
var field = $(this); |
|||
var input = field.find('input, select, textarea'); |
|||
var dependency_list = input.data('dependency_list') || []; |
|||
var dependencies = []; |
|||
$.each(dependency_list, function(i, field_name) { |
|||
dependencies.push('#' + row.find('.field-' + field_name).find('input, select, textarea').attr('id')); |
|||
}); |
|||
if (dependencies.length) { |
|||
input.prepopulate(dependencies, input.attr('maxlength')); |
|||
} |
|||
}); |
|||
} |
|||
$(rows).formset({ |
|||
prefix: "{{ inline_admin_formset.formset.prefix }}", |
|||
addText: "{% blocktrans with verbose_name=inline_admin_formset.opts.verbose_name|title %}Add another {{ verbose_name }}{% endblocktrans %}", |
|||
formCssClass: "dynamic-{{ inline_admin_formset.formset.prefix }}", |
|||
deleteCssClass: "inline-deletelink", |
|||
deleteText: "{% trans "Remove" %}", |
|||
emptyCssClass: "empty-form", |
|||
removed: alternatingRows, |
|||
added: (function(row) { |
|||
initPrepopulatedFields(row); |
|||
reinitDateTimeShortCuts(); |
|||
updateSelectFilter(); |
|||
alternatingRows(row); |
|||
}) |
|||
}); |
|||
}); |
|||
})(django.jQuery); |
|||
|
|||
// listener for jquery 1.7.2 |
|||
(function($) { |
|||
{% if inline_admin_formset.opts.sortable_field_name %} |
|||
$('tbody').sortable({ |
|||
// items: '.dynamic-{{ inline_admin_formset.formset.prefix }}', |
|||
handle: '.drag-handler', |
|||
items: ".form-row" |
|||
}); |
|||
$("#{{ opts.model_name }}_form").submit(function(e) { |
|||
var sortable_field_name = "{{ inline_admin_formset.opts.sortable_field_name }}", |
|||
i = 0; |
|||
var initial_form_count = $('#id_{{ inline_admin_formset.formset.prefix }}-INITIAL_FORMS').val(); |
|||
|
|||
$('#{{ inline_admin_formset.formset.prefix }}-group table > tbody').find(".form-row").each(function(i, e) { |
|||
// make sure we don't assign a position unless extra has been moved |
|||
if ($(this).find("input[name$='" + sortable_field_name + "']").val() || (i <= initial_form_count - 1 )) { |
|||
$(this).find("input[name$='" + sortable_field_name + "']").val(i); |
|||
i++; |
|||
} |
|||
}); |
|||
}); |
|||
{% endif %} |
|||
})(jQuery); |
|||
</script> |
@ -1,164 +0,0 @@ |
|||
{% load i18n admin_static admin_modify bootstrapped_goodies_tags %} |
|||
<div class="_inline-group" id="{{ inline_admin_formset.formset.prefix }}-group"> |
|||
<div class="tabular inline-related {% if forloop.last %}last-related{% endif %}"> |
|||
{{ inline_admin_formset.formset.management_form }} |
|||
<fieldset class="module"> |
|||
<h2>{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}</h2> |
|||
{{ inline_admin_formset.formset.non_form_errors }} |
|||
<table class="table table-striped table-bordered"> |
|||
<thead><tr> |
|||
{% for field in inline_admin_formset.fields %} |
|||
{% if not field.widget.is_hidden %} |
|||
<th{% if forloop.first %} colspan="2"{% endif %}{% if field.required %} class="required"{% endif %}>{{ field.label|capfirst }} |
|||
{% if field.help_text %}<i class="glyphicon glyphicon-comment help help-tooltip" style="margin-left: 4px;" alt="({{ field.help_text|striptags }})" title="{{ field.help_text|striptags }}"></i>{% endif %} |
|||
</th> |
|||
{% endif %} |
|||
{% endfor %} |
|||
{% if inline_admin_formset.formset.can_delete %}<th>{% trans "Delete?" %}</th>{% endif %} |
|||
</tr></thead> |
|||
|
|||
<tbody> |
|||
{% for inline_admin_form in inline_admin_formset %} |
|||
{% if inline_admin_form.form.non_field_errors %} |
|||
<tr><td colspan="{{ inline_admin_form|cell_count }}">{{ inline_admin_form.form.non_field_errors }}</td></tr> |
|||
{% endif %} |
|||
<tr class="form-row {% cycle "row1" "row2" %} {% if inline_admin_form.original or inline_admin_form.show_url %}has_original{% endif %}{% if forloop.last %} empty-form{% endif %}" |
|||
id="{{ inline_admin_formset.formset.prefix }}-{% if not forloop.last %}{{ forloop.counter0 }}{% else %}empty{% endif %}"> |
|||
<td class="original"> |
|||
{% if inline_admin_formset.opts.sortable_field_name %} |
|||
<span class="btn btn-default btn-xs drag-handler pull-left"><i class="glyphicon glyphicon-move"></i></span> |
|||
{% endif %} |
|||
{% if inline_admin_form.original or inline_admin_form.show_url %}<p> |
|||
{% if inline_admin_form.original %} {{ inline_admin_form.original }}{% endif %} |
|||
{% if inline_admin_form.show_url %}<a href="../../../r/{{ inline_admin_form.original_content_type_id }}/{{ inline_admin_form.original.id }}/">{% trans "View on site" %}</a>{% endif %} |
|||
</p>{% endif %} |
|||
{% if inline_admin_form.has_auto_field or inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %} |
|||
{{ inline_admin_form.fk_field.field }} |
|||
{% spaceless %} |
|||
{% for fieldset in inline_admin_form %} |
|||
{% for line in fieldset %} |
|||
{% for field in line %} |
|||
{% if field.is_hidden %} {{ field.field }} {% endif %} |
|||
{% endfor %} |
|||
{% endfor %} |
|||
{% endfor %} |
|||
{% endspaceless %} |
|||
</td> |
|||
{% for fieldset in inline_admin_form %} |
|||
{% for line in fieldset %} |
|||
{% for field in line %} |
|||
<td{% if field.field.name %} class="field-{{ field.field.name }}"{% endif %}> |
|||
{% if field.is_readonly %} |
|||
<p>{{ field.contents }}</p> |
|||
{% else %} |
|||
{% if field.errors %} |
|||
<div class="alert alert-danger">{{ field.errors|striptags }}</div> |
|||
{% endif %} |
|||
{% dab_field_rendering field.field %} |
|||
{% endif %} |
|||
</td> |
|||
{% endfor %} |
|||
{% endfor %} |
|||
{% endfor %} |
|||
{% if inline_admin_formset.formset.can_delete %} |
|||
<td class="delete">{% if inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }}{% endif %}</td> |
|||
{% endif %} |
|||
</tr> |
|||
{% endfor %} |
|||
<tr><td colspan="100"> |
|||
<a href="{% url 'admin:ocorrencias_ocorrencia_add' %}?casa_legislativa={{original.pk|safe}}"> |
|||
<span class="glyphicon glyphicon-plus"></span>{% blocktrans with inline_admin_formset.opts.verbose_name|capfirst as verbose_name %}Add another {{ verbose_name }}{% endblocktrans %} |
|||
</a> |
|||
</td></tr> |
|||
</tbody> |
|||
</table> |
|||
</fieldset> |
|||
</div> |
|||
</div> |
|||
|
|||
<script type="text/javascript"> |
|||
(function($) { |
|||
$(document).ready(function($) { |
|||
var rows = "#{{ inline_admin_formset.formset.prefix }}-group .tabular.inline-related tbody tr"; |
|||
var alternatingRows = function(row) { |
|||
$(rows).not(".add-row").removeClass("row1 row2") |
|||
.filter(":even").addClass("row1").end() |
|||
.filter(rows + ":odd").addClass("row2"); |
|||
} |
|||
var reinitDateTimeShortCuts = function() { |
|||
// Reinitialize the calendar and clock widgets by force |
|||
if (typeof DateTimeShortcuts != "undefined") { |
|||
$(".datetimeshortcuts").remove(); |
|||
DateTimeShortcuts.init(); |
|||
} |
|||
} |
|||
var updateSelectFilter = function() { |
|||
// If any SelectFilter widgets are a part of the new form, |
|||
// instantiate a new SelectFilter instance for it. |
|||
if (typeof SelectFilter != "undefined"){ |
|||
$(".selectfilter").each(function(index, value){ |
|||
var namearr = value.name.split('-'); |
|||
SelectFilter.init(value.id, namearr[namearr.length-1], false, "{% static "admin/" %}"); |
|||
}); |
|||
$(".selectfilterstacked").each(function(index, value){ |
|||
var namearr = value.name.split('-'); |
|||
SelectFilter.init(value.id, namearr[namearr.length-1], true, "{% static "admin/" %}"); |
|||
}); |
|||
} |
|||
} |
|||
var initPrepopulatedFields = function(row) { |
|||
row.find('.prepopulated_field').each(function() { |
|||
var field = $(this); |
|||
var input = field.find('input, select, textarea'); |
|||
var dependency_list = input.data('dependency_list') || []; |
|||
var dependencies = []; |
|||
$.each(dependency_list, function(i, field_name) { |
|||
dependencies.push('#' + row.find('.field-' + field_name).find('input, select, textarea').attr('id')); |
|||
}); |
|||
if (dependencies.length) { |
|||
input.prepopulate(dependencies, input.attr('maxlength')); |
|||
} |
|||
}); |
|||
} |
|||
$(rows).formset({ |
|||
prefix: "{{ inline_admin_formset.formset.prefix }}", |
|||
addText: "{% blocktrans with verbose_name=inline_admin_formset.opts.verbose_name|title %}Add another {{ verbose_name }}{% endblocktrans %}", |
|||
formCssClass: "dynamic-{{ inline_admin_formset.formset.prefix }}", |
|||
deleteCssClass: "inline-deletelink", |
|||
deleteText: "{% trans "Remove" %}", |
|||
emptyCssClass: "empty-form", |
|||
removed: alternatingRows, |
|||
added: (function(row) { |
|||
initPrepopulatedFields(row); |
|||
reinitDateTimeShortCuts(); |
|||
updateSelectFilter(); |
|||
alternatingRows(row); |
|||
}) |
|||
}); |
|||
}); |
|||
})(django.jQuery); |
|||
|
|||
// listener for jquery 1.7.2 |
|||
(function($) { |
|||
{% if inline_admin_formset.opts.sortable_field_name %} |
|||
$('tbody').sortable({ |
|||
// items: '.dynamic-{{ inline_admin_formset.formset.prefix }}', |
|||
handle: '.drag-handler', |
|||
items: ".form-row" |
|||
}); |
|||
$("#{{ opts.model_name }}_form").submit(function(e) { |
|||
var sortable_field_name = "{{ inline_admin_formset.opts.sortable_field_name }}", |
|||
i = 0; |
|||
var initial_form_count = $('#id_{{ inline_admin_formset.formset.prefix }}-INITIAL_FORMS').val(); |
|||
|
|||
$('#{{ inline_admin_formset.formset.prefix }}-group table > tbody').find(".form-row").each(function(i, e) { |
|||
// make sure we don't assign a position unless extra has been moved |
|||
if ($(this).find("input[name$='" + sortable_field_name + "']").val() || (i <= initial_form_count - 1 )) { |
|||
$(this).find("input[name$='" + sortable_field_name + "']").val(i); |
|||
i++; |
|||
} |
|||
}); |
|||
}); |
|||
{% endif %} |
|||
})(jQuery); |
|||
</script> |
@ -1,23 +0,0 @@ |
|||
{% extends "admin/change_list.html" %} |
|||
{% load admin_list i18n admin_urls %} |
|||
|
|||
{% block extrahead %} |
|||
{{ block.super }} |
|||
<script type="text/javascript"> |
|||
function dismissRelatedLookupPopup(win, chosenId) { |
|||
win.close(); |
|||
url = "{% url 'admin:servicos_casaatendida_changelist' %}" + chosenId; |
|||
// alert(url); |
|||
document.location.href = url; |
|||
} |
|||
</script> |
|||
{% endblock %} |
|||
|
|||
{% block object-tools-items %} |
|||
<li><a id="lookup_id_casa_legislativa" onclick="return showRelatedObjectLookupPopup(this);" |
|||
href="{% url 'admin:casas_orgao_changelist' %}?codigo_interlegis__exact=" class="addlink"> |
|||
<span class="glyphicon glyphicon-plus"></span> |
|||
{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %} |
|||
</a></li> |
|||
{{ block.super }} |
|||
{% endblock %} |
@ -1,33 +0,0 @@ |
|||
{% extends "change_list_with_cart.html" %} |
|||
{% load i18n %} |
|||
|
|||
|
|||
{% block extra_search %} |
|||
<nav class="navbar navbar-default"> |
|||
<div class="container-fluid"> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> |
|||
<span class="sr-only">Toggle navigation</span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
<a class="navbar-brand" href="#">Filtro de datas</a> |
|||
<p class="navbar-text">Use AAAA, AAAA-MM ou AAAA-MM-DD</p> |
|||
</div> |
|||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> |
|||
<form class="navbar-form navbar-left" role="extra-search" id="changelist-extrasearch" action="" method="get"> |
|||
<div class="form-group"> |
|||
<label for="data_ativacao__gte">{% trans 'Ativados a partir de' %}:</label> |
|||
<input type="text" class="form-control search-query" size="10" name="data_ativacao__gte" value="" id="data_ativacao__gte"> |
|||
<label for="data_ativacao__lte">{% trans 'até' %}:</label> |
|||
<input type="text" class="form-control search-query" size="10" name="data_ativacao__lte" value="" id="data_ativacao__lte"> |
|||
</div> |
|||
<button type="submit" class="btn btn-default navbar-btn "> |
|||
<span class="glyphicon glyphicon-search"></span> |
|||
</button> |
|||
</form> |
|||
</div><!-- /.navbar-collapse --> |
|||
</div><!-- /.container-fluid --> |
|||
</nav> |
|||
{% endblock %} |
Loading…
Reference in new issue