Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>TmeplateMaker</code> does seem to do what you need, at least according to its documentation. Instead of receiving a template as an input, it infers ("learns") if from a few documents. Then, it has the <code>extract</code> method to extract the data from other documents that were created with this template.</p> <p>The example shows:</p> <pre><code># Now that we have a template, let's extract some data. &gt;&gt;&gt; t.extract('&lt;b&gt;red and green&lt;/b&gt;') ('red', 'green') &gt;&gt;&gt; t.extract('&lt;b&gt;django and stephane&lt;/b&gt;') ('django', 'stephane') # The extract() method is very literal. It doesn't magically trim # whitespace, nor does it have any knowledge of markup languages such as # HTML. &gt;&gt;&gt; t.extract('&lt;b&gt; spacy and &lt;u&gt;underlined&lt;/u&gt;&lt;/b&gt;') (' spacy ', '&lt;u&gt;underlined&lt;/u&gt;') # The extract() method will raise the NoMatch exception if the data # doesn't match the template. In this example, the data doesn't have the # leading and trailing "&lt;b&gt;" tags. &gt;&gt;&gt; t.extract('this and that') Traceback (most recent call last): ... </code></pre> <p>So, to achieve the task you require, I think you should:</p> <ul> <li>Give it a few documents rendered from your template - it will have no trouble inferring the template from them.</li> <li>Use the inferred template to extract data from new documents.</li> </ul> <p>Come to think about it, it's even more useful than Perl's <code>Template::Extract</code> as it doesn't expect you to provide it a clean template - it learns it on its own from sample text.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload