Browse Source

Merge branch 'master' of github.com:interlegis/sigi

revisaoSidenav
Lude Ribeiro 3 years ago
parent
commit
e5a32f9cef
  1. 8
      env/sigi/pyvenv.cfg
  2. 142
      env/sigi/share/doc/pygraphviz-1.7/INSTALL.txt
  3. 30
      env/sigi/share/doc/pygraphviz-1.7/examples/plot_attributes.py
  4. 98
      env/sigi/share/doc/pygraphviz-1.7/examples/plot_miles.py
  5. 30
      env/sigi/share/doc/pygraphviz-1.7/examples/plot_simple.py
  6. 37
      env/sigi/share/doc/pygraphviz-1.7/examples/plot_star.py
  7. 23
      env/sigi/share/doc/pygraphviz-1.7/examples/plot_subgraph.py
  8. 49
      env/sigi/share/doc/pygraphviz-1.7/examples/skip_django_simple.py
  9. 31
      env/sigi/share/doc/pygraphviz-1.7/examples/skip_utf8_encoding.py
  10. 270
      env/sigi/share/man/man1/csv2ods.1
  11. BIN
      env/sigi/share/man/man1/ipython.1.gz
  12. 232
      env/sigi/share/man/man1/mailodf.1
  13. 239
      env/sigi/share/man/man1/odf2mht.1
  14. 221
      env/sigi/share/man/man1/odf2xhtml.1
  15. 231
      env/sigi/share/man/man1/odf2xml.1
  16. 227
      env/sigi/share/man/man1/odfimgimport.1
  17. 217
      env/sigi/share/man/man1/odflint.1
  18. 277
      env/sigi/share/man/man1/odfmeta.1
  19. 213
      env/sigi/share/man/man1/odfoutline.1
  20. 267
      env/sigi/share/man/man1/odfuserfield.1
  21. 225
      env/sigi/share/man/man1/ttx.1
  22. 235
      env/sigi/share/man/man1/xml2odf.1
  23. 280
      sigi/apps/casas/admin.py
  24. 92
      sigi/apps/casas/filters.py
  25. 6
      sigi/apps/casas/models.py
  26. 179
      sigi/apps/casas/reports.py
  27. 1
      sigi/apps/casas/templates/admin/casas/change_form.html
  28. 164
      sigi/apps/casas/templates/admin/casas/convenios_inline.html
  29. 164
      sigi/apps/casas/templates/admin/casas/ocorrencia_inline.html
  30. 17
      sigi/apps/convenios/admin.py
  31. 2
      sigi/apps/home/templates/menus/menu.html
  32. 176
      sigi/apps/servicos/admin.py
  33. 23
      sigi/apps/servicos/templates/admin/servicos/casaatendida/change_list.html
  34. 33
      sigi/apps/servicos/templates/servico/change_list.html
  35. 40
      sigi/apps/utils/filters.py
  36. 8
      sigi/apps/utils/mixins.py
  37. 2
      sigi/settings/menu_conf.yaml

8
env/sigi/pyvenv.cfg

@ -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

142
env/sigi/share/doc/pygraphviz-1.7/INSTALL.txt

@ -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

30
env/sigi/share/doc/pygraphviz-1.7/examples/plot_attributes.py

@ -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

98
env/sigi/share/doc/pygraphviz-1.7/examples/plot_miles.py

@ -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")

30
env/sigi/share/doc/pygraphviz-1.7/examples/plot_simple.py

@ -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

37
env/sigi/share/doc/pygraphviz-1.7/examples/plot_star.py

@ -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

23
env/sigi/share/doc/pygraphviz-1.7/examples/plot_subgraph.py

@ -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")

49
env/sigi/share/doc/pygraphviz-1.7/examples/skip_django_simple.py

