Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescooke committed Mar 28, 2024
1 parent bc218f8 commit 26ddbb4
Show file tree
Hide file tree
Showing 22 changed files with 726 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,17 +337,18 @@ <h2>Update&nbsp;13/10/2019</h2>
<br>
&ndash; Further reading:
<ul>
<li>
<a href="https://jamescooke.info/why-isnt-the-uk-in-dst-yet.html">Why isn&#8217;t the <span class="caps">UK</span> in <span class="caps">DST</span>&nbsp;yet?!</a>
<p>British Summer Time is due to start this weekend. However, for some
reason, it&#8217;s three weeks after the usual <span class="caps">USA</span> switch over, rather than the
usual two. Why is this? And when will it happen&nbsp;again?</p></li>
<li>
<a href="https://jamescooke.info/pipxs-upgrade-is-shallow-lets-go-deeper.html">Pipx&#8217;s upgrade is shallow, let&#8217;s go&nbsp;deeper</a>
<p>Software installed in pipx&#8217;s managed virtual environments can get
stale. How can we update those packages <em>and</em> their&nbsp;dependencies?</p></li>
<li>
<a href="https://jamescooke.info/an-ode-to-pipx.html">An Ode to&nbsp;pipx</a>
<p>Using pipx has improved my daily development experience&nbsp;considerably.</p></li>
<li>
<a href="https://jamescooke.info/pytests-cache-and-gitignore.html">Pytest&#8217;s cache and&nbsp;gitignore</a>
<p class="first last">Sanity checking Pytest&#8217;s <tt class="docutils literal">.gitignore</tt> files.</p>
</li>
</ul>
</p>

Expand Down
10 changes: 5 additions & 5 deletions an-ode-to-pipx.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,18 @@ <h2>🙏&nbsp;Thanks</h2>
<br>
&ndash; Further reading:
<ul>
<li>
<a href="https://jamescooke.info/why-isnt-the-uk-in-dst-yet.html">Why isn&#8217;t the <span class="caps">UK</span> in <span class="caps">DST</span>&nbsp;yet?!</a>
<p>British Summer Time is due to start this weekend. However, for some
reason, it&#8217;s three weeks after the usual <span class="caps">USA</span> switch over, rather than the
usual two. Why is this? And when will it happen&nbsp;again?</p></li>
<li>
<a href="https://jamescooke.info/pipxs-upgrade-is-shallow-lets-go-deeper.html">Pipx&#8217;s upgrade is shallow, let&#8217;s go&nbsp;deeper</a>
<p>Software installed in pipx&#8217;s managed virtual environments can get
stale. How can we update those packages <em>and</em> their&nbsp;dependencies?</p></li>
<li>
<a href="https://jamescooke.info/pytests-cache-and-gitignore.html">Pytest&#8217;s cache and&nbsp;gitignore</a>
<p class="first last">Sanity checking Pytest&#8217;s <tt class="docutils literal">.gitignore</tt> files.</p>
</li>
<li>
<a href="https://jamescooke.info/its-good-to-extract.html">It&#8217;s good to&nbsp;extract</a>
<p class="first last">Thoughts on the benefits of extracting library code from Python
projects into their own&nbsp;packages.</p>
</li>
</ul>
</p>
Expand Down
2 changes: 2 additions & 0 deletions archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ <h1 class="blogtitle">
<h1>Archives for James Cooke</h1>

<dl>
<dt>Mar 28, 2024</dt>
<dd><a href="https://jamescooke.info/why-isnt-the-uk-in-dst-yet.html">Why isn&#8217;t the <span class="caps">UK</span> in <span class="caps">DST</span>&nbsp;yet?!</a></dd>
<dt>Mar 07, 2024</dt>
<dd><a href="https://jamescooke.info/pipxs-upgrade-is-shallow-lets-go-deeper.html">Pipx&#8217;s upgrade is shallow, let&#8217;s go&nbsp;deeper</a></dd>
<dt>Feb 18, 2024</dt>
Expand Down
13 changes: 13 additions & 0 deletions author/james.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ <h1>
Latest posts
</h1>

