Skip to content

Commit

Permalink
- Implemented functions to work with groups: addGroup, addToGroup, se…
Browse files Browse the repository at this point in the history
…lectGroupElements.

- Updated circleci configuration.
  • Loading branch information
mauvilsa committed May 3, 2019
1 parent b16c042 commit fca0ef0
Show file tree
Hide file tree
Showing 15 changed files with 308 additions and 43 deletions.
20 changes: 11 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2
version: 2.1

dockerbuild: &dockerbuild
steps:
Expand All @@ -15,11 +15,11 @@ dockerbuild: &dockerbuild
paths: ./py-pagexml/dist/*.whl

jobs:
build-16.04-py35:
build-1604-py35:
docker:
- image: mauvilsa/pagexml:build-ubuntu16.04-py35
<<: *dockerbuild
build-18.04-py36:
build-1804-py36:
docker:
- image: mauvilsa/pagexml:build-ubuntu18.04-py36
<<: *dockerbuild
Expand Down Expand Up @@ -55,17 +55,19 @@ workflows:
version: 2
main:
jobs:
- build-16.04-py35:
- build-1604-py35:
<<: *tagfilter
- build-18.04-py36:
- build-1804-py36:
<<: *tagfilter
- publish-pypi:
<<: *tagfilter
context: pagexml-context
requires:
- build-16.04-py35
- build-18.04-py36
- build-1604-py35
- build-1804-py36
- publish-github:
<<: *tagfilter
context: pagexml-context
requires:
- build-16.04-py35
- build-18.04-py36
- build-1604-py35
- build-1804-py36
6 changes: 3 additions & 3 deletions docs/py-pagexml/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Overview: module code &mdash; pagexml 2019.4.26 documentation</title>
<title>Overview: module code &mdash; pagexml 2019.5.3 documentation</title>



Expand Down Expand Up @@ -58,7 +58,7 @@


<div class="version">
2019.4.26
2019.5.3
</div>


Expand All @@ -83,7 +83,7 @@


<ul>
<li class="toctree-l1"><a class="reference internal" href="../pagexml.html">pagexml API (version 2019.4.26)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../pagexml.html">pagexml API (version 2019.5.3)</a></li>
<li class="toctree-l1"><a class="reference external" href="https://omni-us.github.io/pageformat/pagecontent_omnius.html">OPF XSD schema documentation</a></li>
</ul>

Expand Down
6 changes: 3 additions & 3 deletions docs/py-pagexml/_modules/pagexml.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>pagexml &mdash; pagexml 2019.4.26 documentation</title>
<title>pagexml &mdash; pagexml 2019.5.3 documentation</title>



Expand Down Expand Up @@ -58,7 +58,7 @@


<div class="version">
2019.4.26
2019.5.3
</div>


Expand All @@ -83,7 +83,7 @@


<ul>
<li class="toctree-l1"><a class="reference internal" href="../pagexml.html">pagexml API (version 2019.4.26)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../pagexml.html">pagexml API (version 2019.5.3)</a></li>
<li class="toctree-l1"><a class="reference external" href="https://omni-us.github.io/pageformat/pagecontent_omnius.html">OPF XSD schema documentation</a></li>
</ul>

Expand Down
58 changes: 55 additions & 3 deletions docs/py-pagexml/_modules/pagexml/pagexml.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>pagexml &mdash; pagexml 2019.4.26 documentation</title>
<title>pagexml &mdash; pagexml 2019.5.3 documentation</title>



Expand Down Expand Up @@ -58,7 +58,7 @@


<div class="version">
2019.4.26
2019.5.3
</div>


Expand All @@ -83,7 +83,7 @@


<ul>
<li class="toctree-l1"><a class="reference internal" href="../../pagexml.html">pagexml API (version 2019.4.26)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../pagexml.html">pagexml API (version 2019.5.3)</a></li>
<li class="toctree-l1"><a class="reference external" href="https://omni-us.github.io/pageformat/pagecontent_omnius.html">OPF XSD schema documentation</a></li>
</ul>

Expand Down Expand Up @@ -13007,6 +13007,58 @@ <h1>Source code for pagexml</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">_pagexml</span><span class="o">.</span><span class="n">PageXML_getLeftRightTopBottomReadingOrder</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">elems</span><span class="p">,</span> <span class="n">max_angle_diff</span><span class="p">,</span> <span class="n">max_horiz_iou</span><span class="p">,</span> <span class="n">min_prolong_fact</span><span class="p">,</span> <span class="n">prolong_alpha</span><span class="p">,</span> <span class="n">fake_baseline</span><span class="p">,</span> <span class="n">recurse_factor</span><span class="p">)</span></div>


<div class="viewcode-block" id="PageXML.addGroup"><a class="viewcode-back" href="../../pagexml.html#pagexml.PageXML.addGroup">[docs]</a> <span class="k">def</span> <span class="nf">addGroup</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="sd"> Adds a Group to the PcGts node.</span>

<span class="sd"> Arguments:</span>
<span class="sd"> id (const char *): ID for Page, if NULL it is selected automatically.</span>
<span class="sd"> elems (std::vector&lt; xmlNodePt &gt;): Elements to add (must have id attributes).</span>
<span class="sd"> before_node (xmlNodePt): If !=NULL inserts it before the provided Group node.</span>

<span class="sd"> Returns:</span>
<span class="sd"> xmlNodePt: Pointer to created element.</span>


<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">_pagexml</span><span class="o">.</span><span class="n">PageXML_addGroup</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>


<div class="viewcode-block" id="PageXML.addToGroup"><a class="viewcode-back" href="../../pagexml.html#pagexml.PageXML.addToGroup">[docs]</a> <span class="k">def</span> <span class="nf">addToGroup</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">group</span><span class="p">,</span> <span class="n">elems</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="sd"> Adds elements to a Group.</span>

<span class="sd"> Arguments:</span>
<span class="sd"> group (xmlNodePt): Pointer to group node.</span>
<span class="sd"> elems (std::vector&lt; xmlNodePt &gt;): Elements to add (must have id attributes).</span>

<span class="sd"> Returns:</span>
<span class="sd"> int: Number of elements added.</span>


<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">_pagexml</span><span class="o">.</span><span class="n">PageXML_addToGroup</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">group</span><span class="p">,</span> <span class="n">elems</span><span class="p">)</span></div>


<div class="viewcode-block" id="PageXML.selectGroupElements"><a class="viewcode-back" href="../../pagexml.html#pagexml.PageXML.selectGroupElements">[docs]</a> <span class="k">def</span> <span class="nf">selectGroupElements</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">group</span><span class="p">,</span> <span class="n">recurse</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="sd"> Selects all elements referenced by a Group.</span>

<span class="sd"> Arguments:</span>
<span class="sd"> group (xmlNodePt): Pointer to group node.</span>
<span class="sd"> recurse (bool): Whether to recurse into group members which are groups.</span>

<span class="sd"> Returns:</span>
<span class="sd"> std::vector&lt; xmlNodePt &gt;: Number of elements added.</span>


<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">_pagexml</span><span class="o">.</span><span class="n">PageXML_selectGroupElements</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">group</span><span class="p">,</span> <span class="n">recurse</span><span class="p">)</span></div>


<div class="viewcode-block" id="PageXML.getDocPtr"><a class="viewcode-back" href="../../pagexml.html#pagexml.PageXML.getDocPtr">[docs]</a> <span class="k">def</span> <span class="nf">getDocPtr</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>

Expand Down
2 changes: 1 addition & 1 deletion docs/py-pagexml/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '2019.4.26',
VERSION: '2019.5.3',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
Expand Down
12 changes: 9 additions & 3 deletions docs/py-pagexml/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Index &mdash; pagexml 2019.4.26 documentation</title>
<title>Index &mdash; pagexml 2019.5.3 documentation</title>



Expand Down Expand Up @@ -59,7 +59,7 @@


<div class="version">
2019.4.26
2019.5.3
</div>


Expand All @@ -84,7 +84,7 @@


<ul>
<li class="toctree-l1"><a class="reference internal" href="pagexml.html">pagexml API (version 2019.4.26)</a></li>
<li class="toctree-l1"><a class="reference internal" href="pagexml.html">pagexml API (version 2019.5.3)</a></li>
<li class="toctree-l1"><a class="reference external" href="https://omni-us.github.io/pageformat/pagecontent_omnius.html">OPF XSD schema documentation</a></li>
</ul>

Expand Down Expand Up @@ -181,6 +181,8 @@ <h2 id="A">A</h2>
<li><a href="pagexml.html#pagexml.PageXML.addElem">addElem() (pagexml.PageXML method)</a>
</li>
<li><a href="pagexml.html#pagexml.PageXML.addGlyph">addGlyph() (pagexml.PageXML method)</a>
</li>
<li><a href="pagexml.html#pagexml.PageXML.addGroup">addGroup() (pagexml.PageXML method)</a>
</li>
<li><a href="pagexml.html#pagexml.PageXML.addPage">addPage() (pagexml.PageXML method)</a>
</li>
Expand All @@ -189,6 +191,8 @@ <h2 id="A">A</h2>
<li><a href="pagexml.html#pagexml.PageXML.addTextLine">addTextLine() (pagexml.PageXML method)</a>
</li>
<li><a href="pagexml.html#pagexml.PageXML.addTextRegion">addTextRegion() (pagexml.PageXML method)</a>
</li>
<li><a href="pagexml.html#pagexml.PageXML.addToGroup">addToGroup() (pagexml.PageXML method)</a>
</li>
<li><a href="pagexml.html#pagexml.PageXML.addWord">addWord() (pagexml.PageXML method)</a>
</li>
Expand Down Expand Up @@ -1111,6 +1115,8 @@ <h2 id="S">S</h2>
<li><a href="pagexml.html#pagexml.PageXML.selectByID">selectByID() (pagexml.PageXML method)</a>
</li>
<li><a href="pagexml.html#pagexml.PageXML.selectByOverlap">selectByOverlap() (pagexml.PageXML method)</a>
</li>
<li><a href="pagexml.html#pagexml.PageXML.selectGroupElements">selectGroupElements() (pagexml.PageXML method)</a>
</li>
<li><a href="pagexml.html#pagexml.PageXML.selectNth">selectNth() (pagexml.PageXML method)</a>
</li>
Expand Down
12 changes: 6 additions & 6 deletions docs/py-pagexml/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>py-pagexml: Python wrapper for the PageXML C++ library &mdash; pagexml 2019.4.26 documentation</title>
<title>py-pagexml: Python wrapper for the PageXML C++ library &mdash; pagexml 2019.5.3 documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="pagexml API (version 2019.4.26)" href="pagexml.html" />
<link rel="next" title="pagexml API (version 2019.5.3)" href="pagexml.html" />
</head>

<body class="wy-body-for-nav">
Expand All @@ -59,7 +59,7 @@


<div class="version">
2019.4.26
2019.5.3
</div>


Expand All @@ -84,7 +84,7 @@


<ul>
<li class="toctree-l1"><a class="reference internal" href="pagexml.html">pagexml API (version 2019.4.26)</a></li>
<li class="toctree-l1"><a class="reference internal" href="pagexml.html">pagexml API (version 2019.5.3)</a></li>
<li class="toctree-l1"><a class="reference external" href="https://omni-us.github.io/pageformat/pagecontent_omnius.html">OPF XSD schema documentation</a></li>
</ul>

Expand Down Expand Up @@ -302,7 +302,7 @@ <h3>Crop an element and save image to disk<a class="headerlink" href="#crop-an-e
<h2>Documentation Contents<a class="headerlink" href="#documentation-contents" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="pagexml.html">pagexml API (version 2019.4.26)</a><ul>
<li class="toctree-l1"><a class="reference internal" href="pagexml.html">pagexml API (version 2019.5.3)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pagexml.html#module-pagexml">pagexml module</a></li>
</ul>
</li>
Expand All @@ -327,7 +327,7 @@ <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Pe

<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">

<a href="pagexml.html" class="btn btn-neutral float-right" title="pagexml API (version 2019.4.26)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="pagexml.html" class="btn btn-neutral float-right" title="pagexml API (version 2019.5.3)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>


</div>
Expand Down
Binary file modified docs/py-pagexml/objects.inv
Binary file not shown.
Loading

0 comments on commit fca0ef0

Please sign in to comment.