bootstraparse/apidoc/bootstraparse.modules.prepa...

434 lines
12 KiB
HTML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html>
<head>
<title>bootstraparse.modules.preparser</title>
<meta name="generator" content="pydoctor 22.5.1">
</meta>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1" />
<link rel="stylesheet" type="text/css" href="bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="apidocs.css" />
<link rel="stylesheet" type="text/css" href="extra.css" />
</head>
<body>
<nav class="navbar navbar-default mainnavbar">
<div class="container-fluid">
<div class="navbar-header">
<div class="navlinks">
<span class="navbar-brand">
bootstraparse <a href="index.html">API Documentation</a>
</span>
<a href="moduleIndex.html">
Modules
</a>
<a href="classIndex.html">
Classes
</a>
<a href="nameIndex.html">
Names
</a>
<div id="search-box-container">
<div class="input-group">
<input id="search-box" type="search" name="search-query" placeholder="Search..." aria-label="Search" minlength="2" class="form-control" autocomplete="off" />
<span class="input-group-btn">
<a style="display: none;" class="btn btn-default" id="search-clear-button" title="Clear" onclick="clearSearch()"><img src="fonts/x-circle.svg" alt="Clear" /></a>
<a class="btn btn-default" id="search-help-button" title="Help" onclick="toggleSearchHelpText()"><img src="fonts/info.svg" alt="Help" /></a>
</span>
</div>
</div>
</div>
<div id="search-results-container" style="display: none;">
<div id="search-buttons">
<span class="label label-default" id="search-docstrings-button">
<label class="checkbox-inline">
<input type="checkbox" id="toggle-search-in-docstrings-checkbox" value="false" onclick="toggleSearchInDocstrings()">
search in docstrings
</input>
</label>
</span>
</div>
<noscript>
<h1>Cannot search: JavaScript is not supported/enabled in your browser.</h1>
</noscript>
<div class="hint" id="search-help-box">
<p class="rst-last">
Search bar offers the following options:
<ul>
<li>
<strong>Term presence.</strong> The below example searches for documents that
must contain “foo”, might contain “bar” and must not contain “baz”: <code>+foo bar -baz</code>
</li>
<li>
<strong>Wildcards.</strong> The below example searches for documents with words beginning with “foo”: <code>foo*</code>
</li>
<li>
<strong>Search in specific fields.</strong> The following search matches all objects
in "twisted.mail" that matches “search”: <code>+qname:twisted.mail.* +search</code>
<p>
Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'.
Last two fields are only applicable if "search in docstrings" is enabled.
</p>
</li>
<li>
<strong>Fuzzy matches.</strong> The following search matches all documents
that have a word within 1 edit distance of “foo”: <code>foo~1</code>
</li>
</ul>
</p>
</div>
<div id="search-status"> </div>
<div class="warning" id="search-warn-box" style="display: none;">
<p class="rst-last"><span id="search-warn"></span></p>
</div>
<table id="search-results">
<!-- Filled dynamically by JS -->
</table>
<div style="margin-top: 8px;">
<p>Results provided by <a href="https://lunrjs.com">Lunr.js</a></p>
</div>
</div>
</div>
</div>
</nav>
<div class="container-fluid">
<!-- Side navigation -->
<div class="sidebarcontainer" style="display: none;">
<div class="sidebar"><nav class="sidebar">
<div>
<div class="thingTitle">
<span>Module</span>
<code class="thisobject"><a href="bootstraparse.modules.preparser.html" class="internal-link" title="This module">preparser</a></code>
</div>
<div>
<div class="childrenKindTitle">Classes</div>
<ul>
<li class="">
<div class="itemName"><code><a href="bootstraparse.modules.preparser.PreParser.html" class="internal-link" title="bootstraparse.modules.preparser.PreParser"><wbr></wbr>Pre<wbr></wbr>Parser</a></code>
</div>
</li>
</ul>
</div>
</div><div>
<div class="thingTitle">
<span>Package</span>
<code><a href="bootstraparse.modules.html" class="internal-link" title="The parent of this module">modules</a></code>
</div>
<div>
<div class="childrenKindTitle">Modules</div>
<ul>
<li class="">
<div class="itemName"><code><a href="bootstraparse.modules.config.html" class="internal-link" title="bootstraparse.modules.config">config</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="bootstraparse.modules.context_mngr.html" class="internal-link" title="bootstraparse.modules.context_mngr">context<wbr></wbr>_mngr</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="bootstraparse.modules.environment.html" class="internal-link" title="bootstraparse.modules.environment">environment</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="bootstraparse.modules.error_mngr.html" class="internal-link" title="bootstraparse.modules.error_mngr">error<wbr></wbr>_mngr</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="bootstraparse.modules.export.html" class="internal-link" title="bootstraparse.modules.export">export</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="bootstraparse.modules.parser.html" class="internal-link" title="bootstraparse.modules.parser">parser</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="bootstraparse.modules.pathresolver.html" class="internal-link" title="bootstraparse.modules.pathresolver">pathresolver</a></code>
</div>
</li><li class=" thisobject">
<div class="itemName"><code><a href="bootstraparse.modules.preparser.html" class="internal-link" title="bootstraparse.modules.preparser">preparser</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="bootstraparse.modules.sitecrawler.html" class="internal-link" title="bootstraparse.modules.sitecrawler">sitecrawler</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="bootstraparse.modules.sitecreator.html" class="internal-link" title="bootstraparse.modules.sitecreator">sitecreator</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="bootstraparse.modules.syntax.html" class="internal-link" title="bootstraparse.modules.syntax">syntax</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="bootstraparse.modules.template_mngr.html" class="internal-link" title="bootstraparse.modules.template_mngr">template<wbr></wbr>_mngr</a></code>
</div>
</li><li class="">
<div class="itemName"><code><a href="bootstraparse.modules.tools.html" class="internal-link" title="bootstraparse.modules.tools">tools</a></code>
</div>
</li>
</ul>
</div>
</div>
</nav>
</div>
<div id="collapseSideBar">
<a class="btn btn-link" onclick="toggleSideBarCollapse()" title="Toggle Sidebar Collapse">
</a>
</div>
<script src="sidebartoggle.js" type="text/javascript"></script>
</div>
<div id="main" class="">
<div class="page-header">
<h1 class="module"><code><code><a href="index.html" class="internal-link">bootstraparse</a></code><wbr></wbr>.<code><a href="bootstraparse.modules.html" class="internal-link" title="bootstraparse.modules">modules</a></code><wbr></wbr>.<code><a href="bootstraparse.modules.preparser.html" class="internal-link" title="bootstraparse.modules.preparser">preparser</a></code></code></h1>
<div id="showPrivate">
<button class="btn btn-link" onclick="togglePrivate()">Toggle Private API</button>
</div>
</div>
<div class="categoryHeader">
module documentation
</div>
<div class="extrasDocstring">
<p></p>
</div>
<div class="moduleDocstring">
<div><p>Module for pre-parsing user files in preparation for the parser Usage:</p>
<ul class="rst-simple">
<li>from bootstraparse.modules.preparser import preparser</li>
<li>pp = preparser(file, enviroment)</li>
<li>pp.do_import() # imports all the modules and adds them to the file, do the same for all the files that are to be imported - # noqa</li>
<li>pp.do_replacements() # replaces all images and shortcuts in the file</li>
<li>pp.readlines() # returns the lines of ORIGINAL file</li>
<li>pp.get_all_lines() # returns the lines of the file after replacements and imports</li>
</ul>
</div>
</div>
<div id="splitTables">
<table class="children sortable" id="id60">
<tr class="class">
<td>Class</td>
<td><code><a href="bootstraparse.modules.preparser.PreParser.html" class="internal-link" title="bootstraparse.modules.preparser.PreParser"><wbr></wbr>Pre<wbr></wbr>Parser</a></code></td>
<td>Takes a path and environment, executes all pre-parsing methods on the specified file.</td>
</tr>
</table>
</div>
<div id="childList">
</div>
</div>
</div>
<footer class="navbar navbar-default">
<div class="container">
<a href="index.html">API Documentation</a> for bootstraparse,
generated by <a href="https://github.com/twisted/pydoctor/">pydoctor</a>
22.5.1 at 2022-06-16 02:03:04.
</div>
<!-- Search related scripts needs to be loaded at the end of HTML
parsing not to introduce overhead and display HTML data asap -->
<script src="ajax.js" type="text/javascript"></script>
<script src="searchlib.js" type="text/javascript"></script>
<script src="search.js" type="text/javascript"></script>
</footer>
<script src="pydoctor.js" type="text/javascript"></script>
</body>
</html>