@ -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.
"""
)

31
env/sigi/share/doc/pygraphviz-1.7/examples/skip_utf8_encoding.py

@ -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

270
env/sigi/share/man/man1/csv2ods.1

@ -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

BIN
env/sigi/share/man/man1/ipython.1.gz

Binary file not shown.

232
env/sigi/share/man/man1/mailodf.1

@ -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

239
env/sigi/share/man/man1/odf2mht.1

@ -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

221
env/sigi/share/man/man1/odf2xhtml.1

@ -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

231
env/sigi/share/man/man1/odf2xml.1

@ -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

227
env/sigi/share/man/man1/odfimgimport.1

@ -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

217
env/sigi/share/man/man1/odflint.1

@ -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

277
env/sigi/share/man/man1/odfmeta.1

@ -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

213
env/sigi/share/man/man1/odfoutline.1

@ -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

267
env/sigi/share/man/man1/odfuserfield.1

@ -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

225
env/sigi/share/man/man1/ttx.1

@ -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:

235
env/sigi/share/man/man1/xml2odf.1

@ -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

280
sigi/apps/casas/admin.py

@ -1,9 +1,5 @@
from unicodedata import name
from urllib import response
from django.contrib import admin
from django.contrib.admin.options import ModelAdmin
from django.contrib.contenttypes.admin import GenericTabularInline
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils.safestring import mark_safe
from django.utils.translation import gettext as _
@ -11,16 +7,14 @@ from django_weasyprint.views import WeasyTemplateResponse
from import_export.fields import Field
from sigi.apps.casas.forms import OrgaoForm
from sigi.apps.casas.models import Orgao, Presidente, Funcionario, TipoOrgao
# from sigi.apps.casas.views import report_complete, labels_report, export_csv, \
# labels_report_sem_presidente, report, \
# adicionar_casas_carrinho
from sigi.apps.casas.filters import (GerentesInterlegisFilter, ConvenioFilter,
ExcluirConvenioFilter)
ExcluirConvenioFilter, ServicoFilter)
from sigi.apps.contatos.models import Telefone
from sigi.apps.convenios.models import Convenio, Projeto
# from sigi.apps.ocorrencias.models import Ocorrencia
# from sigi.apps.servicos.models import Servico, TipoServico
from sigi.apps.utils import field_label, queryset_ascii
from sigi.apps.convenios.models import Convenio
from sigi.apps.ocorrencias.models import Ocorrencia
from sigi.apps.servicos.models import Servico
from sigi.apps.servicos.filters import ServicoAtivoFilter
from sigi.apps.utils import queryset_ascii
from sigi.apps.utils.mixins import CartExportReportMixin, LabeledResourse
@ -143,10 +137,9 @@ class ConveniosInline(admin.TabularInline):
'data_retorno_sem_assinatura', 'get_anexos']
extra = 0
can_delete = False
template = 'admin/casas/convenios_inline.html'
ordering = ('-data_retorno_assinatura',)
def has_add_permission(self, request):
def has_add_permission(self, request, obj):
return False
def get_anexos(self, obj):
@ -176,16 +169,11 @@ class ConveniosInline(admin.TabularInline):
def link_convenio(self, obj):
if obj.pk is None:
return ""
url = reverse(
f'admin:{obj._meta.app_label}_{obj._meta.module_name}_change',
args=[obj.pk]
) + '?_popup=1'
opts = self.opts
url = reverse(f"admin:{opts.app_label}_{opts.model_name}_change",
args=[obj.pk])
return mark_safe(
f'<input id="edit_convenio-{obj.pk}" type="hidden"/>'
f'<a id="lookup_edit_convenio-{obj.pk}" href="{url}"'
'class="changelink" '
'onclick="return showRelatedObjectLookupPopup(this)">'
f'{_("Editar")}</a>'
f'<a href="{url}"><i class="material-icons Tiny">edit</i></a>'
)
link_convenio.short_description = _('Editar convenio')
@ -195,72 +183,64 @@ class ConveniosInline(admin.TabularInline):
return mark_safe(obj.get_sigad_url())
link_sigad.short_description = _("Processo no Senado")
# class ServicoInline(admin.TabularInline):
# model = Servico
# fields = ('link_url', 'contato_tecnico', 'contato_administrativo',
# 'hospedagem_interlegis', 'data_ativacao', 'data_alteracao',
# 'data_desativacao', 'link_servico')
# readonly_fields = ['link_url', 'contato_tecnico', 'contato_administrativo',
# 'hospedagem_interlegis', 'data_ativacao',
# 'data_alteracao', 'data_desativacao', 'link_servico']
# extra = 0
# max_num = 0
# can_delete = False
# ordering = ('-data_alteracao',)
# def link_url(self, servico):
# if servico.data_desativacao is not None:
# return servico.url
# return mark_safe(
# f'<a href="{servico.url}" target="_blank">{servico.url}</a>'
# )
# link_url.short_description = _('URL do serviço')
# def link_servico(self, obj):
# if obj.pk is None:
# return ""
# url = reverse(
# f'admin:{obj._meta.app_label}_{obj._meta.module_name_change}',
# args=[obj.pk]
# ) + '?_popup=1'
# return mark_safe(
# f'<input id="edit_convenio-{obj.pk}" type="hidden"/>'
# f'<a id="lookup_edit_convenio-{obj.pk}" href="{url}" '
# 'class="changelink" '
# 'onclick="return showRelatedObjectLookupPopup(this)">Editar</a>'
# )
# link_servico.short_description = _('Editar Serviço')
# def has_add_permission(self, request):
# return False
# class OcorrenciaInline(admin.TabularInline):
# model = Ocorrencia
# fields = ('data_criacao', 'assunto', 'prioridade', 'status',
# 'data_modificacao', 'setor_responsavel', 'link_editar',)
# readonly_fields = ('data_criacao', 'assunto', 'prioridade', 'status',
# 'data_modificacao', 'setor_responsavel', 'link_editar',)
# extra = 0
# max_num = 0
# can_delete = False
# template = 'admin/casas/ocorrencia_inline.html'
# ordering = ('-data_modificacao',)
# def link_editar(self, obj):
# if obj.pk is None:
# return ""
# url = reverse(
# f'admin:{obj._meta.app_label}_{obj._meta.module_name}_change',
# args=[obj.pk]
# )
# return mark_safe(
# f'<input id="edit_ocorrencia-{obj.pk}" type="hidden"/>'
# f'<a id="lookup_edit_ocorrencia-{obj.pk}" href="{url}" '
# 'class="button" target="_blank" '
# 'onclick="return showRelatedObjectLookupPopup(this);">'
# f'{_("Editar")}</a>'
# )
# link_editar.short_description = _('Editar')
class ServicoInline(admin.TabularInline):
model = Servico
fields = ('link_url', 'contato_tecnico', 'contato_administrativo',
'hospedagem_interlegis', 'data_ativacao', 'data_alteracao',
'data_desativacao', 'link_servico')
readonly_fields = ['link_url', 'contato_tecnico', 'contato_administrativo',
'hospedagem_interlegis', 'data_ativacao',
'data_alteracao', 'data_desativacao', 'link_servico']
extra = 0
max_num = 0
can_delete = False
ordering = ('-data_alteracao',)
def link_url(self, servico):
if servico.data_desativacao is not None:
return servico.url
return mark_safe(
f'<a href="{servico.url}" target="_blank">{servico.url}</a>'
)
link_url.short_description = _('URL do serviço')
def link_servico(self, obj):
if obj.pk is None:
return ""
opts = self.opts
url = reverse(f'admin:{opts.app_label}_{opts.model_name}_change',
args=[obj.pk])
return mark_safe(
f'<a href="{url}"><i class="material-icons Tiny">edit</i></a>'
)
link_servico.short_description = _('Editar Serviço')
def has_add_permission(self, request, obj):
return False
class OcorrenciaInline(admin.TabularInline):
model = Ocorrencia
fields = ('data_criacao', 'assunto', 'prioridade', 'status',
'data_modificacao', 'link_editar',)
readonly_fields = ('data_criacao', 'assunto', 'prioridade', 'status',
'data_modificacao', 'link_editar',)
extra = 0
max_num = 0
can_delete = False
ordering = ('-data_modificacao',)
def link_editar(self, obj):
if obj.pk is None:
return ""
opts = self.opts
url = reverse(
f'admin:{opts.app_label}_{opts.model_name}_change',
args=[obj.pk]
)
return mark_safe(
f'<a href="{url}"><i class="material-icons Tiny">edit</i></a>'
)
link_editar.short_description = _('Editar')
@admin.register(Orgao)
@ -268,16 +248,15 @@ class OrgaoAdmin(CartExportReportMixin, admin.ModelAdmin):
form = OrgaoForm
resource_class = OrgaoExportResourse
inlines = (TelefonesInline, PresidenteInline, ContatoInterlegisInline,
FuncionariosInline, ) #ConveniosInline, ServicoInline,
# OcorrenciaInline,)
FuncionariosInline, ConveniosInline, ServicoInline,
OcorrenciaInline,)
list_display = ('id', 'sigla', 'nome', 'get_uf', 'get_gerentes',
'get_convenios', 'get_servicos')
list_display_links = ('sigla', 'nome',)
# list_filter = ('tipo', ('gerentes_interlegis', GerentesInterlegisFilter),
# 'municipio__uf__nome', ConvenioFilter, ServicoAtivoFilter,
# ExcluirConvenioFilter, ServicoFilter, 'inclusao_digital',)
list_filter = ('tipo', ('gerentes_interlegis', GerentesInterlegisFilter),
'municipio__uf__nome', ConvenioFilter, ExcluirConvenioFilter,
'municipio__uf__nome', ConvenioFilter,
('servico__data_desativacao', ServicoAtivoFilter),
ExcluirConvenioFilter, ServicoFilter,
'inclusao_digital',)
ordering = ('municipio__uf__nome', 'nome')
queryset = queryset_ascii
@ -295,8 +274,7 @@ class OrgaoAdmin(CartExportReportMixin, admin.ModelAdmin):
'pagina_web', 'email', 'obs_pesquisa',)
}),
(_('Outras informações'), {
'fields': ('observacoes', 'horario_funcionamento', 'foto',
'recorte'),
'fields': ('observacoes', 'horario_funcionamento', 'foto',),
}),
)
raw_id_fields = ('municipio',)
@ -331,25 +309,17 @@ class OrgaoAdmin(CartExportReportMixin, admin.ModelAdmin):
get_convenios.short_description = _('Convênios')
def get_servicos(self, obj):
#TODO: Descomentar após migrar a app Servicos
# return mark_safe(
# '<ul>' +
# ''.join(
# [f'<li><a href="{s.url}" target="_blank">{s}</a></li>'
# for s in obj.servico_set.filter(
# data_desativacao__isnull=True)
# ]
# ) +
# '</ul>'
# )
return "TODO: Descomentar após migrar a app Servicos"
get_servicos.short_description = _('Serviços')
def changelist_view(self, request, extra_context=None):
return super(OrgaoAdmin, self).changelist_view(
request,
extra_context={'query_str': '?' + request.META['QUERY_STRING']}
return mark_safe(
'<ul>' +
''.join(
[f'<li><a href="{s.url}" target="_blank">{s}</a></li>'
for s in obj.servico_set.filter(
data_desativacao__isnull=True)
]
) +
'</ul>'
)
get_servicos.short_description = _('Serviços')
def lookup_allowed(self, lookup, value):
return (super(OrgaoAdmin, self).lookup_allowed(lookup, value) or
@ -393,7 +363,6 @@ class OrgaoAdmin(CartExportReportMixin, admin.ModelAdmin):
'casas': self.get_queryset(request).order_by('municipio__uf','nome'),
'title': _('Relatório completo')
}
print (context)
return WeasyTemplateResponse(
filename='relatorio_completo.pdf',
request=request,
@ -403,85 +372,10 @@ class OrgaoAdmin(CartExportReportMixin, admin.ModelAdmin):
)
relatorio_completo.title = _('Relatório completo')
# def etiqueta_presidente_25(self, request):
# return HttpResponseRedirect('..')
# etiqueta_presidente_25.title = _('Etiqueta 2 x 5 com presidente')
# etiqueta_presidente_25.icon = 'label'
# def etiqueta_presidente_39(self, request):
# return HttpResponseRedirect('..')
# etiqueta_presidente_39.title = _('Etiqueta 3 x 9 com presidente')
# etiqueta_presidente_39.icon = 'label'
# def etiqueta_25(self, request):
# return HttpResponseRedirect('..')
# etiqueta_25.title = _('Etiqueta 2 x 5 sem presidente')
# etiqueta_25.icon = 'label'
# def etiqueta_39(self, request):
# return HttpResponseRedirect('..')
# etiqueta_39.title = _('Etiqueta 3 x 9 sem presidente')
# etiqueta_39.icon = 'label'
# def etiqueta_parlamentar_25(self, request):
# return HttpResponseRedirect('..')
# etiqueta_parlamentar_25.title = _('Etiqueta 2 x 5 parlamentares')
# etiqueta_parlamentar_25.icon = 'label'
# def etiqueta_parlamentar_39(self, request):
# return HttpResponseRedirect('..')
# etiqueta_parlamentar_39.title = _('Etiqueta 3 x 9 parlamentares')
# etiqueta_parlamentar_39.icon = 'label'
#TODO: Resolver depois - sigi-boys???
# def etiqueta(self, request, queryset):
# return labels_report(request, queryset=queryset)
# etiqueta.short_description = _("Gerar etiqueta(s) da(s) casa(s) "
# "selecionada(s)")
# def etiqueta_sem_presidente(self, request, queryset):
# return labels_report_sem_presidente(request, queryset=queryset)
# etiqueta_sem_presidente.short_description = _("Gerar etiqueta(s) sem "
# "presidente da(s) casa(s) "
# "selecionada(s)")
# def relatorio(self, request, queryset):
# return report(request, queryset=queryset)
# relatorio.short_description = _("Exportar a(s) casa(s) selecionada(s) "
# "para PDF")
# def relatorio_completo(self, request, queryset):
# return report_complete(request, queryset=queryset)
# relatorio_completo.short_description = _("Gerar relatório completo da(s) "
# "casa(s) selecionada(s)")
# def relatorio_csv(self, request, queryset):
# return export_csv(request)
# relatorio_csv.short_description = _("Exportar casa(s) selecionada(s) "
# "para CSV")
# def adicionar_casas(self, request, queryset):
# if 'carrinho_casas' in request.session:
# # if request.session.has_key('carrinho_casas'):
# q1 = len(request.session['carrinho_casas'])
# else:
# q1 = 0
# response = adicionar_casas_carrinho(request, queryset=queryset)
# q2 = len(request.session['carrinho_casas'])
# quant = q2 - q1
# if quant:
# self.message_user(request, str(q2 - q1) + " " +
# _("Casas Legislativas adicionadas no carrinho"))
# else:
# self.message_user(request, _("As Casas Legislativas selecionadas "
# "já foram adicionadas anteriormente"))
# return HttpResponseRedirect('.')
# adicionar_casas.short_description = _("Armazenar casas no carrinho para "
# "exportar")
def get_actions(self, request):
actions = super(OrgaoAdmin, self).get_actions(request)
if 'delete_selected' in actions:
del actions['delete_selected']
return actions
admin.site.register(TipoOrgao)

92
sigi/apps/casas/filters.py

@ -1,14 +1,16 @@
from django.contrib import admin
from django.utils.translation import gettext as _
from sigi.apps.servidores.models import Servidor
from sigi.apps.convenios.models import Convenio, Projeto
from sigi.apps.convenios.models import Projeto
from sigi.apps.servicos.models import TipoServico
class GerentesInterlegisFilter(admin.filters.RelatedFieldListFilter):
def __init__(self, *args, **kwargs):
super(GerentesInterlegisFilter, self).__init__(*args, **kwargs)
gerentes = Servidor.objects.filter(casas_que_gerencia__isnull=False).order_by('nome_completo').distinct()
super().__init__(*args, **kwargs)
gerentes = Servidor.objects.exclude(
casas_que_gerencia=None).order_by(
'nome_completo')
self.lookup_choices = [(x.id, x) for x in gerentes]
class ConvenioFilter(admin.SimpleListFilter):
@ -43,57 +45,41 @@ class ExcluirConvenioFilter(admin.SimpleListFilter):
if (self.value() is None):
return queryset
else:
queryset = queryset.exclude(convenio__projeto_id=self.value()).distinct('municipio__uf__nome', 'nome')
queryset = queryset.exclude(
convenio__projeto_id=self.value()).distinct(
'municipio__uf__nome', 'nome')
return queryset
# class ServicoFilter(admin.SimpleListFilter):
# title = _("Serviço")
# parameter_name = 'servico'
# def lookups(self, request, model_admin):
# return (
# ('SS', _("Sem nenhum serviço")),
# ('CS', _("Com algum serviço")),
# ('CH', _("Com algum serviço de hospedagem")),
# ('CR', _("Apenas serviço de registro")),
# ) + tuple([(p.pk, p.nome) for p in TipoServico.objects.all()])
# def queryset(self, request, queryset):
# if self.value() is not None:
# if self.value() == 'SS':
# queryset = queryset.filter(servico=None)
# elif self.value() == 'CS':
# queryset = queryset.exclude(servico=None).filter(
# servico__data_desativacao__isnull=True)
# elif self.value() == 'CR':
# queryset = queryset.exclude(servico__tipo_servico__modo='H') \
# .exclude(servico=None)
# elif self.value() == 'CH':
# queryset = queryset.filter(
# servico__tipo_servico__modo='H',
# servico__data_desativacao__isnull=True
# )
# else:
# queryset = queryset.filter(
# servico__tipo_servico_id=self.value()
# )
class ServicoFilter(admin.SimpleListFilter):
title = _("Serviço")
parameter_name = 'servico'
# return queryset.distinct('municipio__uf__nome', 'nome')
# class ServicoAtivoFilter(admin.SimpleListFilter):
# title = _("Serviço ativo")
# parameter_name = 'ativo'
def lookups(self, request, model_admin):
return (
('SS', _("Sem nenhum serviço")),
('CS', _("Com algum serviço")),
('CH', _("Com algum serviço de hospedagem")),
('CR', _("Apenas serviço de registro")),
) + tuple([(p.pk, p.nome) for p in TipoServico.objects.all()])
# def lookups(self, request, model_admin):
# return (
# ('ativo', _("Ativo")),
# ('desativado', _("Desativado")),
# )
def queryset(self, request, queryset):
if self.value() is not None:
if self.value() == 'SS':
queryset = queryset.filter(servico=None)
elif self.value() == 'CS':
queryset = queryset.exclude(servico=None).filter(
servico__data_desativacao__isnull=True)
elif self.value() == 'CR':
queryset = queryset.exclude(servico__tipo_servico__modo='H') \
.exclude(servico=None)
elif self.value() == 'CH':
queryset = queryset.filter(
servico__tipo_servico__modo='H',
servico__data_desativacao__isnull=True
)
else:
queryset = queryset.filter(
servico__tipo_servico_id=self.value()
)
# def queryset(self, request, queryset):
# if self.value() is not None:
# if self.value() == 'ativo':
# queryset = queryset.filter(servico__data_desativacao__isnull=True)
# else:
# queryset = queryset.filter(servico__data_desativacao__isnull=False)
# return queryset
return queryset.distinct('municipio__uf__nome', 'nome')

6
sigi/apps/casas/models.py

@ -148,11 +148,9 @@ class Orgao(models.Model):
@property
def num_parlamentares(self):
# TODO: Descomentar assim que a app Parlamentares for migrada
# if not self.legislatura_set.exists():
# return 0
# return self.legislatura_set.latest('data_inicio').total_parlamentares
if not self.legislatura_set.exists():
return 0
return self.legislatura_set.latest('data_inicio').total_parlamentares
@property
def telefone(self):

179
sigi/apps/casas/reports.py

@ -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
sigi/apps/casas/templates/admin/casas/change_form.html

@ -1 +0,0 @@
{% extends "change_form_with_report_and_labels.html" %}

164
sigi/apps/casas/templates/admin/casas/convenios_inline.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>

164
sigi/apps/casas/templates/admin/casas/ocorrencia_inline.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: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>

17
sigi/apps/convenios/admin.py

@ -2,7 +2,6 @@ from django.contrib import admin
from django.http import HttpResponse, HttpResponseRedirect
from django.utils.translation import gettext as _
from django.utils.safestring import mark_safe
from import_export.fields import Field
from sigi.apps.convenios.models import (Projeto, StatusConvenio,
TipoSolicitacao, Convenio,
EquipamentoPrevisto, Anexo, Tramitacao,
@ -11,7 +10,11 @@ from sigi.apps.utils import queryset_ascii
from sigi.apps.servidores.models import Servidor
from sigi.apps.casas.admin import ConveniosInline, GerentesInterlegisFilter
from sigi.apps.utils.mixins import CartExportReportMixin, LabeledResourse
<<<<<<< HEAD
from django_weasyprint.views import WeasyTemplateResponse
=======
from sigi.apps.utils.filters import DateRangeFilter
>>>>>>> 96ea3b8f2dd4c7380c7e59f4a0546e6c27b09ffe
class ConvenioExportResourse(LabeledResourse):
class Meta:
@ -74,10 +77,14 @@ class ConvenioAdmin(CartExportReportMixin, admin.ModelAdmin):
'status_convenio', 'link_sigad', 'data_retorno_assinatura',
'data_termino_vigencia',)
list_display_links = ('num_convenio', 'casa_legislativa',)
list_filter = (('casa_legislativa__gerentes_interlegis',
GerentesInterlegisFilter), 'projeto',
'casa_legislativa__tipo', 'conveniada','equipada',
'casa_legislativa__municipio__uf',)
list_filter = (
('data_retorno_assinatura', DateRangeFilter),
('data_sigi', DateRangeFilter), ('data_solicitacao', DateRangeFilter),
('data_sigad', DateRangeFilter),
('casa_legislativa__gerentes_interlegis', GerentesInterlegisFilter),
'projeto', 'casa_legislativa__tipo', 'conveniada','equipada',
'casa_legislativa__municipio__uf',
)
ordering = ('casa_legislativa', '-data_retorno_assinatura')
raw_id_fields = ('casa_legislativa',)
get_queryset = queryset_ascii

2
sigi/apps/home/templates/menus/menu.html

@ -10,7 +10,7 @@
{% for child in menu.children %}
{% if child.view_name %}
{% url child.view_name as item_url %}
<div{% if item_url in request.path and child.querystr in request.get_full_path %} class="active"{% endif %}>
<div{% if item_url in request.path and child.querystr == None or child.querystr in request.get_full_path %} class="active"{% endif %}>
<a href="{{ item_url }}{% if child.querystr %}?{{ child.querystr }}{% endif %}">{{ child.title }}</a>
</div>
{% else %}

176
sigi/apps/servicos/admin.py

@ -1,117 +1,65 @@
from datetime import date, timedelta
from django.contrib import admin
from django.urls import reverse
from django.utils.encoding import force_str
from django.utils.safestring import mark_safe
from django.forms.models import ModelForm
from django.http import Http404, HttpResponseRedirect
from django.utils.translation import gettext as _
from import_export.fields import Field
from sigi.apps.casas.admin import FuncionariosInline, GerentesInterlegisFilter
from sigi.apps.casas.models import Orgao
from sigi.apps.servicos.models import (Servico, LogServico, CasaAtendida,
TipoServico)
from sigi.apps.servicos.filters import ServicoAtivoFilter, DataUtimoUsoFilter
from sigi.apps.servicos.forms import ServicoFormAdmin
from sigi.apps.utils.filters import DateRangeFilter
from sigi.apps.utils.mixins import CartExportMixin, LabeledResourse
class ServicoExportResourse(LabeledResourse):
telefone_casa = Field(column_name='Casa Legislativa/telefone')
hospedagem_interlegis = Field(column_name='hospedagem no interlegis')
class Meta:
model = Servico
fields = ('casa_legislativa__nome', 'casa_legislativa__municipio__nome',
'casa_legislativa__municipio__uf__sigla',
'casa_legislativa__email', 'telefone_casa',
'contato_tecnico__nome', 'contato_tecnico__email',
'contato_tecnico__nota', 'tipo_servico__nome', 'url',
'hospedagem_interlegis', 'data_ativacao', 'data_desativacao',
'motivo_desativacao', 'data_ultimo_uso', 'erro_atualizacao')
export_order = fields
def dehydrate_telefone_casa(self, servico):
return servico.casa_legislativa.telefone
def dehydrate_hospedagem_interlegis(self, servico):
if servico.hospedagem_interlegis:
return _("Sim")
else:
return _("Não")
class LogServicoInline(admin.StackedInline):
model = LogServico
Fieldset = ((None, {'fields': (('data', 'descricao'), 'log')}))
extra = 1
class ServicoFormAdmin(ModelForm):
class Meta:
model = Servico
fields = '__all__'
def __init__(self, *args, **kwargs):
super(ServicoFormAdmin, self).__init__(*args, **kwargs)
self.fields['contato_tecnico'].choices = ()
self.fields['contato_administrativo'].choices = ()
if self.instance.casa_legislativa_id:
id_casa = self.instance.casa_legislativa_id
elif 'initial' in kwargs and 'id_casa' in kwargs['initial']:
id_casa = kwargs['initial']['id_casa']
self.instance.casa_legislativa_id = id_casa
else:
id_casa = None
class ContatosInline(FuncionariosInline):
can_delete = False # Equipe do SEIT não pode excluir pessoas de contato
# SEIT see all contacts, including President
def get_queryset(self, request):
return self.model.objects.all()
if id_casa:
casa = CasaAtendida.objects.get(pk=id_casa)
contatos = [
(f.id, force_str(f)) for f in casa.funcionario_set.all()
]
self.fields['contato_tecnico'].choices = contatos
self.fields['contato_administrativo'].choices = contatos
def get_queryset(self, request):
return (self.model.objects.exclude(desativado=True)
.extra(select={'ult_null': 'ult_alteracao is null'})
.order_by('ult_null', '-ult_alteracao')
# A função extra foi usada para quando existir um registro com o campo igual a null não aparecer na frente dos mais novos
)
@admin.register(TipoServico)
class TipoServicoAdmin(admin.ModelAdmin):
list_display = ('id', 'sigla', 'nome', 'qtde_casas_atendidas', )
ordering = ['id']
class DataUtimoUsoFilter(admin.SimpleListFilter):
title = _("Atualização")
parameter_name = 'atualizacao'
def lookups(self, request, model_admin):
return (
('err', _("Erro na verificação")),
('year', _("Sem atualização há um ano ou mais")),
('semester', _("Sem atualização de seis meses a um ano")),
('quarter', _("Sem atualização de três a seis meses")),
('month', _("Sem atualização de um a três meses")),
('week', _("Sem atualização de uma semana a um mês")),
('updated', _("Atualizado na última semana")),
)
def queryset(self, request, queryset):
if self.value() is not None:
queryset = queryset.exclude(tipo_servico__string_pesquisa="")
if self.value() == 'err':
queryset = queryset.exclude(erro_atualizacao="")
elif self.value() == 'year':
limite = date.today() - timedelta(days=365)
queryset = queryset.filter(data_ultimo_uso__lte=limite)
else:
de = date.today() - (
timedelta(days=365) if self.value() == 'semester' else
timedelta(days=6*30) if self.value() == 'quarter' else
timedelta(days=3*30) if self.value() == 'month' else
timedelta(days=30) if self.value() == 'week' else
timedelta(days=0)
)
ate = date.today() - (
timedelta(days=6*30) if self.value() == 'semester' else
timedelta(days=3*30) if self.value() == 'quarter' else
timedelta(days=30) if self.value() == 'month' else
timedelta(days=7) if self.value() == 'week' else
timedelta(days=0)
)
queryset = queryset.filter(data_ultimo_uso__range=(de, ate))
return queryset
class ServicoAtivoFilter(admin.SimpleListFilter):
title = _("Serviço ativo")
parameter_name = 'ativo'
def lookups(self, request, model_admin):
return (
('ativo', _("Ativo")),
('desativado', _("Desativado")),
)
def queryset(self, request, queryset):
if self.value() is not None:
if self.value() == 'ativo':
queryset = queryset.filter(data_desativacao__isnull=True)
else:
queryset = queryset.filter(data_desativacao__isnull=False)
return queryset
@admin.register(Servico)
class ServicoAdmin(admin.ModelAdmin):
change_list_template = "servico/change_list.html"
class ServicoAdmin(CartExportMixin, admin.ModelAdmin):
form = ServicoFormAdmin
actions = ['calcular_data_uso', ]
list_display = ('casa_legislativa', 'get_codigo_interlegis', 'get_uf',
@ -136,17 +84,18 @@ class ServicoAdmin(admin.ModelAdmin):
list_filter = (
'tipo_servico',
'hospedagem_interlegis',
ServicoAtivoFilter,
('data_ativacao', DateRangeFilter),
('data_desativacao', ServicoAtivoFilter),
DataUtimoUsoFilter,
('casa_legislativa__gerentes_interlegis', GerentesInterlegisFilter),
'casa_legislativa__municipio__uf',
)
list_display_links = []
actions = ['adicionar_servicos']
ordering = ('casa_legislativa__municipio__uf', 'casa_legislativa',
'tipo_servico',)
inlines = (LogServicoInline,)
search_fields = ('casa_legislativa__search_text',)
resource_class = ServicoExportResourse
def get_codigo_interlegis(self, obj):
return obj.casa_legislativa.codigo_interlegis
@ -178,21 +127,6 @@ class ServicoAdmin(admin.ModelAdmin):
get_link_erro.short_description = _("Erro na atualização")
get_link_erro.admin_order_field = 'erro_atualizacao'
# def adicionar_servicos(self, request, queryset):
# if 'carrinho_servicos' in request.session:
# q1 = len(request.session['carrinho_servicos'])
# else:
# q1 = 0
# adicionar_servicos_carrinho(request, queryset=queryset)
# q2 = len(request.session['carrinho_servicos'])
# quant = q2 - q1
# if quant:
# self.message_user(request, str(q2 - q1) + _(" Serviços adicionados no carrinho"))
# else:
# self.message_user(request, _("Os Serviços selecionados já foram adicionadas anteriormente"))
# return HttpResponseRedirect('.')
# adicionar_servicos.short_description = _("Armazenar serviços no carrinho para exportar")
def calcular_data_uso(self, request, queryset):
for servico in queryset:
servico.atualiza_data_uso()
@ -267,34 +201,6 @@ class ServicoAdmin(admin.ModelAdmin):
extra_context={'query_str': '?' + request.META['QUERY_STRING']}
)
# def adicionar_servicos(self, request, queryset):
# if 'carrinho_servicos' in request.session:
# q1 = len(request.session['carrinho_servicos'])
# else:
# q1 = 0
# adicionar_servicos_carrinho(request, queryset=queryset)
# q2 = len(request.session['carrinho_servicos'])
# quant = q2 - q1
# if quant:
# self.message_user(request, str(q2 - q1) + _(" Convênios adicionados no carrinho"))
# else:
# self.message_user(request, _("Os Convênios selecionados já foram adicionadas anteriormente"))
# return HttpResponseRedirect('.')
# adicionar_servicos.short_description = _("Armazenar Serviços no carrinho para exportar")
class ContatosInline(FuncionariosInline):
can_delete = False # Equipe do SEIT não pode excluir pessoas de contato
# SEIT see all contacts, including President
def get_queryset(self, request):
return self.model.objects.all()
def get_queryset(self, request):
return (self.model.objects.exclude(desativado=True)
.extra(select={'ult_null': 'ult_alteracao is null'})
.order_by('ult_null', '-ult_alteracao')
# A função extra foi usada para quando existir um registro com o campo igual a null não aparecer na frente dos mais novos
)
@admin.register(CasaAtendida)
class CasaAtendidaAdmin(admin.ModelAdmin):
actions = None

23
sigi/apps/servicos/templates/admin/servicos/casaatendida/change_list.html

@ -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 %}

33
sigi/apps/servicos/templates/servico/change_list.html

@ -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 %}

40
sigi/apps/utils/filters.py

@ -1,5 +1,6 @@
import string
from math import log10
from django import forms
from django.contrib import admin
from django.contrib.admin.options import IncorrectLookupParameters
from django.utils.translation import ngettext, gettext as _
@ -133,3 +134,42 @@ class RangeFilter(admin.FieldListFilter):
raise IncorrectLookupParameters(e)
return queryset
class DateRangeFilter(admin.FieldListFilter):
template = 'admin/date_range_filter.html'
def __init__(self, field, request, params, model, model_admin, field_path):
self.model = model
self.model_admin = model_admin
self.lookup_kwargs = [f'{field_path}__gte', f'{field_path}__lte']
super().__init__(field, request, params, model, model_admin, field_path)
form = self.get_date_form(self.used_parameters)
if form.is_valid():
self.used_parameters = {
key: value for key,value in form.cleaned_data.items()
if value is not None
}
else:
self.used_parameters = {}
def has_output(self):
return self.model.objects.exists()
def expected_parameters(self):
return self.lookup_kwargs
def choices(self, changelist):
return [{
'query_string': changelist.get_query_string(
remove=self.lookup_kwargs),
'form': self.get_date_form(self.used_parameters)
}]
def get_date_form(self, context={}):
date_fields = {name: forms.DateField(required=False)
for name in self.lookup_kwargs}
DateForm = type('DateForm', (forms.Form,), date_fields)
return DateForm(context)

8
sigi/apps/utils/mixins.py

@ -16,6 +16,7 @@ from import_export.admin import ExportMixin
from import_export.forms import ExportForm
from import_export.signals import post_export
from sigi.apps.utils import field_label
class ExportFormFields(ExportForm):
def __init__(self, formats, field_list, *args, **kwargs):
super().__init__(formats, *args, **kwargs)
@ -42,7 +43,8 @@ class LabeledResourse(resources.ModelResource):
def get_export_fields(self):
fields = self.get_fields()
if self.selected_fields:
fields = [f for f in fields if f.column_name in self.selected_fields]
fields = [f for f in fields
if self.get_field_name(f) in self.selected_fields]
return fields
def export(self, queryset=None, selected_fields=None, *args, **kwargs):
@ -51,7 +53,6 @@ class LabeledResourse(resources.ModelResource):
class CartExportMixin(ExportMixin):
to_encoding = 'utf-8'
actions = ['add_to_cart']
change_list_template = 'admin/cart/change_list_cart_export.html'
_cart_session_name = None
_cart_viewing_name = None
@ -73,6 +74,9 @@ class CartExportMixin(ExportMixin):
action = self.get_action('remove_from_cart')
return OrderedDict([(action[1], action)])
else:
if self.actions is None:
self.actions = []
self.actions.append('add_to_cart')
return super(CartExportMixin, self).get_actions(request)
@csrf_protect_m

2
sigi/settings/menu_conf.yaml

@ -37,8 +37,6 @@ main_menu:
children:
- title: Convênios
view_name: admin:convenios_convenio_changelist
- title: Planos diretores
view_name: admin:metas_planodiretor_changelist
- title: Serviços SEIT
icon: cloud_done
children:

Loading…
Cancel
Save