<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>add &amp;mdash; Paul Sutton</title>
    <link>https://personaljournal.ca/paulsutton/tag:add</link>
    <description>Personal Blog</description>
    <pubDate>Tue, 05 May 2026 16:32:43 +0000</pubDate>
    <item>
      <title>Add Duckduckgo to firefox.</title>
      <link>https://personaljournal.ca/paulsutton/add-duckduckgo-to-firefox</link>
      <description>&lt;![CDATA[Add Duckduckgo to firefox.&#xA;&#xA;Further to my post on the 17th December. &#xA;&#xA;It was rightly pointed out, that I should be using a browser other than Chrome.  To this end, I have made a video illustrating how to add Duckduckgo to the Firefox web browser. &#xA;&#xA;iframe width=&#34;560&#34; height=&#34;315&#34; sandbox=&#34;allow-same-origin allow-scripts allow-popups&#34; src=&#34;https://diode.zone/videos/embed/575c4b6c-4107-44ee-aff5-cea310ed17aa&#34; frameborder=&#34;0&#34; allowfullscreen/iframe&#xA;&#xA;#firefox,#add,#duckduckgo,#extension&#xA;&#xA;a rel=&#34;license&#34; href=&#34;http://creativecommons.org/licenses/by-sa/4.0/&#34;img alt=&#34;Creative Commons Licence&#34; style=&#34;border-width:0&#34; src=&#34;https://i.creativecommons.org/l/by-sa/4.0/88x31.png&#34; //abr /This work is licensed under a a rel=&#34;license&#34; href=&#34;http://creativecommons.org/licenses/by-sa/4.0/&#34;Creative Commons Attribution-ShareAlike 4.0 International License/a&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Add Duckduckgo to firefox.</p>

<p>Further to my post on the <a href="https://personaljournal.ca/paulsutton/duck-duck-go-search" rel="nofollow">17th December</a>.</p>

<p>It was rightly pointed out, that I should be using a browser other than Chrome.  To this end, I have made a video illustrating how to add Duckduckgo to the Firefox web browser.</p>

<iframe width="560" height="315" src="https://diode.zone/videos/embed/575c4b6c-4107-44ee-aff5-cea310ed17aa" frameborder="0" allowfullscreen=""></iframe>

<p><a href="/paulsutton/tag:firefox" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">firefox</span></a>,<a href="/paulsutton/tag:add" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">add</span></a>,<a href="/paulsutton/tag:duckduckgo" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">duckduckgo</span></a>,<a href="/paulsutton/tag:extension" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">extension</span></a></p>

<p><a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="nofollow"><img alt="Creative Commons Licence" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png"/></a><br/>This work is licensed under a <a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="nofollow">Creative Commons Attribution-ShareAlike 4.0 International License</a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/add-duckduckgo-to-firefox</guid>
      <pubDate>Sun, 20 Dec 2020 07:30:00 +0000</pubDate>
    </item>
    <item>
      <title>Add new users to Debian</title>
      <link>https://personaljournal.ca/paulsutton/add-new-users-to-debian</link>
      <description>&lt;![CDATA[Add new users to Debian&#xA;&#xA;To do this you need to install gnome-system-tools then from the menu select Users and Groups &#xA;&#xA;apt install gnome-system-tools&#xA;&#xA;The video below illustrates the, short, simple process of adding new users to your system.&#xA;&#xA;iframe width=&#34;560&#34; height=&#34;315&#34; sandbox=&#34;allow-same-origin allow-scripts allow-popups&#34; src=&#34;https://diode.zone/videos/embed/bd34bbc9-1e6f-4faf-a8b6-fb9673747ae7&#34; frameborder=&#34;0&#34; allowfullscreen/iframe&#xA;&#xA;#debian,#add,#new,#user,#howto,#help,#support,freesoftware&#xA;&#xA;a rel=&#34;license&#34; href=&#34;http://creativecommons.org/licenses/by-sa/4.0/&#34;img alt=&#34;Creative Commons Licence&#34; style=&#34;border-width:0&#34; src=&#34;https://i.creativecommons.org/l/by-sa/4.0/88x31.png&#34; //abr /This work is licensed under a a rel=&#34;license&#34; href=&#34;http://creativecommons.org/licenses/by-sa/4.0/&#34;Creative Commons Attribution-ShareAlike 4.0 International License/a&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Add new users to Debian</p>

<p>To do this you need to install <em>gnome-system-tools</em> then from the menu select <em>Users and Groups</em></p>

<p><strong>apt install gnome-system-tools</strong></p>

<p>The video below illustrates the, short, simple process of adding new users to your system.</p>

<iframe width="560" height="315" src="https://diode.zone/videos/embed/bd34bbc9-1e6f-4faf-a8b6-fb9673747ae7" frameborder="0" allowfullscreen=""></iframe>

<p><a href="/paulsutton/tag:debian" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">debian</span></a>,<a href="/paulsutton/tag:add" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">add</span></a>,<a href="/paulsutton/tag:new" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">new</span></a>,<a href="/paulsutton/tag:user" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">user</span></a>,<a href="/paulsutton/tag:howto" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">howto</span></a>,<a href="/paulsutton/tag:help" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">help</span></a>,<a href="/paulsutton/tag:support" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">support</span></a>,freesoftware</p>

<p><a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="nofollow"><img alt="Creative Commons Licence" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png"/></a><br/>This work is licensed under a <a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="nofollow">Creative Commons Attribution-ShareAlike 4.0 International License</a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/add-new-users-to-debian</guid>
      <pubDate>Sat, 19 Dec 2020 07:30:00 +0000</pubDate>
    </item>
    <item>
      <title>Adding CC Images To Photos</title>
      <link>https://personaljournal.ca/paulsutton/adding-cc-images-to-photos</link>
      <description>&lt;![CDATA[Adding CC Images To Photos&#xA;&#xA;This is a re-post from December 2019&#xA;&#xA;If you create lots of media such as photos or graphics.  You may want to add information pertaining to the copyright (or ideally copyleft) of the image.  &#xA;&#xA;As I am interested in Creative Commons (CC) then it makes sense to be able to add one of the many creative commons license logos to an image.&#xA;&#xA;I asked on Friendica about how to do this (having tried and failed before) and was provided with some help and a really useful shell script to automate the process.&#xA;&#xA;Firstly we need an image to modify and a logo image to add to this:&#xA;&#xA;cc-by logo&#xA;&#xA;Example logo file to insert&#xA;&#xA;cc-by logo&#xA;&#xA;For the sake of this article, I am just using a random photo I took of Paignton Geopark.  I have also reduced the image size to 640×480 to make it smaller for the website as per command below.&#xA;&#xA;gm mogrify -resize 640×480 .JPG&#xA;&#xA;I also had to convert the jpg files to png files with the following&#xA;&#xA;gm convert DSCF0182mod.jpg DSCF0182mod.png&#xA;&#xA;So that this blog would display the images. &#xA;&#xA;The next step is to create a folder structure to contain what we need to undertake the work.&#xA;&#xA;What we need is a new folder&#xA;&#xA;mkdir insertcc-logo&#xA;&#xA;Inside this, we need another folder called out&#xA;&#xA;cd insertcc-logo&#xA;&#xA;mkdir out&#xA;&#xA;we need some more files mostly the cc logos,  these are available from a simple duckduckgo search.&#xA;&#xA;Note if putting on a website or other media you need to properly include the creative commons license being used on here I have put &#xA;&#xA;&#39;&#39;&#39;&#xA;Licenced under Attribution 4.0 International (CC BY 4.0)&#xA;&#39;&#39;&#39;&#xA;&#xA;Which should then link to the human readable license terms you want to use. &#xA;&#xA;So what we should have is&#xA;&#xA;\insertcc-logo\insertcc.sh&#xA;&#xA;\insertcc-logo\out\&#xA;&#xA;\insertcc-logo\out\\88×31.png&#xA;&#xA;\insertcc-logo\out\\88×31-sa.png&#xA;&#xA;\insertcc-logo\out\\cc-zero.png&#xA;&#xA;etc&#xA;&#xA;Put the SOURCE FILE in \insertcc-logo\&#xA;&#xA;MODIFY AND RUN the script below&#xA;&#xA;Our script looks like ( save this as insertcc.sh or what you want to call this )&#xA;&#xA;for p in .JPG; do convert “$p” ./out/88×31.png -gravity southeast -geometry +10+10 -composite “out/$p”; done&#xA;&#xA;What the script does is take each file with the JPG extension (or other extension), add the required logo,  and save the modified file in&#xA;&#xA;\insertcc-logo\out\&#xA;&#xA;As per :&#xA;&#xA;cc-by logo&#xA;&#xA;You need to make sure that the script points to the correct source files.&#xA;&#xA;You also need to point the script to the correct file you want to insert in to your source image.&#xA;&#xA;for p in *.JPG;&#xA;&#xA;To use a different logo change this section of the script&#xA;&#xA;$p” ./out/88×31.png&#xA;&#xA;This article originally appeared on http://www.zleap.net.  &#xA;&#xA;--&#xA;&#xA;#photo,#embed,#add,#creativecommonslogo,#linux #graphicsmagick,#editing,#manipulation,#bash,#commands,&#xA;#media,#copyleft,#attribute,#share,#alike,#sharealike,&#xA;#commons,#freedom,&#xA;&#xA;You can find me on Friendica at zleap@social.isurf.ca&#xA;&#xA;---&#xA;&#xA;cc-by logo&#xA;&#xA;Licenced under Attribution 4.0 International (CC BY 4.0)&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Adding CC Images To Photos</p>

<p><strong>This is a re-post from December 2019</strong></p>

<p>If you create lots of media such as photos or graphics.  You may want to add information pertaining to the copyright (or ideally copyleft) of the image.</p>

<p>As I am interested in <a href="https://creativecommons.org/" rel="nofollow">Creative Commons (CC)</a> then it makes sense to be able to add one of the many creative commons license logos to an image.</p>

<p>I asked on Friendica about how to do this (having tried and failed before) and was provided with some help and a really useful shell script to automate the process.</p>

<p>Firstly we need an image to modify and a logo image to add to this:</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/DSCF0182.png" alt="cc-by logo"></p>

<p>Example logo file to insert</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/88x31.png" alt="cc-by logo"></p>

<p>For the sake of this article, I am just using a random photo I took of Paignton Geopark.  I have also reduced the image size to 640×480 to make it smaller for the website as per command below.</p>

<h3 id="gm-mogrify-resize-640-480-jpg">gm mogrify -resize 640×480 *.JPG</h3>

<p>I also had to convert the jpg files to png files with the following</p>

<h3 id="gm-convert-dscf0182mod-jpg-dscf0182mod-png">gm convert DSCF0182mod.jpg DSCF0182mod.png</h3>

<p>So that this blog would display the images.</p>

<p>The next step is to create a folder structure to contain what we need to undertake the work.</p>

<p>What we need is a new folder</p>

<h3 id="mkdir-insertcc-logo">mkdir insertcc-logo</h3>

<p>Inside this, we need another folder called out</p>

<h3 id="cd-insertcc-logo">cd insertcc-logo</h3>

<h3 id="mkdir-out">mkdir out</h3>

<p>we need some more files mostly the cc logos,  these are available from a simple <a href="https://duckduckgo.com/" rel="nofollow">duckduckgo</a> search.</p>

<p>Note if putting on a website or other media you need to properly include the creative commons license being used on here I have put</p>

<p>&#39;&#39;&#39;
<a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">Licenced under Attribution 4.0 International (CC BY 4.0)</a>
&#39;&#39;&#39;</p>

<p>Which should then link to the human readable license terms you want to use.</p>

<p>So what we should have is</p>

<p>\insertcc-logo\insertcc.sh</p>

<p>\insertcc-logo\out</p>

<p>\insertcc-logo\out\88×31.png</p>

<p>\insertcc-logo\out\88×31-sa.png</p>

<p>\insertcc-logo\out\cc-zero.png</p>

<p>etc</p>

<p>Put the SOURCE FILE in \insertcc-logo</p>

<p>MODIFY AND RUN the script below</p>

<p>Our script looks like ( save this as insertcc.sh or what you want to call this )</p>

<pre><code>for p in *.JPG; do convert “$p” ./out/88×31.png -gravity southeast -geometry +10+10 -composite “out/$p”; done
</code></pre>

<p>What the script does is take each file with the JPG extension (or other extension), add the required logo,  and save the modified file in</p>

<p>\insertcc-logo\out</p>

<p>As per :</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/DSCF0182mod.png" alt="cc-by logo"></p>

<p>You need to make sure that the script points to the correct source files.</p>

<p>You also need to point the script to the correct file you want to insert in to your source image.</p>

<p>for p in *.JPG;</p>

<p>To use a different logo change this section of the script</p>

<p>$p” ./out/88×31.png</p>

<p>This article originally appeared on <a href="http://www.zleap.net" rel="nofollow">http://www.zleap.net</a>.</p>

<p>—</p>

<p><a href="/paulsutton/tag:photo" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">photo</span></a>,<a href="/paulsutton/tag:embed" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">embed</span></a>,<a href="/paulsutton/tag:add" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">add</span></a>,<a href="/paulsutton/tag:creativecommonslogo" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">creativecommonslogo</span></a>,<a href="/paulsutton/tag:linux" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">linux</span></a> <a href="/paulsutton/tag:graphicsmagick" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">graphicsmagick</span></a>,<a href="/paulsutton/tag:editing" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">editing</span></a>,<a href="/paulsutton/tag:manipulation" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">manipulation</span></a>,<a href="/paulsutton/tag:bash" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">bash</span></a>,<a href="/paulsutton/tag:commands" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">commands</span></a>,
<a href="/paulsutton/tag:media" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">media</span></a>,<a href="/paulsutton/tag:copyleft" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">copyleft</span></a>,<a href="/paulsutton/tag:attribute" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">attribute</span></a>,<a href="/paulsutton/tag:share" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">share</span></a>,<a href="/paulsutton/tag:alike" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">alike</span></a>,<a href="/paulsutton/tag:sharealike" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">sharealike</span></a>,
<a href="/paulsutton/tag:commons" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">commons</span></a>,<a href="/paulsutton/tag:freedom" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">freedom</span></a>,</p>

<p><a href="https://social.isurf.ca/profile/zleap" rel="nofollow">You can find me on Friendica at zleap@social.isurf.ca</a></p>

<hr>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/88x31.png" alt="cc-by logo"></p>

<p><a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">Licenced under Attribution 4.0 International (CC BY 4.0)</a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/adding-cc-images-to-photos</guid>
      <pubDate>Wed, 09 Dec 2020 07:30:00 +0000</pubDate>
    </item>
    <item>
      <title>Adding items to the XFCE Panel</title>
      <link>https://personaljournal.ca/paulsutton/adding-items-to-the-xfce-panel</link>
      <description>&lt;![CDATA[Adding items to the XFCE Panel&#xA;&#xA;This is a quick video, created with Vokoscreen to illustrate the process of adding an item to the XFCE4 Panel&#xA;&#xA;iframe width=&#34;560&#34; height=&#34;315&#34; sandbox=&#34;allow-same-origin allow-scripts allow-popups&#34; src=&#34;https://diode.zone/videos/embed/af7837f4-fffd-411d-a4d4-ee2affe4ca25&#34; frameborder=&#34;0&#34; allowfullscreen/iframe&#xA;&#xA;Vokoscreen Homepage&#xA;Video on peertube&#xA;Peertube Channels&#xA;&#xA;#video,#peertube,#debian,#xfce4,panel,#add,new,#item&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Adding items to the XFCE Panel</p>

<p>This is a quick video, created with Vokoscreen to illustrate the process of adding an item to the XFCE4 Panel</p>

<iframe width="560" height="315" src="https://diode.zone/videos/embed/af7837f4-fffd-411d-a4d4-ee2affe4ca25" frameborder="0" allowfullscreen=""></iframe>
<ul><li><a href="https://linuxecke.volkoh.de/vokoscreen/vokoscreen.html" rel="nofollow">Vokoscreen Homepage</a></li>
<li><a href="https://diode.zone/videos/watch/af7837f4-fffd-411d-a4d4-ee2affe4ca25" rel="nofollow">Video on peertube</a></li>
<li><a href="https://diode.zone/accounts/zleap/video-channels" rel="nofollow">Peertube Channels</a></li></ul>

<p><a href="/paulsutton/tag:video" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">video</span></a>,<a href="/paulsutton/tag:peertube" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">peertube</span></a>,<a href="/paulsutton/tag:debian" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">debian</span></a>,<a href="/paulsutton/tag:xfce4" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">xfce4</span></a>,panel,<a href="/paulsutton/tag:add" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">add</span></a>,new,<a href="/paulsutton/tag:item" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">item</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/adding-items-to-the-xfce-panel</guid>
      <pubDate>Mon, 05 Oct 2020 14:07:25 +0000</pubDate>
    </item>
    <item>
      <title>Adding games to Debian Xfce menu</title>
      <link>https://personaljournal.ca/paulsutton/adding-games-to-debian-xfce-menu</link>
      <description>&lt;![CDATA[Adding games to Debian Xfce menu&#xA;&#xA;Yesterday, I wrote briefly that I am now using snaps,  this works really well, but does not add items to the Debian XFCE menu automatically.&#xA;&#xA;To solve this I have installed menulibre, which helps users edit the menu.&#xA;&#xA;apt install menulibre&#xA;&#xA;So adding items to this is fairly straight forward.&#xA;&#xA;Load up the menulibre program.&#xA;&#xA;menu --  accessories --  Menu Editor&#xA;&#xA;Launch Program from menu&#xA;&#xA;Once loaded you will be presented with:-&#xA;&#xA;Main Program screen&#xA;&#xA;The + in the corner allows users to add a new entry. &#xA;&#xA;Click on the appropriate place in the menu to add your program to where you want it.  You can also move items around with the up / down arrows at the bottom, don&#39;t forget to save (see later) what you have changed. &#xA;&#xA;menu 1&#xA;&#xA;You can then enter the details of the program. To save there is an icon to the right of the + Depicting an arrow pointing towards a disk drive.  Click this to save.&#xA;&#xA;You can then test to make sure your entry works.&#xA;&#xA;#debian,#buster,#menu,#add,#item,#menulibre &#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Adding games to Debian Xfce menu</p>

<p>Yesterday, I wrote briefly that I am now using snaps,  this works really well, but does not add items to the Debian XFCE menu automatically.</p>

<p>To solve this I have installed menulibre, which helps users edit the menu.</p>

<pre><code>apt install menulibre
</code></pre>

<p>So adding items to this is fairly straight forward.</p>
<ol><li>Load up the menulibre program.</li></ol>

<p><strong>menu —&gt; accessories —&gt; Menu Editor</strong></p>

<p><img src="https://salsa.debian.org/zleap-guest/screenshots/-/raw/master/menulibre/menueditor.png" alt="Launch Program from menu"></p>

<p>Once loaded you will be presented with:-</p>

<p><img src="https://salsa.debian.org/zleap-guest/screenshots/-/raw/master/menulibre/menuedit1.png" alt="Main Program screen"></p>

<p>The + in the corner allows users to add a new entry.</p>

<p>Click on the appropriate place in the menu to add your program to where you want it.  You can also move items around with the up / down arrows at the bottom, don&#39;t forget to save (see later) what you have changed.</p>

<p><img src="https://salsa.debian.org/zleap-guest/screenshots/-/raw/ddc41dd5cb587f674cf58ddc478e655639e9c9d8/menulibre/add%20menu%20entry.png" alt="menu 1"></p>

<p>You can then enter the details of the program. To save there is an icon to the right of the + Depicting an arrow pointing towards a disk drive.  Click this to save.</p>

<p>You can then test to make sure your entry works.</p>

<p><a href="/paulsutton/tag:debian" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">debian</span></a>,<a href="/paulsutton/tag:buster" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">buster</span></a>,<a href="/paulsutton/tag:menu" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">menu</span></a>,<a href="/paulsutton/tag:add" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">add</span></a>,<a href="/paulsutton/tag:item" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">item</span></a>,<a href="/paulsutton/tag:menulibre" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">menulibre</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/adding-games-to-debian-xfce-menu</guid>
      <pubDate>Sat, 26 Sep 2020 06:30:00 +0000</pubDate>
    </item>
    <item>
      <title>Add  more functions</title>
      <link>https://personaljournal.ca/paulsutton/add-more-functions</link>
      <description>&lt;![CDATA[Add  more functions&#xA;&#xA;I have added a few more maths functions to the application and also provided a clear function.  There are still a few items to add to help improve debugging but the application is starting to take shape. &#xA;&#xA;Notes &#xA; &#xA;window = Tk()&#xA;window.title(&#39;Maths Application&#39;)&#xA;window.geometry(&#34;570x150&#34;) # w x h&#xA;window.resizable(0,0)&#xA;&#xA;The above code is being modified as I go. So I am changing the window size depending on what is being displayed.&#xA;&#xA;I have also made the Window title reflect the purpose of the application.&#xA;&#xA;That the source code now has &#39;result&#39; as a label rather than output.  This will show up future screenshots. &#xA;&#xA;addition app&#xA;&#xA;The code for the above is as follows. &#xA;&#xA;!/usr/bin/env python&#xA;import Tkinter # note use of caps&#xA;from Tkinter import &#xA;&#xA;window = Tk()&#xA;window.title(&#39;Maths Application&#39;)&#xA;window.geometry(&#34;570x150&#34;) # w x h&#xA;window.resizable(0,0)&#xA;&#xA;define button actions&#xA;def btn1():&#xA;&#x9;#convert box text in to integers&#x9;&#xA;&#x9;ent1 = int(entrytext.get())&#xA;&#x9;ent2 = int(entrytext2.get())&#xA;&#x9;&#xA;&#x9;#add the 2 integers and store in variable add&#xA;&#x9;add = (ent1 + ent2)&#xA;&#x9;print (add)&#xA;&#x9;&#xA;&#x9;#insert value of variable add in&#x9;to box outtext &#xA;&#x9;outtext1.insert(0,str(add)) # insert response&#xA;&#xA;def btn2():&#xA;&#x9;#print(&#34;subtraction&#34;)&#xA;&#x9;ent1 = int(entrytext.get())&#xA;&#x9;ent2 = int(entrytext2.get())&#xA;&#x9;&#xA;&#x9;#subtract the 2 integers and store in variable sub&#xA;&#x9;sub = (ent1 - ent2)&#xA;&#x9;&#xA;&#x9;&#xA;&#x9;#insert value of variable sub in&#x9;to box outtext &#xA;&#x9;outtext1.insert(0,str(sub)) # insert response&#x9;&#xA;&#x9;&#xA;def btn3():&#xA;&#x9;#print(&#34;multiply&#34;)&#xA;&#x9;ent1 = int(entrytext.get())&#xA;&#x9;ent2 = int(entrytext2.get())&#xA;&#x9;&#xA;&#x9;#multiply the 2 integers and store in variable mul&#xA;&#x9;mul = (ent1  ent2)&#xA;&#x9;&#x9;&#xA;&#x9;#insert value of variable mul in&#x9;to box outtext &#xA;&#x9;outtext1.insert(0,str(mul)) # insert response&#x9;&#x9;&#xA;&#xA;def btn4():&#xA;&#x9;#print(&#34;divide&#34;)&#xA;&#x9;ent1 = int(entrytext.get())&#xA;&#x9;ent2 = int(entrytext2.get())&#xA;&#x9;&#xA;&#x9;#multiply the 2 integers and store in variable div&#xA;&#x9;div = (ent1 / ent2)&#xA;&#x9;&#x9;&#xA;&#x9;#insert value of variable mul in&#x9;to box outtext &#xA;&#x9;outtext1.insert(0,str(div)) # insert response&#x9;&#xA;&#x9;&#xA;clear boxes&#xA;def clear():&#xA;&#x9;#print(&#34;clear boxes&#34;) # leave in for legacy testing&#xA;&#x9;entrytext.delete(0, END) # clear input box&#xA;&#x9;entrytext2.delete(0, END) # clear input box2&#xA;&#x9;outtext1.delete(0, END) # clear output box&#xA;&#x9;&#xA;btntog2 = Button( window, text =&#39;+&#39;, command=btn1) # add&#xA;btntog3 = Button( window, text =&#39;-&#39;, command=btn2)  # subtract&#xA;btntog4 = Button( window, text =&#39;x&#39;, command=btn3) #multiply&#xA;btntog5 = Button( window, text =&#39;/&#39;, command=btn4) #divide&#xA;btntog6 = Button( window, text =&#39;Clear&#39;, command=clear) #clear&#xA;btnexit = Button( window, text =&#39;Exit&#39;,command=exit)&#x9; #exit&#xA;&#xA;define some labels&#xA;box1 = Label(window, text=&#34;1st Value&#34;)&#xA;box2 = Label(window, text=&#34;2nd Value&#34;)&#xA;box3 = Label(window, text=&#34;Result&#34;)&#xA;&#xA;define entry box &#xA;entry1 = StringVar() # this is our entry box&#xA;entry2 = StringVar()&#xA;entrytext = Entry(window, textvariable=entry1) # this is our entry box&#xA;entrytext2 = Entry(window, textvariable=entry2) # this is our second entry box&#xA;&#xA;define out box &#xA;&#xA;entry2 = StringVar() # this is our output box&#xA;outtext1 = Entry(window, textvariable=entry2) # this is our output box&#xA;&#xA;display boxes&#xA;entrytext.grid(row = 3, column = 2,)  #display entry box&#xA;entrytext2.grid(row = 3, column = 3,)  #display entry box&#xA;outtext1.grid(row = 3, column = 4,) #display output box&#xA;&#xA;place labels&#xA;box1.grid(row = 1&#x9;, column = 2, padx = 5, pady = 5)&#xA;box2.grid(row = 1&#x9;, column = 3, padx = 5, pady = 5)&#xA;box3.grid(row = 1&#x9;, column = 4, padx = 5, pady = 5)&#xA;&#xA;buttons&#xA;btntog2.grid(row = 4, column = 2, padx = 1, pady = 1) # addition button&#xA;btntog3.grid(row = 4, column = 3, padx = 1, pady = 1) # subtraction button&#xA;btntog4.grid(row = 5, column = 2, padx = 1, pady = 1) # multiply button&#xA;btntog5.grid(row = 5, column = 3, padx = 1, pady = 1) # divide button&#xA;btntog6.grid(row = 4, column = 6, padx = 1, pady = 1) # clear button&#xA;btnexit.grid(row = 3, column = 6, padx = 1, pady = 1) # exit button&#xA;&#xA;window.mainloop()&#xA;&#xA;The code that I used for a previous application to detect if numerical values have been used is below but provided &#39;as is&#39; for now.&#xA;&#xA;def response():&#xA;&#x9;&#x9;&#xA;&#x9;msg = &#34;error : must be a text value&#34;&#xA;&#xA;&#x9;i = circletext.get()&#xA;&#x9;y = i.isdigit()&#xA;&#x9;l = len(circletext.get())&#xA;&#x9;#print l&#xA;&#x9;if y == True or l == 0:&#xA;&#x9;&#x9;circletext.insert(0,(msg))&#xA;&#x9;&#x9;&#xA;&#x9;else:&#x9;&#xA;&#x9;&#x9;x = random.choice(RESPONSES)&#xA;&#x9;&#x9;circletext2.delete(0, END) # clear prev output&#xA;&#x9;&#x9;circletext2.insert(0,str(x)) # insert response&#xA;&#xA;I will integrate a version of this in to the main code. &#xA;&#xA;#python, #tkinter, #programming, #python, #graphic, #applications, #bugs, #troubleshooting, #howto, #paignton, #library, #virtual, #codeclub&#xA;&#xA;Happy to provide help and support via decentralised social media.  I can be contacted on Mastodon here. You can get a free account on the http://qoto.org instance by following this link.&#xA;&#xA;cc-by logo&#xA;&#xA;Licenced under Attribution 4.0 International (CC BY 4.0)&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Add  more functions</p>

<p>I have added a few more maths functions to the application and also provided a clear function.  There are still a few items to add to help improve debugging but the application is starting to take shape.</p>

<p><strong>Notes</strong></p>

<pre><code>window = Tk()
window.title(&#39;Maths Application&#39;)
window.geometry(&#34;570x150&#34;) # w x h
window.resizable(0,0)
</code></pre>
<ol><li><p>The above code is being modified as I go. So I am changing the window size depending on what is being displayed.</p></li>

<li><p>I have also made the Window title reflect the purpose of the application.</p></li>

<li><p>That the source code now has &#39;result&#39; as a label rather than output.  This will show up future screenshots.</p></li></ol>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/tkinter/AdditionApp2.png" alt="addition app"></p>

<p>The code for the above is as follows.</p>

<pre><code>#!/usr/bin/env python
import Tkinter # note use of caps
from Tkinter import *

window = Tk()
window.title(&#39;Maths Application&#39;)
window.geometry(&#34;570x150&#34;) # w x h
window.resizable(0,0)

#define button actions
def btn1():
	#convert box text in to integers	
	ent1 = int(entrytext.get())
	ent2 = int(entrytext2.get())
	
	#add the 2 integers and store in variable add
	add = (ent1 + ent2)
	print (add)
	
	#insert value of variable add in	to box outtext 
	outtext1.insert(0,str(add)) # insert response

def btn2():
	#print(&#34;subtraction&#34;)
	ent1 = int(entrytext.get())
	ent2 = int(entrytext2.get())
	
	#subtract the 2 integers and store in variable sub
	sub = (ent1 - ent2)
	
	
	#insert value of variable sub in	to box outtext 
	outtext1.insert(0,str(sub)) # insert response	
	
def btn3():
	#print(&#34;multiply&#34;)
	ent1 = int(entrytext.get())
	ent2 = int(entrytext2.get())
	
	#multiply the 2 integers and store in variable mul
	mul = (ent1 * ent2)
		
	#insert value of variable mul in	to box outtext 
	outtext1.insert(0,str(mul)) # insert response		

def btn4():
	#print(&#34;divide&#34;)
	ent1 = int(entrytext.get())
	ent2 = int(entrytext2.get())
	
	#multiply the 2 integers and store in variable div
	div = (ent1 / ent2)
		
	#insert value of variable mul in	to box outtext 
	outtext1.insert(0,str(div)) # insert response	
	
#clear boxes
def clear():
	#print(&#34;clear boxes&#34;) # leave in for legacy testing
	entrytext.delete(0, END) # clear input box
	entrytext2.delete(0, END) # clear input box2
	outtext1.delete(0, END) # clear output box
	
btn_tog2 = Button( window, text =&#39;+&#39;, command=btn1) # add
btn_tog3 = Button( window, text =&#39;-&#39;, command=btn2)  # subtract
btn_tog4 = Button( window, text =&#39;x&#39;, command=btn3) #multiply
btn_tog5 = Button( window, text =&#39;/&#39;, command=btn4) #divide
btn_tog6 = Button( window, text =&#39;Clear&#39;, command=clear) #clear
btn_exit = Button( window, text =&#39;Exit&#39;,command=exit)	 #exit

# define some labels
box1 = Label(window, text=&#34;1st Value&#34;)
box2 = Label(window, text=&#34;2nd Value&#34;)
box3 = Label(window, text=&#34;Result&#34;)

#define entry box 
entry1 = StringVar() # this is our entry box
entry2 = StringVar()
entrytext = Entry(window, textvariable=entry1) # this is our entry box
entrytext2 = Entry(window, textvariable=entry2) # this is our second entry box

#define out box 

entry2 = StringVar() # this is our output box
outtext1 = Entry(window, textvariable=entry2) # this is our output box

#display boxes
entrytext.grid(row = 3, column = 2,)  #display entry box
entrytext2.grid(row = 3, column = 3,)  #display entry box
outtext1.grid(row = 3, column = 4,) #display output box

#place labels
box1.grid(row = 1	, column = 2, padx = 5, pady = 5)
box2.grid(row = 1	, column = 3, padx = 5, pady = 5)
box3.grid(row = 1	, column = 4, padx = 5, pady = 5)

#buttons
btn_tog2.grid(row = 4, column = 2, padx = 1, pady = 1) # addition button
btn_tog3.grid(row = 4, column = 3, padx = 1, pady = 1) # subtraction button
btn_tog4.grid(row = 5, column = 2, padx = 1, pady = 1) # multiply button
btn_tog5.grid(row = 5, column = 3, padx = 1, pady = 1) # divide button
btn_tog6.grid(row = 4, column = 6, padx = 1, pady = 1) # clear button
btn_exit.grid(row = 3, column = 6, padx = 1, pady = 1) # exit button

window.mainloop()


</code></pre>

<p>The code that I used for a previous application to detect if numerical values have been used is below but provided &#39;as is&#39; for now.</p>

<pre><code>def response():
		
	msg = &#34;error : must be a text value&#34;

	i = circletext.get()
	y = i.isdigit()
	l = len(circletext.get())
	#print l
	if y == True or l == 0:
		circletext.insert(0,(msg))
		
	else:	
		x = random.choice(RESPONSES)
		circletext2.delete(0, END) # clear prev output
		circletext2.insert(0,str(x)) # insert response
</code></pre>

<p>I will integrate a version of this in to the main code.</p>

<p><a href="/paulsutton/tag:python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">python</span></a>, <a href="/paulsutton/tag:tkinter" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">tkinter</span></a>, <a href="/paulsutton/tag:programming" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">programming</span></a>, <a href="/paulsutton/tag:python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">python</span></a>, <a href="/paulsutton/tag:graphic" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">graphic</span></a>, <a href="/paulsutton/tag:applications" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">applications</span></a>, <a href="/paulsutton/tag:bugs" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">bugs</span></a>, <a href="/paulsutton/tag:troubleshooting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">troubleshooting</span></a>, <a href="/paulsutton/tag:howto" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">howto</span></a>, <a href="/paulsutton/tag:paignton" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">paignton</span></a>, <a href="/paulsutton/tag:library" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">library</span></a>, <a href="/paulsutton/tag:virtual" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">virtual</span></a>, <a href="/paulsutton/tag:codeclub" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">codeclub</span></a></p>

<p>Happy to provide help and support via decentralised social media.  I can be contacted on Mastodon <a href="https://qoto.org/@zleap/" rel="nofollow">here</a>. You can get a free account on the <a href="http://qoto.org" rel="nofollow">http://qoto.org</a> instance by following <a href="https://qoto.org/invite/pN8gdTzi" rel="nofollow">this link</a>.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/88x31.png" alt="cc-by logo"></p>

<p><a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">Licenced under Attribution 4.0 International (CC BY 4.0)</a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/add-more-functions</guid>
      <pubDate>Thu, 21 May 2020 06:44:22 +0000</pubDate>
    </item>
    <item>
      <title>Addition Application</title>
      <link>https://personaljournal.ca/paulsutton/addition-application</link>
      <description>&lt;![CDATA[Addition Application&#xA;&#xA;So following on from the previous posts, I am how sharing a small application, that makes use of what we have been learning. &#xA;&#xA;This presents 2 input boxes and an output box,  any values entered in to the first two,  the sum is placed in to the last box.&#xA;&#xA;addition app&#xA;&#xA;This is not perfect, but getting there slowly.&#xA;&#xA;We need to:-&#xA;&#xA;Fix the name of the button from button1&#xA;Detect if the user has entered numerical values&#xA;Detect for empty boxes&#xA;Make labels more useful&#xA;Fix spelling in comments&#xA;Fix clarity of comments&#xA;&#xA;The code for the above is as follows. &#xA;&#xA;!/usr/bin/env python&#xA;import Tkinter # note use of caps&#xA;from Tkinter import *&#xA;&#xA;window = Tk()&#xA;window.title(&#39;App 1&#39;)&#xA;window.geometry(&#34;650x125&#34;) # w x h&#xA;window.resizable(0,0)&#xA;&#xA;define button actions&#xA;def btn1():&#xA;&#x9;#convert box text in to integers&#x9;&#xA;&#x9;ent1 = int(entrytext.get())&#xA;&#x9;ent2 = int(entrytext2.get())&#xA;&#x9;&#xA;&#x9;#add the 2 integers and store in variable add&#xA;&#x9;add = (ent1 + ent2)&#xA;&#x9;print add&#xA;&#x9;&#xA;&#x9;#instert value add in&#x9;to box outtext &#xA;&#x9;outtext1.insert(0,str(add)) # insert response&#xA;&#x9;&#xA;btntog2 = Button( window, text =&#39;button1&#39;, command=btn1)&#xA;btnexit = Button( window, text =&#39;exit&#39;,command=exit)&#x9;&#xA;&#xA;define some labels&#xA;box1 = Label(window, text=&#34;Entry 1: &#34;)&#xA;box2 = Label(window, text=&#34;Entry 2: &#34;)&#xA;box3 = Label(window, text=&#34;Ouput1: &#34;)&#xA;&#xA;define entry box &#xA;entry1 = StringVar() # this is our entry box&#xA;entry2 = StringVar()&#xA;entrytext = Entry(window, textvariable=entry1) # this is our entry box&#xA;entrytext2 = Entry(window, textvariable=entry2) # this is our second entry box&#xA;&#xA;define out box &#xA;&#xA;entry2 = StringVar() # this is our output box&#xA;outtext1 = Entry(window, textvariable=entry2) # this is our output box&#xA;&#xA;display boxes&#xA;entrytext.grid(row = 3, column = 2,)  #display entry box&#xA;entrytext2.grid(row = 3, column = 3,)  #display entry box&#xA;outtext1.grid(row = 3, column = 4,) #display output box&#xA;&#xA;place labels&#xA;box1.grid(row = 1&#x9;, column = 2, padx = 5, pady = 5)&#xA;box2.grid(row = 1&#x9;, column = 3, padx = 5, pady = 5)&#xA;box3.grid(row = 1&#x9;, column = 4, padx = 5, pady = 5)&#xA;&#xA;buttons&#xA;btntog2.grid(row = 3, column = 5, padx = 5, pady = 5)&#xA;btnexit.grid(row = 3, column = 6, padx = 5, pady = 5)&#xA;&#xA;window.mainloop()&#xA;&#xA;#python, #tkinter, #programming, #python, #graphic, #applications, #bugs, #troubleshooting, #howto, #paignton, #library, #virtual, #codeclub&#xA;&#xA;Happy to provide help and support via decentralised social media.  I can be contacted on Mastodon here. You can get a free account on the http://qoto.org instance by following this link.&#xA;&#xA;cc-by logo&#xA;&#xA;Licenced under Attribution 4.0 International (CC BY 4.0)&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Addition Application</p>

<p>So following on from the previous posts, I am how sharing a small application, that makes use of what we have been learning.</p>

<p>This presents 2 input boxes and an output box,  any values entered in to the first two,  the sum is placed in to the last box.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/tkinter/AdditionApp.png" alt="addition app"></p>

<p>This is not perfect, but getting there slowly.</p>

<p>We need to:-</p>
<ul><li>Fix the name of the button from button1</li>
<li>Detect if the user has entered numerical values</li>
<li>Detect for empty boxes</li>
<li>Make labels more useful</li>
<li>Fix spelling in comments</li>
<li>Fix clarity of comments</li></ul>

<p>The code for the above is as follows.</p>

<pre><code>#!/usr/bin/env python
import Tkinter # note use of caps
from Tkinter import *

window = Tk()
window.title(&#39;App 1&#39;)
window.geometry(&#34;650x125&#34;) # w x h
window.resizable(0,0)

#define button actions
def btn1():
	#convert box text in to integers	
	ent1 = int(entrytext.get())
	ent2 = int(entrytext2.get())
	
	#add the 2 integers and store in variable add
	add = (ent1 + ent2)
	print add
	
	#instert value add in	to box outtext 
	outtext1.insert(0,str(add)) # insert response
	
btn_tog2 = Button( window, text =&#39;button1&#39;, command=btn1)
btn_exit = Button( window, text =&#39;exit&#39;,command=exit)	

# define some labels
box1 = Label(window, text=&#34;Entry 1: &#34;)
box2 = Label(window, text=&#34;Entry 2: &#34;)
box3 = Label(window, text=&#34;Ouput1: &#34;)

#define entry box 
entry1 = StringVar() # this is our entry box
entry2 = StringVar()
entrytext = Entry(window, textvariable=entry1) # this is our entry box
entrytext2 = Entry(window, textvariable=entry2) # this is our second entry box

#define out box 

entry2 = StringVar() # this is our output box
outtext1 = Entry(window, textvariable=entry2) # this is our output box

#display boxes
entrytext.grid(row = 3, column = 2,)  #display entry box
entrytext2.grid(row = 3, column = 3,)  #display entry box
outtext1.grid(row = 3, column = 4,) #display output box

#place labels
box1.grid(row = 1	, column = 2, padx = 5, pady = 5)
box2.grid(row = 1	, column = 3, padx = 5, pady = 5)
box3.grid(row = 1	, column = 4, padx = 5, pady = 5)

#buttons
btn_tog2.grid(row = 3, column = 5, padx = 5, pady = 5)
btn_exit.grid(row = 3, column = 6, padx = 5, pady = 5)

window.mainloop()

</code></pre>

<p><a href="/paulsutton/tag:python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">python</span></a>, <a href="/paulsutton/tag:tkinter" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">tkinter</span></a>, <a href="/paulsutton/tag:programming" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">programming</span></a>, <a href="/paulsutton/tag:python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">python</span></a>, <a href="/paulsutton/tag:graphic" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">graphic</span></a>, <a href="/paulsutton/tag:applications" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">applications</span></a>, <a href="/paulsutton/tag:bugs" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">bugs</span></a>, <a href="/paulsutton/tag:troubleshooting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">troubleshooting</span></a>, <a href="/paulsutton/tag:howto" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">howto</span></a>, <a href="/paulsutton/tag:paignton" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">paignton</span></a>, <a href="/paulsutton/tag:library" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">library</span></a>, <a href="/paulsutton/tag:virtual" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">virtual</span></a>, <a href="/paulsutton/tag:codeclub" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">codeclub</span></a></p>

<p>Happy to provide help and support via decentralised social media.  I can be contacted on Mastodon <a href="https://qoto.org/@zleap/" rel="nofollow">here</a>. You can get a free account on the <a href="http://qoto.org" rel="nofollow">http://qoto.org</a> instance by following <a href="https://qoto.org/invite/pN8gdTzi" rel="nofollow">this link</a>.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/88x31.png" alt="cc-by logo"></p>

<p><a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">Licenced under Attribution 4.0 International (CC BY 4.0)</a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/addition-application</guid>
      <pubDate>Wed, 20 May 2020 06:30:00 +0000</pubDate>
    </item>
  </channel>
</rss>