Skip to content

Commit d7fe14b

Browse files
updated customizing pandoc blog post
1 parent cb15b37 commit d7fe14b

File tree

19 files changed

+298
-292
lines changed

19 files changed

+298
-292
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ I'm addicted to reading fantasy/sci-fi books, so I have a [blog](https://learnby
66

77
## Posts
88

9+
* [Customizing pandoc to generate beautiful pdf and epub from markdown](https://learnbyexample.github.io/customizing-pandoc/)
910
* [Everything you need to know about sed substitution](https://learnbyexample.github.io/everything-about-sed-substitution/)
1011
* [CLI text processing with GNU awk book announcement](https://learnbyexample.github.io/cli-text-processing-awk-announcement/)
1112
* [awk idioms explained](https://learnbyexample.github.io/awk-idioms-explained/)
@@ -53,7 +54,6 @@ I'm addicted to reading fantasy/sci-fi books, so I have a [blog](https://learnby
5354
* [Emulating regexp lookarounds in GNU sed](https://learnbyexample.github.io/sed-lookarounds/)
5455
* [Search and replace tricks with ripgrep](https://learnbyexample.github.io/substitution-with-ripgrep/)
5556
* [I know Python basics, what next?](https://learnbyexample.github.io/python-intermediate/)
56-
* [Customizing pandoc to generate beautiful pdf and epub from markdown](https://learnbyexample.github.io/customizing-pandoc/)
5757
* [JavaScript regular expressions cheatsheet and examples](https://learnbyexample.github.io/javascript-regexp-cheatsheet/)
5858
* [Python regular expression cheatsheet and examples](https://learnbyexample.github.io/python-regex-cheatsheet/)
5959
* [Creating GUI Applications with wxPython - book review](https://learnbyexample.github.io/python-gui-book-review/)

atom.xml

Lines changed: 268 additions & 262 deletions
Large diffs are not rendered by default.

customizing-pandoc/index.html

Lines changed: 13 additions & 13 deletions
Large diffs are not rendered by default.

everything-about-sed-substitution/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@
139139
</span><span>$ s=$(</span><span style=color:#b39f04;>printf </span><span style=color:#d07711;>'</span><span style=color:#aeb52b;>%s</span><span style=color:#d07711;>' "$s" </span><span style=color:#72ab00;>|</span><span> sed </span><span style=color:#d07711;>'s#[[^$*.\/]#</span><span style=color:#aeb52b;>\\</span><span style=color:#d07711;>&#g'</span><span>)
140140
</span><span>$ </span><span style=color:#b39f04;>printf </span><span style=color:#d07711;>'</span><span style=color:#aeb52b;>%s</span><span style=color:#d07711;>\n' 'f*{[(\ta^b/d).*+?^$|]} - 3' </span><span style=color:#72ab00;>|</span><span> sed </span><span style=color:#d07711;>'s/'"$s"'/'"$r"'/g'
141141
</span><span>f</span><span style=color:#72ab00;>*</span><span>a</span><span style=color:#72ab00;>/</span><span>b</span><span style=color:#72ab00;>&</span><span>c\d </span><span style=color:#72ab00;>- </span><span style=color:#b3933a;>3
142-
</span></code></pre><p>See <a href=https://learnbyexample.github.io/multiline-search-and-replace/>my blog post</a> for multiline fixed string substitution examples.</p><br><h2 id=programming-ebooks>Programming ebooks<a aria-label="Anchor link for: programming-ebooks" class=zola-anchor href=#programming-ebooks>🔗</a></h2><p>Check out <a href=https://learnbyexample.github.io/books/>my ebooks</a> on Regular Expressions, Linux CLI tools, Python and Vim. You can get them all as a single bundle via <a href=https://leanpub.com/b/learnbyexample-all-books>leanpub</a> or <a href=https://learnbyexample.gumroad.com/l/all-books>gumroad</a>.</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/gnu-sed/>#gnu-sed</a><a href=https://learnbyexample.github.io/tags/linux/>#linux</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=next href=https://learnbyexample.github.io/cli-text-processing-awk-announcement/>CLI text processing with GNU awk book announcement →</a><br></div><hr color=#e6e6e6><p>📰 Use <a href=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> ✅ Follow me on <a href=https://twitter.com/learn_byexample>Twitter</a>, <a href=https://github.com/learnbyexample>GitHub</a> and <a href=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> 📧 Subscribe to <a href=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hr color=#e6e6e6></div></article></div></main></div><script src=https://learnbyexample.github.io/even.js></script>
142+
</span></code></pre><p>See <a href=https://learnbyexample.github.io/multiline-search-and-replace/>my blog post</a> for multiline fixed string substitution examples.</p><br><h2 id=programming-ebooks>Programming ebooks<a aria-label="Anchor link for: programming-ebooks" class=zola-anchor href=#programming-ebooks>🔗</a></h2><p>Check out <a href=https://learnbyexample.github.io/books/>my ebooks</a> on Regular Expressions, Linux CLI tools, Python and Vim. You can get them all as a single bundle via <a href=https://leanpub.com/b/learnbyexample-all-books>leanpub</a> or <a href=https://learnbyexample.gumroad.com/l/all-books>gumroad</a>.</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/gnu-sed/>#gnu-sed</a><a href=https://learnbyexample.github.io/tags/linux/>#linux</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=previous href=https://learnbyexample.github.io/customizing-pandoc/>← Customizing pandoc to generate beautiful pdf and epub from markdown</a><br><p><a class=next href=https://learnbyexample.github.io/cli-text-processing-awk-announcement/>CLI text processing with GNU awk book announcement →</a><br></div><hr color=#e6e6e6><p>📰 Use <a href=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> ✅ Follow me on <a href=https://twitter.com/learn_byexample>Twitter</a>, <a href=https://github.com/learnbyexample>GitHub</a> and <a href=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> 📧 Subscribe to <a href=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hr color=#e6e6e6></div></article></div></main></div><script src=https://learnbyexample.github.io/even.js></script>

index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

javascript-regexp-cheatsheet/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,4 @@
199199
</span><span style=color:#72ab00;>> </span><span style=color:#668f14;>let </span><span style=color:#5597d6;>para </span><span style=color:#72ab00;>= </span><span style=color:#d07711;>'"Hi", there! How *are* you? All fine here.'
200200
</span><span style=color:#72ab00;>> </span><span style=color:#5597d6;>para</span><span>.</span><span style=color:#b39f04;>replace</span><span>(</span><span style=color:#72ab00;>/</span><span>[\</span><span style=color:#5597d6;>p</span><span>{</span><span style=color:#5597d6;>P</span><span>}</span><span style=color:#72ab00;>--</span><span>[.</span><span style=color:#72ab00;>!?</span><span>]]</span><span style=color:#72ab00;>+/</span><span style=color:#5597d6;>gv</span><span>, </span><span style=color:#d07711;>''</span><span>)
201201
</span><span style=color:#72ab00;>< </span><span style=color:#d07711;>'Hi there! How are you? All fine here.'
202-
</span></code></pre><br><h2 id=debugging-and-visualization-tools>Debugging and Visualization tools<a aria-label="Anchor link for: debugging-and-visualization-tools" class=zola-anchor href=#debugging-and-visualization-tools>🔗</a></h2><p>As your regexp gets complicated, it can get difficult to debug when you run into issues. Building your regexp step by step from scratch and testing against input strings will go a long way in correcting the problem. To aid in such a process, you could use <a href="https://news.ycombinator.com/item?id=20614847">various online regexp tools</a>.<p><a href=https://regex101.com/r/HSeO0z/1>regex101</a> is a popular site to test your regexp. You'll have to first choose the flavor as JavaScript. Then you can add your regexp, input strings, choose flags and an optional replacement string. Matching portions will be highlighted and explanation is offered in separate panes. There's also a quick reference and other features like link sharing, code generator, quiz, cheatsheet, etc.<p align=center><img alt="regex101 example" src=/images/books/regex101.png><p>Another useful tool is <a href="https://jex.im/regulex/#!flags=&re=%5Cbpar(en%7Cro)%3Ft%5Cb">jex: regulex</a> which converts your regexp to a railroad diagram, thus providing a visual aid to understanding the pattern.<p align=center><img alt="regulex example" src=/images/books/regulex.png></p><br><h2 id=understanding-javascript-regexp-book>Understanding JavaScript RegExp book<a aria-label="Anchor link for: understanding-javascript-regexp-book" class=zola-anchor href=#understanding-javascript-regexp-book>🔗</a></h2><p>Visit my repo <a href=https://github.com/learnbyexample/learn_js_regexp>learn_js_regexp</a> for details about the book I wrote on JavaScript regular expressions. The ebook uses plenty of examples to explain the concepts from the basics and includes <a href=https://github.com/learnbyexample/learn_js_regexp/blob/master/Exercises.md>exercises</a> to test your understanding. The cheatsheet and examples presented in this post are based on the contents of this book.<p align=center><img alt="Understanding JavaScript RegExp cover image" height=360px loading=lazy src=https://raw.githubusercontent.com/learnbyexample/learn_js_regexp/master/images/js_regexp_ls.png width=640px></div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/javascript/>#javascript</a><a href=https://learnbyexample.github.io/tags/regular-expressions/>#regular-expressions</a><a href=https://learnbyexample.github.io/tags/cheatsheet/>#cheatsheet</a><a href=https://learnbyexample.github.io/tags/examples/>#examples</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=previous href=https://learnbyexample.github.io/customizing-pandoc/>← Customizing pandoc to generate beautiful pdf and epub from markdown</a><br><p><a class=next href=https://learnbyexample.github.io/python-regex-cheatsheet/>Python regular expression cheatsheet and examples →</a><br></div><hr color=#e6e6e6><p>📰 Use <a href=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> ✅ Follow me on <a href=https://twitter.com/learn_byexample>Twitter</a>, <a href=https://github.com/learnbyexample>GitHub</a> and <a href=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> 📧 Subscribe to <a href=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hr color=#e6e6e6></div></article></div></main></div><script src=https://learnbyexample.github.io/even.js></script>
202+
</span></code></pre><br><h2 id=debugging-and-visualization-tools>Debugging and Visualization tools<a aria-label="Anchor link for: debugging-and-visualization-tools" class=zola-anchor href=#debugging-and-visualization-tools>🔗</a></h2><p>As your regexp gets complicated, it can get difficult to debug when you run into issues. Building your regexp step by step from scratch and testing against input strings will go a long way in correcting the problem. To aid in such a process, you could use <a href="https://news.ycombinator.com/item?id=20614847">various online regexp tools</a>.<p><a href=https://regex101.com/r/HSeO0z/1>regex101</a> is a popular site to test your regexp. You'll have to first choose the flavor as JavaScript. Then you can add your regexp, input strings, choose flags and an optional replacement string. Matching portions will be highlighted and explanation is offered in separate panes. There's also a quick reference and other features like link sharing, code generator, quiz, cheatsheet, etc.<p align=center><img alt="regex101 example" src=/images/books/regex101.png><p>Another useful tool is <a href="https://jex.im/regulex/#!flags=&re=%5Cbpar(en%7Cro)%3Ft%5Cb">jex: regulex</a> which converts your regexp to a railroad diagram, thus providing a visual aid to understanding the pattern.<p align=center><img alt="regulex example" src=/images/books/regulex.png></p><br><h2 id=understanding-javascript-regexp-book>Understanding JavaScript RegExp book<a aria-label="Anchor link for: understanding-javascript-regexp-book" class=zola-anchor href=#understanding-javascript-regexp-book>🔗</a></h2><p>Visit my repo <a href=https://github.com/learnbyexample/learn_js_regexp>learn_js_regexp</a> for details about the book I wrote on JavaScript regular expressions. The ebook uses plenty of examples to explain the concepts from the basics and includes <a href=https://github.com/learnbyexample/learn_js_regexp/blob/master/Exercises.md>exercises</a> to test your understanding. The cheatsheet and examples presented in this post are based on the contents of this book.<p align=center><img alt="Understanding JavaScript RegExp cover image" height=360px loading=lazy src=https://raw.githubusercontent.com/learnbyexample/learn_js_regexp/master/images/js_regexp_ls.png width=640px></div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/javascript/>#javascript</a><a href=https://learnbyexample.github.io/tags/regular-expressions/>#regular-expressions</a><a href=https://learnbyexample.github.io/tags/cheatsheet/>#cheatsheet</a><a href=https://learnbyexample.github.io/tags/examples/>#examples</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=previous href=https://learnbyexample.github.io/python-intermediate/>← I know Python basics, what next?</a><br><p><a class=next href=https://learnbyexample.github.io/python-regex-cheatsheet/>Python regular expression cheatsheet and examples →</a><br></div><hr color=#e6e6e6><p>📰 Use <a href=https://learnbyexample.github.io/atom.xml>this link</a> for the Atom feed. <br> ✅ Follow me on <a href=https://twitter.com/learn_byexample>Twitter</a>, <a href=https://github.com/learnbyexample>GitHub</a> and <a href=https://www.youtube.com/c/learnbyexample42>Youtube</a> for interesting tech nuggets. <br> 📧 Subscribe to <a href=https://learnbyexample.gumroad.com/l/learnbyexample-weekly>learnbyexample weekly</a> for programming resources, tips, tools, free ebooks and more (free newsletter, delivered every Friday).<hr color=#e6e6e6></div></article></div></main></div><script src=https://learnbyexample.github.io/even.js></script>

0 commit comments

Comments
 (0)