Chris's Wiki :: blog/python/TweakingVersusReplacement Commentshttps://utcc.utoronto.ca/~cks/space/blog/python/TweakingVersusReplacement?atomcommentsDWiki2015-09-14T17:02:12ZRecent comments in Chris's Wiki :: blog/python/TweakingVersusReplacement.By Chris Siebenmann on /blog/python/TweakingVersusReplacementtag:CSpace:blog/python/TweakingVersusReplacement:558fc6b1df682f1c92e65e49d9ceda49674425daChris Siebenmann<div class="wikitext"><p>I actually like almost all of my current wikitext dialect so I'm not
looking to make any sort of major switch. If I did, I would make it
primarily time-based (ie all content after time X is rendered with
the new engine by default) because I'm not interested in littering my
content with explicit format annotations.</p>
<p>For various reasons I continue to think that Markdown is not ideal
for my usage cases, although my resistance is fading a bit. Any HTML
to Markdown (or whatever) I do would probably be hand-tweaked for
my specific HTML output, since I know a lot about it and what it's
supposed to render into. With that said, a fully custom 'from my HTML
to whatever' converter is an interesting general solution to the whole
conversion problem if I ever want to do a full conversion, especially
since there are a whole lot of HTML parsers out there that will turn
well-structured HTML into some sort of AST or token stream; all I'd
need is a backend that renders the result out in my own new markup.</p>
</div>2015-09-14T17:02:12ZBy Alan on /blog/python/TweakingVersusReplacementtag:CSpace:blog/python/TweakingVersusReplacement:2847742a350bcaa7125454b9e560617e8c1c84b6Alan<div class="wikitext"><p>The nuclear alternative would be to round-trip through HTML. Saves dealing with finicky custom parsing.</p>
<p>It'd start getting lossy and/or hard to test if you use any CSS classes. At least your blog formatting seems reasonably simple.</p>
<p>Maybe worth considering, if you want to switch to a markdown derivative :).</p>
<p>JS: <a href="https://domchristie.github.io/to-markdown/">https://domchristie.github.io/to-markdown/</a></p>
<p>Python: <a href="https://github.com/Alir3z4/html2text">https://github.com/Alir3z4/html2text</a></p>
</div>2015-09-14T12:32:49ZBy Moritz on /blog/python/TweakingVersusReplacementtag:CSpace:blog/python/TweakingVersusReplacement:b920219f9d0fb49afeb99b17bd369c181528f51eMoritz<div class="wikitext"><p>Why don't you introduce the ability to switch between two different renderer versions through some kind of meta tag on your entries?</p>
<p>So you could just use the new engine for selected and new posts and don't worry about the old ones.</p>
</div>2015-09-14T06:09:45Z