Skip to content

Commit

Permalink
adding whitespace to readme formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dsillman2000 committed Nov 26, 2023
1 parent 8b7102d commit 3d712af
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 144 deletions.
26 changes: 13 additions & 13 deletions .metadock/content_schematics/example_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,19 @@ example_project:
import: jira/projects.yml
key: IGDP
# "flow" syntax for importing a sub-key, "David_Sillman" inside "eng_identity"
code_owners:
- { import: jira/identities.yml, key: eng_identity.David_Sillman }
# "flow" syntax for importing a sub-key using a merge key ("<<"),
<<: { import: team_contexts/data.yml, key: resources.alerting_channels }
# "block" syntax for importing multiple subkeys from multiple files using a merge key,
<<:
- import: team_contexts/data_contacts.yml
key: contacts.email
- import: team_contexts/data_push_api.yml
key: push_api.contracts
# "flow" syntax for importing a sub-key, "David_Sillman" inside "eng_identity"
code_owners:
- { import: jira/identities.yml, key: eng_identity.David_Sillman }
# "flow" syntax for importing a sub-key using a merge key ("<<"),
<<: { import: team_contexts/data.yml, key: resources.alerting_channels }
# "block" syntax for importing multiple subkeys from multiple files using a merge key,
<<:
- import: team_contexts/data_contacts.yml
key: contacts.email
- import: team_contexts/data_push_api.yml
key: push_api.contracts
import_key_examples_2.yml: |
content_schematics:
Expand Down
20 changes: 10 additions & 10 deletions .metadock/content_schematics/jinja_helpers/html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ html:
>>> from metadock.env import MetadockEnv
>>> env = MetadockEnv().jinja_environment()
>>> env.from_string("{{ html.bold('This is bold text.') }}").render()
'<b>This is bold text.</b>'
'&lt;b&gt;This is bold text.&lt;/b&gt;'
source_file: metadock/env.py
method_name: metadock.env.MetadockHtmlNamespace.bold
signature: "(self, content: str) -> str"
Expand All @@ -26,7 +26,7 @@ html:
>>> from metadock.env import MetadockEnv
>>> env = MetadockEnv().jinja_environment()
>>> env.from_string("{{ html.code('This is code text.') }}").render()
'<code>This is code text.</code>'
'&lt;code&gt;This is code text.&lt;/code&gt;'
source_file: metadock/env.py
method_name: metadock.env.MetadockHtmlNamespace.code
signature: "(self, content: str) -> str"
Expand All @@ -43,7 +43,7 @@ html:
>>> from metadock.env import MetadockEnv
>>> env = MetadockEnv().jinja_environment()
>>> env.from_string("{{ html.details('This is details text.') }}").render()
'<details>\nThis is details text.\n</details>'
'&lt;details&gt;\nThis is details text.\n&lt;/details&gt;'
source_file: metadock/env.py
method_name: metadock.env.MetadockHtmlNamespace.details
signature: "(self, *contents: str) -> str"
Expand All @@ -59,7 +59,7 @@ html:
>>> from metadock.env import MetadockEnv
>>> env = MetadockEnv().jinja_environment()
>>> env.from_string("{{ html.italic('This is italic text.') }}").render()
'<i>This is italic text.</i>'
'&lt;i&gt;This is italic text.&lt;/i&gt;'
source_file: metadock/env.py
method_name: metadock.env.MetadockHtmlNamespace.italic
signature: "(self, content: str) -> str"
Expand All @@ -76,7 +76,7 @@ html:
>>> from metadock.env import MetadockEnv
>>> env = MetadockEnv().jinja_environment()
>>> env.from_string("{{ html.pre('This is code text.', indent = 4) }}").render()
'<pre> This is code text.</pre>'
'&lt;pre&gt; This is code text.&lt;/pre&gt;'
source_file: metadock/env.py
method_name: metadock.env.MetadockHtmlNamespace.pre
signature: "(self, content: str, indent: int = 0) -> str"
Expand All @@ -92,7 +92,7 @@ html:
>>> from metadock.env import MetadockEnv
>>> env = MetadockEnv().jinja_environment()
>>> env.from_string("{{ html.summary('This is summary text.') }}").render()
'<summary>\nThis is summary text.\n</summary>'
'&lt;summary&gt;\nThis is summary text.\n&lt;/summary&gt;'
source_file: metadock/env.py
method_name: metadock.env.MetadockHtmlNamespace.summary
signature: "(self, content: str) -> str"
Expand All @@ -108,7 +108,7 @@ html:
>>> from metadock.env import MetadockEnv
>>> env = MetadockEnv().jinja_environment()
>>> env.from_string("{{ html.underline('This is underlined text.') }}").render()
'<u>This is underlined text.</u>'
'&lt;u&gt;This is underlined text.&lt;/u&gt;'
source_file: metadock/env.py
method_name: metadock.env.MetadockHtmlNamespace.underline
signature: "(self, content: str) -> str"
Expand All @@ -124,8 +124,8 @@ html:
example: |
>>> from metadock.env import MetadockEnv
>>> env = MetadockEnv().jinja_environment()
>>> env.from_string("{{ '<p>This is a paragraph.</p>' | html.escape }}").render()
'&lt;p&gt;This is a paragraph.&lt;/p&gt;'
>>> env.from_string("{{ '&lt;p&gt;This is a paragraph.&lt;/p&gt;' | html.escape }}").render()
'\&lt;p\&gt;This is a paragraph.\&lt;/p\&gt;'
source_file: metadock/env.py
method_name: metadock.env.MetadockHtmlNamespace.escape_filter
signature: "(self, content: str) -> str"
Expand All @@ -141,7 +141,7 @@ html:
>>> from metadock.env import MetadockEnv
>>> env = MetadockEnv().jinja_environment()
>>> env.from_string("{{ 'This is a multi-line string.\nThis is the second line.\nAnd the third.' | html.inline }}").render()
'This is a multi-line string.<br>This is the second line.<br>And the third.'
'This is a multi-line string.&lt;br&gt;This is the second line.&lt;br&gt;And the third.'
source_file: metadock/env.py
method_name: metadock.env.MetadockHtmlNamespace.inline_filter
signature: "(self, content: str) -> str"
Expand Down
14 changes: 0 additions & 14 deletions .metadock/content_schematics/jinja_helpers/md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,6 @@ md:
docstring: |
Jinja Namespace for Markdown-related functions and filters.
**Macros**:
blockquote
code
codeblock
list
tablehead
tablerow
**Filters**:
convert
list
macros:
blockquote:
docstring: |
Expand Down
64 changes: 32 additions & 32 deletions .metadock/generated_documents/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,19 @@ <h2>Code splitting with YAML imports</h2>
import: jira/projects.yml
key: IGDP

