[freeside-devel] Documentation

ivan at 420.am ivan at 420.am
Sun Oct 19 19:58:54 PDT 2003


On Mon, Oct 20, 2003 at 10:29:47AM +1000, Systems Administrator wrote:
> On Sat, 18 Oct 2003 ivan at 420.am wrote:
> > On Fri, Oct 17, 2003 at 10:46:27AM +1000, Systems Administrator wrote:
> > > 
> > > 	Has any work on this auto-generation been done?
> > 
> > Nope.
> 
> 	Ok, I'm intending to start on it, assuming my boss doesn't give me 
> something else to do.  
> 
> > > If not, what format were you planning to embed the documentation in?  
> > 
> > Hadn't given it a whole lot of though yet.  Perhaps a data structure in
> > each individual tablename.pm so we can autogenerate what freeside-setup
> > needs too.
> 
> 	Good idea.  The simplest way I can think of is:
> 
> # BEGIN tabledef
> #    'agent' => {	# Table Descriptions
> #      'columns' => [
> #        'agentnum', 'serial',            '',     '',		# The primary key of the table
> #        'agent',    'varchar',           '',     $char_d,	# The name of the agent
> #        'typenum',  'int',            '',     '',
> #        'freq',     'int',       'NULL', '',
> #        'prog',     @perl_type,
> #        'disabled',     'char', 'NULL', 1,
> #        'username', 'varchar',       'NULL',     $char_d,
> #        '_password','varchar',       'NULL',     $char_d,
> #      ],
> #      'primary_key' => 'agentnum',
> #      'unique' => [],
> #      'index' => [ ['typenum'] ],
> #    },
> # END tabledef
> 
> 	Hopefully it doesn't get word-wrapped on me.  The basic idea is 
> that we could suck this text from the file, s/^# //, and use it to 
> generate fs_setup.

Hmm, no, I don't think so.  There's nothing special about the giant data
structure in freeside-setup, and there's no reason to continue using it.
tablename.pm modules can declare their schema information somehow and
freeside-setup can read it, as would some sort of auto-generator for
httemplate/docs/schema.html.

(bin/fs-setup from 1.4 is replaced bin FS/bin/freeside-setup in 1.5.)

> 	Or did you have something entirely different in mind?  

Sounds like it...

-- 
_ivan



More information about the freeside-devel mailing list