<div class="row">
<div class="span1">
<p class="postdate">Mar 28, 2024</p>
</div>
<div class="span4">
<h2 class="small">
<a href="https://jamescooke.info/why-isnt-the-uk-in-dst-yet.html" rel='bookmark'>Why isn&#8217;t the <span class="caps">UK</span> in <span class="caps">DST</span>&nbsp;yet?!</a>
</h2>
<div class="article-excerpt"> <p>British Summer Time is due to start this weekend. However, for some
reason, it&#8217;s three weeks after the usual <span class="caps">USA</span> switch over, rather than the
usual two. Why is this? And when will it happen&nbsp;again?</p> </div>
</div>
</div>
<div class="row">
<div class="span1">
<p class="postdate">Mar 07, 2024</p>
Expand Down
2 changes: 1 addition & 1 deletion authors.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1 class="blogtitle">

<h1>Authors on James Cooke</h1>
<ul>
<li><a href="https://jamescooke.info/author/james.html">James</a> (42)</li>
<li><a href="https://jamescooke.info/author/james.html">James</a> (43)</li>
</ul>

</div>
Expand Down
2 changes: 1 addition & 1 deletion categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h1>Categories on James Cooke</h1>
<li><a href="https://jamescooke.info/category/github-contributions.html">GitHub Contributions</a> (5)</li>
<li><a href="https://jamescooke.info/category/python.html">Python</a> (2)</li>
<li><a href="https://jamescooke.info/category/talk.html">Talk</a> (5)</li>
<li><a href="https://jamescooke.info/category/zzz-misc.html">ZZZ Misc...</a> (2)</li>
<li><a href="https://jamescooke.info/category/zzz-misc.html">ZZZ Misc...</a> (3)</li>
</ul>
</section>

Expand Down
13 changes: 13 additions & 0 deletions category/zzz-misc.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ <h1 class="blogtitle">
<h1>
Posts in 'ZZZ Misc...' </h1>

<div class="row">
<div class="span1">
<p class="postdate">Mar 28, 2024</p>
</div>
<div class="span4">
<h2 class="small">
<a href="https://jamescooke.info/why-isnt-the-uk-in-dst-yet.html" rel='bookmark'>Why isn&#8217;t the <span class="caps">UK</span> in <span class="caps">DST</span>&nbsp;yet?!</a>
</h2>
<div class="article-excerpt"> <p>British Summer Time is due to start this weekend. However, for some
reason, it&#8217;s three weeks after the usual <span class="caps">USA</span> switch over, rather than the
usual two. Why is this? And when will it happen&nbsp;again?</p> </div>
</div>
</div>
<div class="row">
<div class="span1">
<p class="postdate">Jul 14, 2013</p>
Expand Down
9 changes: 5 additions & 4 deletions drafts/flake8-aaa-06-dev-log.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,18 @@ <h3>noqa</h3>
<br>
&ndash; Further reading:
<ul>
<li>
<a href="https://jamescooke.info/why-isnt-the-uk-in-dst-yet.html">Why isn&#8217;t the <span class="caps">UK</span> in <span class="caps">DST</span>&nbsp;yet?!</a>
<p>British Summer Time is due to start this weekend. However, for some
reason, it&#8217;s three weeks after the usual <span class="caps">USA</span> switch over, rather than the
usual two. Why is this? And when will it happen&nbsp;again?</p></li>
<li>
<a href="https://jamescooke.info/pipxs-upgrade-is-shallow-lets-go-deeper.html">Pipx&#8217;s upgrade is shallow, let&#8217;s go&nbsp;deeper</a>
<p>Software installed in pipx&#8217;s managed virtual environments can get
stale. How can we update those packages <em>and</em> their&nbsp;dependencies?</p></li>
<li>
<a href="https://jamescooke.info/an-ode-to-pipx.html">An Ode to&nbsp;pipx</a>
<p>Using pipx has improved my daily development experience&nbsp;considerably.</p></li>
<li>
<a href="https://jamescooke.info/pytests-cache-and-gitignore.html">Pytest&#8217;s cache and&nbsp;gitignore</a>
<p class="first last">Sanity checking Pytest&#8217;s <tt class="docutils literal">.gitignore</tt> files.</p>
</li>
</ul>
</p>

