<aname="L2"></a><ttclass="py-lineno"> 2</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># This file is part of pybliographer</tt></tt>
<aname="L7"></a><ttclass="py-lineno"> 7</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># This program is free software; you can redistribute it and/or</tt></tt>
<aname="L8"></a><ttclass="py-lineno"> 8</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># modify it under the terms of the GNU General Public License</tt></tt>
<aname="L9"></a><ttclass="py-lineno"> 9</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># as published by the Free Software Foundation; either version 2 </tt></tt>
<aname="L10"></a><ttclass="py-lineno"> 10</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># of the License, or (at your option) any later version.</tt></tt>
<aname="L12"></a><ttclass="py-lineno"> 12</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># This program is distributed in the hope that it will be useful,</tt></tt>
<aname="L13"></a><ttclass="py-lineno"> 13</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># but WITHOUT ANY WARRANTY; without even the implied warranty of</tt></tt>
<aname="L14"></a><ttclass="py-lineno"> 14</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</tt></tt>
<aname="L15"></a><ttclass="py-lineno"> 15</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># GNU General Public License for more details. </tt></tt>
<aname="L17"></a><ttclass="py-lineno"> 17</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># You should have received a copy of the GNU General Public License</tt></tt>
<aname="L18"></a><ttclass="py-lineno"> 18</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># along with this program; if not, write to the Free Software</tt></tt>
<aname="L19"></a><ttclass="py-lineno"> 19</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</tt></tt>
<aname="L23"></a><ttclass="py-lineno"> 23</tt><ttclass="py-line"><ttclass="py-docstring">Defines the Citator, a class that glues together every aspect related</tt></tt>
<aname="L24"></a><ttclass="py-lineno"> 24</tt><ttclass="py-line"><ttclass="py-docstring">to citations. It reads and stores this information from an XML file,</tt></tt>
<aname="L25"></a><ttclass="py-lineno"> 25</tt><ttclass="py-line"><ttclass="py-docstring">making it easy to distribute per-journal citation styles for instance.</tt></tt>
<aname="L27"></a><ttclass="py-lineno"> 27</tt><ttclass="py-line"><ttclass="py-docstring">WARNING: this object loads python modules by their name. It might do</tt></tt>
<aname="L28"></a><ttclass="py-lineno"> 28</tt><ttclass="py-line"><ttclass="py-docstring">nasty things if the file comes from untrusted sources.</tt></tt>
<aname="L50"></a><ttclass="py-lineno"> 50</tt><ttclass="py-line"><ttclass="py-keyword">raise</tt><ttid="link-7"class="py-name"><atitle="Pyblio.Exceptions.ParserError"class="py-name"href="#"onclick="return doclink('link-7', 'ParserError', 'link-4');">ParserError</a></tt><ttclass="py-op">(</tt><ttclass="py-name">_</tt><ttclass="py-op">(</tt><ttclass="py-string">"file is not a Citator XML file"</tt><ttclass="py-op">)</tt><ttclass="py-op">)</tt></tt>
</div><divid="Citator.prepare-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="Citator.prepare-expanded"><aname="L65"></a><ttclass="py-lineno"> 65</tt><ttclass="py-line"><ttclass="py-docstring">"""Link the citator with a specific database and word</tt></tt>
<aname="L66"></a><ttclass="py-lineno"> 66</tt><ttclass="py-line"><ttclass="py-docstring"> processor. @extra_info is an optional function that will</tt></tt>
<aname="L67"></a><ttclass="py-lineno"> 67</tt><ttclass="py-line"><ttclass="py-docstring"> return a string to store along with the entry, if the word</tt></tt>
</div><divid="Citator.update-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="Citator.update-expanded"><aname="L95"></a><ttclass="py-lineno"> 95</tt><ttclass="py-line"><ttclass="py-docstring">""" Force an update of keys and bibliography content """</tt></tt>
<aname="L97"></a><ttclass="py-lineno"> 97</tt><ttclass="py-line"><ttclass="py-comment"># We need to resynchronize the local state with the remote</tt></tt>
<aname="L98"></a><ttclass="py-lineno"> 98</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># info. Fetch the list of known references from the current</tt></tt>
<aname="L104"></a><ttclass="py-lineno">104</tt><ttclass="py-line"><ttclass="py-comment"># Regenerate the keys, and update the ones that changed.</tt></tt>
<aname="L105"></a><ttclass="py-lineno">105</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># We need to restart the key generator, to ensure it</tt></tt>
<aname="L106"></a><ttclass="py-lineno">106</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># provides them in a coherent order.</tt></tt>
</div><divid="Citator.cite-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="Citator.cite-expanded"><aname="L129"></a><ttclass="py-lineno">129</tt><ttclass="py-line"><ttclass="py-docstring">""" Insert the specified record identifiers in the current</tt></tt>