pax_global_header 0000666 0000000 0000000 00000000064 13732144217 0014516 g ustar 00root root 0000000 0000000 52 comment=80a6b150febb5c0c91f2daa433cc089ff1278841
postgresql-autodoc-1.41+20200921/ 0000775 0000000 0000000 00000000000 13732144217 0016175 5 ustar 00root root 0000000 0000000 postgresql-autodoc-1.41+20200921/.gitignore 0000664 0000000 0000000 00000000147 13732144217 0020167 0 ustar 00root root 0000000 0000000 .*.swp
*~
ChangeLog.bak
postgresql_autodoc
config.status
config.mk
config.log
env
postgresql_autodoc.1
postgresql-autodoc-1.41+20200921/ChangeLog 0000664 0000000 0000000 00000022566 13732144217 0017762 0 ustar 00root root 0000000 0000000 2012-01-05 10:30 rbt
* postgresql_autodoc.pl: Mark 1.41 release
2012-01-05 10:22 rbt
* xml.tmpl: Update schema for Docbook 4.5. Use where
possible.
2010-01-24 15:01 rbt
* postgresql_autodoc.pl: Apply a fix to the function signatures
that was reversing argument names.
Patch created by Jyrki Muukkonen and submitted via Peter
Eisentraut
2009-08-11 14:50 rbt
* Makefile: Add the manpage to the release tarball.
2009-08-06 22:48 rbt
* Makefile, postgresql_autodoc.1.in: Add a manpage for PostgreSQL
Autodoc (Tim Retout)
It always installs at the moment (BSD Port won't like that).
2009-06-13 07:06 rbt
* postgresql_autodoc.pl: Correct the synopsis (Peter Eisentraut)
2009-04-30 22:31 rbt
* ChangeLog: Finally, a 1.40 release changelog.
2009-04-30 22:31 rbt
* ChangeLog, Makefile: Seems tar on FreeBSD has changed behaviour
since the last release. Copy files to new location and build
tarball out of that directory.
2009-04-30 22:14 rbt
* ChangeLog, Makefile: Really fix the release process.
2009-04-30 22:13 rbt
* postgresql_autodoc.pl: Tag for 1.40
2009-04-30 22:11 rbt
* ChangeLog: Another crack at 1.40
2009-04-30 22:10 rbt
* Makefile: make release was broken.
2009-04-30 22:09 rbt
* ChangeLog: Release notes for 1.40
2009-04-26 13:01 rbt
* postgresql_autodoc.pl: Don't need relhasindexes, relhasrules, or
relhastriggers since older DBs have been dropped. This also makes
up 8.4 compatible without additional changes required.
2009-04-24 00:43 rbt
* postgresql_autodoc.pl: Improve wording for --table help (Jamie
Nicholson)
2009-04-24 00:41 rbt
* postgresql_autodoc.pl: Add -m to only output structures
or functions matching a specific regex (Simon Michael)
Tidy code along the way.
2009-04-24 00:21 rbt
* postgresql_autodoc.pl: Remove support for PostgreSQL versions
earlier than 8.0.
Do a better job of named function parameters.
2009-04-24 00:04 rbt
* postgresql_autodoc.pl: Minor fixes for named functions for newer
DBD::Pg's. A long time ago DBD::Pg changed from returning an
array string to returning an actual array for PostgreSQL arrays.
Autodoc did not take this into account.
2009-04-23 23:46 rbt
* Makefile, config.mk.in, configure.ac: Dramatically simplify
installation process (Thanks Simon Bertrang).
Complex installation checks have never been required so drop it
and replace with simple make functionality.
Targetting to a different installation prefix is done by setting
the PREFIX variable:
make PREFIX=/some/new/home install
2009-04-23 23:39 rbt
* config.mk.in: Use datarootdir instead of datadir
2008-03-16 19:30 rbt
* ChangeLog: 1.31 actual
2008-03-12 15:00 rbt
* postgresql_autodoc.pl: Clean up formatting.
2008-03-12 15:00 rbt
* postgresql_autodoc.pl: Do not output all functions in the
database if a specific table list was requested. Good chance it
isn't functions the user is after.
2008-03-12 14:55 rbt
* postgresql_autodoc.pl: Keep foreign key defaults (0) when
referencing a table which does not exist in our output.
2008-03-12 14:50 rbt
* postgresql_autodoc.pl: Leonardo Cezar patches:
One of them to fix a odd behavior when we had views in schema to
schema to extract some reporter. Previously we got an error on
trying to get statistcs from a view, since views hasn't stats.
The other one to choose which table(s) we want to collect
information with --table=foo,bar,x ... option.
Although it's functional we still get warning when dealing with
table FKs that weren't selected together; among others gotchas
;-).
Unfortunately I didn't find any mailing lists or forum to treat
this issue neither at pgfoundry nor autodoc's website. --
FKeys still unfixed. Statistics portion cleaned up by me.
Virtually no testing of input for comma separated values but oh
well.
Will follow with a fix to all the "gotchas"
2008-03-12 14:24 rbt
* ChangeLog, postgresql_autodoc.pl: Tag for 1.31 release. After
additional testing to ensure Foriegn Keys work again this is what
will go out.
2008-03-12 14:21 rbt
* postgresql_autodoc.pl: New versions of DBD::Pg like to return an
array reference instead of the special text string that
PostgreSQL returns.
This might take care of the issue, although only partially tested
(FreeBSD ports doesn't have the newer version yet as it breaks a
number of applications).
2007-01-02 09:44 rbt
* ChangeLog: Release 1.30
2007-01-02 08:53 rbt
* configure.ac, postgresql_autodoc.pl: Toshio Kuratomi wrote a
patch to allow a password to be provided via prompt.
2006-05-16 15:01 rbt
* html.tmpl, postgresql_autodoc.pl, xml.tmpl: Assume the strings
are in UTF8 instead of in ASCII. This expands on the number of
characters that we can work with. While not perfect, it is an
improvement.
Submitted by: Dirk Jagdmann
2006-05-16 14:58 rbt
* config.mk.in: The datadir should be
/usr/local/share/postgresql_autodoc by default instead of
/usr/local/share.
Submitted by: Dirk Jagdmann
2006-05-16 14:57 rbt
* Makefile: Add an uninstall target.
Submitted by: Dirk Jagdmann
2006-03-17 17:32 rbt
* postgresql_autodoc.pl: Do not prepare() the statistics query if
it is not going to be used.
Prepare() and finish() on an empty string causes DBD::Pg to
complain about the finish().
2006-02-12 20:15 rbt
* html.tmpl, postgresql_autodoc.pl, regressdatabase.sql: Add in
very simple inheritance documentation. Templates other than HTML
need to be updated.
Remove support for PostgreSQL 7.1 and 7.2. Continues to support
7.3 and later.
2006-02-12 15:27 rbt
* html.tmpl: Display index information in HTML output.
2005-05-02 22:18 rbt
* ChangeLog: Changelog for the 1.25 release.
2005-05-02 22:17 rbt
* zigzag.dia.tmpl: Prevent Dia 0.94 from crashing by rearranging
the Dependency attributes.
2005-05-02 22:07 rbt
* dia.tmpl, zigzag.dia.tmpl: Eliminate Dia warnings for newer
versions of dia (new elements).
Luckily, Dia will completely ignore these saved values and
calculate it's own instead which is convenient because we really
have no idea where to place things.
2005-05-01 01:32 rbt
* Makefile, neato.tmpl: Template for the Neato and Twopi tools
(part of GraphViz) submitted by Tony Wasson.
2005-05-01 01:13 rbt
* postgresql_autodoc.pl: Finish() the GetVersion sql statement.
Set the FK Group number back to being a number instead of the
schema name. Accidentally converted earlier while removing the
$group variable.
2005-05-01 01:07 rbt
* dot.tmpl: Matt Bosworth has provided an updated dot template with
PK, FK information and improved styling.
Rod proceeded to break several things, but eventually got it
working again.
2005-04-18 19:53 rbt
* postgresql_autodoc.pl: Fix GraphViz foreign key links (they were
missing).
2005-04-18 19:48 rbt
* zigzag.dia.tmpl:
The latest version of dia crashes when I open a dia file produced
with the zigzag.dia.tmpl template. I replaced the following lines
in zigzag.dia.tmpl
with
and dia no longer crashes.
best whishes, Piebe de Vries
2005-02-27 14:39 rbt
* postgresql_autodoc.pl: Bump copyright date.
2005-02-27 14:38 rbt
* postgresql_autodoc.pl: Do a little bit of cleaning on this old
and crufty code.
2005-02-27 13:08 rbt
* postgresql_autodoc.pl: Include argument names as provided by
Jacob Smullyan.
Clean up handling of argument types from a schema not in the
current path. This means getting rid of the schema prefix added
by format_type so when can add our own when appropriate.
2004-10-13 09:46 rbt
* ChangeLog, postgresql_autodoc.pl: Push out 1.24
2004-10-12 09:33 rbt
* postgresql_autodoc.pl: Strip out quotes in the comparison area.
2004-06-29 12:40 rbt
* dia.tmpl, postgresql_autodoc.pl, zigzag.dia.tmpl: From:
Bort, Paul Subject: RE: Patch for Dia templates for
Postgresql_AutoDoc Date: Tue, 22 Jun 2004 15:23:24 -0400
I've used the same method of shortening as the constraint you
mentioned, but I made it a new entry (table_comment_dia) in the
hash rather than mangle the existing one. I tried to follow the
existing naming conventions and coding style. I picked a total of
45 characters because that seems to be about the right size on my
screen. In testing I also found a bug in Dia that causes a crash
if a comment is too long, but that seems to be in the 100+
character range, so I'm not worried about 45.
Here are the patches for postgresql_autodoc.pl, dia.tmpl, and
zigzag.dia.tmpl.
2004-06-02 21:46 rbt
* ChangeLog, postgresql_autodoc.pl: 1.23 Release
2004-06-01 11:22 rbt
* postgresql_autodoc.pl: Handle the inability to connect to the
database (print real error message).
Use pg_get_constraintdef() for 7.4 and newer databases.
PostgreSQL does the formatting all by itself now.
2004-05-12 12:00 rbt
* dia.tmpl, ChangeLog, .cvsignore, Makefile, configure.ac,
html.tmpl, config.mk.in, dot.tmpl, install-sh,
postgresql_autodoc.pl, regressdatabase.sql, xml.tmpl,
zigzag.dia.tmpl: Initial revision
2004-05-12 12:00 rbt
* dia.tmpl, ChangeLog, .cvsignore, Makefile, configure.ac,
html.tmpl, config.mk.in, dot.tmpl, install-sh,
postgresql_autodoc.pl, regressdatabase.sql, xml.tmpl,
zigzag.dia.tmpl: Migrate code from sourceforge into pgfoundry
postgresql-autodoc-1.41+20200921/Dockerfile 0000664 0000000 0000000 00000001020 13732144217 0020160 0 ustar 00root root 0000000 0000000 # USAGE:
# docker build . -t autodoc
# docker run --mount src=`pwd`,target=/app,type=bind --network=host --env-file ./env -v $pwd:/app autodoc
FROM ubuntu:18.04
WORKDIR /app
RUN apt-get update
RUN apt-get install -y libdbi-perl \
libhtml-template-perl libterm-readkey-perl \
libdbd-pg-perl make
COPY . .
RUN make install
ENV DATABASE=app \
HOST=localhost \
PORT=port \
USER=app \
PASSWORD=password
CMD postgresql_autodoc -d ${DATABASE} \
-h ${HOST} \
-p ${PORT} \
-u ${USER} \
--password=${PASSWORD}
postgresql-autodoc-1.41+20200921/Makefile 0000664 0000000 0000000 00000003746 13732144217 0017647 0 ustar 00root root 0000000 0000000 # $Header: /cvsroot/autodoc/autodoc/Makefile,v 1.9 2009/08/11 18:50:02 rbt Exp $
# install configuration
DESTDIR =
PREFIX = /usr/local
BINDIR = ${PREFIX}/bin
DATADIR = ${PREFIX}/share/postgresql_autodoc
MANDIR = ${PREFIX}/share/man/man1
# build configuration
TEMPLATES = dia.tmpl dot.tmpl dot_shortfk.tmpl html.tmpl neato.tmpl xml.tmpl zigzag.dia.tmpl
BINARY = postgresql_autodoc
SOURCE = ${BINARY}.pl
MANPAGE = ${BINARY}.1
MANPAGE_SOURCE = ${MANPAGE}.in
RELEASE_FILES = Makefile ChangeLog ${SOURCE} ${TEMPLATES} ${MANPAGE}
RELEASE_DIR=postgresql_autodoc
# system tools
INSTALL_SCRIPT = $$(which install) -c
PERL = $$(which perl)
SED = $$(which sed)
all: ${BINARY} ${MANPAGE}
${MANPAGE}: ${MANPAGE_SOURCE}
${SED} -e "s,@@TEMPLATE-DIR@@,${DATADIR}," \
${MANPAGE_SOURCE} > ${MANPAGE}
${BINARY}: ${SOURCE}
${SED} -e "s,/usr/bin/env perl,${PERL}," \
-e "s,@@TEMPLATE-DIR@@,${DATADIR}," \
${SOURCE} > ${BINARY}
-chmod +x ${BINARY}
install: all
${INSTALL_SCRIPT} -d ${DESTDIR}${BINDIR}
${INSTALL_SCRIPT} -d ${DESTDIR}${DATADIR}
${INSTALL_SCRIPT} -d ${DESTDIR}${MANDIR}
${INSTALL_SCRIPT} -m 755 ${BINARY} ${DESTDIR}${BINDIR}
for entry in ${TEMPLATES} ; \
do ${INSTALL_SCRIPT} -m 644 $${entry} ${DESTDIR}${DATADIR} ; \
done
${INSTALL_SCRIPT} ${MANPAGE} ${DESTDIR}${MANDIR}
uninstall:
-rm ${DESTDIR}${BINDIR}/${BINARY}
-for entry in ${TEMPLATES} ; \
do rm ${DESTDIR}${DATADIR}/$${entry} ; \
done
-rm ${DESTDIR}${MANDIR}/${MANPAGE}
-rmdir ${DESTDIR}${MANDIR}
-rmdir ${DESTDIR}${DATADIR}
-rmdir ${DESTDIR}${BINDIR}
clean:
rm -f ${BINARY}
release: clean ${RELEASE_FILES}
@if [ -z ${VERSION} ] ; then \
echo "-------------------------------------------"; \
echo "VERSION needs to be specified for a release"; \
echo "-------------------------------------------"; \
false; \
fi
cvs2cl
-cvs commit
mkdir ${RELEASE_DIR} && cp ${RELEASE_FILES} ${RELEASE_DIR} && tar -czvf ${RELEASE_DIR}-${VERSION}.tar.gz ${RELEASE_DIR}
rm -r ${RELEASE_DIR}
.PHONY: install uninstall clean release
postgresql-autodoc-1.41+20200921/README.org 0000664 0000000 0000000 00000011275 13732144217 0017651 0 ustar 00root root 0000000 0000000 * PostgreSQL Autodoc
This is a utility which will run through PostgreSQL system tables and
returns HTML, DOT, and several styles of XML which describe the
database.
As a result, documentation about a project can be generated quickly
and be automatically updatable, yet have a quite professional look if
you do some DSSSL/CSS work.
** Requirements
This program requires the following perl modules:
- DBI
- HTML::Template
- Term::ReadKey
- DBD::Pg
** Installation
*** Ubuntu
(Debian should be similar/identical)
**** from the universe repository
~$ sudo apt install postgresql-autodoc~
**** from github
~$ sudo apt install libdbi-perl libhtml-template-perl libterm-readkey-perl libdbd-pg-perl~
~$ git clone https://github.com/cbbrowne/autodoc.git~
~$ cd autodoc~
~$ sudo make install~
*** Docker
Install [Docker](https://www.docker.com/)
Create a Docker Image:
~$ docker build . -t autodoc~
Running Docker:
Create an env file by copying the example file and filling in details:
~$ cp env-example env~
Run a Docker container (with default command in Dockerfile):
~$ docker run --mount src=`pwd`,target=/app,type=bind --network=host --env-file ./env -v $pwd:/app autodoc~
Note: --network=host is for accessing a database on localhost
Run a custom container (see Usage below; if you want the files to appear in current directory, use the `--mount` arg above):
~$ docker run autodoc postgresql_autodoc [options]~
** Usage
~postgresql_autodoc [options]~
** Options
- ~−d~ :: - Specify database name to connect to (default: current user)
- ~−f~ :: Specify output file prefix (default: current user)
- ~−h~ :: Specify database server host (default: localhost)
- ~−p~ :: Specify database server port (default: 5432)
- ~−u~ :: Specify database username (default: current user)
- ~−−password=~ :: Specify database password (default: blank)
- ~−w~ :: Use ~/.pgpass for authentication (overrides all other password options)
- ~−l~ :: Path to the templates (default: @@TEMPLATE-DIR@@)
- ~−t~ ::