Expand Down
9 changes: 5 additions & 4 deletions drafts/how-to-pipx-ify-a-private-package.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,18 @@ <h3>Oh no - moar&nbsp;packages!</h3>
<br>
&ndash; Further reading:
<ul>
<li>
<a href="https://jamescooke.info/why-isnt-the-uk-in-dst-yet.html">Why isn&#8217;t the <span class="caps">UK</span> in <span class="caps">DST</span>&nbsp;yet?!</a>
<p>British Summer Time is due to start this weekend. However, for some
reason, it&#8217;s three weeks after the usual <span class="caps">USA</span> switch over, rather than the
usual two. Why is this? And when will it happen&nbsp;again?</p></li>
<li>
<a href="https://jamescooke.info/pipxs-upgrade-is-shallow-lets-go-deeper.html">Pipx&#8217;s upgrade is shallow, let&#8217;s go&nbsp;deeper</a>
<p>Software installed in pipx&#8217;s managed virtual environments can get
stale. How can we update those packages <em>and</em> their&nbsp;dependencies?</p></li>
<li>
<a href="https://jamescooke.info/an-ode-to-pipx.html">An Ode to&nbsp;pipx</a>
<p>Using pipx has improved my daily development experience&nbsp;considerably.</p></li>
<li>
<a href="https://jamescooke.info/pytests-cache-and-gitignore.html">Pytest&#8217;s cache and&nbsp;gitignore</a>
<p class="first last">Sanity checking Pytest&#8217;s <tt class="docutils literal">.gitignore</tt> files.</p>
</li>
</ul>
</p>

Expand Down
9 changes: 5 additions & 4 deletions drafts/packaging-checklist.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,18 @@ <h2>Lint</h2>
<br>
&ndash; Further reading:
<ul>
<li>
<a href="https://jamescooke.info/why-isnt-the-uk-in-dst-yet.html">Why isn&#8217;t the <span class="caps">UK</span> in <span class="caps">DST</span>&nbsp;yet?!</a>
<p>British Summer Time is due to start this weekend. However, for some
reason, it&#8217;s three weeks after the usual <span class="caps">USA</span> switch over, rather than the
usual two. Why is this? And when will it happen&nbsp;again?</p></li>
<li>
<a href="https://jamescooke.info/pipxs-upgrade-is-shallow-lets-go-deeper.html">Pipx&#8217;s upgrade is shallow, let&#8217;s go&nbsp;deeper</a>
<p>Software installed in pipx&#8217;s managed virtual environments can get
stale. How can we update those packages <em>and</em> their&nbsp;dependencies?</p></li>
<li>
<a href="https://jamescooke.info/an-ode-to-pipx.html">An Ode to&nbsp;pipx</a>
<p>Using pipx has improved my daily development experience&nbsp;considerably.</p></li>
<li>
<a href="https://jamescooke.info/pytests-cache-and-gitignore.html">Pytest&#8217;s cache and&nbsp;gitignore</a>
<p class="first last">Sanity checking Pytest&#8217;s <tt class="docutils literal">.gitignore</tt> files.</p>
</li>
</ul>
</p>

Expand Down
125 changes: 125 additions & 0 deletions drafts/todo-rest-to-md.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" property="og:description" content="Migrating from RST to Markdown Everywhere I used to use RST (ReStructured Text) format for all my FOSS documentation, internal note taking and even for Python docstrings. However, I’ve decided to make my life simpler by using Markdown everywhere. This change came about around the summer of 2023. Since …">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="https://jamescooke.info/theme/droidstrap.css">
<link href='https://fonts.googleapis.com/css?family=Droid+Sans:400,700|Droid+Sans+Mono|Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>


<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>


<title>TODO ReST to MD // James Cooke // Brighton-based Python developer</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width">
</head>

<body>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<div class="fake"> </div>
<div class="container">
<div class="row">
<header class="span3">
<h1 class="blogtitle">
<a href="https://jamescooke.info"><img id="profileimg" src="/images/coding_cooke_ltd.png" alt="James Cooke" ></a>James Cooke
</h1>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/pages/hello-my-name-is-james.html">About</a></li>
<li><a href="/feeds/all.atom.xml">Atom Feed</a></li>
</ul>
</nav>
</header>

