<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Eric on Medium]]></title>
        <description><![CDATA[Stories by Eric on Medium]]></description>
        <link>https://medium.com/@wiemanneric?source=rss-cb46c5f0c5c9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*SDu2GNYs1kXG3GM1kuoF1w@2x.jpeg</url>
            <title>Stories by Eric on Medium</title>
            <link>https://medium.com/@wiemanneric?source=rss-cb46c5f0c5c9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 01:17:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wiemanneric/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to write a simple termial menu using the simple-term-menu lib.]]></title>
            <link>https://medium.com/@wiemanneric/how-to-write-a-simple-termial-menu-using-the-simple-term-menu-lib-9ce90bbd6cf8?source=rss-cb46c5f0c5c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ce90bbd6cf8</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Eric]]></dc:creator>
            <pubDate>Tue, 20 Feb 2024 21:21:00 GMT</pubDate>
            <atom:updated>2024-02-21T10:34:01.929Z</atom:updated>
            <content:encoded><![CDATA[<p>If you want to <strong>create a simple menu</strong> in the <strong>terminal</strong>, for example, when being connected via an ssh connection, I will show you the fastest way how to set it up and structure it.<br>Personally, I have used it to control a recycling robot and change settings wirelessly via a raspberry pi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/207/0*xHh4yn5ZR-lgoCLB" /><figcaption>A small terminal menu with different styling options.</figcaption></figure><h4>1. Installation</h4><p>To install the <a href="https://pypi.org/project/simple-term-menu/">simple-term-menu</a> v1.6.4 library simply <strong>paste this command</strong> into the terminal:</p><pre>pip install simple-term-menu</pre><p>Note: If this command does not work, you will need to install pip, which is part of the Python environment. How to <strong>install pip </strong>can be found <a href="https://pip.pypa.io/en/stable/installation/">here</a>.</p><h4>2. Setup</h4><p>To show how this library works and how to set it up, I will use the example of the documentation website:</p><pre>from simple_term_menu import TerminalMenu<br><br>def main():<br>    options = [&quot;entry 1&quot;, &quot;entry 2&quot;, &quot;entry 3&quot;]<br>    terminal_menu = TerminalMenu(options)<br>    menu_entry_index = terminal_menu.show()<br>    print(f&quot;You have selected {options[menu_entry_index]}!&quot;)<br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><p>First, you will need to <strong>import the TerminalMenu</strong> part from the simple_term_menu library as always.</p><pre>from simple_term_menu import TerminalMenu</pre><p>After that, the <strong>main loop</strong> is being <strong>started,</strong> and the possible menu options are listed. Here, it doesn’t matter how many different ones are listed; you can add as many options as you like. Then, the terminal_menu is being defined using the menu and then shown with the terminal_menu.show() function.</p><pre>def main():<br>    options = [&quot;entry 1&quot;, &quot;entry 2&quot;, &quot;entry 3&quot;]<br>    terminal_menu = TerminalMenu(options)<br>    menu_entry_index = terminal_menu.show()</pre><p>When the entry is selected, the program prints the name of the menu saved in the menu_entry_index.</p><p>If you want to add just <strong>one general result for every selected entry,</strong> we could stop here. Usually this is not the case, so we will continue <strong>how to add a own part of code to every entry</strong> itself.</p><pre><br>import time<br>from simple_term_menu import TerminalMenu<br><br><br>def main():<br>    main_menu_title = &quot;  Main Menu.\n  Press Q or Esc to quit. \n&quot;<br>    main_menu_items = [&quot;Edit Menu&quot;, &quot;Second Item&quot;, &quot;Third Item&quot;, &quot;Quit&quot;]<br>    main_menu_exit = False<br><br>    main_menu = TerminalMenu(<br>        menu_entries=main_menu_items,<br>        title=main_menu_title,<br>        cycle_cursor=True,<br>    )<br><br>    while not main_menu_exit:<br>        main_sel = main_menu.show()<br><br>        if main_sel == 0:<br>            print(&quot;option 1 selected&quot;)<br>        elif main_sel == 1:<br>            print(&quot;option 2 selected&quot;)<br>            time.sleep(5)<br>        elif main_sel == 2:<br>            print(&quot;option 3 selected&quot;)<br>            time.sleep(5)<br>        elif main_sel == 3 or main_sel == None:<br>            main_menu_exit = True<br>            print(&quot;Quit Selected&quot;)<br><br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><p>This program looks a little bit more complicated, but it is still kind of similar. In the initiation, we just added the cycle_cursor = True statement, to make the cursor get back up to the top when pushing the arrow down.</p><p>The important part begins in the while not main_menu exit statement. First, the main menu is shown as long the exit variable is not set to true. This is set to true (and the loop will end) in the library itself when the button q is pressed, or when the variable is manually set to true, just as seen in the main_sel == 3 menu point. In general, the <strong>own code</strong> for the different entries should <strong>be inserted here</strong> instead of the print statements. If you <strong>add more options</strong> to the option list, you will have to <strong>add more possible selections</strong> to the while loop. <strong><em>The position in the option list equals the number of the main_sel value.</em></strong></p><h4>3. Submenus</h4><p>Of course, you will want to add a submenu to specify the different selections. Submenus can be more effective and make decisions easier.</p><pre>import time<br>from simple_term_menu import TerminalMenu<br><br>def main():<br>    main_menu_title = &quot;  Main Menu.\n  Press Q or Esc to quit. \n&quot;<br>    main_menu_items = [&quot;Edit Menu&quot;, &quot;Second Item&quot;, &quot;Third Item&quot;, &quot;Quit&quot;]<br><br>    main_menu = TerminalMenu(<br>        menu_entries=main_menu_items,<br>        title=main_menu_title,<br>        cycle_cursor=True,<br>        clear_screen=True,<br>    )<br><br>    edit_menu_title = &quot;  Edit Menu.\n  Press Q or Esc to back to main menu. \n&quot;<br>    edit_menu_items = [&quot;Edit Config&quot;, &quot;Save Settings&quot;, &quot;Back to Main Menu&quot;]<br>    edit_menu_back = False<br>    edit_menu = TerminalMenu(<br>        edit_menu_items,<br>        title=edit_menu_title,<br>        cycle_cursor=True,<br>        clear_screen=True,<br>    )<br><br>    while not main_menu_exit:<br>        main_sel = main_menu.show()<br><br>        if main_sel == 0:<br>            while not edit_menu_back:<br>                edit_sel = edit_menu.show()<br>                if edit_sel == 0:<br>                    print(&quot;Edit Config Selected&quot;)<br>                    time.sleep(5)<br>                elif edit_sel == 1:<br>                    print(&quot;Save Selected&quot;)<br>                    time.sleep(5)<br>                elif edit_sel == 2 or edit_sel == None:<br>                    edit_menu_back = True<br>                    print(&quot;Back Selected&quot;)<br>            edit_menu_back = False<br>        elif main_sel == 1:<br>            print(&quot;option 2 selected&quot;)<br>            time.sleep(5)<br>        elif main_sel == 2:<br>            print(&quot;option 3 selected&quot;)<br>            time.sleep(5)<br>        elif main_sel == 3 or main_sel == None:<br>            main_menu_exit = True<br>            print(&quot;Quit Selected&quot;)<br><br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><p>Here, the setup of the submenu is kind of the <strong>same as the main menu</strong>. You will just have to add the initiation in the same structure and insert the list of options into the main menu code inthe place where the submenu should be.</p><h4>4. Styling options</h4><p>The different styling options can just be added in the menu initiation. You will also find the different things to insert in the <a href="https://pypi.org/project/simple-term-menu/">documentation</a> of the library. Here is an example:</p><pre>main_menu_title = &quot;  Main Menu.\n  Press Q or Esc to quit. \n&quot;<br>    main_menu_items = [&quot;Edit Menu&quot;, &quot;Second Item&quot;, &quot;Third Item&quot;, &quot;Quit&quot;]<br>    main_menu_cursor = &quot;&gt; &quot;<br>    main_menu_cursor_style = (&quot;fg_red&quot;, &quot;bold&quot;)<br>    main_menu_style = (&quot;bg_red&quot;, &quot;fg_yellow&quot;)<br>    main_menu_exit = False<br><br>    main_menu = TerminalMenu(<br>        menu_entries=main_menu_items,<br>        title=main_menu_title,<br>        menu_cursor=main_menu_cursor,<br>        menu_cursor_style=main_menu_cursor_style,<br>        menu_highlight_style=main_menu_style,<br>        cycle_cursor=True,<br>        clear_screen=True,</pre><h4>5. Conclusion</h4><p>There is still a nice amount of menus that are styled differently and perfectly possible to create in a short time with this library. Multi — selection options or database listings are things that I will show in future articles. <br>Thank you for reading, and have fun with your own small menu :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*duyj5rsWW6xMSSJ5" /><figcaption>Photo by <a href="https://unsplash.com/@afgprogrammer?utm_source=medium&amp;utm_medium=referral">Mohammad Rahmani</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ce90bbd6cf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Forest”. Spielerisches Fokussieren.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@wiemanneric/forest-spielerisches-fokussieren-cc88ac106e82?source=rss-cb46c5f0c5c9------2"><img src="https://cdn-images-1.medium.com/max/1248/0*ukpJeBMrOzJoj_au.jpg" width="1248"></a></p><p class="medium-feed-snippet">Jeder kennt es. Man sollte sich eigentlich auf eine Aufgabe konzentrieren, driftet aber ab und geht wie automatisch auf die n&#xE4;chstm&#xF6;gliche&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@wiemanneric/forest-spielerisches-fokussieren-cc88ac106e82?source=rss-cb46c5f0c5c9------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@wiemanneric/forest-spielerisches-fokussieren-cc88ac106e82?source=rss-cb46c5f0c5c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc88ac106e82</guid>
            <category><![CDATA[forest]]></category>
            <category><![CDATA[lernen]]></category>
            <category><![CDATA[fokus]]></category>
            <category><![CDATA[handy]]></category>
            <dc:creator><![CDATA[Eric]]></dc:creator>
            <pubDate>Sat, 17 Feb 2024 16:59:05 GMT</pubDate>
            <atom:updated>2024-02-17T16:59:05.520Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Obsidian or Notion? What suits best for you?]]></title>
            <link>https://medium.com/@wiemanneric/obsidian-or-notion-what-suits-best-for-you-6260046c108b?source=rss-cb46c5f0c5c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6260046c108b</guid>
            <category><![CDATA[best]]></category>
            <category><![CDATA[organize]]></category>
            <category><![CDATA[best-organizer]]></category>
            <category><![CDATA[notion]]></category>
            <category><![CDATA[obsidian]]></category>
            <dc:creator><![CDATA[Eric]]></dc:creator>
            <pubDate>Sat, 17 Feb 2024 14:59:05 GMT</pubDate>
            <atom:updated>2024-02-17T14:59:05.049Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pwd8KqihzJ4z-kg3" /><figcaption>Photo by <a href="https://unsplash.com/@teamnocoloco?utm_source=medium&amp;utm_medium=referral">Team Nocoloco</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Foreword</h4><p>Personally, I am a big fan of both programs. Each of them has different features and methods, and both have their place in the world of organizing your life in an easier and better way. To help you find out which program can become your personal favorite, let’s look at the different pros and cons:</p><h4>Comparison</h4><p>Obsidian vs Notion</p><ol><li><strong>Data Storage</strong></li></ol><p>Obsidian is a pretty lightweight program, saving any data just in plain .txt files on your machine or in the cloud. The advantage? You don’t need the program itself to read your notes. Notion, in this case, uses its own data format, and we can’t access the file itself. Everything is cloud-based on the servers of Notion, so when the Notion servers are offline, your data is gone too. Of course, this is pretty unlikely to happen, but still, for people who really like to know their data is safe, Obsidian is the goalkeeper.</p><p><strong>2. Price</strong></p><p>Obsidian is completely free with 99 percent of its functions. One thing that can be bought is the online synchronization across devices, called Obsidian Sync. Sync costs around $8 per month, leaving the user with a built-in feature that really works well with a fair price. If you are using iCloud or any Google file storage, you can also easily sync all the data for free across any device, just taking about five more minutes to set up.</p><p>Here is a simple setup instruction. Using ICoud it even becomes easier to sync between Apple devices (Pretty rare that it works better on apple devices XD)</p><p><a href="https://medium.com/@taiyu_chen/using-obsidian-with-google-drive-10beca66bd29">https://medium.com/@taiyu_chen/using-obsidian-with-google-drive-10beca66bd29</a></p><p>Notion takes a slightly different approach by giving the user cloud storage for free. You don’t have to pay for working across devices with unlimited storage for individual use. However, when working collaboratively, you will need to pay after reaching a specific block limit. At this point, Notion can be considered expensive, priced at around $15 per member of the team per month for the basic version.</p><p>Still, when you want to work alone both Programs are reliable and save to use, leading Notion to be more comfortable setting it up.</p><p>3. <strong>User Interface</strong></p><p>Here, it depends on your own likes and dislikes. Notion offers infinite possibilities for organizing, and the best thing to do is to experience it yourself. Once you get into it, both programs are easy to use with a nice interface. One advantage of Obsidian compared to Notion is the Graph Editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9zKtqQ2ehgRoEJgp.png" /><figcaption>Graph Editor Obsidian</figcaption></figure><p>Here, your Notes will pop up as different points, connected to each other. Actually this is a pretty cool feature, visualizing your notes and showing the links as connections inbetween.</p><h4>Conclusion</h4><p>In the end, the decision comes down to your preferences. Do you mind relying on servers to access your notes, or do you prefer to keep them stored locally on your machine? Is the graph editor important to you? Do you prefer having presets or organizing everything yourself?</p><p>My recommendation — Just try both. Nevertheless, I hope this quick overview has provided insight into, in my opinion, the biggest selling points of both programs. Thank you for reading, and see you next time! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6260046c108b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>