13 |
print <<EOF; |
print <<EOF; |
14 |
usage: emf [-h] [-z=ER.zot] |
usage: emf [-h] [-z=ER.zot] |
15 |
-h show this message |
-h show this message |
16 |
|
-g show hidden widgets |
17 |
-z=ER.zot use the specified zotfile |
-z=ER.zot use the specified zotfile |
18 |
if not specified, the environment variable \$ZOTFILE must be set. |
if not specified, the environment variable \$ZOTFILE must be set. |
19 |
EOF |
EOF |
23 |
sub ds_handler; |
sub ds_handler; |
24 |
sub entry_handler; |
sub entry_handler; |
25 |
sub block_handler; |
sub block_handler; |
26 |
our ($h, $z, %ds); |
our ($h, $g, $z, %ds); |
27 |
|
|
28 |
$z ||= $ENV{ZOTFILE}; |
$z ||= $ENV{ZOTFILE}; |
29 |
|
|
57 |
|
|
58 |
sub entry_handler |
sub entry_handler |
59 |
{ |
{ |
60 |
|
if ($g and defined $_->att('hidden')) |
61 |
|
{ |
62 |
|
$_->del_att('hidden'); |
63 |
|
my $name = $_->parent(qr/^block$/)->att('name') . '.' . $_->att('name'); |
64 |
|
my $new = $_->insert_new_elt('options'); |
65 |
|
$new->insert_new_elt('option', {'name' => 'tip', 'value'=>$name}); |
66 |
|
} |
67 |
|
|
68 |
if ($_->att('field')) { |
if ($_->att('field')) { |
69 |
my ($field, $table) = reverse split /\./, $_->att('field'); |
my ($field, $table) = reverse split /\./, $_->att('field'); |
70 |
|
|