View on
Philip Crow > Bigtop > tentmaker


Annotate this POD


New  3
Open  1
View/Report Bugs


tentmaker - browser based bigtop file editor


    tentmaker [ --port=8192 ] [ file ]

Or, to name a new app with optional table layout:

    tentmaker --new AppName [table...|ascii_art]

Or, to augment an existing bigtop file:

    tentmaker --add file.bigtop table...|ascii_art

See "ASCII ART" below for what ascii art can be.


This script is a simple web server. Tell it what file you want to edit (or start from scratch) and an optional port (defaults to 8080). Point your browser to that port and edit away.


--port (or -p)

Specifies a port for the server. Defaults to 8080.

--new (or -n)

Allows you to specify the name of the app and optionally its table relationships. Requires a name for the app. Allows a list of tables to create or "ASCII Art".

--add (or -a)

Allows you to augment an existing bigtop file prior to editing it. Requires a bigtop file name. Allows a list of tables to create or "ASCII Art". Any relationships specified in ASCII art will be applied, even if they refer to existing tables.

--style (or -s)

Defaults to Original. Specifies which Bigtop::ScriptHelp::Style:: module will handle extra command line arguements and standard input. See your Style module's docs for details. For historical reasons, the Original style is described below. standard in


Both --new and --add allow you to specify a list of tables or ASCII art. The ASCII art option allows you to quickly note relationships between tables with simple operators.

Note well: Since the relationship operators use punctuation that your shell probably loves, you must surround the art with single quotes.

It is easiest to understand the options by seeing an example. So, suppose we have a four table data model describing a bit of our personnel process:

    +-----------+       +----------+
    |    job    |<------| position |
    +-----------+       +----------+
    +-----------+       +----------+
    | job_skill |------>|  skill   |
    +-----------+       +----------+

First, you'll be happy to know that bigtop's ASCII art is simpler to draw than the above.

What our data model shows is that each position refers to a job (description), each job could require many skills, and each skill could be associated with many jobs. The last two mean that job and skill share a many-to-many relationship.

Here's how to specify this data model in bigtop ASCII art:

    bigtop --new HR 'job<-position job<->skill'

This indicates a foreign key from position to job and an implied table, called job_skill, to hold the many-to-many relationship between job and skill.

There are four art operators:


Many-to-many. A new table will be made with foreign keys to each operand table. Each operand table will have a has_many relationship. Note that your Model backend may not understand these relationships. At the time of this writing only Model GantryDBIxClass did, by luck it happens to be the default.


The first table has a foreign key pointing to the second.


The second table has a foreign key pointing to the first. This is really a convenience synonymn for ->, but the tables are put into generated SQL in their overall order of appearance.


The two tables have a one-to-one relationship. Each of them will have a foreign key pointing to the other.


Phil Crow <>


Copyright (C) 2006 by Phil Crow

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: