Commit eb04a4d2 authored by ak's avatar ak
Browse files

bump version

parent 5a16b1c3
Pipeline #2570 passed with stage
in 13 seconds
pages:
stage: deploy
script:
- cp -ru docs/htm_lout public
- cp -ru docs/html_out public
artifacts:
paths:
- public
......
# Pykyll Documentation
![y is missing](pykyll_logo.png)
*Effortless generation of documentation for Your Python project sensation.* 🙄
This is highly adapted to a particular workflow and not for everyone.
![y is missing](https://pykyll.harmlos.info/pykyll_logo.png)
## Documentation
This software is highly adapted to a particular workflow and not for everyone. It is currently *in a state*, namely a state of being rewritten.
- [Docs](https://pykyll.harmlos.info/pykyll) - pykyll api documentation.
- [Git Repository](https://git.c3pb.de/ak/pykyll)
## Documentation
- [Web Site](https://pykyll.harmlos.info/pykyll) in HTML
- [Git Repository](https://git.c3pb.de/ak/pykyll) in MArkdown
Pykyll /pikl/ is just a friendly tool that aims to be useful and by no means *intended* to be a foot gun.
Pykyll */pikil/* is a friendly tool that aims to be useful and by no means *intended* to be a foot gun. Its aim is to ease maintaining documentation of software projects.
### Install
......@@ -22,6 +21,25 @@ Tip: Don't forget the `./` in `pipx install ./pykyll-SEMANTIC-VERSION-STRING.whl
[![](https://harmlos.info/ak.png)](https://ak.harmlos.info#software)
# Pygments Test
:::python
def serve(self, work_dir=os.getcwd(), htmlout="htmlout"):
"""
Serve current docs version on localhost.
"""
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
os.chdir("docs/html_out")
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print("Serving on http://0.0.0.0:8000")
print("\n[bold]<CTL> + <c> to quit[/bold]")
self.display_header()
try:
httpd.serve_forever()
except KeyboardInterrupt:
sys.exit()
---
[TOC]
......@@ -6,22 +6,55 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Pykyll Documentation</title>
<link rel="stylesheet" href="pykyll.css" />
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<h1 id="pykyll-documentation">Pykyll Documentation</h1>
<p><img alt="y is missing" src="pykyll_logo.png" /></p>
<p><em>Effortless generation of documentation for Your Python project sensation.</em> 🙄</p>
<p>This is highly adapted to a particular workflow and not for everyone.</p>
<p><img alt="y is missing" src="https://pykyll.harmlos.info/pykyll_logo.png" /></p>
<p>This software is highly adapted to a particular workflow and not for everyone. It is currently <em>in a state</em>, namely a state of being rewritten. </p>
<h2 id="documentation">Documentation</h2>
<ul>
<li><a href="https://pykyll.harmlos.info/pykyll">Docs</a> - pykyll api documentation.</li>
<li><a href="https://git.c3pb.de/ak/pykyll">Git Repository</a> </li>
<li><a href="https://pykyll.harmlos.info/pykyll">Web Site</a> in HTML </li>
<li><a href="https://git.c3pb.de/ak/pykyll">Git Repository</a> in MArkdown</li>
</ul>
<p>Pykyll /pikl/ is just a friendly tool that aims to be useful and by no means <em>intended</em> to be a foot gun.</p>
<p>Pykyll <em>/pikil/</em> is a friendly tool that aims to be useful and by no means <em>intended</em> to be a foot gun. Its aim is to ease maintaining documentation of software projects.</p>
<h3 id="install">Install</h3>
<p>Download the <a href="https://git.c3pb.de/ak/pykyll/-/tree/master/dist">latest wheel</a> and install to an ephemeral virtual environment handled by pipx.</p>
<p>Tip: Don't forget the <code>./</code> in <code>pipx install ./pykyll-SEMANTIC-VERSION-STRING.whl</code></p>
<p><a href="https://ak.harmlos.info#software"><img alt="" src="https://harmlos.info/ak.png" /></a></p>
<h1 id="pygments-test">Pygments Test</h1>
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
<span class="normal"> 3</span>
<span class="normal"> 4</span>
<span class="normal"> 5</span>
<span class="normal"> 6</span>
<span class="normal"> 7</span>
<span class="normal"> 8</span>
<span class="normal"> 9</span>
<span class="normal">10</span>
<span class="normal">11</span>
<span class="normal">12</span>
<span class="normal">13</span>
<span class="normal">14</span>
<span class="normal">15</span></pre></div></td><td class="code"><div class="codehilite"><pre><span></span><code><span class="k">def</span> <span class="nf">serve</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">work_dir</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">getcwd</span><span class="p">(),</span> <span class="n">htmlout</span><span class="o">=</span><span class="s2">&quot;htmlout&quot;</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Serve current docs version on localhost.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">PORT</span> <span class="o">=</span> <span class="mi">8000</span>
<span class="n">Handler</span> <span class="o">=</span> <span class="n">http</span><span class="o">.</span><span class="n">server</span><span class="o">.</span><span class="n">SimpleHTTPRequestHandler</span>
<span class="n">os</span><span class="o">.</span><span class="n">chdir</span><span class="p">(</span><span class="s2">&quot;docs/html_out&quot;</span><span class="p">)</span>
<span class="k">with</span> <span class="n">socketserver</span><span class="o">.</span><span class="n">TCPServer</span><span class="p">((</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">PORT</span><span class="p">),</span> <span class="n">Handler</span><span class="p">)</span> <span class="k">as</span> <span class="n">httpd</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Serving on http://0.0.0.0:8000&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">[bold]&lt;CTL&gt; + &lt;c&gt; to quit[/bold]&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">display_header</span><span class="p">()</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">httpd</span><span class="o">.</span><span class="n">serve_forever</span><span class="p">()</span>
<span class="k">except</span> <span class="ne">KeyboardInterrupt</span><span class="p">:</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">()</span>
</code></pre></div>
</td></tr></table>
<hr />
<div class="toc">
<ul>
......@@ -32,6 +65,7 @@
</li>
</ul>
</li>
<li><a href="#pygments-test">Pygments Test</a></li>
</ul>
</div>
</body>
......
......@@ -7,19 +7,18 @@ title: Pykyll Documentation
# Pykyll Documentation
![y is missing](pykyll_logo.png)
*Effortless generation of documentation for Your Python project sensation.* 🙄
This is highly adapted to a particular workflow and not for everyone.
![y is missing](https://pykyll.harmlos.info/pykyll_logo.png)
## Documentation
This software is highly adapted to a particular workflow and not for everyone. It is currently *in a state*, namely a state of being rewritten.
- [Docs](https://pykyll.harmlos.info/pykyll) - pykyll api documentation.
- [Git Repository](https://git.c3pb.de/ak/pykyll)
## Documentation
- [Web Site](https://pykyll.harmlos.info/pykyll) in HTML
- [Git Repository](https://git.c3pb.de/ak/pykyll) in MArkdown
Pykyll /pikl/ is just a friendly tool that aims to be useful and by no means *intended* to be a foot gun.
Pykyll */pikil/* is a friendly tool that aims to be useful and by no means *intended* to be a foot gun. Its aim is to ease maintaining documentation of software projects.
### Install
......@@ -29,6 +28,25 @@ Tip: Don't forget the `./` in `pipx install ./pykyll-SEMANTIC-VERSION-STRING.whl
[![](https://harmlos.info/ak.png)](https://ak.harmlos.info#software)
# Pygments Test
:::python
def serve(self, work_dir=os.getcwd(), htmlout="htmlout"):
"""
Serve current docs version on localhost.
"""
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
os.chdir("docs/html_out")
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print("Serving on http://0.0.0.0:8000")
print("\n[bold]<CTL> + <c> to quit[/bold]")
self.display_header()
try:
httpd.serve_forever()
except KeyboardInterrupt:
sys.exit()
---
[TOC]
......@@ -367,7 +367,7 @@ dev = ["pre-commit", "tox"]
[[package]]
name = "prompt-toolkit"
version = "3.0.22"
version = "3.0.23"
description = "Library for building powerful interactive command lines in Python"
category = "main"
optional = false
......@@ -684,7 +684,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes
[metadata]
lock-version = "1.1"
python-versions = "^3.9"
content-hash = "723aa1601e9265a8895248a8b5b9e1f30f5b7696dc6c4bf4d246657181aee670"
content-hash = "44a0601aeb4388b80128acb1fd6ba196c6a141e77179fbcf584bb0b01554989f"
[metadata.files]
astroid = [
......@@ -1046,8 +1046,8 @@ pluggy = [
{file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"},
]
prompt-toolkit = [
{file = "prompt_toolkit-3.0.22-py3-none-any.whl", hash = "sha256:48d85cdca8b6c4f16480c7ce03fd193666b62b0a21667ca56b4bb5ad679d1170"},
{file = "prompt_toolkit-3.0.22.tar.gz", hash = "sha256:449f333dd120bd01f5d296a8ce1452114ba3a71fae7288d2f0ae2c918764fa72"},
{file = "prompt_toolkit-3.0.23-py3-none-any.whl", hash = "sha256:5f29d62cb7a0ecacfa3d8ceea05a63cd22500543472d64298fc06ddda906b25d"},
{file = "prompt_toolkit-3.0.23.tar.gz", hash = "sha256:7053aba00895473cb357819358ef33f11aa97e4ac83d38efb123e5649ceeecaf"},
]
py = [
{file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"},
......
......@@ -42,6 +42,7 @@ pkll = Pykyll(global_conf=config_path)
@app.callback(invoke_without_command=True)
def callback(ctx: typer.Context):
"""Pykyll Documentation Fun."""
sys.stdout.write("\x1b]2;" + "pykyll:" + pkll.conf["name"] + "\x07")
if ctx.invoked_subcommand == None:
pkll.cons.clear()
pkll.display_header("Pykyll Help")
......
......@@ -77,6 +77,7 @@ class Pykyll:
try:
with open(self.CONFIG) as f:
self.conf = yaml.load(f, Loader=yaml.FullLoader)
sys.stdout.write("\x1b]2;" + "pykyll" + "\x07")
except FileNotFoundError:
with self.cons.status("Config file [red]missing[/red]."):
self.print("")
......@@ -537,12 +538,13 @@ class Pykyll:
with pysftp.Connection(
host=sftp_hostname, username=sftp_username, password=sftp_password
) as sftp:
with self.cons.status("exporting web site to " + sftp_hostname):
print("Connetion established")
self.cons.print("Connetion established")
sftp.put_r("docs/html_out", sftp_directory)
sftp.put_r("docs/html_out", sftp_directory)
print("Done.")
self.cons.print("Done.")
def select_fuzzy(self, work_dir=os.getcwd()):
"""
......@@ -636,7 +638,9 @@ class Pykyll:
with open(os.path.join("index.md")) as f:
index_frontmatter = frontmatter.load(f)
html_body = markdown.markdown(
index_frontmatter.content, extensions=["toc", "extra"]
index_frontmatter.content,
extensions=["toc", "extra", "codehilite"],
extension_configs={"codehilite": {"linenums": True}},
)
html_output = f"""<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
......@@ -646,6 +650,7 @@ class Pykyll:
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>{index_frontmatter["title"]}</title>
<link rel="stylesheet" href="pykyll.css" />
<link rel="stylesheet" href="styles.css" />
</head>
<body>
{html_body}
......
[tool.poetry]
name = "pykyll"
version = "0.1.1-alpha.0"
version = "0.1.2-alpha.0"
description = "Pykyll is not Jekyll"
authors = ["ak <ak@c3pb.de>"]
readme= "README.md"
......@@ -24,6 +24,7 @@ textwrapper = "^1.0.2"
pdoc3 = "^0.10.0"
timew = "^0.0.22"
Markdown = "^3.3.6"
Pygments = "^2.10.0"
[tool.poetry.dev-dependencies]
pytest = "^5.2"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment