View the DQSD CVS repository here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/
Update of /cvsroot/dqsd/dqsd/addons/genealogy
In directory usw-pr-cvs1:/tmp/cvs-serv27059/addons/genealogy
Added Files:
age.xml pclmap.xml rwmap.xml usdmap.xml ustmap.xml
Log Message:
added age calculation, pclmap, rwmap, usdmap, and ustmap searches
--- NEW FILE: age.xml ---
<search function="age">
<name>Age Calculator</name>
<category>Genealogy</category>
<contributor>Brent Beardsley</contributor>
<link></link>
<email></email>
<description>
Calculate age between two dates. The start date is specified first
and if no end date is specified, the current date is used for the end date.
<div class="helpboxDescLabels">Examples:</div>
<table class="helpboxDescTable">
<tr><td>age startDate [endDate]</td></tr>
<tr><td>age 1 Feb 1954 8/22/1979</td></tr>
<tr><td>age 1 Feb 1954 22 August 1979</td></tr>
<tr><td>age 1 Feb 1954 22 Aug 1979</td></tr>
<tr><td>age 12 Feb 1927</td></tr>
<tr><td>age 2/12/1927</td></tr>
</table>
</description>
<script src="addons/genealogy/genealogy_lib.js"></script>
<script><![CDATA[
function age(q)
{
if( nullArgs("age", q) )
return;
if (!genealogy_check_lib_version("1.5")) {
return false;
}
var startDate = null;
var endDate = null;
var result = "Invalid date(s) specified.";
var twoDatesRegEx = new
RegExp("^\\s*"+genealogy_date_format_all+"\\s+"+genealogy_date_format_all+"\\s*$");
var oneDateRegEx = new RegExp("^\\s*"+genealogy_date_format_all+"\\s*$");
if (q.match(twoDatesRegEx)) {
var r = twoDatesRegEx.exec(q);
if (r != null) {
startDate = genealogy_parse_date(r[6]);
endDate = genealogy_parse_date(r[10]);
result = genealogy_age_calc(startDate, endDate);
}
} else if (q.match(oneDateRegEx)) {
var r = oneDateRegEx.exec(q);
if (r != null) {
startDate = genealogy_parse_date(r[6]);
result = genealogy_age_calc(startDate);
}
}
document.deff.q.value = result;
}
]]></script>
</search>
--- NEW FILE: pclmap.xml ---
<search function="pclmap">
<name>Perry Castaneda Library Map Collection</name>
<description>
Goto Perry Castaneda Library Map Collection web pages.<br/>
<div class="helpboxDescLabels">Examples:</div>
<table class="helpboxDescTable">
<tr><td>pclmap michigan</td></tr>
<tr><td>pcmlap brown, wi</td></tr>
</table>
</description>
<link>http://www.lib.utexas.edu/maps/united_states.html</link>
<category>Genealogy</category>
<contributor>Brent Beardsley</contributor>
<script src="addons/genealogy/genealogy_lib.js"></script>
<script><![CDATA[
function pclmap(q)
{
if( nullArgs("pclmap", q) )
return false;
var state_name =
genealogy_lookup_place_name(genealogy_parse_place_state(q)).replace(/\s/g,
"_").toLowerCase();
if (state_name == "" || state_name == "district_of_columbia") {
state_name = "united_states";
}
var search_url = "http://www.lib.utexas.edu/maps/"+state_name+".html";
openSearchWindow(search_url);
}
]]>
</script>
</search>
--- NEW FILE: rwmap.xml ---
<search function="rwmap">
<name>GenWeb Census Project</name>
<description>
Goto CGenWeb Census Project web pages.<br/>
<div class="helpboxDescLabels">Examples:</div>
<table class="helpboxDescTable">
<tr><td>gwcp mi</td></tr>
<tr><td>gwcp alaska</td></tr>
</table>
</description>
<link>http://www.rootsweb.com/~census/states/</link>
<category>Genealogy</category>
<contributor>Brent Beardsley</contributor>
<form name="gwcp">
</form>
<script src="addons/genealogy/genealogy_lib.js"></script>
<script><![CDATA[
function gwcp(q)
{
if( nullArgs("gwcp", q) )
return false;
var search_url = "http://www.rootsweb.com/~census/states/";
var links = genealogy_get_known_page_links(search_url);
var search_place_num = genealogy_lookup_place(q);
if (search_place_num >= 0) {
openSearchWindow(links[search_place_num]);
} else {
openSearchWindow(search_url);
}
}
]]>
</script>
</search>
--- NEW FILE: usdmap.xml ---
<search function="usdmap">
<name>United States Digital Map library</name>
<description>
Goto United States Digital Map library web pages.<br/>
<div class="helpboxDescLabels">Examples:</div>
<table class="helpboxDescTable">
<tr><td>usdmap michigan</td></tr>
<tr><td>usdmap brown, wi</td></tr>
</table>
</description>
<link>http://www.rootsweb.com/~usgenweb/maps/table2.html</link>
<category>Genealogy</category>
<contributor>Brent Beardsley</contributor>
<script src="addons/genealogy/genealogy_lib.js"></script>
<script><![CDATA[
function usdmap(q)
{
if( nullArgs("usdmap", q) )
return false;
var search_url = "http://www.rootsweb.com/~usgenweb/maps/table2.html";
var links = genealogy_get_known_page_links(search_url);
var state = genealogy_parse_place_state(q);
var county = genealogy_parse_place_county(q);
var search_place_num = genealogy_lookup_place(state);
if (search_place_num >= 0) {
search_url = links[search_place_num];
if (county != "" ) {
var page_src = genealogy_webpage_get(search_url);
links = genealogy_webpage_get_links(page_src);
if (links.length == 1) {
// if only one link assume it's a redirect
genealogy_alert("only one link available assuming it's a redirect.");
search_url = genealogy_build_url(search_url,
genealogy_link_get_href(links[0]));
page_src = genealogy_webpage_get(search_url);
links = genealogy_webpage_get_links(page_src)
}
var county_regex = new RegExp("^"+county+"( County)?", "i");
genealogy_alert("looking for "+county);
var matching_links = genealogy_links_get_matching_named_links(links,
county_regex, null);
if (matching_links.length > 0) {
// found the county link
search_url = genealogy_build_url(search_url,
genealogy_link_get_href(matching_links[0]));
}
}
}
openSearchWindow(search_url);
}
]]>
</script>
</search>
--- NEW FILE: ustmap.xml ---
<search function="ustmap">
<name>United States Territorial Map library</name>
<description>
Goto a map showing the states and territories for a given year.<br/>
Valid years are: 1775, 1790, 1800, 1810, 1820, 1830, 1840, 1850, 1860, 1870, 1880,
1900, 1920
<div class="helpboxDescLabels">Examples:</div>
<table class="helpboxDescTable">
<tr><td>ustmap</td><td> - </td><td>Show an overview of when all the states
became states.</td></tr>
<tr><td>ustmap 1790</td><td> - </td><td>Show an overview of the states and
territories in 1775.</td></tr>
<tr><td>ustmap 1920</td><td> - </td><td>Show an overview of the states in
1920.</td></tr>
</table>
</description>
<link>http://xroads.virginia.edu/~MAP/TERRITORY/territor.html</link>
<category>Genealogy</category>
<contributor>Brent Beardsley</contributor>
<script src="addons/genealogy/genealogy_lib.js"></script>
<script><![CDATA[
function ustmap(q)
{
if( nullArgs("ustmap", q) )
return false;
var valid_years = new Array("1775", "1790", "1800", "1810", "1820", "1830",
"1840", "1850", "1860", "1870", "1880", "1900", "1920");
if (!genealogy_in_array(q, valid_years)) {
nullArgs("ustmap", "?");
return false;
}
openSearchWindow("http://xroads.virginia.edu/~MAP/TERRITORY/"+q+"map.html");
}
]]>
</script>
</search>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/