a91557175dced065f9c8b4c79048aba4e2adc307
[crypto.git] / apps / silcmap / silcmap.conf
1 #
2 # Map drawing script file
3 #
4 # Command     : server { ... }
5 # Description : Specifies a server to connect, fetch statistics, draw the
6 #               server on map and to show its status on the map.  See the
7 #               example server command below for all parameters of this
8 #               command.
9 #
10 # Command     : loadmap { filename = <filename>; };
11 # Example     : loadmap { filename = "world_map.ppm"; };
12 # Description : Load the source bitmap image file to be used as the map
13 #
14 # Command     : writemap { filename = <filename>; };
15 # Example     : writemap { filename = "map.ppm"; };
16 # Description : Write the target bitmap image file
17 #
18 # Command     : writemaphtml { filename = <filename>; image = <filename>;
19 #                              cut_lat = <lat>; cut_lon = <lon>; };
20 # Example     : writemaphtml { filename = "htmlmap.map"; image = "map.jpg"; };
21 # Description : Write the gathered information as as HTML map page.  This
22 #               allows the user to click the specified points of URLs.
23 #               The html_url parameter in server will specify the 
24 #               URL that will be used in the HTML map.  If omitted the
25 #               filename created by writehml command is used.  The <cut_lat>
26 #               and <cut_lon> are specified if the <image> is a portion of
27 #               the original map image.  In this case the lat and lon specify
28 #               which portion it is.
29 #
30 # Command     : writehtml { filename = <filename>; class = <class>; };
31 # Example     : writehtml { filename = "index.html"; };
32 # Description : Write the gathered information as HTML pages.  Every server
33 #               command will have their own HTML file.  The filename is
34 #               based on the hostname of the server.  The index HTML file
35 #               will include list of the servers.  The generated HTML files
36 #               are quite raw and are intended to be embedded into user's
37 #               own website.  If <class> is defined the it is used as the
38 #               CSS class in the created HTML page.
39 #
40 # Command     : cut { lat = <lat>; lon = <lon>; width = <width>; 
41 #                     height = <height>; filename = <filename>; };
42 # Example     : cut { lat = "20"; lon = "5"; width = "1000"; height = "700";
43 #                     filename = "map_chunk.ppm"; };
44 # Description : Cuts a chunk from the source image at specified location.
45 #               The chunk will be <width> * <height> pixels in size.  The
46 #               <filename> is the output bitmap file where the chunk is saved.
47 #
48 # Command     : rectangle { lat = <lat>; lon = <lon>; color = <color>; 
49 #                           label = <label>; lposx = <x>; lposy = <y>; 
50 #                           lcolor = <label color>; };
51 # Example     : rectangle { lat = "-31 30"; lon = "0"; color = "0 0 255"; 
52 #                           label = "text"; lposx = "-10", lposy = "15"; };
53 # Description : Draws a rectangle at specified location.  The center of the
54 #               rectangle will be at specified location.  If the <label>
55 #               is specified, that text will appear with the rectangle at the
56 #               <lposx> and <lposy> pixel location in relation to the
57 #               rectangle.  If <lcolor> is omitted the <color> is used.
58 #
59 # Command     : circle { lat = <lat>; lon = <lon>; color = <color>;
60 #                        label = <label>; lposx = <x>; lposy = <y>; 
61 #                        lcolor = <label color>; };
62 # Example     : circle { lat = "31 30"; lon = "0"; color = "255 255 255"; };
63 # Description : Draws a circle at specified location.  The center of the
64 #               circle will be at specified location.  If the <label>
65 #               is specified, that text will appear with the circle at the
66 #               <lposx> and <lposy> pixel location in relation to the 
67 #               circle.  If <lcolor> is omitted the <color> is used.
68 #
69 # Command     : line { a_lat = <lat>; a_lon = <lon>; b_lat = <lat>;
70 #                      b_lon = <lon>; width = <width>; color = <color>; };
71 # Description : Draws a straight line between points a and b.  The <width>
72 #               is line width in pixels.  If omitted, default is 1.
73 #
74 # Command     : text { lat = <lat>; lon = <lon>; color = <color>;
75 #                      text = <text>; };
76 # Example     : text { lat = "63 42 13", lon = "23 17 34", color = "0 0 255";
77 #                      text = "This is an example text"; };
78 # Description : Prints the text <text> at the specified location
79 #
80 # The <lat> is in format DD MM SS, where DD is degrees, MM minutes, and
81 # SS seconds.  If DD is positive the latitude is north bound, if negative 
82 # it is south bound.  At least DD must be specified.
83 #
84 # The <lon> is in format DD MM SS, where DD is degrees, MM minutes, and
85 # SS seconds.  If DD is positive the longitude is east bound, if negative 
86 # it is west bound.  At least DD must be specified.
87 #
88 # The <color> is in format RRR GGG BBB, where RRR is red, GGG green and
89 # BBB blue, between 0 - 255.
90 #
91
92 loadmap   { filename = "map.ppm"; };
93 writemaphtml { filename = "map.html"; image = "map.jpg"; };
94
95 server {
96         # Server details
97         hostname        = "eample.server.com";
98         ip              = "10.2.1.1";
99         port            = "706";
100         public_key      = "example.server.com_706.pub";
101         country         = "Finland";
102         city            = "Kuopio";
103         admin           = "pekka";
104         description     = "";
105
106         # Connection parameters
107         connect         = false;
108         connect_timeout = "30";
109
110         # URL used in writemaphtml and writehtml, instead of hostname
111         #html_url = "";
112
113         # Statistics to fetch
114         starttime       = true;
115         uptime          = true;
116         clients         = true;
117         channels        = true;
118         server_ops      = true;
119         router_ops      = true;
120         cell_clients    = true;
121         cell_channels   = true;
122         cell_servers    = true;
123         all_clients     = true;
124         all_channels    = true;
125         all_servers     = true;
126         all_routers     = true;
127         all_server_ops  = true;
128         all_router_ops  = true;
129
130         # Fetch message of the day
131         motd            = true;
132
133         # Status colors when server is either up or down
134         up_color        = "150 200 190";
135         down_color      = "150 0 0";
136         up_text_color   = "60 200 200";
137         down_text_color = "150 0 0";
138
139         # Draw this server on the map
140         rectangle { lat = "36 00"; lon = "25 00";
141                     label = "example.server.com";
142                     lposx = "-30"; lposy = "10"; };
143 };
144
145 writemap  { filename = "testi2.ppm"; };