#!/usr/bin/perl -s -w use warnings; use strict; use Data::Dumper; use lib "$ENV{HOME}/public_perl/"; use Zot; # zot2kexi [-h] [-t table,table,...] file our ($f, $l, $h, $c, $t); my $compact = $c ? 1 : 0; my $full = $f ? 1 : 0; my $labels = $l ? 1 : 0; my $history = $h ? 1 : 0; my %target_tables; if ($t) { $target_tables{$_}++ foreach (split /,/, $t); } my $zot = Zot->new(shift); $zot->parse; $zot->add_history if $history; $zot->find_roots; print '\n'; print "\n"; print "\n"; foreach my $table ($zot->tables) { foreach my $rel ($table->rels) { print " \n"; printf (" %s\n", $table->name); print " $rel\n"; printf (" %s\n", $zot->table($table->rel($rel))->root); print " id\n"; print " \n"; } } print "\n";