Skip to content

Commit 688c5d1

Browse files
updated TUI app details
1 parent 7389d43 commit 688c5d1

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

β€Žatom.xml

+17-17
Large diffs are not rendered by default.

β€Žinteractive-grep-sed-awk-exercises/index.html

+2-2
Large diffs are not rendered by default.

β€Žinteractive-linux-cli-exercises/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html><html lang=en><head><meta content="IE=edge" http-equiv=X-UA-Compatible><meta content="text/html; charset=utf-8" http-equiv=content-type><meta content="width=device-width,initial-scale=1.0,maximum-scale=1" name=viewport><title>Interactive Linux CLI Text Processing Exercises</title><link href=https://learnbyexample.github.io/atom.xml rel=alternate title=RSS type=application/atom+xml><script src=https://cdnjs.cloudflare.com/ajax/libs/slideout/1.0.1/slideout.min.js></script><link href=https://learnbyexample.github.io/site.css rel=stylesheet><meta content="Interactive Linux CLI Text Processing Exercises" property=og:title><meta content=website property=og:type><meta content="60+ interactive exercises to test your Linux CLI text processing skills" property=og:description><meta content=https://learnbyexample.github.io/interactive-linux-cli-exercises/ property=og:url><meta content=https://raw.githubusercontent.com/learnbyexample/TUI-apps/main/CLI-Exercises/cli_exercises.png property=og:image><meta content=1200 property=og:image:width><meta content=699 property=og:image:height><meta content=summary_large_image property=twitter:card><meta content=@learn_byexample property=twitter:site><link href=https://learnbyexample.github.io/favicon.svg rel=icon><link rel="shortcut icon" href=https://learnbyexample.github.io/favicon.png><body><div class=container><div class=mobile-navbar id=mobile-navbar><div class=mobile-header-logo><a class=logo href=/>learnbyexample</a></div><div class="mobile-navbar-icon icon-out"><span></span><span></span><span></span></div></div><nav class="mobile-menu slideout-menu slideout-menu-left" id=mobile-menu><ul class=mobile-menu-list><li class=mobile-menu-item><a href=https://learnbyexample.github.io/books> Books </a><li class=mobile-menu-item><a href=https://learnbyexample.github.io/mini> Mini </a><li class=mobile-menu-item><a href=https://learnbyexample.github.io/tips> Tips </a><li class=mobile-menu-item><a href=https://learnbyexample.github.io/tags> Tags </a><li class=mobile-menu-item><a href=https://learnbyexample.github.io/about> About </a></ul></nav><header id=header><div class=logo><a href=https://learnbyexample.github.io>learnbyexample</a></div><nav class=menu><ul><li><a href=https://learnbyexample.github.io/books> Books </a><li><a href=https://learnbyexample.github.io/mini> Mini </a><li><a href=https://learnbyexample.github.io/tips> Tips </a><li><a href=https://learnbyexample.github.io/tags> Tags </a><li><a href=https://learnbyexample.github.io/about> About </a></ul></nav></header><main><div class=content id=mobile-panel><div class=post-toc id=post-toc><h2 class=post-toc-title>Contents</h2><div class="post-toc-content always-active"><nav id=TableOfContents><ul><li><a class=toc-link href=https://learnbyexample.github.io/interactive-linux-cli-exercises/#installation>Installation</a><li><a class=toc-link href=https://learnbyexample.github.io/interactive-linux-cli-exercises/#video-demo>Video demo</a><li><a class=toc-link href=https://learnbyexample.github.io/interactive-linux-cli-exercises/#brief-guide>Brief Guide</a><li><a class=toc-link href=https://learnbyexample.github.io/interactive-linux-cli-exercises/#ebook>Ebook</a><li><a class=toc-link href=https://learnbyexample.github.io/interactive-linux-cli-exercises/#feedback>Feedback</a></ul></nav></div></div><article class=post><header class=post__header><h1 class=post__title><a href=https://learnbyexample.github.io/interactive-linux-cli-exercises/>Interactive Linux CLI Text Processing Exercises</a></h1><div class=post__meta><span class=post__time>2022-12-09</span></div></header><div class=post-content><p>Having an interactive program that automatically loads questions and checks the solution is wonderful to have while learning a topic. This <a href=https://github.com/learnbyexample/TUI-apps/tree/main/CLI-Exercises>TUI app</a> has 60+ beginner to intermediate level exercises for Linux CLI text processing tools.<p align=center><img alt="Sample screenshot for CLI exercises" loading=lazy src=https://raw.githubusercontent.com/learnbyexample/TUI-apps/main/CLI-Exercises/cli_exercises.png></p><span id=continue-reading></span><br><h2 id=installation>Installation<a aria-label="Anchor link for: installation" class=zola-anchor href=#installation>πŸ”—</a></h2><p>Last month, I started learning a Python TUI framework called <a href=https://textual.textualize.io/>Textual</a>. After working on a <a href=https://github.com/learnbyexample/TUI-apps/tree/main/SquareTicTacToe>4x4 board game</a>, I made an interactive app to help you test your CLI text processing skills with 60+ beginner to intermediate level exercises.<p>You'll need Python for this (I used 3.8, it should work for more recent versions too). This app is available on PyPI as <a href=https://pypi.org/project/cliexercises/>cliexercises</a>. Example installation instructions are shown below, adjust them based on your preferences and OS.<pre class=language-bash data-lang=bash style=background-color:#f5f5f5;color:#1f1f1f;><code class=language-bash data-lang=bash><span style=color:#7f8989;># virtual environment
1+
<!doctype html><html lang=en><head><meta content="IE=edge" http-equiv=X-UA-Compatible><meta content="text/html; charset=utf-8" http-equiv=content-type><meta content="width=device-width,initial-scale=1.0,maximum-scale=1" name=viewport><title>Interactive Linux CLI Text Processing Exercises</title><link href=https://learnbyexample.github.io/atom.xml rel=alternate title=RSS type=application/atom+xml><script src=https://cdnjs.cloudflare.com/ajax/libs/slideout/1.0.1/slideout.min.js></script><link href=https://learnbyexample.github.io/site.css rel=stylesheet><meta content="Interactive Linux CLI Text Processing Exercises" property=og:title><meta content=website property=og:type><meta content="60+ interactive exercises to test your Linux CLI text processing skills" property=og:description><meta content=https://learnbyexample.github.io/interactive-linux-cli-exercises/ property=og:url><meta content=https://raw.githubusercontent.com/learnbyexample/TUI-apps/main/CLI-Exercises/cli_exercises.png property=og:image><meta content=1200 property=og:image:width><meta content=699 property=og:image:height><meta content=summary_large_image property=twitter:card><meta content=@learn_byexample property=twitter:site><link href=https://learnbyexample.github.io/favicon.svg rel=icon><link rel="shortcut icon" href=https://learnbyexample.github.io/favicon.png><body><div class=container><div class=mobile-navbar id=mobile-navbar><div class=mobile-header-logo><a class=logo href=/>learnbyexample</a></div><div class="mobile-navbar-icon icon-out"><span></span><span></span><span></span></div></div><nav class="mobile-menu slideout-menu slideout-menu-left" id=mobile-menu><ul class=mobile-menu-list><li class=mobile-menu-item><a href=https://learnbyexample.github.io/books> Books </a><li class=mobile-menu-item><a href=https://learnbyexample.github.io/mini> Mini </a><li class=mobile-menu-item><a href=https://learnbyexample.github.io/tips> Tips </a><li class=mobile-menu-item><a href=https://learnbyexample.github.io/tags> Tags </a><li class=mobile-menu-item><a href=https://learnbyexample.github.io/about> About </a></ul></nav><header id=header><div class=logo><a href=https://learnbyexample.github.io>learnbyexample</a></div><nav class=menu><ul><li><a href=https://learnbyexample.github.io/books> Books </a><li><a href=https://learnbyexample.github.io/mini> Mini </a><li><a href=https://learnbyexample.github.io/tips> Tips </a><li><a href=https://learnbyexample.github.io/tags> Tags </a><li><a href=https://learnbyexample.github.io/about> About </a></ul></nav></header><main><div class=content id=mobile-panel><div class=post-toc id=post-toc><h2 class=post-toc-title>Contents</h2><div class="post-toc-content always-active"><nav id=TableOfContents><ul><li><a class=toc-link href=https://learnbyexample.github.io/interactive-linux-cli-exercises/#installation>Installation</a><li><a class=toc-link href=https://learnbyexample.github.io/interactive-linux-cli-exercises/#video-demo>Video demo</a><li><a class=toc-link href=https://learnbyexample.github.io/interactive-linux-cli-exercises/#brief-guide>Brief Guide</a><li><a class=toc-link href=https://learnbyexample.github.io/interactive-linux-cli-exercises/#ebook>Ebook</a><li><a class=toc-link href=https://learnbyexample.github.io/interactive-linux-cli-exercises/#feedback>Feedback</a></ul></nav></div></div><article class=post><header class=post__header><h1 class=post__title><a href=https://learnbyexample.github.io/interactive-linux-cli-exercises/>Interactive Linux CLI Text Processing Exercises</a></h1><div class=post__meta><span class=post__time>2022-12-09</span></div></header><div class=post-content><p>Having an interactive program that automatically loads questions and checks the solution is wonderful to have while learning a topic. This <a href=https://github.com/learnbyexample/TUI-apps/tree/main/CLI-Exercises>TUI app</a> has 60+ beginner to intermediate level exercises for Linux CLI text processing tools.<p align=center><img alt="Sample screenshot for CLI exercises" loading=lazy src=https://raw.githubusercontent.com/learnbyexample/TUI-apps/main/CLI-Exercises/cli_exercises.png></p><span id=continue-reading></span><br><h2 id=installation>Installation<a aria-label="Anchor link for: installation" class=zola-anchor href=#installation>πŸ”—</a></h2><p>Last month, I started learning a Python TUI framework called <a href=https://textual.textualize.io/>Textual</a>. After working on a <a href=https://github.com/learnbyexample/TUI-apps/tree/main/SquareTicTacToe>4x4 board game</a>, I made an interactive app to help you test your CLI text processing skills with 60+ beginner to intermediate level exercises.<p>You'll need Python for this. This app is available on PyPI as <a href=https://pypi.org/project/cliexercises/>cliexercises</a>. Example installation instructions are shown below, adjust them based on your preferences and OS.<pre class=language-bash data-lang=bash style=background-color:#f5f5f5;color:#1f1f1f;><code class=language-bash data-lang=bash><span style=color:#7f8989;># virtual environment
22
</span><span style=color:#5597d6;>$</span><span> python3</span><span style=color:#5597d6;> -m</span><span> venv textual_apps
33
</span><span style=color:#5597d6;>$</span><span> cd textual_apps
44
</span><span style=color:#5597d6;>$</span><span> source bin/activate
@@ -10,4 +10,4 @@
1010
</span><span style=color:#b39f04;>alias </span><span style=color:#c23f31;>cliexercises</span><span style=color:#72ab00;>=</span><span style=color:#d07711;>'/path/to/textual_apps/bin/cliexercises'
1111
</span></code></pre><p>As an alternative to manually managing such virtual environments, you can use <a href=https://github.com/pypa/pipx>https://github.com/pypa/pipx</a> instead:<pre class=language-bash data-lang=bash style=background-color:#f5f5f5;color:#1f1f1f;><code class=language-bash data-lang=bash><span style=color:#5597d6;>$</span><span> pipx install cliexercises
1212
</span><span style=color:#5597d6;>$</span><span> cliexercises
13-
</span></code></pre><p>As yet another alternative, you can install <code>textual</code> (see <a href=https://textual.textualize.io/getting_started/>Textual documentation</a> for more details), clone my <a href=https://github.com/learnbyexample/TUI-apps>TUI-apps repository</a> and run the <code>cli_exercises.py</code> file.<p>Adjust the terminal dimensions for the widgets to appear properly, for example 84x25 (characters x lines).</p><br><h2 id=video-demo>Video demo<a aria-label="Anchor link for: video-demo" class=zola-anchor href=#video-demo>πŸ”—</a></h2><p align=center><iframe allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture" title="YouTube video player" allowfullscreen frameborder=0 height=315 loading=lazy src=https://www.youtube.com/embed/lcm_F7zPzRY width=560></iframe></p><br><h2 id=brief-guide>Brief Guide<a aria-label="Anchor link for: brief-guide" class=zola-anchor href=#brief-guide>πŸ”—</a></h2><ul><li>Press <strong>Ctrl+p</strong> and <strong>Ctrl+n</strong> to navigate the questions list.<li>Type the command in the box below the question.<li>Press <strong>Enter</strong> to execute the command. <ul><li>Output would be displayed below the command box.<li>If the output matches the expected results, the command box will turn <em>green</em> and a reference solution will also be shown.<li>Issues due to errors and timeout (about <code>2</code> seconds) will be displayed in <em>red</em>.</ul><li>Press <strong>Ctrl+s</strong> to show the reference solution if you are unable to solve an exercise.<li>Press <strong>Ctrl+t</strong> to toggle between light and dark themes.<li>Press <strong>Ctrl+q</strong> to quit the app.<li>Some basic readline-like shortcuts are supported, for example <strong>Ctrl+u</strong>, <strong>Ctrl+k</strong>, <strong>Ctrl+w</strong>, etc</ul><p>Your progress is automatically saved and restored. Already answered questions will be skipped.<blockquote><p><img alt=warning src=/images/warning.svg> There is no safeguard against the command you are executing. They are treated as if you typed them from a shell session.</blockquote><p>For more detailed instructions, visit <a href=https://github.com/learnbyexample/TUI-apps/tree/main/CLI-Exercises>https://github.com/learnbyexample/TUI-apps/tree/main/CLI-Exercises</a></p><br><h2 id=ebook>Ebook<a aria-label="Anchor link for: ebook" class=zola-anchor href=#ebook>πŸ”—</a></h2><p>The exercises in this app have been adapted from my <a href=https://learnbyexample.github.io/books/>Command Line</a> ebooks.</p><br><h2 id=feedback>Feedback<a aria-label="Anchor link for: feedback" class=zola-anchor href=#feedback>πŸ”—</a></h2><p>I'd highly appreciate your feedback. Please file <a href=https://github.com/learnbyexample/TUI-apps/issues>an issue</a> if there are bugs, crashes, etc.<p>Hope you find this TUI app useful. Happy learning :)</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/linux/>#linux</a><a href=https://learnbyexample.github.io/tags/command-line/>#command-line</a><a href=https://learnbyexample.github.io/tags/exercises/>#exercises</a><a href=https://learnbyexample.github.io/tags/tui/>#TUI</a><a href=https://learnbyexample.github.io/tags/textual/>#textual</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=previous href=https://learnbyexample.github.io/2022-year-in-perspective/>← 2022: year in perspective</a><br><p><a class=next href=https://learnbyexample.github.io/programming-deals-2022/>Festive deals for books on Python, Linux, JavaScript, Regular Expressions and more β†’</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>
13+
</span></code></pre><p>As yet another alternative, you can install <code>textual==0.85.2</code> (see <a href=https://textual.textualize.io/getting_started/>Textual documentation</a> for more details), clone my <a href=https://github.com/learnbyexample/TUI-apps>TUI-apps repository</a> and run the <code>cli_exercises.py</code> file.<p>Adjust the terminal dimensions for the widgets to appear properly, for example 84x25 (characters x lines).</p><br><h2 id=video-demo>Video demo<a aria-label="Anchor link for: video-demo" class=zola-anchor href=#video-demo>πŸ”—</a></h2><p align=center><iframe allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture" title="YouTube video player" allowfullscreen frameborder=0 height=315 loading=lazy src=https://www.youtube.com/embed/lcm_F7zPzRY width=560></iframe></p><br><h2 id=brief-guide>Brief Guide<a aria-label="Anchor link for: brief-guide" class=zola-anchor href=#brief-guide>πŸ”—</a></h2><ul><li>Press <strong>Ctrl+p</strong> and <strong>Ctrl+n</strong> to navigate the questions list.<li>Type the command in the box below the question.<li>Press <strong>Enter</strong> to execute the command. <ul><li>Output would be displayed below the command box.<li>If the output matches the expected results, the command box will turn <em>green</em> and a reference solution will also be shown.<li>Issues due to errors and timeout (about <code>2</code> seconds) will be displayed in <em>red</em>.</ul><li>Press <strong>Ctrl+s</strong> to toggle the reference solution box.<li>Press <strong>Ctrl+t</strong> to toggle between light and dark themes.<li>Press <strong>Ctrl+q</strong> to quit the app.<li>Some basic readline-like shortcuts are supported, for example <strong>Ctrl+u</strong>, <strong>Ctrl+k</strong>, <strong>Ctrl+w</strong>, etc</ul><p>Your progress is automatically saved and restored. Already answered questions will be skipped.<blockquote><p><img alt=warning src=/images/warning.svg> There is no safeguard against the command you are executing. They are treated as if you typed them from a shell session.</blockquote><p>For more detailed instructions, visit <a href=https://github.com/learnbyexample/TUI-apps/tree/main/CLI-Exercises>https://github.com/learnbyexample/TUI-apps/tree/main/CLI-Exercises</a></p><br><h2 id=ebook>Ebook<a aria-label="Anchor link for: ebook" class=zola-anchor href=#ebook>πŸ”—</a></h2><p>The exercises in this app have been adapted from my <a href=https://learnbyexample.github.io/books/>Command Line</a> ebooks.</p><br><h2 id=feedback>Feedback<a aria-label="Anchor link for: feedback" class=zola-anchor href=#feedback>πŸ”—</a></h2><p>I'd highly appreciate your feedback. Please file <a href=https://github.com/learnbyexample/TUI-apps/issues>an issue</a> if there are bugs, crashes, etc.<p>Hope you find this TUI app useful. Happy learning :)</div><div class=post-footer><div class=post-tags><a href=https://learnbyexample.github.io/tags/linux/>#linux</a><a href=https://learnbyexample.github.io/tags/command-line/>#command-line</a><a href=https://learnbyexample.github.io/tags/exercises/>#exercises</a><a href=https://learnbyexample.github.io/tags/tui/>#TUI</a><a href=https://learnbyexample.github.io/tags/textual/>#textual</a></div><hr color=#e6e6e6><div class=post-nav><p><a class=previous href=https://learnbyexample.github.io/2022-year-in-perspective/>← 2022: year in perspective</a><br><p><a class=next href=https://learnbyexample.github.io/programming-deals-2022/>Festive deals for books on Python, Linux, JavaScript, Regular Expressions and more β†’</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)