Configuration file

0 views
Skip to first unread message

Loren M. Lang

unread,
Oct 29, 2010, 3:17:59 AM10/29/10
to Life Logger
Did you say that your working on a configuration file editor? Here's
what the current configuration looks like in Perl code. Most of the
configuration is in the sources themselves. Only a single KML output
file is supported, but multiple sources of any kind. I use the id
attribute on a Folder or Placemark to locate it in the file and
configure it as part of the source. One concern I have is whether or
not to store OAuth token secrets in the config file or elsewhere a
little more protected. Also, I'm considering moving this to an XML
file, but with the same basic structure. What do you think?

$settings = {
cwd => "/home/user/public_html/photocatalog",
backend => "file",
website => "http://www.example.org/",
sources => [
{
id => 1,
name => "Loren's InstaMapper",
type => "InstaMapper",
deviceKey => 123394,
apiKey => 65234,
kml => {
current => 'loren_pos',
path => 'loren_path',
location => 'loren_loc'
}
},
{
id => 2,
name => "Loren's GPX Data",
type => "GPX",
kml => {
current => 'loren_pos',
path => 'loren_path',
location => 'loren_loc'
}
},
{
id => 3,
name => "Ronald's InstaMapper Data",
type => "InstaMapper",
deviceKey => 827394,
apiKey => 45231,
kml => {
current => 'ronald_pos',
path => 'ronald_path',
location => 'ronald_loc'
}
},
{
id => 4,
name => "Some RSS Feed"
type => "RSS",
file => "http://twitter.com/1.rss",
kml => {
folder => 'twitter'
}
},
{
id => 5,
name => "Some FourSquare Feed"
type => "FourSquare",
token_key => 23453435,
token_secret => 1988373,
kml => {
folder => 'foursquare'
}
}
]
};

--
Loren M. Lang
lor...@north-winds.org
http://www.north-winds.org/


Public Key: ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc
Fingerprint: 10A0 7AE2 DAF5 4780 888A 3FA4 DCEE BB39 7654 DE5B

Reply all
Reply to author
Forward
0 new messages