improved documentation

This commit is contained in:
dh1tw 2014-05-02 01:36:12 +02:00
parent 624cea3942
commit d6d90d3e2a
14 changed files with 118 additions and 44 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -79,7 +79,7 @@ An instance of <tt class="xref py py-class docutils literal"><span class="pre">L
</table>
<dl class="method">
<dt id="pyhamtools.callinfo.Callinfo.get_adif_id">
<tt class="descname">get_adif_id</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>29</em>, <em>13</em>, <em>22</em>, <em>14</em>, <em>671563</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_adif_id" title="Permalink to this definition"></a></dt>
<tt class="descname">get_adif_id</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>30</em>, <em>7</em>, <em>25</em>, <em>25</em>, <em>699031</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_adif_id" title="Permalink to this definition"></a></dt>
<dd><p>Returns ADIF id of a callsign&#8217;s country</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -107,7 +107,7 @@ No Country found for callsign</p>
<dl class="method">
<dt id="pyhamtools.callinfo.Callinfo.get_all">
<tt class="descname">get_all</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>29</em>, <em>13</em>, <em>22</em>, <em>14</em>, <em>671563</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_all" title="Permalink to this definition"></a></dt>
<tt class="descname">get_all</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>30</em>, <em>7</em>, <em>25</em>, <em>25</em>, <em>699031</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_all" title="Permalink to this definition"></a></dt>
<dd><p>Lookup a callsign and return all data available from the underlying database</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -160,7 +160,7 @@ would be missing with Clublog (API or XML) <tt class="xref py py-class docutils
<dl class="method">
<dt id="pyhamtools.callinfo.Callinfo.get_continent">
<tt class="descname">get_continent</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>29</em>, <em>13</em>, <em>22</em>, <em>14</em>, <em>671563</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_continent" title="Permalink to this definition"></a></dt>
<tt class="descname">get_continent</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>30</em>, <em>7</em>, <em>25</em>, <em>25</em>, <em>699031</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_continent" title="Permalink to this definition"></a></dt>
<dd><p>Returns the continent Identifier of a callsign</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -201,7 +201,7 @@ No Continent found for callsign</p>
<dl class="method">
<dt id="pyhamtools.callinfo.Callinfo.get_country_name">
<tt class="descname">get_country_name</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>29</em>, <em>13</em>, <em>22</em>, <em>14</em>, <em>671563</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_country_name" title="Permalink to this definition"></a></dt>
<tt class="descname">get_country_name</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>30</em>, <em>7</em>, <em>25</em>, <em>25</em>, <em>699031</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_country_name" title="Permalink to this definition"></a></dt>
<dd><p>Returns the country name where the callsign is located</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -227,17 +227,19 @@ No Country found for callsign</p>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Don&#8217;t rely on the country name when working with several instances of
:Callinfo. Clublog and Country-files.org use slightly different names
for countrys. Example:
Country-files.com: &#8220;Fed. Rep. of Germany&#8221;
Clublog: &#8220;FEDERAL REPUBLIC OF GERMANY&#8221;</p>
<p>Don&#8217;t rely on the country name when working with several instances of
py:class:<cite>Callinfo</cite>. Clublog and Country-files.org use slightly different names
for countrys. Example:</p>
<ul class="last simple">
<li>Country-files.com: &#8220;Fed. Rep. of Germany&#8221;</li>
<li>Clublog: &#8220;FEDERAL REPUBLIC OF GERMANY&#8221;</li>
</ul>
</div>
</dd></dl>
<dl class="method">
<dt id="pyhamtools.callinfo.Callinfo.get_cqz">
<tt class="descname">get_cqz</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>29</em>, <em>13</em>, <em>22</em>, <em>14</em>, <em>671563</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_cqz" title="Permalink to this definition"></a></dt>
<tt class="descname">get_cqz</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>30</em>, <em>7</em>, <em>25</em>, <em>25</em>, <em>699031</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_cqz" title="Permalink to this definition"></a></dt>
<dd><p>Returns CQ Zone of a callsign</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -295,7 +297,7 @@ No callsign found in string</td>
<dl class="method">
<dt id="pyhamtools.callinfo.Callinfo.get_ituz">
<tt class="descname">get_ituz</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>29</em>, <em>13</em>, <em>22</em>, <em>14</em>, <em>671563</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_ituz" title="Permalink to this definition"></a></dt>
<tt class="descname">get_ituz</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>30</em>, <em>7</em>, <em>25</em>, <em>25</em>, <em>699031</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_ituz" title="Permalink to this definition"></a></dt>
<dd><p>Returns ITU Zone of a callsign</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -327,7 +329,7 @@ No ITU Zone found for callsign</p>
<dl class="method">
<dt id="pyhamtools.callinfo.Callinfo.get_lat_long">
<tt class="descname">get_lat_long</tt><big>(</big><em>callsign</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_lat_long" title="Permalink to this definition"></a></dt>
<tt class="descname">get_lat_long</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>30</em>, <em>7</em>, <em>25</em>, <em>25</em>, <em>699031</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.get_lat_long" title="Permalink to this definition"></a></dt>
<dd><p>Returns Latitude and Longitude for a callsign</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
@ -373,7 +375,7 @@ dedicated entry in the database exists.</p>
<dl class="method">
<dt id="pyhamtools.callinfo.Callinfo.is_valid_callsign">
<tt class="descname">is_valid_callsign</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>29</em>, <em>13</em>, <em>22</em>, <em>14</em>, <em>671563</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.is_valid_callsign" title="Permalink to this definition"></a></dt>
<tt class="descname">is_valid_callsign</tt><big>(</big><em>callsign</em>, <em>timestamp=datetime.datetime(2014</em>, <em>4</em>, <em>30</em>, <em>7</em>, <em>25</em>, <em>25</em>, <em>699031</em>, <em>tzinfo=&lt;UTC&gt;)</em><big>)</big><a class="headerlink" href="#pyhamtools.callinfo.Callinfo.is_valid_callsign" title="Permalink to this definition"></a></dt>
<dd><p>Checks if a callsign is valid</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />

View file

@ -16,12 +16,15 @@ with some modules and classes which are frequently necessary, like parsing of an
Currently, PyHamtools contain the following modules and classes:
Modules:
^^^^^^^^
Clases:
Modules
^^^^^^^
.. toctree::
:maxdepth: 2
utils
Clases
^^^^^^
.. toctree::
:maxdepth: 2

View file

@ -50,6 +50,7 @@
<div class="genindex-jumpbox">
<a href="#C"><strong>C</strong></a>
| <a href="#F"><strong>F</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#I"><strong>I</strong></a>
| <a href="#L"><strong>L</strong></a>
@ -66,6 +67,16 @@
</dl></td>
</tr></table>
<h2 id="F">F</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="utils.html#pyhamtools.utils.freq_to_band">freq_to_band() (in module pyhamtools.utils)</a>
</dt>
</dl></td>
</tr></table>
<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
@ -157,10 +168,14 @@
<dt><a href="Callinfo.html#module-pyhamtools.callinfo">pyhamtools.callinfo (module)</a>
</dt>
<dt><a href="LookupLib.html#module-pyhamtools.lookuplib">pyhamtools.lookuplib (module)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="LookupLib.html#module-pyhamtools.lookuplib">pyhamtools.lookuplib (module)</a>
<dt><a href="utils.html#module-pyhamtools.utils">pyhamtools.utils (module)</a>
</dt>
</dl></td>

View file

@ -24,7 +24,7 @@
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="pyhamtools 0.1 documentation" href="#" />
<link rel="next" title="Callinfo" href="Callinfo.html" />
<link rel="next" title="utils" href="utils.html" />
</head>
<body>
<div class="related">
@ -37,7 +37,7 @@
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Callinfo.html" title="Callinfo"
<a href="utils.html" title="utils"
accesskey="N">next</a> |</li>
<li><a href="#">pyhamtools 0.1 documentation</a> &raquo;</li>
</ul>
@ -72,10 +72,17 @@
with some modules and classes which are frequently necessary, like parsing of an Amateur Radio callsign.</p>
<p>Currently, PyHamtools contain the following modules and classes:</p>
<div class="section" id="modules">
<h2>Modules:<a class="headerlink" href="#modules" title="Permalink to this headline"></a></h2>
<h2>Modules<a class="headerlink" href="#modules" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="utils.html">utils</a><ul class="simple">
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="clases">
<h2>Clases:<a class="headerlink" href="#clases" title="Permalink to this headline"></a></h2>
<h2>Clases<a class="headerlink" href="#clases" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Callinfo.html">Callinfo</a><ul class="simple">
@ -106,8 +113,8 @@ with some modules and classes which are frequently necessary, like parsing of an
<h3><a href="#">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">PyHamTools</a><ul>
<li><a class="reference internal" href="#modules">Modules:</a></li>
<li><a class="reference internal" href="#clases">Clases:</a><ul>
<li><a class="reference internal" href="#modules">Modules</a></li>
<li><a class="reference internal" href="#clases">Clases</a><ul>
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
</ul>
</li>
@ -116,8 +123,8 @@ with some modules and classes which are frequently necessary, like parsing of an
</ul>
<h4>Next topic</h4>
<p class="topless"><a href="Callinfo.html"
title="next chapter">Callinfo</a></p>
<p class="topless"><a href="utils.html"
title="next chapter">utils</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.txt"
@ -150,7 +157,7 @@ with some modules and classes which are frequently necessary, like parsing of an
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="Callinfo.html" title="Callinfo"
<a href="utils.html" title="utils"
>next</a> |</li>
<li><a href="#">pyhamtools 0.1 documentation</a> &raquo;</li>
</ul>

View file

@ -2,7 +2,6 @@
# Project: pyhamtools
# Version: 0.1
# The remainder of this file is compressed using zlib.
­SAjÃ0¼çöjÓ\sí©<C3AD>²´¶—JZÕ<E28099>×WŽÜ4¡qj f43šV†ZóAí´(@³lË\Ÿ™ñ ¯ƒÑì•T«<54>½ Ц{EôƒŽŠDõ YO‰ iï‰ð&*ظ¾&iŸk¢<6B>Öi,b<62>I—?±ýÝcÄ ÏYv.•Bk´%M”Ï#8G˜ŸÈÿ<>NjRl{á4Ë¢&ò.ŸÓøùïÈè9Ú/¡QqrЈ€d'ŽíÌŠ¦EüÈVË¢%ŒWx¬§ÔÚÐôÜ

KŽj•Á ý
ãEÍÄR ïo¦øc¢YàÐIp«¬†ö°JÓ®<C393>»%yÎë¹smâKKïìêBÿcåç­+<d
­SAnƒ0¼ç–Ú+¨\sí©R*Uê,c/°ªí%ØT<C398>×0M!¢I(=X²†™avlRh4Ìyµ×"Í¢„•mdÆ<71>~`¯¤j 쥇v9ØÑ7:*Õ<>¨d1'l¤½ÂÈaW¶…0žH»X}ԥƴ˲7áçOì0 Lƒ8àÑ#¦ÒÚ£v3Ù€\“H¡5ÚŒfªç¼GŸÉ9xÞí)\8ÝeQ<65>¹ÊçÜXüÓ:ŽöShTœJ¨„G²3ÇB—šŒ³
ŽÜO…U½8«­Œi±w¤ ïÇr˜¯ ²Ü‘Ý"oëhLÖ£o7gÔùØÎlS¨^,µpîfŠ+<13>ȇFB¹òج¶¾j¹¶Þnôõé_N­¬ ÃfËlÓªWNÒ½®ð¶j
3Žj«<EFBFBD><Þ*÷ ®…)>

View file

@ -74,6 +74,11 @@
<td>&nbsp;&nbsp;&nbsp;
<a href="LookupLib.html#module-pyhamtools.lookuplib"><tt class="xref">pyhamtools.lookuplib</tt></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
<a href="utils.html#module-pyhamtools.utils"><tt class="xref">pyhamtools.utils</tt></a></td><td>
<em></em></td></tr>
</table>

View file

@ -1 +1 @@
Search.setIndex({envversion:42,terms:{vp5:[],all:[1,4,3],code:[0,1,4],identifi:[1,4],show:4,illustr:[],text:[],obtain:[4,3],damag:3,myapikei:4,prefix:[1,4],get_contin:1,publish:3,permiss:3,follow:[0,1,4,3],itu:1,apikeymissingerror:4,entiti:4,xml:[1,4],content:[],onli:1,clublogxml:4,depend:[1,4],copyright:3,also:4,adif:[1,4],"true":[1,4],explain:[],tobia:3,except:4,should:[],tort:3,other:3,dict:[1,4],ituz:[1,4],queri:4,tzinfo:[1,4],aris:3,logger:[1,4],therefor:4,local:4,match:4,merchant:3,applic:0,lookup_ent:4,sourc:4,"return":[1,4],string:[1,4],variou:4,format:[],python:[0,1,4],timestamp:[1,4],express:3,dai:4,feder:1,"import":[1,4],veri:1,liabl:3,month:4,geo:[],requir:4,name:1,warranti:3,like:0,specif:[1,4],descript:[],complic:[],"try":4,whether:3,republ:1,stuff:[],necessari:[0,4],contain:[0,1,4],found:[1,4],readthedoc:0,where:1,page:0,get_cqz:1,impli:3,right:3,deal:3,replac:4,some:0,consequ:1,see:0,callsign:[0,1,4],connect:[4,3],arg:4,download:4,home:1,event:3,librari:[0,4],out:3,even:4,index:0,oceania:1,lookuptyp:[1,4],turkmenistan:4,item:1,lookup_prefix:4,databas:[1,4],rep:[1,4],asia:1,lookup_zone_except:4,current:[0,1],delet:4,written:[],version:0,inject:[1,4],internet:4,print:4,condit:3,irc:0,bla:[],method:4,provid:[1,4,3],str:[1,4],kei:4,longitud:[1,4],differ:[1,4],free:3,entir:1,dictionari:[1,4],europ:1,come:0,lookup_callsign:4,valu:4,christma:4,hc2:1,sell:3,search:0,perform:4,fit:3,most:1,germani:[1,4],island:4,could:1,slightli:1,cty:4,against:4,unfortun:1,precis:1,datetim:[1,4],instanc:[1,4],doctest:[],permit:3,fals:[1,4],countri:[1,4],typic:4,dh1tw:[0,1,2,3],com:[0,1,4],assign:4,frequent:0,oper:4,softwar:3,get_ituz:1,suffix:1,directli:4,activ:1,modul:[],africa:1,three:4,qrp:[],filenam:4,api:[1,4],wrapper:4,strip:1,ea1:[],noresult:[],miss:[1,4],fed:[1,4],merg:3,liabil:3,given:4,latitud:[1,4],from:[1,4,3],log:[1,4],wai:[],cqz:[1,4],modifi:3,daili:4,etc:1,contact:[],two:4,construct:1,github:0,avail:[1,4],whom:3,reli:1,station:4,interfac:4,includ:3,paramet:[1,4],call:1,underli:1,locat:[1,4],type:[1,4],valueerror:1,more:4,"function":[],plist:4,capit:1,through:1,option:[1,4],copi:3,keyerror:[1,4],notic:3,lookup:[1,4],is_invalid_oper:4,pytz:[1,4],pars:0,callinfo:[],particular:3,known:4,off:1,herebi:3,holder:3,cic:1,utc:[1,4],kind:3,dedic:1,retriev:1,"default":4,access:[],none:[1,4],structur:[],exampl:[1,4],aim:4,record:4,"while":1,contin:[1,4],limit:3,can:[1,4],abov:3,webirc:0,otherwis:3,hamtest:0,purpos:[1,3],radio:[0,1,4],associ:3,pre:1,claim:3,would:1,file:[0,1,4,3],creat:0,"int":[1,4],get_homecal:1,year:4,my_lookuplib:[1,4],ani:[1,3],doesn:1,dp0gvn:4,"case":1,antarctica:[1,4],inform:[1,4],exist:[1,4],contract:3,substanti:3,onlin:4,seem:4,deltaxrai:0,action:3,sever:1,incorrect:4,vk9xo:4,mylookuplib:4,date:4,author:3,check:[1,4],get_country_nam:1,apikei:4,when:[1,4],detail:4,same:4,get_lat_long:1,note:[],how:4,amateur:[0,1,4],valid:[1,4],bool:[1,4],which:[0,4],get_adif_id:1,verifi:[],you:0,subject:3,mit:[0,3],lookuplib:[],updat:4,furnish:3,example_gener:[],"5w1cfn":4,http:[0,4],clublog:[1,4],shall:3,org:[0,1,4],object:1,restrict:3,invalid:4,befor:4,zone:[1,4],rais:[1,4],countryfil:[1,4],work:1,distribut:3,sublicens:3,bsd:[],america:1,data:[1,4],"class":[0,1,4],charg:3,is_valid_callsign:1,homogen:4,noninfring:3,infrequ:4,don:1,faster:0,coordin:1,entri:1,"__name__":[1,4],grant:3,clublogapi:4,wellnitz:3,without:[1,3],issu:0,person:3,portion:3,getter:[],gethomecal:[],south:1,thi:[1,4,3],time:4,north:1,get_al:1,hello:[],getlogg:[1,4]},objtypes:{"0":"py:module","1":"py:method","2":"py:class"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","class","Python class"]},filenames:["index","Callinfo","help","license","LookupLib"],titles:["PyHamTools","Callinfo","help","license","LookupLib"],objects:{pyhamtools:{callinfo:[1,0,0,"-"],lookuplib:[4,0,0,"-"]},"pyhamtools.callinfo.Callinfo":{get_continent:[1,1,1,""],get_cqz:[1,1,1,""],get_homecall:[1,1,1,""],get_country_name:[1,1,1,""],get_all:[1,1,1,""],get_lat_long:[1,1,1,""],is_valid_callsign:[1,1,1,""],get_adif_id:[1,1,1,""],get_ituz:[1,1,1,""]},"pyhamtools.lookuplib":{LookupLib:[4,2,1,""]},"pyhamtools.lookuplib.LookupLib":{lookup_prefix:[4,1,1,""],lookup_entity:[4,1,1,""],lookup_zone_exception:[4,1,1,""],lookup_callsign:[4,1,1,""],is_invalid_operation:[4,1,1,""]},"pyhamtools.callinfo":{Callinfo:[1,2,1,""]}},titleterms:{help:2,anoth:[],licens:3,clase:0,simpl:[],indic:0,content:[],header:[],contact:3,tabl:0,pyhamtool:0,document:[],callinfo:1,modul:0,lookuplib:4,welcom:[]}})
Search.setIndex({envversion:42,terms:{all:[4,5,2],code:[0,4,5],illustr:[],queri:5,month:5,prefix:[4,5],follow:[0,3,4,5,2],depend:[4,5],zone:[4,5],tobia:2,aris:2,merchant:2,digit:3,sourc:5,string:[4,5],fals:[4,5],util:[],veri:4,"try":5,item:4,get_contin:4,readthedoc:0,get_cqz:4,impli:2,consequ:4,download:5,even:5,index:0,lookup_prefix:5,asia:4,current:[0,4],delet:5,version:0,method:5,iaru:3,modifi:2,valu:5,search:0,cty:5,precis:4,datetim:[4,5],doctest:[],permit:2,action:2,typic:5,dh1tw:[0,4,1,2],freq_to_band:3,vp5:[],modul:[],africa:4,filenam:5,api:[4,5],callinfo:[],fed:[4,5],from:[3,4,5,2],usb:3,would:4,two:5,call:4,is_valid_callsign:4,type:[3,4,5],more:5,capit:4,notic:2,particular:2,known:5,herebi:2,none:[4,5],retriev:4,work:4,can:[4,5],purpos:[4,2],claim:2,onlin:5,plist:5,mylookuplib:5,get_country_nam:4,how:5,verifi:[],updat:5,befor:5,wrong:3,adif:[4,5],date:5,data:[4,5],github:0,grant:2,assign:5,issu:0,inform:[4,5],frequent:0,furnish:2,lsb:3,through:4,get_ituz:4,itu:4,paramet:[3,4,5],clublogxml:5,fit:2,tort:2,therefor:5,lookup_ent:5,"return":[3,4,5],python:[0,4,5],timestamp:[4,5],dai:5,band:3,qrp:[],name:4,mode:3,found:[4,5],replac:5,connect:[5,2],year:5,event:2,out:[3,2],lookuptyp:[4,5],rep:[4,5],publish:2,content:[],internet:5,print:[3,5],bla:[],differ:[4,5],free:2,dictionari:[3,4,5],org:[0,4,5],freq:3,lookup_callsign:5,hc2:4,frequenc:3,could:4,dp0gvn:5,gethomecal:[],south:4,oper:5,softwar:2,suffix:4,directli:5,restrict:2,construct:4,noresult:[],miss:[4,5],given:5,christma:5,associ:2,wrapper:5,station:5,option:[4,5],copi:2,getter:[],pars:0,holder:2,kind:2,provid:[4,5,2],structur:[],exampl:[3,4,5],str:[3,4,5],pre:4,bandplan:3,ani:[4,2],antarctica:[4,5],amateur:[0,4,5],dedic:4,sell:2,hamtest:0,note:[],also:5,contact:[],which:[0,5],get_adif_id:4,mit:[0,2],germani:[4,5],distribut:2,shall:2,object:4,most:4,sublicens:2,bsd:[],america:4,"class":[0,4,5],charg:2,homogen:5,don:4,wellnitz:2,show:5,text:[],myapikei:5,radio:[0,4,5],permiss:2,xml:[4,5],access:[],onli:4,locat:[4,5],copyright:2,explain:[],activ:4,should:[],dict:[3,4,5],ituz:[4,5],tzinfo:[4,5],local:5,variou:5,utc:[4,5],express:2,liabl:2,geo:[],requir:5,whether:2,stuff:[],contain:[0,3,4,5],where:4,see:0,arg:5,subject:2,oceania:4,databas:[4,5],written:[],"import":[3,4,5],irc:0,accord:3,kei:5,entir:4,come:0,against:5,etc:4,instanc:[4,5],countri:[4,5],com:[0,4,5],latitud:[4,5],damag:2,liabil:2,three:5,whom:2,is_invalid_oper:5,valueerror:4,convert:3,coordin:4,pytz:[4,5],"case":4,aim:5,"while":4,apikei:5,abov:2,webirc:0,my_lookuplib:[4,5],contract:2,substanti:2,seem:5,sever:4,author:2,perform:5,same:5,get_lat_long:4,lookuplib:[],"5w1cfn":5,http:[0,5],clublog:[4,5],rais:[3,4,5],noninfring:2,off:4,entri:4,clublogapi:5,vk9xo:5,person:2,without:[4,2],thi:[4,5,2],entiti:5,identifi:[4,5],obtain:[5,2],europ:4,except:5,valid:[4,5],bool:[4,5],logger:[4,5],match:5,applic:0,format:[],like:0,specif:[4,5],republ:4,necessari:[0,5],page:0,underli:4,right:2,deal:2,some:0,callsign:[0,4,5],home:4,librari:[0,5],feder:4,lookup_zone_except:5,inject:[4,5],condit:2,complic:[],"__name__":[4,5],island:5,slightli:4,unfortun:4,apikeymissingerror:5,"float":3,warranti:2,strip:4,ea1:[],merg:2,get_al:4,log:[4,5],wai:[],cqz:[4,5],avail:[4,5],reli:4,interfac:5,includ:2,"function":[],north:4,keyerror:[3,4,5],"true":[4,5],cic:4,countryfil:[4,5],"default":5,record:5,contin:[4,5],limit:2,otherwis:2,khz:3,creat:0,"int":[3,4,5],get_homecal:4,doesn:4,exist:[4,5],file:[0,4,5,2],deltaxrai:0,check:[4,5],incorrect:5,when:[4,5],detail:5,invalid:5,other:2,lookup:[4,5],you:0,example_gener:[],longitud:[4,5],turkmenistan:5,infrequ:5,faster:0,descript:[],portion:2,daili:5,time:5,hello:[],getlogg:[4,5]},objtypes:{"0":"py:module","1":"py:method","2":"py:function","3":"py:class"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","function","Python function"],"3":["py","class","Python class"]},filenames:["index","help","license","utils","Callinfo","LookupLib"],titles:["PyHamTools","help","license","utils","Callinfo","LookupLib"],objects:{pyhamtools:{utils:[3,0,0,"-"],callinfo:[4,0,0,"-"],lookuplib:[5,0,0,"-"]},"pyhamtools.utils":{freq_to_band:[3,2,1,""]},"pyhamtools.lookuplib":{LookupLib:[5,3,1,""]},"pyhamtools.lookuplib.LookupLib":{lookup_prefix:[5,1,1,""],lookup_entity:[5,1,1,""],lookup_zone_exception:[5,1,1,""],lookup_callsign:[5,1,1,""],is_invalid_operation:[5,1,1,""]},"pyhamtools.callinfo":{Callinfo:[4,3,1,""]},"pyhamtools.callinfo.Callinfo":{get_continent:[4,1,1,""],get_cqz:[4,1,1,""],get_homecall:[4,1,1,""],get_country_name:[4,1,1,""],get_all:[4,1,1,""],get_lat_long:[4,1,1,""],get_adif_id:[4,1,1,""],is_valid_callsign:[4,1,1,""],get_ituz:[4,1,1,""]}},titleterms:{content:[],help:1,anoth:[],licens:2,clase:0,indic:0,util:3,header:[],contact:2,callinfo:4,tabl:0,pyhamtool:0,document:[],simpl:[],modul:0,lookuplib:5,welcom:[]}})

View file

@ -16,12 +16,15 @@ with some modules and classes which are frequently necessary, like parsing of an
Currently, PyHamtools contain the following modules and classes:
Modules:
^^^^^^^^
Clases:
Modules
^^^^^^^
.. toctree::
:maxdepth: 2
utils
Clases
^^^^^^
.. toctree::
:maxdepth: 2

8
docs/source/utils.rst Normal file
View file

@ -0,0 +1,8 @@
utils
=====
.. toctree::
:maxdepth: 2
.. automodule:: pyhamtools.utils
:members:

View file

@ -270,7 +270,7 @@ class Callinfo(object):
except KeyError:
return False
def get_lat_long(self, callsign):
def get_lat_long(self, callsign, timestamp=timestamp_now):
""" Returns Latitude and Longitude for a callsign
Args:
@ -301,7 +301,7 @@ class Callinfo(object):
dedicated entry in the database exists.
"""
callsign_data = self.get_all(callsign, timestamp=timestamp_now)
callsign_data = self.get_all(callsign, timestamp=timestamp)
return {
const.LATITUDE : callsign_data[const.LATITUDE],
const.LONGITUDE : callsign_data[const.LONGITUDE]
@ -357,10 +357,11 @@ class Callinfo(object):
Note:
Don't rely on the country name when working with several instances of
:Callinfo. Clublog and Country-files.org use slightly different names
py:class:`Callinfo`. Clublog and Country-files.org use slightly different names
for countrys. Example:
Country-files.com: "Fed. Rep. of Germany"
Clublog: "FEDERAL REPUBLIC OF GERMANY"
- Country-files.com: "Fed. Rep. of Germany"
- Clublog: "FEDERAL REPUBLIC OF GERMANY"
"""
return self.get_all(callsign, timestamp)[const.COUNTRY]

View file

@ -2,7 +2,38 @@ from pyhamtools.consts import Modes as const
def freq_to_band(freq):
"""converts a frequency [kHz] into the band and looks up the mode"""
"""converts a Frequency [kHz] into the band and mode according to the IARU bandplan
Args:
frequency (float): Frequency in kHz
Returns:
dict: Dictionary containing the band (int) and mode (str)
Raises:
KeyError: Wrong frequency or out of band
Example:
The following example converts the frequency *14005.3 kHz* into band and mode.
>>> from pyhamtools.utils import freq_to_band
>>> print freq_to_band(14005.3)
{
'band': 20,
'mode': CW
}
Note:
Modes are:
- CW
- USB
- LSB
- DIGITAL
"""
band = None
mode = None
if ((freq >= 135) and (freq <= 138)):