phpweather-checkins Mailing List for PHP Weather (Page 2)
Brought to you by:
iridium
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(1) |
Feb
(1) |
Mar
(184) |
Apr
(31) |
May
(45) |
Jun
(15) |
Jul
(11) |
Aug
(40) |
Sep
(19) |
Oct
(8) |
Nov
(6) |
Dec
(17) |
2003 |
Jan
(5) |
Feb
|
Mar
(12) |
Apr
(5) |
May
(2) |
Jun
(3) |
Jul
(3) |
Aug
(3) |
Sep
(17) |
Oct
(10) |
Nov
|
Dec
(4) |
2004 |
Jan
(21) |
Feb
(11) |
Mar
|
Apr
|
May
(3) |
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Etienne T. <eti...@us...> - 2004-02-03 17:16:27
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11886 Modified Files: ChangeLog Log Message: Entries from the 2.1.2 release Index: ChangeLog =================================================================== RCS file: /cvsroot/phpweather/phpweather/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- ChangeLog 1 Jan 2004 23:46:35 -0000 1.14 +++ ChangeLog 3 Feb 2004 16:37:04 -0000 1.15 @@ -1,3 +1,79 @@ +2004-02-03 16:33 etienne_t + + * VERSION: + + This is PHP Weather version 2.2.1 + +2004-02-03 16:22 etienne_t + + * .cvsignore: + + added test2.php to .cvsignore + +2004-02-01 17:29 Martin Geisler <gim...@gi...> + + * AUTHORS: + + More auto-generated documentation which shouldn't be in CVS either. + +2004-02-01 17:28 Martin Geisler <gim...@gi...> + + * doc/: phpweather.dvi, phpweather.html, phpweather.info, + phpweather.info-1, phpweather.info-2, phpweather.pdf, + phpweather.ps, phpweather.txt: + + I don't think the auto-generated documentation should be in CVS. + +2004-01-30 20:46 etienne_t + + * data_retrieval.php, phpweather.php, test2.php, + db/pw_db_mysql.php, db/pw_db_null.php, output/pw_text.php: + + Fixed the timestamp for METAR retreival and archiving in mysql and + null backends. The timestamp is kept as a unix timestamp (UTC) in + the objects. The mysql backend has been modified to keep a UTC + format in the table. + +2004-01-03 19:05 Martin Geisler <gim...@gi...> + + * data_retrieval.php, phpweather.php: + + This restores the null and mysql database backends to working + order... let's hope they stay that way. + +2004-01-03 18:38 Martin Geisler <gim...@gi...> + + * db/pw_db_mysql.php: + + Hmm... that was broke! + +2004-01-03 18:38 Martin Geisler <gim...@gi...> + + * index.php: + + I really think we should give this all it can take, so that we + catch undefined variables... remember, the index.php page is only + for demonstration purposes. + +2004-01-03 10:51 Martin Geisler <gim...@gi...> + + * data_retrieval.php: + + Reindention --- I read through the code and expanded a comment to + better document the behavious or gmmktime. + +2004-01-02 02:50 Martin Geisler <gim...@gi...> + + * output/pw_text_fi.php: + + Updates from Kari Salovaara. + +2004-01-01 23:46 Martin Geisler <gim...@gi...> + + * ChangeLog: + + Entries from the 2.1.2 release. + 2004-01-01 23:45 Martin Geisler <gim...@gi...> * VERSION: @@ -36,9 +112,7 @@ 2004-01-01 23:28 Martin Geisler <gim...@gi...> - * doc/: generate-doc.sh, phpweather.dvi, phpweather.html, - phpweather.info, phpweather.info-1, phpweather.info-2, - phpweather.pdf, phpweather.ps, phpweather.txt: + * doc/generate-doc.sh: I've replaced the autogenerated files with a scipt that can generate them --- this script is also used for new releases. @@ -53,12 +127,6 @@ logins, bypassing the delay for the anonymous CVS service at SourceForge. -2004-01-01 23:18 Martin Geisler <gim...@gi...> - - * AUTHORS: - - This file has been moved to the Texinfo documentation. - 2004-01-01 22:50 Martin Geisler <gim...@gi...> * doc/src/phpweather.texi: @@ -86,16 +154,6 @@ Regenerated from the updated stations.csv file. -2003-12-30 16:19 Martin Geisler <gim...@gi...> - - * AUTHORS: - - Added Warren Rohner. I've also removed the email addresses (it - occured to me that some people might want to keep it a secret, at - least from the SPAM robots) and put in SourceForge login names - instead where I could find them --- please object if this is a bad - idea, and also mail me your login name if you want it listed. - 2003-12-30 16:06 Martin Geisler <gim...@gi...> * stations.csv: |
From: Martin G. <gim...@us...> - 2004-02-01 17:31:15
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20389 Removed Files: AUTHORS Log Message: More auto-generated documentation which shouldn't be in CVS either. --- AUTHORS DELETED --- |
From: Martin G. <gim...@us...> - 2004-02-01 17:30:29
|
Update of /cvsroot/phpweather/phpweather/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19512 Removed Files: phpweather.dvi phpweather.html phpweather.info phpweather.info-1 phpweather.info-2 phpweather.pdf phpweather.ps phpweather.txt Log Message: I don't think the auto-generated documentation should be in CVS. --- phpweather.dvi DELETED --- --- phpweather.html DELETED --- --- phpweather.info DELETED --- --- phpweather.info-1 DELETED --- --- phpweather.info-2 DELETED --- --- BINARY FILE --- --- BINARY FILE --- --- phpweather.txt DELETED --- |
From: Etienne T. <eti...@us...> - 2004-01-30 20:48:12
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30964 Modified Files: data_retrieval.php phpweather.php test2.php Log Message: Fixed the timestamp for METAR retreival and archiving in mysql and null backends. The timestamp is kept as a unix timestamp (UTC) in the objects. The mysql backend has been modified to keep a UTC format in the table. Index: data_retrieval.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/data_retrieval.php,v retrieving revision 1.38 retrieving revision 1.39 diff -u -3 -r1.38 -r1.39 --- data_retrieval.php 3 Jan 2004 19:05:15 -0000 1.38 +++ data_retrieval.php 30 Jan 2004 20:46:36 -0000 1.39 @@ -24,7 +24,7 @@ * @see set_metar() */ var $metar; - //var $metar_time; + var $metar_time; var $metar_arch; /** @@ -67,7 +67,7 @@ $this->set_icao($this->properties['icao']); $this->metar = false; - //$this->metar_time = false; + $this->metar_time = false; $this->metar_arch = false; $this->time_from = false; $this->time_to = false; @@ -104,7 +104,7 @@ $this->properties['icao'] = strtoupper($new_icao); $this->icao_data = false; $this->metar = false; - //$this->metar_time = false; + $this->metar_time = false; $this->decoded_metar = false; $this->metar_arch = false; $this->taf = false; @@ -284,14 +284,14 @@ $this->debug('get_metar_from_db(): Found the METAR in the database'); list($metar, $timestamp, $time) = end($data); reset($data); - + /* We set the METAR right away, and then count on * get_metar_from_web() to set it to something else, if * necessary. */ $tmp_metar = $metar; $this->metar = $metar; - //$this->metar_time = $time; + $this->metar_time = $time; if ($this->properties['always_use_db'] || $timestamp > time() - $this->properties['cache_timeout']) { @@ -368,6 +368,7 @@ if (!empty($metar_data)) { /* The first line in the file is the date */ $date = trim(array_shift($metar_data)); + /* The remaining lines are the METAR itself. This will merge the * remaining lines into one line by removing new-lines: */ @@ -385,6 +386,7 @@ } $timestamp = gmmktime($date[3], $date[4], 0, $date[1], $date[2], $date[0]); + $metar_time = $timestamp; if (!ereg('[0-9]{6}Z', $metar)) { /* Some reports don't even have a time-part, so we insert the @@ -417,22 +419,19 @@ $timestamp = time() - $this->properties['cache_timeout'] + 600; } - /* side effect */ - //$metar_time = $date[0].$date[1].$date[2].$date[3].$date[4]."00"; - /* We then cache the METAR in our database */ if ($new_station) { $this->debug('get_metar_from_web(): Inserting new METAR for <code>' . $this->get_location() . '</code>'); - $this->db->insert_metar($icao, $metar, $timestamp); + $this->db->insert_metar($icao, $metar, $timestamp, $metar_time); } else { $this->debug('get_metar_from_web(): Updating METAR for <code>' . $this->get_location() . '</code>'); - $this->db->update_metar($icao, $metar, $timestamp); + $this->db->update_metar($icao, $metar, $timestamp, $metar_time); } /* We update and return the METAR */ $this->metar = $metar; - //$this->metar_time = $metar_time; + $this->metar_time = $metar_time; return $metar; } Index: phpweather.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v retrieving revision 1.38 retrieving revision 1.39 diff -u -3 -r1.38 -r1.39 --- phpweather.php 3 Jan 2004 19:05:15 -0000 1.38 +++ phpweather.php 30 Jan 2004 20:46:36 -0000 1.39 @@ -178,7 +178,7 @@ /* Setup other variables */ if ($index===false) { /* We are getting the current METAR */ $decoded_metar['metar'] = $tmp_metar; - //$decoded_metar['time'] = $this->metar_time; + $decoded_metar['time'] = $this->metar_time; } else { if ($this->metar_arch===false) { /* error */ @@ -220,33 +220,33 @@ * Station Identifier */ $decoded_metar['icao'] = $part; - } elseif (ereg('([0-9]{2})([0-9]{2})([0-9]{2})Z', $part, $regs)) { - /* - * Date and Time of Report. - * - * We return a standard Unix UTC/GMT timestamp suitable for - * gmdate(). - * - * If you experience incorrect timestamps but cannot set the - * clock, then you can set $this->properties['offset'] to be - * the offset in hours to add. For example, if your times - * generated are 1 hour too early (so METARs appear an hour - * older than they are), set $this->properties['offset'] to be - * +1 in your defaults.php file. - */ - - if ($regs[1] > gmdate('j')) { - /* The day is greather that the current day of month => the - * report is from last month. - */ - $month = gmdate('n') - 1; - } else { - $month = gmdate('n'); - } - - $decoded_metar['time'] = - gmmktime($regs[2] + $this->properties['offset'], - $regs[3], 0, $month, $regs[1], gmdate('Y')); +// } elseif (ereg('([0-9]{2})([0-9]{2})([0-9]{2})Z', $part, $regs)) { +// /* +// * Date and Time of Report. +// * +// * We return a standard Unix UTC/GMT timestamp suitable for +// * gmdate(). +// * +// * If you experience incorrect timestamps but cannot set the +// * clock, then you can set $this->properties['offset'] to be +// * the offset in hours to add. For example, if your times +// * generated are 1 hour too early (so METARs appear an hour +// * older than they are), set $this->properties['offset'] to be +// * +1 in your defaults.php file. +// */ + +// if ($regs[1] > gmdate('j')) { +// /* The day is greather that the current day of month => the +// * report is from last month. +// */ +// $month = gmdate('n') - 1; +// } else { +// $month = gmdate('n'); +// } + +// $decoded_metar['time'] = +// gmmktime($regs[2] + $this->properties['offset'], +// $regs[3], 0, $month, $regs[1], gmdate('Y')); } elseif (ereg('(AUTO|COR|RTD|CC[A-Z]|RR[A-Z])', $part, $regs)) { @@ -708,13 +708,13 @@ number_format($decoded_metar['humidex']['humidex_c'] * 9/5 + 32, 1); } - + /* Finally we store our decoded METAR in $this->decoded_metar so * that other methods can use it. */ if ($index===false) $this->decoded_metar = $decoded_metar; else $this->decoded_metar_arch[$index] = $decoded_metar; - + return $decoded_metar; } Index: test2.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/test2.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- test2.php 20 Sep 2003 22:18:47 -0000 1.3 +++ test2.php 30 Jan 2004 20:46:36 -0000 1.4 @@ -32,7 +32,16 @@ require(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); $icons = new pw_images($weather); - $weather->decode_taf(); + + echo "METAR for $icao : ".$weather->get_metar()."<br>\n"; +// echo "<br>Decoded METAR:<pre>"; +// $weather->decode_metar(); +// print_r( $weather->decoded_metar ); +// echo "</pre><br>\n"; + +// echo "time:".$weather->decoded_metar["time"]."<br>"; +// echo "time:".tms_unix2date($weather->decoded_metar["time"])."<br>"; + echo "TAF for $icao : ".$weather->get_taf()."<br>\n"; echo "<br>Print TAF:<br><br>"; @@ -41,12 +50,10 @@ else $text->print_taf($time_from,$time_to); echo "<br>\n"; - /* - echo "METAR for $icao : ".$weather->get_metar()."<br>\n"; - echo "<br>Decoded METAR:<pre>"; - print_r( $weather->decode_metar() ); - echo "</pre><br>\n"; - */ + echo "taf: <pre>";print_r($weather->taf);echo "</pre><br>"; + $weather->decode_taf(); + echo "decoded_taf: <pre>";print_r($weather->decoded_taf);echo "</pre><br>"; + } |
From: Etienne T. <eti...@us...> - 2004-01-30 20:48:12
|
Update of /cvsroot/phpweather/phpweather/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30964/db Modified Files: pw_db_mysql.php pw_db_null.php Log Message: Fixed the timestamp for METAR retreival and archiving in mysql and null backends. The timestamp is kept as a unix timestamp (UTC) in the objects. The mysql backend has been modified to keep a UTC format in the table. Index: pw_db_mysql.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_mysql.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- pw_db_mysql.php 3 Jan 2004 18:38:43 -0000 1.11 +++ pw_db_mysql.php 30 Jan 2004 20:46:36 -0000 1.12 @@ -185,9 +185,9 @@ */ function insert_metar($icao, $metar, $timestamp, $time) { $this->query(sprintf('INSERT INTO %s SET icao = "%s", time = "%s", ' . - 'metar = "%s", timestamp = FROM_UNIXTIME(%d)', - $this->properties['db_metars'], $icao, $time, - addslashes($metar), intval($timestamp))); + 'metar = "%s", timestamp = "%s"', + $this->properties['db_metars'], $icao, tms_unix2date($time), + addslashes($metar), tms_unix2date($timestamp))); $this->insert_metar_arch($icao, $metar, $time); } @@ -202,10 +202,10 @@ */ function update_metar($icao, $metar, $timestamp, $time) { $this->query(sprintf('UPDATE %s' . - ' SET metar = "%s", timestamp = FROM_UNIXTIME(%d)' . + ' SET metar = "%s", time = "%s", timestamp = "%s"' . ' WHERE icao = "%s"', $this->properties['db_metars'], addslashes($metar), - intval($timestamp), $icao)); + tms_unix2date($time), tms_unix2date($timestamp), $icao)); $this->insert_metar_arch($icao, $metar, $time); } @@ -226,12 +226,12 @@ $this->query(sprintf('DELETE FROM %s WHERE icao = "%s" AND ' . 'time = "%s"' , $this->properties['db_metars_arch'], - $icao,$time)); + $icao, tms_unix2date($time))); $this->query(sprintf('INSERT IGNORE INTO %s SET icao = "%s", ' . 'time = "%s", ' . 'metar = "%s"', $this->properties['db_metars_arch'], $icao, - $time, + tms_unix2date($time), addslashes($metar))); } } @@ -252,21 +252,23 @@ if($time_from===false || $this->properties['archive_metars']===false) { /* fetch the current metar */ - $query = sprintf('SELECT metar, UNIX_TIMESTAMP(timestamp) AS timestamp, time' . + $query = sprintf('SELECT metar, timestamp,' . + ' time' . ' FROM %s WHERE icao = "%s" LIMIT 1', $this->properties['db_metars'], $icao); } else if ($time_to!==false) { /* fetch archived metars between $time_from and $time_to */ - $query = sprintf('SELECT metar, UNIX_TIMESTAMP(time) AS timestamp, time' . + $query = sprintf('SELECT metar, time AS timestamp,' . + ' time' . ' FROM %s WHERE icao = "%s" AND time>="%s" AND time<"%s" ORDER BY time ASC', - $this->properties['db_metars_arch'], $icao, $time_from, $time_to); + $this->properties['db_metars_arch'], $icao, tms_unix2date($time_from), tms_unix2date($time_to)); } else { /* fetch archived metars from $time_from */ - $query = sprintf('SELECT metar, UNIX_TIMESTAMP(time) AS timestamp, time' . + $query = sprintf('SELECT metar, time AS timestamp, time' . ' FROM %s WHERE icao = "%s" AND time>="%s" ORDER BY time ASC', - $this->properties['db_metars_arch'], $icao,$time_from); + $this->properties['db_metars_arch'], $icao,tms_unix2date($time_from)); } $this->query($query); @@ -275,6 +277,8 @@ else { $metar_array = array(); while($row = $this->fetch_row()) { + $row[1] = tms_date2unix($row[1]); + $row[2] = tms_date2unix($row[2]); $metar_array[] = $row; } } Index: pw_db_null.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_null.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- pw_db_null.php 8 Sep 2003 04:20:44 -0000 1.5 +++ pw_db_null.php 30 Jan 2004 20:46:36 -0000 1.6 @@ -68,7 +68,19 @@ * @access public * @see update_metar() */ - function insert_metar($station, $metar, $timestamp) { + function insert_metar($station, $metar, $timestamp, $time) { + ; + } + + /** + * Pretends to insert an archive METAR into the database. + * + * @param string The ICAO of the station. + * @param string The raw METAR. + * @param integer The time of the report. + * @access public + */ + function insert_metar_arch($icao, $metar, $time) { ; } @@ -81,7 +93,7 @@ * @access public * @see insert_metar() */ - function update_metar($station, $metar, $timestamp) { + function update_metar($station, $metar, $timestamp, $time) { ; } |
From: Etienne T. <eti...@us...> - 2004-01-30 20:48:12
|
Update of /cvsroot/phpweather/phpweather/output In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30964/output Modified Files: pw_text.php Log Message: Fixed the timestamp for METAR retreival and archiving in mysql and null backends. The timestamp is kept as a unix timestamp (UTC) in the objects. The mysql backend has been modified to keep a UTC format in the table. Index: pw_text.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text.php,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- pw_text.php 20 Sep 2003 22:18:47 -0000 1.22 +++ pw_text.php 30 Jan 2004 20:46:36 -0000 1.23 @@ -639,7 +639,7 @@ if ($minutes_old > 60) { $hours = round((time() - $time)/3600); $minutes = $minutes_old % 60; - if ($minutes < 1) { + if ($minutes < 1) { $minutes = ''; } else { $minutes = sprintf($this->strings['time_minutes'], @@ -1190,7 +1190,8 @@ echo "<b>icao</b>: ".$taf['icao']."<br>\n"; echo "<b>time_emit</b>: ".$taf['time_emit']."<br>\n"; - echo "<b>time_use</b>: ".$taf['time_use']."<br>\n"; + echo "<b>time_use_from</b>: ".$taf['time_use_from']."<br>\n"; + echo "<b>time_use_to</b>: ".$taf['time_use_to']."<br>\n"; echo "<b>location</b>: ".$taf['location']."<br>\n"; echo "<b>periods</b>:<br><br>"; @@ -1215,9 +1216,16 @@ echo "<td>".substr($period['time_to'],6,6)."</td>\n"; echo "<td>"; if(isset($period['desc']['wind'])) { - if($period['desc']['wind']['deg']=='VRB') echo "VRB"; - else echo round($period['desc']['wind']['deg'],1); - echo " @ ".round($period['desc']['wind']['knots'],1)." kt"; + if (isset($period['desc']['wind']['gust_knots'])) { + echo round($period['desc']['wind']['deg'],1); + echo " @ ".round($period['desc']['wind']['knots'],1)."G".round($period['desc']['wind']['gust_knots'],1)." kt"; + + } + else { + if($period['desc']['wind']['deg']=='VRB') echo "VRB"; + else echo round($period['desc']['wind']['deg'],1); + echo " @ ".round($period['desc']['wind']['knots'],1)." kt"; + } } echo "</td>\n"; echo "<td>"; |
From: Martin G. <gim...@us...> - 2004-01-03 19:05:18
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv27919 Modified Files: data_retrieval.php phpweather.php Log Message: This restores the null and mysql database backends to working order... let's hope they stay that way. Index: data_retrieval.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/data_retrieval.php,v retrieving revision 1.37 retrieving revision 1.38 diff -u -3 -r1.37 -r1.38 --- data_retrieval.php 3 Jan 2004 10:51:49 -0000 1.37 +++ data_retrieval.php 3 Jan 2004 19:05:15 -0000 1.38 @@ -24,7 +24,7 @@ * @see set_metar() */ var $metar; - var $metar_time; + //var $metar_time; var $metar_arch; /** @@ -67,9 +67,8 @@ $this->set_icao($this->properties['icao']); $this->metar = false; - $this->metar_time = false; + //$this->metar_time = false; $this->metar_arch = false; - $this->fd = false; $this->time_from = false; $this->time_to = false; @@ -105,7 +104,7 @@ $this->properties['icao'] = strtoupper($new_icao); $this->icao_data = false; $this->metar = false; - $this->metar_time = false; + //$this->metar_time = false; $this->decoded_metar = false; $this->metar_arch = false; $this->taf = false; @@ -292,7 +291,7 @@ */ $tmp_metar = $metar; $this->metar = $metar; - $this->metar_time = $time; + //$this->metar_time = $time; if ($this->properties['always_use_db'] || $timestamp > time() - $this->properties['cache_timeout']) { @@ -419,21 +418,21 @@ } /* side effect */ - $metar_time = $date[0].$date[1].$date[2].$date[3].$date[4]."00"; + //$metar_time = $date[0].$date[1].$date[2].$date[3].$date[4]."00"; /* We then cache the METAR in our database */ if ($new_station) { $this->debug('get_metar_from_web(): Inserting new METAR for <code>' . $this->get_location() . '</code>'); - $this->db->insert_metar($icao, $metar, $timestamp, $metar_time); + $this->db->insert_metar($icao, $metar, $timestamp); } else { $this->debug('get_metar_from_web(): Updating METAR for <code>' . $this->get_location() . '</code>'); - $this->db->update_metar($icao, $metar, $timestamp, $metar_time); + $this->db->update_metar($icao, $metar, $timestamp); } /* We update and return the METAR */ $this->metar = $metar; - $this->metar_time = $metar_time; + //$this->metar_time = $metar_time; return $metar; } Index: phpweather.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v retrieving revision 1.37 retrieving revision 1.38 diff -u -3 -r1.37 -r1.38 --- phpweather.php 2 Oct 2003 22:54:46 -0000 1.37 +++ phpweather.php 3 Jan 2004 19:05:15 -0000 1.38 @@ -178,12 +178,12 @@ /* Setup other variables */ if ($index===false) { /* We are getting the current METAR */ $decoded_metar['metar'] = $tmp_metar; - $decoded_metar['time'] = $this->metar_time; + //$decoded_metar['time'] = $this->metar_time; } else { if ($this->metar_arch===false) { /* error */ return false; - } + } $tmp_metar = $this->metar_arch[$index]['metar']; $decoded_metar['metar'] = $tmp_metar; $decoded_metar['time'] = $this->metar_arch[$index]['time']; @@ -226,34 +226,30 @@ * * We return a standard Unix UTC/GMT timestamp suitable for * gmdate(). - * Due to a bug in PHP, on some systems the time reported may - * be incorrect. If you experience this, you can set - * $this->properties['offset'] to be the offset to add. For - * example, if your times generated are 1 hour too early (so - * metars appear an hour older than they are), set - * $this->properties['offset'] to be +1 in your defaults.php - * file. + * + * If you experience incorrect timestamps but cannot set the + * clock, then you can set $this->properties['offset'] to be + * the offset in hours to add. For example, if your times + * generated are 1 hour too early (so METARs appear an hour + * older than they are), set $this->properties['offset'] to be + * +1 in your defaults.php file. */ - /* We get the report time from elsewhere */ -// $decoded_metar['time'] = $this->metar_time; + if ($regs[1] > gmdate('j')) { + /* The day is greather that the current day of month => the + * report is from last month. + */ + $month = gmdate('n') - 1; + } else { + $month = gmdate('n'); + } -// if ($regs[1] > gmdate('j')) { -// /* The day is greather that the current day of month => the -// * report is from last month. -// */ -// $month = gmdate('n') - 1; -// } else { -// $month = gmdate('n'); -// } -// /* is this really useful? let's put this in a readable timestamp... */ -// $decoded_metar['time'] = -// gmmktime($regs[2] + $this->properties['offset'], -// $regs[3], 0, $month, $regs[1], gmdate('Y')); + $decoded_metar['time'] = + gmmktime($regs[2] + $this->properties['offset'], + $regs[3], 0, $month, $regs[1], gmdate('Y')); } elseif (ereg('(AUTO|COR|RTD|CC[A-Z]|RR[A-Z])', $part, $regs)) { - /* * Report Modifier: AUTO, COR, CCx or RRx */ |
From: Martin G. <gim...@us...> - 2004-01-03 18:38:48
|
Update of /cvsroot/phpweather/phpweather/db In directory sc8-pr-cvs1:/tmp/cvs-serv24485/db Modified Files: pw_db_mysql.php Log Message: Hmm... that was broke! Index: pw_db_mysql.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/pw_db_mysql.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- pw_db_mysql.php 2 Oct 2003 22:54:46 -0000 1.10 +++ pw_db_mysql.php 3 Jan 2004 18:38:43 -0000 1.11 @@ -379,7 +379,7 @@ time timestamp(14), metar varchar(255) NOT NULL, timestamp timestamp(14), - PRIMARY KEY (icao)'); + PRIMARY KEY (icao))'); /* Then we make a table for the TAFs */ $this->query('DROP TABLE IF EXISTS ' . $this->properties['db_tafs']); @@ -388,7 +388,7 @@ time timestamp(14), taf varchar(255) NOT NULL, timestamp timestamp(14), - PRIMARY KEY (icao)'); + PRIMARY KEY (icao))'); /* We make the archival databases */ $this->query('DROP TABLE IF EXISTS ' . $this->properties['db_metars_arch']); @@ -396,13 +396,13 @@ icao char(4) NOT NULL, time timestamp(14) NOT NULL, metar varchar(255) NOT NULL, - PRIMARY KEY (icao,time)'); + PRIMARY KEY (icao,time))'); $this->query('DROP TABLE IF EXISTS ' . $this->properties['db_tafs_arch']); $this->query('CREATE TABLE ' . $this->properties['db_tafs_arch'] . '( icao char(4) NOT NULL, time timestamp(14) NOT NULL, taf varchar(255) NOT NULL, - PRIMARY KEY (icao,time)'); + PRIMARY KEY (icao,time))'); /* Then we make a table for the stations. */ $this->query('DROP TABLE IF EXISTS ' . $this->properties['db_stations']); |
From: Martin G. <gim...@us...> - 2004-01-03 18:38:10
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv24338 Modified Files: index.php Log Message: I really think we should give this all it can take, so that we catch undefined variables... remember, the index.php page is only for demonstration purposes. Index: index.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/index.php,v retrieving revision 1.41 retrieving revision 1.42 diff -u -3 -r1.41 -r1.42 --- index.php 7 Oct 2003 22:31:54 -0000 1.41 +++ index.php 3 Jan 2004 18:38:07 -0000 1.42 @@ -1,5 +1,5 @@ <?php -error_reporting(E_ERROR); +error_reporting(E_ALL); /* We store the time */ $start_time = explode(' ', microtime()); |
From: Martin G. <gim...@us...> - 2004-01-03 10:51:52
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv15950 Modified Files: data_retrieval.php Log Message: Reindention --- I read through the code and expanded a comment to better document the behavious or gmmktime. Index: data_retrieval.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/data_retrieval.php,v retrieving revision 1.36 retrieving revision 1.37 diff -u -3 -r1.36 -r1.37 --- data_retrieval.php 30 Dec 2003 16:01:40 -0000 1.36 +++ data_retrieval.php 3 Jan 2004 10:51:49 -0000 1.37 @@ -280,7 +280,6 @@ } $tmp_metar = false; - $tmp_metar_time = false; if ($data = $this->db->get_metar($this->get_icao())) { /* found station */ $this->debug('get_metar_from_db(): Found the METAR in the database'); @@ -298,7 +297,7 @@ if ($this->properties['always_use_db'] || $timestamp > time() - $this->properties['cache_timeout']) { /* We have asked explicit for a cached METAR, or the METAR is - * still fresh.Either way - we return the METAR we found in + * still fresh. Either way - we return the METAR we found in * the database. */ $this->debug('get_metar_from_db(): Using previously cached METAR for <code>' . @@ -324,11 +323,13 @@ /* Now we can get the archive METARs. */ $this->metar_arch = false; - if ($this->time_from!==false) { - if ($data = $this->db->get_metar($this->get_icao(),$this->time_from,$this->time_to)) { - for($i=0;$i<count($data);$i++) { - $this->metar_arch[$i] = array('metar'=>$data[$i][0], - 'time'=>$data[$i][2]); + if ($this->time_from !== false) { + if ($data = $this->db->get_metar($this->get_icao(), + $this->time_from, + $this->time_to)) { + for($i = 0; $i < count($data); $i++) { + $this->metar_arch[$i] = array('metar' => $data[$i][0], + 'time' => $data[$i][2]); } } } @@ -376,7 +377,10 @@ $date = explode(':', strtr($date, '/ ', '::')); if ($date[2] > gmdate('j')) { /* The day is greater that the current day of month. This - * implies, that the report is from last month. + * implies, that the report is from last month. Luckily the + * gmmktime function can deal with the month being zero, it + * will then interpret it as December the previous year which + * is exactly what we want. */ $date[1]--; } |
From: Martin G. <gim...@us...> - 2004-01-02 02:50:51
|
Update of /cvsroot/phpweather/phpweather/output In directory sc8-pr-cvs1:/tmp/cvs-serv6980 Modified Files: pw_text_fi.php Log Message: Updates from Kari Salovaara. Index: pw_text_fi.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/output/pw_text_fi.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- pw_text_fi.php 10 Sep 2002 10:06:23 -0000 1.2 +++ pw_text_fi.php 2 Jan 2004 02:50:45 -0000 1.3 @@ -19,7 +19,7 @@ */ function pw_text_fi($weather, $input = array()) { $this->strings['charset'] = 'ISO-8859-1'; - $this->strings['no_data'] = 'Sorry! Ei tietoja saatavilla %s%s%s sääasemalle.'; + $this->strings['no_data'] = 'Valitan! Ei tietoja saatavilla %s%s%s sääasemalle.'; $this->strings['list_sentences_and'] = ' ja '; $this->strings['list_sentences_comma'] = ', '; $this->strings['list_sentences_final_and'] = ', ja '; @@ -29,7 +29,7 @@ $this->strings['time_minutes'] = 'ja %s%s%s minuuttia'; $this->strings['time_one_hour'] = '%s1%s tunti %s'; $this->strings['time_several_hours'] = '%s%s%s tuntia %s'; - $this->strings['time_a_moment'] = 'a moment'; + $this->strings['time_a_moment'] = 'hetki'; $this->strings['meters_per_second'] = ' metriä/sekunnissa'; $this->strings['miles_per_hour'] = ' mailia/tunnissa'; $this->strings['meter'] = ' metriä'; @@ -43,9 +43,9 @@ $this->strings['wind_blowing'] = 'Tuulen voimakkuus '; $this->strings['wind_with_gusts'] = ' puskittain aina '; $this->strings['wind_from'] = ' alkaen '; - $this->strings['wind_variable'] = ' muuttuen %svariable%s suuntien välillä.'; + $this->strings['wind_variable'] = ' muuttuen %ssuuntien%s välillä.'; $this->strings['wind_varying'] = ', vaihdellen %s%s%s (%s%s°%s) ja %s%s%s (%s%s°%s) välillä'; - $this->strings['wind_calm'] = 'Tuuli oli %scalm%s'; + $this->strings['wind_calm'] = 'Tuuli oli %styyni%s'; $this->strings['wind_dir'] = array( 'pohjoinen', 'pohjoinen/koillinen', @@ -103,7 +103,7 @@ $this->strings['cloud_group_end'] = '.'; $this->strings['cloud_clear'] = 'Taivas oli %sselkeä%s.'; $this->strings['cloud_height'] = ' pilvikorkeuden ollessa '; - $this->strings['cloud_overcast'] = 'Taivas oli pilviverhossa %sovercast%s alkaen korkeudesta '; + $this->strings['cloud_overcast'] = 'Taivas oli pilviverhossa %skokonaan%s alkaen korkeudesta '; $this->strings['cloud_vertical_visibility'] = ' %s pystysuuntainen näkyvyys oli %s '; $this->strings['cloud_condition'] = array( @@ -114,7 +114,7 @@ 'BKN' => 'rikkonainen pilvikerros, ', 'OVC' => 'täysin pilvinen, '); $this->strings['cumulonimbus'] = ' cumulonimbus'; - $this->strings['towering_cumulus'] = ' towering cumulus'; + $this->strings['towering_cumulus'] = ' korkeaksi pullistunut cumulus'; $this->strings['cavok'] = ' ei ollut pilviä alle %s eikä cumulonimbus pilviä'; $this->strings['currently'] = 'Parhaillaan '; $this->strings['weather'] = @@ -136,7 +136,7 @@ 'SN' => ' lunta', 'SG' => ' snow grains', 'IC' => ' jääkiteitä', - 'PL' => ' ice pellets', + 'PL' => ' jää pellettejä', 'GR' => ' jäärakeita', 'GS' => ' heikkoa raetta', 'UP' => ' tuntematon', @@ -148,17 +148,17 @@ 'SA' => ' hiekkaa', 'HZ' => ' auerta', 'PY' => ' tihkusade', - 'PO' => ' well-developed dust/sand whirls', + 'PO' => ' kehittyneitä pöly/hiekka pyörteitä', 'SQ' => ' ukkospuuskia', 'FC' => ' trombeja/tornado/vesipyörre', 'SS' => ' hiekkamyrsky/pölymyrsky'); $this->strings['visibility'] = 'Näkyvyys oli '; $this->strings['visibility_greater_than'] = 'suurempi kuin '; $this->strings['visibility_less_than'] = 'vähemmän kuin '; - $this->strings['visibility_to'] = ' to the '; - $this->strings['runway_upward_tendency'] = ' with an %supward%s tendency'; - $this->strings['runway_downward_tendency'] = ' with a %sdownward%s tendency'; - $this->strings['runway_no_tendency'] = ' with %sno distinct%s tendency'; + $this->strings['visibility_to'] = ' yltäen '; + $this->strings['runway_upward_tendency'] = ' jossa %sylöspäin%s suuntaus'; + $this->strings['runway_downward_tendency'] = ' jossa a %salaspäin%s suuntaus'; + $this->strings['runway_no_tendency'] = ' jossa %sei määriteltyä%s suuntausta'; $this->strings['runway_between'] = 'välillä '; $this->strings['runway_left'] = ' vasen'; $this->strings['runway_central'] = ' keskellä'; |
From: Martin G. <gim...@us...> - 2004-01-02 01:00:41
|
Update of /cvsroot/phpweather/phpweather/doc In directory sc8-pr-cvs1:/tmp/cvs-serv3859 Modified Files: .cvsignore Log Message: Now please ignore all the phpweather.txt, phpweather.ps, ... files. Index: .cvsignore =================================================================== RCS file: /cvsroot/phpweather/phpweather/doc/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- .cvsignore 28 Dec 2002 14:13:53 -0000 1.3 +++ .cvsignore 1 Jan 2004 23:29:45 -0000 1.4 @@ -1,11 +1,2 @@ -*.aux -*.cp -*.cps -*.fn -*.fns -*.ky -*.log -*.pg -*.toc -*.tp -*.vr +phpweather.* + |
From: Martin G. <gim...@us...> - 2004-01-02 01:00:20
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv4064 Modified Files: .cvsignore Log Message: Also, please ignore the AUTHORS file for it's now autogenerated. Index: .cvsignore =================================================================== RCS file: /cvsroot/phpweather/phpweather/.cvsignore,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- .cvsignore 28 Dec 2002 13:20:14 -0000 1.5 +++ .cvsignore 1 Jan 2004 23:30:36 -0000 1.6 @@ -1,2 +1,3 @@ defaults.php test.php +AUTHORS |
From: Martin G. <gim...@us...> - 2004-01-02 00:43:57
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv6874 Modified Files: VERSION Log Message: This is PHP Weather version 2.2.0. Index: VERSION =================================================================== RCS file: /cvsroot/phpweather/phpweather/VERSION,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- VERSION 20 Apr 2003 13:20:58 -0000 1.11 +++ VERSION 1 Jan 2004 23:45:31 -0000 1.12 @@ -1 +1 @@ -2.1.2 +2.2.0 |
From: Martin G. <gim...@us...> - 2004-01-02 00:03:07
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv5143 Modified Files: INSTALL README README-CVS Log Message: Updated year to 2004 --- Happy New Year! Index: INSTALL =================================================================== RCS file: /cvsroot/phpweather/phpweather/INSTALL,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- INSTALL 20 Apr 2003 13:12:41 -0000 1.8 +++ INSTALL 1 Jan 2004 23:36:21 -0000 1.9 @@ -1,5 +1,5 @@ INSTALL file for PHP Weather #VERSION# #DATE# -*- text -*- -Copyright (C) 2000--2003 Martin Geisler <gim...@gi...> +Copyright (C) 2000-2004 Martin Geisler <gim...@gi...> Licensed under the GNU GPL. See the file COPYING for details. Index: README =================================================================== RCS file: /cvsroot/phpweather/phpweather/README,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- README 20 Apr 2003 13:12:42 -0000 1.15 +++ README 1 Jan 2004 23:36:21 -0000 1.16 @@ -1,5 +1,5 @@ README for PHP Weather #VERSION# #DATE# -*- text -*- -Copyright (C) 2000--2003 Martin Geisler <gim...@gi...> +Copyright (C) 2000-2004 Martin Geisler <gim...@gi...> Licensed under the GNU GPL. See the file COPYING for details. Index: README-CVS =================================================================== RCS file: /cvsroot/phpweather/phpweather/README-CVS,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- README-CVS 20 Apr 2003 13:12:42 -0000 1.5 +++ README-CVS 1 Jan 2004 23:36:21 -0000 1.6 @@ -1,5 +1,5 @@ README-CVS for PHP Weather -*- text -*- -Copyright (C) 2000--2003 Martin Geisler <gim...@gi...> +Copyright (C) 2000-2004 Martin Geisler <gim...@gi...> Licensed under the GNU GPL. See the file COPYING for details. |
From: Martin G. <gim...@us...> - 2004-01-02 00:02:49
|
Update of /cvsroot/phpweather/phpweather/doc In directory sc8-pr-cvs1:/tmp/cvs-serv3556 Added Files: generate-doc.sh Removed Files: phpweather.dvi phpweather.html phpweather.info phpweather.info-1 phpweather.info-2 phpweather.pdf phpweather.ps phpweather.txt Log Message: I've replaced the autogenerated files with a scipt that can generate them --- this script is also used for new releases. --- NEW FILE --- #!/bin/bash # # Copyright 2004 Martin Geisler <gim...@gi...> # You're free to use this script as described in the GPL. echo -n "Generating phpweather.dvi... " texi2dvi -q -c src/phpweather.texi echo "done." echo -n "Generating phpweather.pdf... " texi2pdf -q -c src/phpweather.texi echo "done." echo -n "Generating phpweather.html... " texi2html src/phpweather.texi echo "done." echo -n "Generating phpweather.ps... " dvips -q phpweather.dvi -o phpweather.ps echo "done." echo -n "Generating phpweather.info... " makeinfo -I src src/phpweather.texi echo "done." echo -n "Generating phpweather.txt... " makeinfo -I src --no-headers src/phpweather.texi -o phpweather.txt echo "done." echo -n "Generating AUTHORS... " makeinfo --no-headers src/contributors.texi -o ../AUTHORS echo "done." --- phpweather.dvi DELETED --- --- phpweather.html DELETED --- --- phpweather.info DELETED --- --- phpweather.info-1 DELETED --- --- phpweather.info-2 DELETED --- --- BINARY FILE --- --- BINARY FILE --- --- phpweather.txt DELETED --- |
From: Martin G. <gim...@us...> - 2004-01-01 23:47:47
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv6989 Modified Files: ChangeLog Log Message: Entries from the 2.1.2 release. Index: ChangeLog =================================================================== RCS file: /cvsroot/phpweather/phpweather/ChangeLog,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- ChangeLog 20 Apr 2003 13:22:02 -0000 1.13 +++ ChangeLog 1 Jan 2004 23:46:35 -0000 1.14 @@ -1,7 +1,421 @@ +2004-01-01 23:45 Martin Geisler <gim...@gi...> + + * VERSION: + + This is PHP Weather version 2.2.0. + +2004-01-01 23:40 Martin Geisler <gim...@gi...> + + * doc/src/: contributors.texi, phpweather.texi: + + More timestamps... [...3388 lines suppressed...] Added <title>-tag. 2001-03-22 18:04 Martin Geisler <gim...@gi...> @@ -2735,7 +3149,7 @@ doc/metar_parser.html, doc/db_layer.html, doc/locale_en.html, doc/locale_common.html, doc/base_object.html, doc/phpdoc_classtree.html, doc/phpdoc_xmlfiles.html: - + First checkin... 2001-03-22 18:04 Martin Geisler <gim...@gi...> @@ -2758,6 +3172,6 @@ doc/metar_parser.html, doc/db_layer.html, doc/locale_en.html, doc/locale_common.html, doc/base_object.html, doc/phpdoc_classtree.html, doc/phpdoc_xmlfiles.html: - + Initial revision |
From: Martin G. <gim...@us...> - 2004-01-01 23:41:14
|
Update of /cvsroot/phpweather/phpweather/doc/src In directory sc8-pr-cvs1:/tmp/cvs-serv5803/doc/src Modified Files: contributors.texi phpweather.texi Log Message: More timestamps... Index: contributors.texi =================================================================== RCS file: /cvsroot/phpweather/phpweather/doc/src/contributors.texi,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- contributors.texi 1 Jan 2004 21:59:41 -0000 1.1 +++ contributors.texi 1 Jan 2004 23:40:10 -0000 1.2 @@ -9,7 +9,7 @@ @set RELEASED #DATE# AUTHORS file for PHP Weather @value{VERSION} @value{RELEASED} @* -Copyright @copyright{} 2000--2003 Martin Geisler +Copyright @copyright{} 2000--2004 Martin Geisler @email{gimpster@@gimpster.com} @* Licensed under the GNU GPL. See the file @file{COPYING} for details. Index: phpweather.texi =================================================================== RCS file: /cvsroot/phpweather/phpweather/doc/src/phpweather.texi,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- phpweather.texi 1 Jan 2004 22:50:31 -0000 1.6 +++ phpweather.texi 1 Jan 2004 23:40:10 -0000 1.7 @@ -15,7 +15,7 @@ @c The following two commands start the copyright page. @page @vskip 0pt plus 1filll -Copyright @copyright{} 2002, 2003 Martin Geisler and others, see +Copyright @copyright{} 2002, 2003, 2004 Martin Geisler and others, see @ref{Contributors}. Permission is granted to copy, distribute and/or modify this document |
From: Martin G. <gim...@us...> - 2004-01-01 23:38:42
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv5294 Modified Files: make-release.sh Log Message: Updated year to 2004 --- Happy New Year! Index: make-release.sh =================================================================== RCS file: /cvsroot/phpweather/phpweather/make-release.sh,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- make-release.sh 1 Jan 2004 23:31:38 -0000 1.12 +++ make-release.sh 1 Jan 2004 23:37:16 -0000 1.13 @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2001--2003 Martin Geisler <gim...@gi...> +# Copyright 2001-2004 Martin Geisler <gim...@gi...> # You're free to use this script as described in the GPL. # # This small script retrieves the latest version of PHP Weather, packs |
From: Martin G. <gim...@us...> - 2004-01-01 23:37:06
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv4342 Modified Files: make-release.sh Log Message: Use the new script to generate the documentation for the release. Index: make-release.sh =================================================================== RCS file: /cvsroot/phpweather/phpweather/make-release.sh,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- make-release.sh 1 Jan 2004 23:20:38 -0000 1.11 +++ make-release.sh 1 Jan 2004 23:31:38 -0000 1.12 @@ -1,7 +1,7 @@ #!/bin/bash # # Copyright 2001--2003 Martin Geisler <gim...@gi...> -# You're free to use this as described in the GPL. +# You're free to use this script as described in the GPL. # # This small script retrieves the latest version of PHP Weather, packs # it up into two tarballs (gz and bz2) and a zip file, and then asks @@ -31,35 +31,7 @@ echo "done." cd doc || exit - -echo -n "Generating phpweather.dvi... " -texi2dvi -q -c src/phpweather.texi -echo "done." - -echo -n "Generating phpweather.pdf... " -texi2pdf -q -c src/phpweather.texi -echo "done." - -echo -n "Generating phpweather.html... " -texi2html src/phpweather.texi -echo "done." - -echo -n "Generating phpweather.ps... " -dvips -q phpweather.dvi -o phpweather.ps -echo "done." - -echo -n "Generating phpweather.info... " -makeinfo -I src src/phpweather.texi -echo "done." - -echo -n "Generating phpweather.txt... " -makeinfo -I src --no-headers src/phpweather.texi -o phpweather.txt -echo "done." - -echo -n "Generating AUTHORS... " -makeinfo --no-headers src/contributors.texi -o ../AUTHORS -echo "done." - +./generate-doc.sh cd ../.. mv phpweather.$$ phpweather-$VERSION |
From: Martin G. <gim...@us...> - 2004-01-01 23:19:01
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1:/tmp/cvs-serv1861 Removed Files: AUTHORS Log Message: This file has been moved to the Texinfo documentation. --- AUTHORS DELETED --- |
From: Martin G. <gim...@us...> - 2004-01-01 22:50:41
|
Update of /cvsroot/phpweather/phpweather/doc/src In directory sc8-pr-cvs1:/tmp/cvs-serv28989 Modified Files: phpweather.texi Log Message: Moved the Contributors chapter to contributors-body.texi, and expanded things like "it's" to "it is". Index: phpweather.texi =================================================================== RCS file: /cvsroot/phpweather/phpweather/doc/src/phpweather.texi,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- phpweather.texi 10 Oct 2003 23:33:27 -0000 1.5 +++ phpweather.texi 1 Jan 2004 22:50:31 -0000 1.6 @@ -6,13 +6,10 @@ @c @setchapternewpage odd @c %**end of header -@set VERSION #VERSION# -@set RELEASED #DATE# - @titlepage -@title PHP Weather Version @value{VERSION} -@subtitle Reference and Users Guide released on @value{RELEASED} +@title PHP Weather Version #VERSION# +@subtitle Reference and Users Guide released on #DATE# @author Martin Geisler @email{gimpster@@phpweather.net} @c The following two commands start the copyright page. @@ -35,12 +32,12 @@ @node Top @top PHP Weather - a @acronym{METAR} Decoder -@noindent This is the definitive guide to PHP Weather, or at least it -tries to be. PHP Weather is a script written in -@uref{http://www.php.net/, PHP} which makes it possible to display the -current weather on a webpage. The system is based on data from 4,500 -airports scattered all over the world, so there's a good chance that -you'll find a station near your place. +This is the definitive guide to PHP Weather, or at least it tries to +be. PHP Weather is a script written in @uref{http://www.php.net/, PHP} +which makes it possible to display the current weather on a +webpage. The system is based on data from 4,500 airports scattered all +over the world, so there is a good chance that you will find a station +near your place. @end ifnottex @contents @@ -73,7 +70,7 @@ Using PHP Weather * Output Modules:: The standard output modules -* The Raw Data:: It's yours to play with, if you want it +* The Raw Data:: It is yours to play with, if you want it Output Modules @@ -107,8 +104,8 @@ format which PHP Weather can decode. The METAR reports are made at about 4,500 airports from around the -world, so there's a good chance that you live near one of them. And -the airports make an report once or twice an hour, so you'll be able +world, so there is a good chance that you live near one of them. And +the airports make an report once or twice an hour, so you will be able to provide fresh reports on your website. The reports from all over the world are stored at the National Weather @@ -116,11 +113,11 @@ a department under the National Oceanic and Atmospheric Administration (@dfn{NOAA}, see @uref{http://www.noaa.gov/}) of the United States. The reports are available using both HTTP and FTP --- PHP Weather uses -HTTP because it's the fastest of the two protocols. +HTTP because it is the fastest of the two protocols. -Once you've got hold of a METAR, you'll want to display the weather -report contained within it. A textual display, known as a @dfn{pretty -print} looks like this: +Once you have got hold of a METAR, you will want to display the +weather report contained within it. A textual display, known as a +@dfn{pretty print} looks like this: @quotation @@ -151,7 +148,7 @@ @end quotation -Each station is uniquely identified by it's @dfn{ICAO} code. ICAO is +Each station is uniquely identified by it is @dfn{ICAO} code. ICAO is an abbreviation for the @uref{http://www.icao.org/, International Civil Aviation Organization}. @@ -169,7 +166,7 @@ @item You can change the language of the report. The report is built by combining many tiny strings which can be translated into other -languages. There's also support for more diverse translations, see +languages. There is also support for more diverse translations, see @ref{Diverse Translations}. @end itemize @@ -185,7 +182,7 @@ @noindent PHP Weather has been designed so that it is easy to install it. After -you've obtained PHP Weather, just unpack it somewhere on your +you have obtained PHP Weather, just unpack it somewhere on your webserver and load the file @file{index.php} in your favorite browser. The next section will give you more details. @@ -204,19 +201,19 @@ @noindent The first thing to do, is to get hold of PHP Weather. The official PHP Weather homepage can be reached at @uref{http://phpweather.net/} and -you'll be able to download the latest version of PHP Weather from the +you will be able to download the latest version of PHP Weather from the ``Downloads'' section. -After you've downloaded PHP Weather in your favorite format (we +After you have downloaded PHP Weather in your favorite format (we provide files in three formats: @file{tar.gz}, @file{tar.bz2}, and @file{zip}) you should unpack it in a temporary place. If the file you downloaded is called @file{phpweather-x.y.tar.gz}, then it will be unpacked in a directory called @file{phpweather-x.y}. Upload this -directory with all it's files to your webserver. +directory with all its files to your webserver. PHP Weather has now been installed! Use your browser to load the file @file{index.php} found in the root-directory of the PHP Weather -installation and see how it works. You'll be presented with a +installation and see how it works. You will be presented with a demonstration of PHP Weather. @node Configuration @@ -252,7 +249,7 @@ @item Next, the file @file{defaults.php} is read if it exists. This file -isn't part of the PHP Weather distribution, but should be created by +is not part of the PHP Weather distribution, but should be created by you if you want to change some of the defaults from @file{defaults-dist.php}. @@ -276,9 +273,9 @@ @end example @item -You can change some of the options after you've created the object. If -you want to change the current ICAO of a @code{phpweather} object, -then you'll use the @code{set_icao} method like this: +You can change some of the options after you have created the +object. If you want to change the current ICAO of a @code{phpweather} +object, then you will use the @code{set_icao} method like this: @example $weather->set_icao('EKYT'); @@ -287,28 +284,28 @@ @end enumerate The idea is, that you should create a @file{defaults.php} file with -the options that you'll always want to use --- things like database +the options that you will always want to use --- things like database and proxy settings. To create the file, you should use the supplied script @file{make_config.php} found in the @file{config} directory. Load the script in the browser and follow the instructions. In short, then you build the configuration file by repeatedly choosing/changing -options until the all say ``Input accepted''. You'll notice that all +options until the all say ``Input accepted''. You will notice that all options are at their default settings when you load the page initially ---- you'll have to change something and press the ``Update Options'' +--- you will have to change something and press the ``Update Options'' button before anything changes. When you press the button, the page will reload, and the configuration file found at the bottom is updated with your new selections. Also, your selection might give your more choices such as when you change the @code{use_proxy} option from ``No'' to ``Yes''. When you press the -update button you'll be presented with input fields for the +update button you will be presented with input fields for the @code{proxy_host} and the @code{proxy_port}. Because we cannot anticipate the name of your proxy, the @code{proxy_host} will be set -to nothing (the empty string ``'') initially. Since this isn't a valid -hostname, you'll see a text in red that says exactly this. +to nothing (the empty string ``'') initially. Since this is not a +valid hostname, you will see a text in red that says exactly this. -Continue to make changes to the options. When you're happy with the +Continue to make changes to the options. When you are happy with the configuration you should press the ``Download the Configuration'' button. Your browser should ask you where to same the downloaded file --- save it as @file{defaults.php} in the root of your PHP Weather @@ -328,8 +325,8 @@ @noindent PHP Weather works by retrieving weather reports called METARs. It -takes some time to get the METARs, so you'll be interested in using a -local database as a cache. All database backends support the same +takes some time to get the METARs, so you will be interested in using +a local database as a cache. All database backends support the same features (see @ref{Required Functions in a Backend} for details) but differ in speed. Your version of PHP might also lack support for some of the backends. PHP Weather supports the following databases @@ -338,17 +335,17 @@ @table @code @item null -This is the default ``database'' backend, but it isn't really a +This is the default ``database'' backend, but it is not really a database. It pretends to cache the METARs, but in reallity it just throws them away. This means that PHP Weather will have to fetch them from the NWS again each time. This makes the @code{null} backend the slowest backend if you repeadaly need the same METAR, e.g. if you show the current weather -for a fixed location on your homepage. But it's just as quick (or +for a fixed location on your homepage. But it is just as quick (or slow, depending on how you view things) as the other backends when it -comes to showing the weather for a random station. So if that's your -usage-pattern, then you might like this backend. +comes to showing the weather for a random station. So if that is your +typical usage-pattern, then you might like this backend. @item pw_mysql You can use the @uref{http://www.mysql.com/, MySQL} relational @@ -360,37 +357,36 @@ @item pw_dba This database backend uses normal files on the webserver to do the -caching. You'll have to ensure that the PHP process on the webserver +caching. You will have to ensure that the PHP process on the webserver can write to the @file{db/files} directory so that the necessary files can be created and maintained. @end table -After you've chosen a database backend, you'll have to initialize the -database. You should first generate the appropriate +After you have chosen a database backend, you will have to initialize +the database. You should first generate the appropriate @file{defaults.php} file, see @ref{The defaults.php file}. -After you've uploaded the file to the webserver, you can load the +After you have uploaded the file to the webserver, you can load the script @file{make_db.php} found in the @file{config} directory in your favorite browser. When you press the ``Create or Recreate Tables'' -button the database will be initialized. If you've selected a -SQL-based database, then the necessary tables will be -created. +button the database will be initialized. If you have selected a +SQL-based database, then the necessary tables will be created. -If you've selected a file-based database, then the script will attempt +If you have selected a file-based database, then the script will attempt to create the necessary files. This might very well fail: the script is run by the webserver, and the webserver will most likely @emph{not} have permission to create new files in the @file{db/files} directory under the PHP Weather root directory because the webserver runs as an unprivileged user. -So, you'll have to change the permission on the @file{db/files} -directory. I'll assume that the webserver is running some form of -Unix. If you have shell access to the machine, then you can execute -the following commands after you have logged into the webserver. If -you don't have that kind of access to the machine, then you should -still be able to change the permissions using your FTP -program. The relevant commands are: +So, you will have to change the permission on the @file{db/files} +directory. Assuming that the webserver is running some form of Unix +and that you have shell access to the machine, then you can execute +the following commands after you have logged into the webserver. If +you do not have that kind of access to the machine, then you should +still be able to change the permissions using your FTP program. The +relevant commands are: @example cd /root/directory/of/phpweather/installation @@ -411,8 +407,8 @@ @noindent All database backends have to support a common set of methods --- if PHP had support for @emph{interfaces}, then we would require them to -implement a database interface. Because of the lack of interfaces in -the PHP language we're left with this description of what a database +implement a database interface. Because of the lack of interfaces in +the PHP language we are left with this description of what a database backend has to satisfy. All database backends are defined in their own class which is a @@ -444,13 +440,13 @@ @cindex usage @noindent -Now that you've learned about how to install and configure PHP +Now that you have learned about how to install and configure PHP Weather, you might want to learn how you can use it on your own webpages. @menu * Output Modules:: The standard output modules -* The Raw Data:: It's yours to play with, if you want it +* The Raw Data:: It is yours to play with, if you want it @end menu @node Output Modules @@ -460,7 +456,7 @@ @cindex modules, output @noindent -The textual output you've seen on the @file{index.php} demonstration +The textual output you have seen on the @file{index.php} demonstration page is produces by an @dfn{output module} called @code{pw_text}. The images are selected by another module called @code{pw_images}. @@ -485,7 +481,7 @@ @cindex data, raw @noindent -It's easy for you to get hold of the raw data produced by the code in +It is easy for you to get hold of the raw data produced by the code in @file{phpweather.php}: @example @@ -498,9 +494,10 @@ was able to extract from the METAR. The different parts in the METAR is stored under specific keys in the array --- if the METAR lacks a given part, then the corresponding entry in the array will be left -out. This means, that you'll have to check each entry with -@code{empty} before you use it, otherwise you see warnings from PHP, -if you've set the error reporting level high enough. +out. This means that you will have to check each entry with the +built-in PHP function @code{empty} before you use it, otherwise you +see warnings from PHP, if you have set the error reporting level high +enough. You can have PHP show you the structure of the array by using the builtin @code{print_r} function like this: @@ -518,7 +515,7 @@ @item type This can either be @samp{METAR} or @samp{SPECI} and denotes the type -of the report. This isn't used for anything. +of the report. This is not used for anything. @item metar The raw METAR report. @@ -542,8 +539,8 @@ @item report_mod A report modifier which gives information about how the report was made: @samp{AUTO} for a fully automated report with no human -intervention or @samp{COR} for a corrected report. It's supposed to be -part of all METARs, but experience shows that it's not. +intervention or @samp{COR} for a corrected report. It is supposed to +be part of all METARs, but experience shows that it is not. @item wind This is an array with information about the wind. The @code{deg} entry @@ -571,7 +568,7 @@ The visibility itself is stored in the @code{meter}, @code{km}, @code{ft}, and @code{miles} entries. There is an optional entry -@code{dir} for a direction --- if there's no direction, then the +@code{dir} for a direction --- if there is no direction, then the visibility refers to the overall visibility. @item runway @@ -583,7 +580,7 @@ ``center'', or ``right'' respectively. The visibility information can either be a single value or a pair of -values in case of varying conditions. If there's only a single value, +values in case of varying conditions. If there is only a single value, then @code{meter} and @code{ft} holds the visibility, an optional @code{prefix} can be @samp{-1} if range is less than the lowest reportable value or @samp{1} if greater than the greatest reportable @@ -596,7 +593,7 @@ @item weather This holds the current weather phenomena and is one of the most -interesting groups. It's an array of weather groups which means that +interesting groups. It is an array of weather groups which means that the the first group will be @code{$data['weather'][0]}, the second group (if there is such a group) will be @code{$data['weather'][1]}, and so on. @@ -621,8 +618,8 @@ for ``few clouds'', @samp{SCT} for ``scattered clouds'', @samp{BKN} for ``broken clouds'', @samp{OVC} for ``overcast'', and @samp{SKC} and @samp{CLR} for ``clear sky''. The condition @samp{CAVOK} is a bit -special, because if it's present, then the @code{condition} entry will -be the only entry in the cloud group. +special, because if it is present, then the @code{condition} entry +will be the only entry in the cloud group. The other conditions will be part of a larger array with an optional @code{cumulus} entry denoting the presence of cumulonimbus (@samp{CB}) @@ -632,8 +629,8 @@ @samp{nil}. Theres an optional @code{prefix} with the usual meaning. @item temperature -This is the temperature group. It's an array with two or four entries: -@code{temp_c} and @code{temp_f} is always present and is the +This is the temperature group. It is an array with two or four +entries: @code{temp_c} and @code{temp_f} is always present and is the temperature in degrees Celsius and Fahrenheit respectively. If information about the dew-point is present, then @code{dew_c} and @code{dew_f} will be added to the array. @@ -655,7 +652,7 @@ timescales. The entries @code{mm} and @code{in} contains the precipitation during the last hour, entries @code{mm_h6} and @code{in_6h} store the amount of precipitation in the last 3--6 hours -and finally there's @code{mm_24h} and @code{in_24h} with the +and finally there is @code{mm_24h} and @code{in_24h} with the precipitation measured over the last 24 hours. If there has been snowfall, then that will be reported in the @code{snow_mm} and @code{snow_in} entries. @@ -664,7 +661,7 @@ that there was only a trace of precipitation. @item remarks -Anything which isn't recognized is added to this entry. +Anything which is not recognized is added to this entry. @end table @@ -687,6 +684,10 @@ @cindex diverse translations @cindex advanced translations +@noindent +PHP Weather has facilities ready that makes it possible to totally +redefine the generated text from within a translation. + @node Things To Do @chapter Things To Do @cindex TODO list @@ -708,7 +709,7 @@ contain @emph{forecasts} instead of just the current weather. This is of course much more interesting that the current weather conditions. -There's more information about how to decode TAF reports at this +There is more information about how to decode TAF reports at this website: @uref{http://www.awc-kc.noaa.gov/awc/help/taf-decode.html}. @item @@ -751,21 +752,21 @@ etc.) that could display the weather. I discovered that they got their data from the NWS who makes the data available at no cost. -The data is available off the Internet via either FTP or HTTP, so it's -easy to get hold of it with PHP. The only problem was that the data -has to be decoded because it's written in a compact fashion. The data +The data is available off the Internet via either FTP or HTTP, so it +is easy to get hold of it with PHP. The only problem was that the data +has to be decoded because it is written in a compact fashion. The data in question is a so-called METAR report that the airports issue once or twice an hour. I then discovered a script written in Perl that could take a METAR and -split it into it's components. The script was written by Jeremy +split it into its components. The script was written by Jeremy D. Zawodny @email{Jeremy@@Zawodny.com} and is licensed under the GPL just like PHP Weather. So there was no problem with me peeping at his code for PHP Weather. I took the logic from the Perl script and wrote a function in PHP that would decode a METAR. -But that wouldn't do it --- to be useful the decoded data has to be -displayed in a nice fashion, preferable so that it's easy to +But that would not do it --- to be useful the decoded data has to be +displayed in a nice fashion, preferable so that it is easy to customize. The script should also be able to fetch a METAR from the NWS and once that is done, the METAR should be cached so that the script would run faster after the METAR had been fetched once. The @@ -777,11 +778,10 @@ degrees Fahrenheit)''. That turned out very nice so I released the code to the public. -I didn't think about internationalization then, but after a while, I -received a Spanish translation made by Eduardo Guilenea -@email{eduardo@@guilenea.com}. Because the script wasn't ready for -internationalization, he had simply gone through the script and -translated all the English words into Spanish. +I did not think about internationalization then, but after a while, I +received a Spanish translation made by Eduardo Guilenea. Because the +script was not ready for internationalization, he had simply gone +through the script and translated all the English words into Spanish. That promped me to start thinking about how we could translate PHP Weater into other languages. I quickly found out, that it would work @@ -805,188 +805,12 @@ flexible structure. All locale-specific code has been moved out from the main parsing algorithms, so that PHP Weather can be truly localized. All access to the database is now done through a database -abstraction layer: each database is defined in it's own class, so it's +abstraction layer: each database is defined in its own class, so it is free to implement the various methods any way it wants. - - - @node Contributors @chapter Contributors - -@noindent -Everybody listed below has helped in some way with the creation of PHP -Weather. If, by some mistake, your name isn't listed below, then send -a mail to @email{gimpster@@gimpster.com} so that proper credit can -given. - -@table @asis - -@item Kristian Kristensen @email{zianet@@zianet.dk} - -He made the interface to PostgreSQL. - -@item Jeremy D. Zawodny @email{Jeremy@@Zawodny.com} - -He wrote @code{Geo::METAR}, which is a Perl module which can do some -of the things PHP Weather now does. @code{Geo::METAR} can be found -here: @uref{http://www.wcnet.org/jzawodn/perl/Geo-METAR/index.html}. - -@item Enrico Lodolo @email{e.lodolo@@bo.nettuno.it} - -For suggesting that I use http to get the METARs instead of the much -slower ftp. - -@item Stefan Wiesendanger @email{stefan.wiesendanger@@epfl.ch} - -For rewritting some large @code{case}- and @code{switch}-statements as -a couple of arrays. This speeds-up the parsing of the METARs. - -@item Mike @email{bvrtrimmer@@lycos.com} - -He noticed that the pressures was all wrong. I though the unit used in -the METAR was hPa, when it really was inHg. - -@item Jeffrey Y. Sue @email{jysue@@tiki.net} - -Suggested that I told people how to turn off the warnings, if you -don't establish a connection to MySQL. - -Later he made it possible to use PHP Weather with DBM databases. He -also added support for precipitation. Lots of other stuff, see the -@file{ChangeLog} for more details. - -@item Rutger Lubbers @email{rutger@@notenbomer.nl} - -Noticed that South/southeast was duplicated in the directions-array. - -@item Eduardo Guilenea @email{eduardo@@guilenea.com} - -Translated PHP Weather into Spanish, and thereby forced me to add -support for multiply languages. (Which was a Good Thing :-) - -@item Sven-Erik @email{sven_erik@@andersen.as} - -Translated PHP Weather into Norwegian. - -He also sat down and did the boring work, when he manually compiled -the complete list of all airports available from NWS. - -@item Maciek Uhlig @email{muhlig@@us.edu.pl} - -Noticed that I sometimes tried to access @code{$cloud_coverage_array} -with just @code{$cloud_coverage} --- which, of cause, didn't work. - -@item Ing. Vladimir Kotala @email{kotala@@ingema.net} - -Suggested that I changed the long text @samp{@dots{} degrees Celsius} -into the more compact @samp{@dots{} °C}, which is much -better. - -@item Gyulai Mih@'aly @uref{http://gyulai.freeyellow.com/} - -Made the Hungarian translation for PHP Weather. He has also corrected -tons of spelling errors. - -@item Johnny Funder @email{jhf@@slv.dk} - -Lots of explanations and suggestions. He also gave a much simpler -formula for calculating the relative humidity. - -@item Ray van Beek @email{r_vanbeek@@hotmail.com} - -Helped me spot a little error with the current weather. He has also -written code that displays the current weather as an image. - -@item David Kjellquist @email{dave@@kjellquist.com} - -Added support for windchill. - -@item Max Hammond @email{max@@flipstorm.net} - -Lots of different things: bugfixes, clever suggestions, and general -maintenance. - -@item Jes@'us Pe@=nas @email{jpc@@educaplus.org} - -Made the Spanish translation. - -@item Ondrej Jombik @email{nepto@@pobox.sk} - -Translated PHP Weather into Slovak and rewrote the navigation system -used in index.php. He also looked at the MySQL and PostgreSQL database -and found some security flaws. - -@item Reini Urban @email{rurban@@xarch.tu-graz.ac.at} - -Fixed some problems with using PHP Weather on a default installation -of PHP 4.2. - -@item Kari Salovaara @email{kari.salovaara@@pp1.inet.fi} and Tage Malmen - -Translated PHP Weater into Swedish and Finnish. - -@item Paul Kairis @email{Paul.Kairis@@sas.com} - -Wrote the code that handles connections through a proxy server. - -@item Bas Elshof @email{bas@@elshof.de} - -Translated PHP Weather into Dutch. - -@item V@'aclav R@'{@dotless{i}}kal @email{vaclavr@@physics.muni.cz} - -Made a Czech translation. - -@item Radoslava Fed@'akov@'a @email{mortischka@@pobox.sk} - -Czech translation. - -@item Guillaume Petit @email{gpetit@@fr.st} - -Translated PHP Weather into French. - -@item Rudy Boedts - -Updated the Dutch translation. - -@item Konrad Tadesse - -Finally, a working German translation. - -@item Andrew Simpson (andrewsimpson) - -Reported problems with the use of short open tags in a couple of -files. - -@item Jim Whitehead @email{jim@@twopalms.com} - -Fixed the rounding of hours and minutes in the pretty-printed report. - -@item Ferhat Bingol @email{s021183@@student.dtu.dk} - -Made a Turkish translation. - -@item Renato Gallmetzer @email{renatogl@@renatogl.com} - -Provided us with an Italian translation. - -@item Pablo Alcaraz (pabloa) - -Updated the Spanish translation and other bugfixes. - -@item Etienne Tourigny (etienne_t) - -Added a method that decodes TAF reports and made some of the database -backends archive the data instead of always replacing the old data -with new reports. - -@item Justin Heideman @email{justin_heideman@@mcad.edu} - -Drew a full set of beautiful icons for PHP Weather to display the -current weather conditions. - -@end table +@include contributors-body.texi @node Licenses @appendix Licenses @@ -997,10 +821,11 @@ Because we believe in @uref{http://www.opensource.org/, Open Source}, we have licensed the code in PHP Weather under the GNU General Public License and the manual under the GNU Free Documentation License. This -license is similar to the GPL, it's just aimed for documentation. +license is similar to the GPL, it is just aimed for documentation. This means that you are allowed to use PHP Weather on as many websites -as you like, and you're even allowed to use it on commercial websites. +as you like, and you are even allowed to use it on commercial +websites. @menu * GNU General Public License:: |
From: Martin G. <gim...@us...> - 2004-01-01 22:49:21
|
Update of /cvsroot/phpweather/phpweather/doc/src In directory sc8-pr-cvs1:/tmp/cvs-serv28851 Modified Files: contributors-body.texi Log Message: Hmm, there shouldn't be any indention after chapters etc. Index: contributors-body.texi =================================================================== RCS file: /cvsroot/phpweather/phpweather/doc/src/contributors-body.texi,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- contributors-body.texi 1 Jan 2004 21:59:42 -0000 1.1 +++ contributors-body.texi 1 Jan 2004 22:49:17 -0000 1.2 @@ -1,4 +1,5 @@ +@noindent Everybody listed below has helped in some way with the creation of PHP Weather. If, by some mistake, your name isn't listed below, then send a mail to Martin Geisler @email{gimpster@@gimpster.com} so that proper |
From: Martin G. <gim...@us...> - 2004-01-01 21:59:49
|
Update of /cvsroot/phpweather/phpweather/doc/src In directory sc8-pr-cvs1:/tmp/cvs-serv19145 Added Files: contributors.texi contributors-body.texi Log Message: I've made a stand-alone Texinfo file that can be used to generate the AUTHORS file. This will make sure that the AUTHORS file is in sync with the Contributors chapter in the manual. --- NEW FILE --- \input texinfo @c -*-texinfo-*- @c %**start of header @settitle Contributors to PHP Weather @documentencoding ISO-8859-1 @c @setchapternewpage odd @c %**end of header @set VERSION #VERSION# @set RELEASED #DATE# AUTHORS file for PHP Weather @value{VERSION} @value{RELEASED} @* Copyright @copyright{} 2000--2003 Martin Geisler @email{gimpster@@gimpster.com} @* Licensed under the GNU GPL. See the file @file{COPYING} for details. @chapter Contributors to PHP Weather @include src/contributors-body.texi --- NEW FILE --- Everybody listed below has helped in some way with the creation of PHP Weather. If, by some mistake, your name isn't listed below, then send a mail to Martin Geisler @email{gimpster@@gimpster.com} so that proper credit can given. Please include your SourceForge login, if any, and an URL if you like. @table @asis @item Kristian Kristensen (kkrz) He made the interface to PostgreSQL. @item Jeremy D. Zawodny He wrote @code{Geo::METAR}, which is a Perl module which can do some of the things PHP Weather now does. @code{Geo::METAR} can be found here: @uref{http://www.wcnet.org/jzawodn/perl/Geo-METAR/index.html}. @item Enrico Lodolo For suggesting that I use http to get the METARs instead of the much slower ftp. @item Stefan Wiesendanger For rewritting some large @code{case}- and @code{switch}-statements as a couple of arrays. This speeds-up the parsing of the METARs. @item Mike He noticed that the pressures was all wrong. I though the unit used in the METAR was hPa, when it really was inHg. @item Jeffrey Y. Sue Suggested that I told people how to turn off the warnings, if you don't establish a connection to MySQL. Later he made it possible to use PHP Weather with DBM databases. He also added support for precipitation. Lots of other stuff, see the @file{ChangeLog} for more details. @item Rutger Lubbers Noticed that South/southeast was duplicated in the directions-array. @item Eduardo Guilenea Translated PHP Weather into Spanish, and thereby forced me to add support for multiply languages. (Which was a Good Thing :-) @item Sven-Erik (seasoft) Translated PHP Weather into Norwegian. He also sat down and did the boring work, when he manually compiled the complete list of all airports available from NWS. @item Maciek Uhlig Noticed that I sometimes tried to access @code{$cloud_coverage_array} with just @code{$cloud_coverage} --- which, of cause, didn't work. @item Ing. Vladimir Kotala Suggested that I changed the long text @samp{@dots{} degrees Celsius} into the more compact @samp{@dots{} °C}, which is much better. @item Gyulai Mih@'aly (misibacsi) @uref{http://gyulai.freeyellow.com/} Made the Hungarian translation for PHP Weather. He has also corrected tons of spelling errors. @item Johnny Funder Lots of explanations and suggestions. He also gave a much simpler formula for calculating the relative humidity. @item Ray van Beek Helped me spot a little error with the current weather. He has also written code that displays the current weather as an image. @item David Kjellquist Added support for windchill. @item Max Hammond (iridium) Lots of different things: bugfixes, clever suggestions, and general maintenance. @item Jes@'us Pe@~nas Made the Spanish translation. @item Ondrej Jombik (nepto) Translated PHP Weather into Slovak and rewrote the navigation system used in index.php. He also looked at the MySQL and PostgreSQL database and found some security flaws. @item Reini Urban Fixed some problems with using PHP Weather on a default installation of PHP 4.2. @item Kari Salovaara and Tage Malmen Translated PHP Weater into Swedish and Finnish. @item Paul Kairis Wrote the code that handles connections through a proxy server. @item Bas Elshof Translated PHP Weather into Dutch. @item V@'aclav R@'{@dotless{i}}kal Made a Czech translation. @item Radoslava Fed@'akov@'a Czech translation. @item Guillaume Petit Translated PHP Weather into French. @item Rudy Boedts Updated the Dutch translation. @item Konrad Tadesse Finally, a working German translation. @item Andrew Simpson (andrewsimpson) Reported problems with the use of short open tags in a couple of files. @item Jim Whitehead Fixed the rounding of hours and minutes in the pretty-printed report. @item Ferhat Bingol Made a Turkish translation. @item Renato Gallmetzer Provided us with an Italian translation. @item Pablo Alcaraz (pabloa) Updated the Spanish translation and other bugfixes. @item Etienne Tourigny (etienne_t) Added a method that decodes TAF reports and made some of the database backends archive the data instead of always replacing the old data with new reports. @item Justin Heideman Drew a full set of beautiful icons for PHP Weather to display the current weather conditions. @item Warren Rohner Updated the South African stations in the @file{stations.csv} file. @end table |
From: Martin G. <gim...@us...> - 2003-12-30 16:24:33
|
Update of /cvsroot/phpweather/phpweather/db/files In directory sc8-pr-cvs1:/tmp/cvs-serv30380 Modified Files: DJ.php US.php ZA.php stations.db Log Message: Regenerated from the updated stations.csv file. Index: DJ.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/files/DJ.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- DJ.php 28 May 2002 13:28:37 -0000 1.2 +++ DJ.php 30 Dec 2003 16:24:30 -0000 1.3 @@ -5,7 +5,7 @@ $icaos = array( 'HFFF' => 'Djibouti', - 'HDAM' => 'Djibouti \\ Ambouli' + 'HDAM' => 'Djibouti / Ambouli' ); ?> Index: US.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/files/US.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- US.php 28 May 2002 13:28:38 -0000 1.2 +++ US.php 30 Dec 2003 16:24:30 -0000 1.3 @@ -1096,7 +1096,7 @@ 'KRNM' => 'Ramona, Ramona Airport', 'KRND' => 'Randolph Air Force Base', 'KRAP' => 'Rapid City, Rapid City Regional Airport', - 'KRTN' => 'Raton, Raton Municipal \\ Crews Field Airport', + 'KRTN' => 'Raton, Raton Municipal / Crews Field Airport', 'KRWL' => 'Rawlins Municipal', 'KRDG' => 'Reading, Reading Regional Airport', 'KRBL' => 'Red Bluff, Red Bluff Municipal Airport', Index: ZA.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/files/ZA.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- ZA.php 28 May 2002 13:28:38 -0000 1.2 +++ ZA.php 30 Dec 2003 16:24:30 -0000 1.3 @@ -5,50 +5,49 @@ $icaos = array( 'FAAB' => 'Alexander Bay', - 'FAAN' => 'Aliwal North', 'FABY' => 'Beaufort West', - 'FABM' => 'Bethlehem Airport', - 'FABL' => 'Bloemfontein J. B. M. Hertzog', + 'FABM' => 'Bethlehem', + 'FABL' => 'Bloemfontein Airport', 'FACV' => 'Calvinia', - 'FACT' => 'Cape Town D. F. Malan', - 'FACL' => 'Carolina', - 'FADA' => 'De Aar', - 'FADN' => 'Durban Louis Botha', - 'FAEL' => 'East London', + 'FACT' => 'Cape Town International Airport', + 'FADY' => 'De Aar', + 'FADN' => 'Durban International Airport', + 'FAEL' => 'East London Airport', 'FAER' => 'Ellisras', - 'FAFF' => 'Frankfort', - 'FAFR' => 'Fraserburg', + 'FAEO' => 'Ermelo', 'FAGG' => 'George Airport', - 'FAGE' => 'Gough Island', - 'FAGR' => 'Graaff Reinet', 'FAHS' => 'Hoedspruit', - 'FAJS' => 'Jan Smuts', - 'FAKM' => 'Kimberley', + 'FAJS' => 'Johannesburg International Airport', + 'FAKM' => 'Kimberley Airport', + 'FAKD' => 'Klerksdorp', 'FALY' => 'Ladysmith', 'FALW' => 'Langebaanweg', - 'FALT' => 'Lichtenburg', - 'FAME' => 'Marion Island', - 'FAMB' => 'Middelburg', + 'FALI' => 'Lichtenburg', + 'FALT' => 'Louis Trichardt', + 'FAMG' => 'Margate', 'FAMM' => 'Mmabatho Airport', - 'FAMO' => 'Mossel Bay Cape Saint Blaize', 'FANS' => 'Nelspruit', - 'FAOH' => 'Oudtshoorn', + 'FANC' => 'Newcastle', 'FAPH' => 'Phalaborwa', - 'FAPB' => 'Pietersburg', - 'FAPE' => 'Port Elizabeth', - 'FAPJ' => 'Port St Johns', + 'FAPM' => 'Pietermaritzburg', + 'FAPG' => 'Plettenberg Bay', + 'FAPB' => 'Polokwane', + 'FAPE' => 'Port Elizabeth Airport', + 'FAPS' => 'Potchefstroom', 'FAPR' => 'Pretoria', 'FAIR' => 'Pretoria Irene', - 'FAQT' => 'Queenstown', - 'FARB' => 'Richard Bay', + 'FARB' => 'Richard\'s Bay', + 'FARG' => 'Rustenburg', 'FASB' => 'Springbok', - 'FATC' => 'Tristan Da Cunha', + 'FASI' => 'Springs', + 'FASR' => 'Standerton', 'FAUT' => 'Umtata', - 'FAUP' => 'Upington', - 'FAVR' => 'Vredendal', - 'FAVB' => 'Vryburg', - 'FAWK' => 'Waterkloof Lmb', - 'FAWM' => 'Welkom' + 'FAUP' => 'Upington Airport', + 'FAVV' => 'Vereeniging', + 'FAVY' => 'Vryheid', + 'FAWK' => 'Waterkloof', + 'FAWM' => 'Welkom', + 'FAWI' => 'Witbank' ); ?> Index: stations.db =================================================================== RCS file: /cvsroot/phpweather/phpweather/db/files/stations.db,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- stations.db 25 Sep 2002 18:33:40 -0000 1.5 +++ stations.db 30 Dec 2003 16:24:30 -0000 1.6 @@ -1247,50 +1247,49 @@ EVRA:Riga Airport:Belarus:BY EYVI:Vilnius:Lithuania:LT FAAB:Alexander Bay:South Africa:ZA -FAAN:Aliwal North:South Africa:ZA -FABL:Bloemfontein J. B. M. Hertzog:South Africa:ZA -FABM:Bethlehem Airport:South Africa:ZA +FABL:Bloemfontein Airport:South Africa:ZA +FABM:Bethlehem:South Africa:ZA FABY:Beaufort West:South Africa:ZA -FACL:Carolina:South Africa:ZA -FACT:Cape Town D. F. Malan:South Africa:ZA +FACT:Cape Town International Airport:South Africa:ZA FACV:Calvinia:South Africa:ZA -FADA:De Aar:South Africa:ZA -FADN:Durban Louis Botha:South Africa:ZA -FAEL:East London:South Africa:ZA +FADN:Durban International Airport:South Africa:ZA +FADY:De Aar:South Africa:ZA +FAEL:East London Airport:South Africa:ZA +FAEO:Ermelo:South Africa:ZA FAER:Ellisras:South Africa:ZA -FAFF:Frankfort:South Africa:ZA -FAFR:Fraserburg:South Africa:ZA FAGB:Gobabis:Namibia:NA -FAGE:Gough Island:South Africa:ZA FAGG:George Airport:South Africa:ZA -FAGR:Graaff Reinet:South Africa:ZA FAHS:Hoedspruit:South Africa:ZA FAIR:Pretoria Irene:South Africa:ZA -FAJS:Jan Smuts:South Africa:ZA -FAKM:Kimberley:South Africa:ZA -FALT:Lichtenburg:South Africa:ZA +FAJS:Johannesburg International Airport:South Africa:ZA +FAKD:Klerksdorp:South Africa:ZA +FAKM:Kimberley Airport:South Africa:ZA +FALI:Lichtenburg:South Africa:ZA +FALT:Louis Trichardt:South Africa:ZA FALW:Langebaanweg:South Africa:ZA FALY:Ladysmith:South Africa:ZA -FAMB:Middelburg:South Africa:ZA -FAME:Marion Island:South Africa:ZA +FAMG:Margate:South Africa:ZA FAMM:Mmabatho Airport:South Africa:ZA -FAMO:Mossel Bay Cape Saint Blaize:South Africa:ZA +FANC:Newcastle:South Africa:ZA FANS:Nelspruit:South Africa:ZA -FAOH:Oudtshoorn:South Africa:ZA -FAPB:Pietersburg:South Africa:ZA -FAPE:Port Elizabeth:South Africa:ZA +FAPB:Polokwane:South Africa:ZA +FAPE:Port Elizabeth Airport:South Africa:ZA +FAPG:Plettenberg Bay:South Africa:ZA FAPH:Phalaborwa:South Africa:ZA -FAPJ:Port St Johns:South Africa:ZA +FAPM:Pietermaritzburg:South Africa:ZA FAPR:Pretoria:South Africa:ZA -FAQT:Queenstown:South Africa:ZA -FARB:Richard Bay:South Africa:ZA +FAPS:Potchefstroom:South Africa:ZA +FARB:Richard's Bay:South Africa:ZA +FARG:Rustenburg:South Africa:ZA FASB:Springbok:South Africa:ZA -FATC:Tristan Da Cunha:South Africa:ZA -FAUP:Upington:South Africa:ZA +FASI:Springs:South Africa:ZA +FASR:Standerton:South Africa:ZA +FAUP:Upington Airport:South Africa:ZA FAUT:Umtata:South Africa:ZA -FAVB:Vryburg:South Africa:ZA -FAVR:Vredendal:South Africa:ZA -FAWK:Waterkloof Lmb:South Africa:ZA +FAVV:Vereeniging:South Africa:ZA +FAVY:Vryheid:South Africa:ZA +FAWI:Witbank:South Africa:ZA +FAWK:Waterkloof:South Africa:ZA FAWM:Welkom:South Africa:ZA FBFT:Francistown:Botswana:BW FBGZ:Ghanzi:Botswana:BW @@ -1624,7 +1623,7 @@ HCMM:Mogadiscio:Somalia:SO HCMN:Belet Uen:Somalia:SO HCMV:Burao:Somalia:SO -HDAM:Djibouti \ Ambouli:Djibouti:DJ +HDAM:Djibouti / Ambouli:Djibouti:DJ HEAR:El Arish:Egypt:EG HEAT:Asyut:Egypt:EG HEAX:Alexandria / Nouzha:Egypt:EG @@ -2804,7 +2803,7 @@ KRSL:Russell, Russell Municipal Airport:United States:US KRST:Rochester, Rochester Municipal Airport:United States:US KRSW:Fort Myers, Southwest Florida International Airport:United States:US -KRTN:Raton, Raton Municipal \ Crews Field Airport:United States:US +KRTN:Raton, Raton Municipal / Crews Field Airport:United States:US KRUE:Russellville, Russellville Municipal Airport:United States:US KRUM:Rumford:United States:US KRUT:Rutland State Automatic Weather Observing / Reporting System:United States:US |