# &quot;flow&quot; syntax for importing a sub-key, &quot;David_Sillman&quot; inside &quot;eng_identity&quot;
code_owners:
- { import: jira/identities.yml, key: eng_identity.David_Sillman }
# &quot;flow&quot; syntax for importing a sub-key, &quot;David_Sillman&quot; inside &quot;eng_identity&quot;
code_owners:
- { import: jira/identities.yml, key: eng_identity.David_Sillman }

# &quot;flow&quot; syntax for importing a sub-key using a merge key (&quot;&lt;&lt;&quot;),
&lt;&lt;: { import: team_contexts/data.yml, key: resources.alerting_channels }
# &quot;flow&quot; syntax for importing a sub-key using a merge key (&quot;&lt;&lt;&quot;),
&lt;&lt;: { import: team_contexts/data.yml, key: resources.alerting_channels }

# &quot;block&quot; syntax for importing multiple subkeys from multiple files using a merge key,
&lt;&lt;:
- import: team_contexts/data_contacts.yml
key: contacts.email
- import: team_contexts/data_push_api.yml
key: push_api.contracts
# &quot;block&quot; syntax for importing multiple subkeys from multiple files using a merge key,
&lt;&lt;:
- import: team_contexts/data_contacts.yml
key: contacts.email
- import: team_contexts/data_push_api.yml
key: push_api.contracts
</code></pre>
<p>Note that all paths for the <code>import</code> field are relative to the <code>content_schematics</code> folder for the project.
If you'd like to import the entire content of a file as context, you may omit the <code>key</code> field, e.g.:</p>
Expand Down Expand Up @@ -307,6 +307,7 @@ <h2>Jinja Templating Helpers</h2>
3 namespaces, documented below:</p>
<h3>Global namespace</h3>
<p>Jinja namespace for the global Metadock environment, including all global macros, filters, and namespaces.</p>
<p><br><br></p>
<h4>Jinja macros</h4>
<p>The following macros are available in the global namespace:</p>
<ul>
Expand All @@ -331,6 +332,7 @@ <h4>Jinja macros</h4>
<td>Prints a debug message to stdout, and returns an empty string.<br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;No changes!{{ debug('This is a debug message.') }}&quot;).render()<br>This is a debug message.<br>'No changes!'<br></pre></td>
</tr>
</tbody></table></details>
<p><br><br></p>
<h4>Jinja filters</h4>
<p>The following filters are available in the global namespace:</p>
<ul>
Expand Down Expand Up @@ -385,20 +387,11 @@ <h4>Jinja filters</h4>
<td>Filter which zips an input iterable with one or more iterables. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ ['a', 'b', 'c'] | zip([1, 2, 3]) | list }}&quot;).render()<br>&quot;[('a', 1), ('b', 2), ('c', 3)]&quot;<br></pre></td>
</tr>
</tbody></table></details>
<p><br><br></p>
<hr />
<h3><code>md</code> namespace</h3>
<p>Jinja Namespace for Markdown-related functions and filters.</p>
<p><strong>Macros</strong>:</p>
<pre><code>blockquote
code
codeblock
list
tablehead
tablerow
</code></pre>
<p><strong>Filters</strong>:</p>
<pre><code>convert
list
</code></pre>
<p><br><br></p>
<h4>Jinja macros</h4>
<p>The following macros are available in the md namespace:</p>
<ul>
Expand Down Expand Up @@ -453,6 +446,7 @@ <h4>Jinja macros</h4>
<td>Produces a Markdown table row from the given cells by joining each cell with pipes (&quot;|&quot;) and wrapping the result in pipes. Cell contents have their pipes escaped with a backslash (&quot;\&quot;). <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(<br>... &quot;{{ md.tablehead('Column 1', 'Column 2', 'Column 3') }}\n&quot;<br>... &quot;{{ md.tablerow('Value 1', 'Value 2', 'Value 3') }}&quot;<br>... ).render()<br>'| Column 1 | Column 2 | Column 3 |\n| --- | --- | --- |\n| Value 1 | Value 2 | Value 3 |'<br></pre></td>
</tr>
</tbody></table></details>
<p><br><br></p>
<h4>Jinja filters</h4>
<p>The following filters are available in the md namespace:</p>
<ul>
Expand Down Expand Up @@ -483,8 +477,11 @@ <h4>Jinja filters</h4>
<td>Filter which unpacks an iterable of values into a Markdown list, or formats a single value as a Markdown list element. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(<br>... &quot;{{ ['This is a list.', 'This is a second element'] | md.list }}\n&quot;<br>... ).render()<br>'- This is a list.\n- This is a second element\n'<br></pre></td>
</tr>
</tbody></table></details>
<p><br><br></p>
<hr />
<h3><code>html</code> namespace</h3>
<p>Jinja namespace which owns HTML-related functions and filters.</p>
<p><br><br></p>
<h4>Jinja macros</h4>
<p>The following macros are available in the html namespace:</p>
<ul>
Expand Down Expand Up @@ -512,39 +509,40 @@ <h4>Jinja macros</h4>
<tr>
<td><pre>html.bold</pre></td>
<td><pre>metadock.env.MetadockHtmlNamespace.bold: (self, content: str) -&gt; str</pre></td>
<td>Wraps a string in HTML bold tags (&lt;b&gt;&lt;/b&gt;). <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.bold('This is bold text.') }}&quot;).render()<br>'<b>This is bold text.</b>'<br></pre></td>
<td>Wraps a string in HTML bold tags (&lt;b&gt;&lt;/b&gt;). <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.bold('This is bold text.') }}&quot;).render()<br>'&lt;b&gt;This is bold text.&lt;/b&gt;'<br></pre></td>
</tr>
<tr>
<td><pre>html.code</pre></td>
<td><pre>metadock.env.MetadockHtmlNamespace.code: (self, content: str) -&gt; str</pre></td>
<td>Wraps a string in HTML code tags (&lt;code&gt;&lt;/code&gt;). <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.code('This is code text.') }}&quot;).render()<br>'<code>This is code text.</code>'<br></pre></td>
<td>Wraps a string in HTML code tags (&lt;code&gt;&lt;/code&gt;). <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.code('This is code text.') }}&quot;).render()<br>'&lt;code&gt;This is code text.&lt;/code&gt;'<br></pre></td>
</tr>
<tr>
<td><pre>html.details</pre></td>
<td><pre>metadock.env.MetadockHtmlNamespace.details: (self, *contents: str) -&gt; str</pre></td>
<td>Wraps a string in line-broken HTML details tags (&lt;details&gt;&lt;/details&gt;). Multiple arguments get separated by two line breaks. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.details('This is details text.') }}&quot;).render()<br>'<details>\nThis is details text.\n</details>'<br></pre></td>
<td>Wraps a string in line-broken HTML details tags (&lt;details&gt;&lt;/details&gt;). Multiple arguments get separated by two line breaks. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.details('This is details text.') }}&quot;).render()<br>'&lt;details&gt;\nThis is details text.\n&lt;/details&gt;'<br></pre></td>
</tr>
<tr>
<td><pre>html.italic</pre></td>
<td><pre>metadock.env.MetadockHtmlNamespace.italic: (self, content: str) -&gt; str</pre></td>
<td>Wraps a string in HTML italic tags (&lt;i&gt;&lt;/i&gt;). <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.italic('This is italic text.') }}&quot;).render()<br>'<i>This is italic text.</i>'<br></pre></td>
<td>Wraps a string in HTML italic tags (&lt;i&gt;&lt;/i&gt;). <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.italic('This is italic text.') }}&quot;).render()<br>'&lt;i&gt;This is italic text.&lt;/i&gt;'<br></pre></td>
</tr>
<tr>
<td><pre>html.pre</pre></td>
<td><pre>metadock.env.MetadockHtmlNamespace.pre: (self, content: str, indent: int = 0) -&gt; str</pre></td>
<td>Wraps a string in preformatted HTML pre tags (&lt;pre&gt;&lt;/pre&gt;), and indents the content by the given amount. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.pre('This is code text.', indent = 4) }}&quot;).render()<br>'<pre> This is code text.</pre>'<br></pre></td>
<td>Wraps a string in preformatted HTML pre tags (&lt;pre&gt;&lt;/pre&gt;), and indents the content by the given amount. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.pre('This is code text.', indent = 4) }}&quot;).render()<br>'&lt;pre&gt; This is code text.&lt;/pre&gt;'<br></pre></td>
</tr>
<tr>
<td><pre>html.summary</pre></td>
<td><pre>metadock.env.MetadockHtmlNamespace.summary: (self, content: str) -&gt; str</pre></td>
<td>Wraps a string in line-broken HTML summary tags (&lt;summary&gt;\n\n&lt;/summary&gt;). <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.summary('This is summary text.') }}&quot;).render()<br>'<summary>\nThis is summary text.\n</summary>'<br></pre></td>
<td>Wraps a string in line-broken HTML summary tags (&lt;summary&gt;\n\n&lt;/summary&gt;). <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.summary('This is summary text.') }}&quot;).render()<br>'&lt;summary&gt;\nThis is summary text.\n&lt;/summary&gt;'<br></pre></td>
</tr>
<tr>
<td><pre>html.underline</pre></td>
<td><pre>metadock.env.MetadockHtmlNamespace.underline: (self, content: str) -&gt; str</pre></td>
<td>Wraps a string in HTML underline tags (&lt;u&gt;&lt;/u&gt;). <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.underline('This is underlined text.') }}&quot;).render()<br>'<u>This is underlined text.</u>'<br></pre></td>
<td>Wraps a string in HTML underline tags (&lt;u&gt;&lt;/u&gt;). <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ html.underline('This is underlined text.') }}&quot;).render()<br>'&lt;u&gt;This is underlined text.&lt;/u&gt;'<br></pre></td>
</tr>
</tbody></table></details>
<p><br><br></p>
<h4>Jinja filters</h4>
<p>The following filters are available in the html namespace:</p>
<ul>
Expand All @@ -567,14 +565,16 @@ <h4>Jinja filters</h4>
<tr>
<td><pre>html.escape</pre></td>
<td><pre>metadock.env.MetadockHtmlNamespace.escape_filter: (self, content: str) -&gt; str</pre></td>
<td>Filter which escapes a string by replacing all HTML special characters with their HTML entity equivalents. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ '<p>This is a paragraph.</p>' | html.escape }}&quot;).render()<br>'&lt;p&gt;This is a paragraph.&lt;/p&gt;'<br></pre></td>
<td>Filter which escapes a string by replacing all HTML special characters with their HTML entity equivalents. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ '&lt;p&gt;This is a paragraph.&lt;/p&gt;' | html.escape }}&quot;).render()<br>'&amp;lt;p&amp;gt;This is a paragraph.&amp;lt;/p&amp;gt;'<br></pre></td>
</tr>
<tr>
<td><pre>html.inline</pre></td>
<td><pre>metadock.env.MetadockHtmlNamespace.inline_filter: (self, content: str) -&gt; str</pre></td>
<td>Filter which inlines a string by replacing all newlines with HTML line-breaks &lt;br&gt; singleton tags. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ 'This is a multi-line string.\nThis is the second line.\nAnd the third.' | html.inline }}&quot;).render()<br>'This is a multi-line string.<br>This is the second line.<br>And the third.'<br></pre></td>
<td>Filter which inlines a string by replacing all newlines with HTML line-breaks &lt;br&gt; singleton tags. <br/><br/><pre>&gt;&gt;&gt; from metadock.env import MetadockEnv<br>&gt;&gt;&gt; env = MetadockEnv().jinja_environment()<br>&gt;&gt;&gt; env.from_string(&quot;{{ 'This is a multi-line string.\nThis is the second line.\nAnd the third.' | html.inline }}&quot;).render()<br>'This is a multi-line string.&lt;br&gt;This is the second line.&lt;br&gt;And the third.'<br></pre></td>
</tr>
</tbody></table></details>
<p><br><br></p>
<hr />
<h2>Acknowledgements</h2>
<p>Author:</p>
<ul>
Expand Down
Loading

0 comments on commit 3d712af

Please sign in to comment.