<section class="span7 offset1 content">
<article class="blogpost">
<header>
<h1><span class="caps">TODO</span> ReST to <span class="caps">MD</span></h1>
<p class="postdate" title="9999-12-31T23:59:59.999999-00:01">- Posted </p>
</header>
<div class='article-content'>
<h1>Migrating from <span class="caps">RST</span> to&nbsp;Markdown</h1>
<p><em>Everywhere</em></p>
<p>I used to use <span class="caps">RST</span> (ReStructured Text) format for all my <span class="caps">FOSS</span> documentation, internal note taking and even for Python&nbsp;docstrings.</p>
<p>However, I&#8217;ve decided to make my life simpler by using Markdown&nbsp;everywhere.</p>
<p>This change came about around the summer of 2023. Since then all posts on this blog have been in Markdown (yes all <span class="caps">FOUR</span> of&nbsp;them).</p>
<p>Essentially the change happened because I&#8217;ve improved my workflow for Markdown documents because they are the standard at work. In fact, thinking back, I can&#8217;t think of a work project that I&#8217;ve <em>ever</em> contributed to that <em>didn&#8217;t</em> use Markdown for documentation stored in&nbsp;repositories.</p>
<p>As we&#8217;ve worked to improve and upgrade the quality of our work documentation, I&#8217;ve also improved my local workflow. I use Frogmouth to render Markdown documents alongside my editor in Vim. We&#8217;ve used https://github.com/DavidAnson/markdownlint/ at work to nail down consistency, but I&#8217;ve not wired it into my workflow at home or work&nbsp;yet.</p>
<p>However, all this effort, and the fact I&#8217;ve finally learned how to do links in Markdown <code>[ ]( )</code>, means that I&#8217;m in a much better place to switch over to&nbsp;it.</p>
<p>Making the&nbsp;switch.</p>
<p>I&#8217;ve been using <code>pandoc</code> to make <span class="caps">RST</span> to <span class="caps">MD</span> conversions. It&#8217;s not perfect and I have to fix things up by hand afterwards, but it gets the bulk of the document&nbsp;&#8220;right&#8221;.</p>
<div class="highlight"><pre><span></span><code>pandoc -s -o rc.md release_checklist.rst
</code></pre></div>

<p>The annoying thing has been keeping history for those docs in git. For this I run the&nbsp;following:</p>
<ul>
<li>Make an initial Markdown clone of the&nbsp;document.</li>
<li><code>git mv</code> the existing <span class="caps">RST</span> document to its new <span class="caps">MD</span>&nbsp;filename.</li>
<li>Move the Markdown clone over the top of the markdown&nbsp;document.</li>
</ul>
<p>Most recently, I&#8217;ve converted the Flake8-<span class="caps">AAA</span> release checklist document from <span class="caps">RST</span> to Markdown. So, working in the <code>/docs</code> directory of that&nbsp;project:</p>
<div class="highlight"><pre><span></span><code>pandoc<span class="w"> </span>-s<span class="w"> </span>-o<span class="w"> </span>/tmp/rc.md<span class="w"> </span>release_checklist.rst
</code></pre></div>

<ol>
<li>move</li>
</ol>
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>mv<span class="w"> </span>release_checklist.rst<span class="w"> </span>release_checklist.md
</code></pre></div>

<ol>
<li>Dump the converted&nbsp;file</li>
</ol>
<div class="highlight"><pre><span></span><code>mv<span class="w"> </span>/tmp/rc.md<span class="w"> </span>release_checklist.md
</code></pre></div>

<p>Now at this stage, I usually hand-edit the changes and commit the move and edit at the same time, but you might be more cautious and want to commit the move, and then the edits on&nbsp;top.</p>
<h2>Issues</h2>
<p>At a personal level, I&#8217;ve not had any issues using Markdown over <span class="caps">RST</span>.</p>
<p>I find it easier to write and easier to render in&nbsp;terminal.</p>
<p>This blog is running the Pelican static site generator and that handles the Markdown just&nbsp;fine.</p>
<p>So I&#8217;ll continue using Markdown&nbsp;everywhere.</p>
<p>There might be interesting issues at an organisational level - this <a href="https://hachyderm.io/@remoquete/112168229391465692">Toot was
really interesting</a> and
mentions pros and cons of using Markdown for technical documentation (I think
&#8220;within a team&#8221; is&nbsp;implied).</p>
</div>
</article>

<hr />

<p class="article-meta">
&ndash;
Posted in <a href="https://jamescooke.info/category/zzz-misc.html">ZZZ Misc...</a>

</p>

<hr />



</section>

</div>
<div class="row">
<footer class="offset4 span7">
<p>&copy; James Cooke &ndash;
Built with <a href="https://github.com/jamescooke/droidstrap">Droidstrap theme</a>
for <a href="https://blog.getpelican.com/">Pelican</a>
</p>
<p>Licensed under <a rel="license" href="https://creativecommons.org/licenses/by-sa/3.0/deed.en_GB">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</p>
</footer>
</div>

</body>
</html>
Loading

0 comments on commit 26ddbb4

Please sign in to comment.