The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

ftw_new_app - create a new File::Tabular::Web application

SYNOPSIS

  cp some/data.txt /path/to/http/htdocs/some/data.txt
  perl ftw_new_app.pl -m field1 -m field2 -e \
                      -f "|" /path/to/http/htdocs/some/data.txt

DESCRIPTION

This script creates a skeleton for a Web application around a tabular datafile. The concepts and basic setup instructions are described in File::Tabular::Web. After having created the skeleton, you can navigate to URL http://myServer/some/data.ftw.

CREATED FILES

The script will create the following files, in the same directory as the data file :

data.ftw

The application configuration file (also used as URL).

data_wrapper.tt

General wrapper template for the application, including the search form.

data_home.tt

Home page.

data_short.tt

Template for displaying result sets (short display of each record).

data_long.tt

Template for displaying detailed view of a single record.

data_modif.tt

HTML form for modifying a record.

data_msg.tt

Template for displaying a message (for example confirmation of an update operation).

All templates may be later be moved out of the htdocs tree, to a more appropriate location : you just have to specify the new location in the configuration file (dir variable in the [template] section).

OPTIONS

Options may be abbreviated to the first letter, i.e.

  -m field1 -f "|"

instead of

  -menu field1 -fieldSep "|"

-help

Help to using this script.

-menu field1 -menu field2 ...

For each specified field, will inspect all values currently in the data file, and creates an simple menu, like a spreadsheet "automatic filter". However, this is currently merely static, so if the data changes, menus will not be updated accordingly --- it will improve in a future release.

-fieldSep

Specifies which character is the field separator in the data file. Default is |.

-override

Forces creation of the files, overriding previous files of the same names.

-editor username1 -editor username2

Writes into the configuration file that the data is editable by the specified usernames. Usernames must correspond to names returned by your Apache authentication layer. If no username is given, the default value is *, which means "editable by all".