<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>ProblemSolving &amp;mdash; Paul Sutton</title>
    <link>https://personaljournal.ca/paulsutton/tag:ProblemSolving</link>
    <description>Personal Blog</description>
    <pubDate>Tue, 05 May 2026 16:19:35 +0000</pubDate>
    <item>
      <title>Share Graphics on Next Cloud</title>
      <link>https://personaljournal.ca/paulsutton/share-graphics-on-next-cloud</link>
      <description>&lt;![CDATA[Share Graphics on Next Cloud &#xA;&#xA;So Further to the video / post yesterday&#xA;&#xA;In a similar way to how you can share a video on BBB you can share graphics in markdown, by doing something similar. This works on WriteAs / WriteFreely&#xA;&#xA;I uploaded ILoveFS.png&#xA;&#xA;So adding /download?.png to &#xA;&#xA;https://nc.phillw.org/index.php/s/BsMHAQ8sKDKExfW&#xA;&#xA;Embeds the graphics in the page. &#xA;&#xA;I Love Free Software&#xA;&#xA;REFERENCES&#xA;&#xA;Next Cloud&#xA;Free Software Foundation&#xA;&#xA;TAGS&#xA;&#xA;#YearOfTheFediverse,#NextCloud,#Share,#Graphics,&#xA;ProblemSolving&#xA;&#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&#xA;&#xA;img src=&#34;https://socialhub.activitypub.rocks/uploads/default/original/1X/6aac842b7ff5c58385a02f3a131c259281be88c8.png&#34; target=&#34;_blank&#34; &#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>Share Graphics on Next Cloud</p>

<p>So Further to the video / post yesterday</p>

<p>In a similar way to how you can share a video on BBB you can share graphics in markdown, by doing something similar. This works on WriteAs / WriteFreely</p>

<p>I uploaded ILoveFS.png</p>

<p>So adding /download?.png to</p>

<p><a href="https://nc.phillw.org/index.php/s/BsMHAQ8sKDKExfW" rel="nofollow">https://nc.phillw.org/index.php/s/BsMHAQ8sKDKExfW</a></p>

<p>Embeds the graphics in the page.</p>

<p><img src="https://nc.phillw.org/index.php/s/BsMHAQ8sKDKExfW/download?.png=" alt="I Love Free Software"></p>

<p><strong>REFERENCES</strong></p>
<ul><li><a href="https://www.nextcloud.com" rel="nofollow">Next Cloud</a></li>
<li><a href="https://www.fsf.org" rel="nofollow">Free Software Foundation</a></li></ul>

<p><strong>TAGS</strong></p>

<p><a href="/paulsutton/tag:YearOfTheFediverse" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">YearOfTheFediverse</span></a>,<a href="/paulsutton/tag:NextCloud" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">NextCloud</span></a>,<a href="/paulsutton/tag:Share" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Share</span></a>,<a href="/paulsutton/tag:Graphics" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Graphics</span></a>,
<a href="/paulsutton/tag:ProblemSolving" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">ProblemSolving</span></a></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>

<p><a href="https://torresjrjr.com/archive/2020-07-19-guide-to-the-fediverse" rel="nofollow"><img src="https://socialhub.activitypub.rocks/uploads/default/original/1X/6aac842b7ff5c58385a02f3a131c259281be88c8.png"></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/share-graphics-on-next-cloud</guid>
      <pubDate>Tue, 23 Feb 2021 07:30:00 +0000</pubDate>
    </item>
    <item>
      <title>Ansi Weather</title>
      <link>https://personaljournal.ca/paulsutton/ansi-weather</link>
      <description>&lt;![CDATA[Ansi Weather&#xA;&#xA;img src=&#34;https://socialhub.activitypub.rocks/uploads/default/original/1X/6aac842b7ff5c58385a02f3a131c259281be88c8.png&#34; target=&#34;_blank&#34; &#xA;&#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&#xA;&#xA;Getting weather information is really useful. What happens if you&#39;re at the command line in Linux?  I found a really little application that can help&#xA;&#xA;ansiweather &#xA;&#xA;apt install ansiweather&#xA;&#xA;ansiweather -l Plymouth, UK&#xA;&#xA;Ansi Weather Output&#xA;&#xA;So what else can we do with this&#xA;&#xA;Send the output to Mastodon with toot post&#xA;&#xA;This is a two step process&#xA;&#xA;ansiweather -l Plymouth, UK   weather.txt&#xA;toot post &lt; weather.txt&#xA;&#xA;Will send the weather info to Mastodon.&#xA;&#xA;However this does not include any date info&#xA;&#xA;We can fix this with&#xA;&#xA;date   weatherinfo.txt&#xA;ansiweather -l Plymouth, UK     weatherinfo.txt&#xA;&#xA;then send the whole lot to Mastodon with&#xA;&#xA;toot post &lt; weatherinfo.txt&#xA;&#xA;So, if we put this in to a final shell script we need:- &#xA;&#xA;send weather info to Mastodon&#xA;current date&#xA;date   weatherinfo.txt&#xA;current weather&#xA;ansiweather -l Plymouth, UK     weatherinfo.txt&#xA;send to Mastodon&#xA;toot post &lt; weatherinfo.txt&#xA;done&#xA;echo done&#xA;&#xA;Again released under GPLv3&#xA;&#xA;I tried to get festival to speak the weather, it is not perfect but this sort of works,  you will need to direct to weather.txt first.  &#xA;&#xA;festival --tts &lt; weather.txt&#xA; &#xA;Looking in to this further, the issue is the brackets etc, so this stackoverflow post&#xA;&#xA;strips out the colour formatting&#xA;&#xA;sed &#39;s/\x1b\[m//g&#39; weatherinfo.txt&#xA;&#xA;Therefore &#xA;&#xA;sed &#39;s/\x1b\[m//g&#39; weatherinfo.txt   weatherinfo2.txt&#xA;&#xA;Sends the newly formatted text to weatherinfo2.txt&#xA;&#xA;So running back through festival&#xA;&#xA;festival --tts &lt; weather.txt&#xA;&#xA;Is perhaps a little better, but not perfect&#xA;&#xA;So going back to what we wrote earlier to send to Mastodon, the new script &#xA;&#xA;  1 #send weather info to Mastodon&#xA;  2 # current date&#xA;  3 date   weatherinfo.txt&#xA;  4 # current weather&#xA;  5 ansiweather -l Plymouth, UK     weatherinfo.txt&#xA;  6 # clean up output with sed&#xA;  7 sed &#39;s/\x1b\[*m//g&#39; weatherinfo.txt   weatherinfo2.txt&#xA;  8 #send to Mastodon&#xA;  9 toot post &lt; weatherinfo2.txt&#xA; 10 # done&#xA; 11 echo done&#xA;&#xA;Produces much nicer output. The top bottom part of this illustrates what was sent before we stripped out the colour formatting&#xA;&#xA;However it still isn&#39;t perfect, as it removes part some of the wording, but it is hopefully getting there.  &#xA;&#xA;Weather Output (new)&#xA;&#xA;REFERENCES&#xA;&#xA;Ansi Weather&#xA;Free Software Foundation&#xA;&#xA;TAGS&#xA;&#xA;#YearOfTheFediverse,#Weather,#Scripting,#Bash,#Linux,&#xA;#Mastodon,#ProblemSolving,#AnsiWeather,#programming,&#xA;#Stackoverflow,#sed,#cat,#grep,GPL3,#FSF&#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>Ansi Weather</p>

<p><a href="https://torresjrjr.com/archive/2020-07-19-guide-to-the-fediverse" rel="nofollow"><img src="https://socialhub.activitypub.rocks/uploads/default/original/1X/6aac842b7ff5c58385a02f3a131c259281be88c8.png"></a></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>

<p>Getting weather information is really useful. What happens if you&#39;re at the command line in Linux?  I found a really little application that can help</p>

<p>ansiweather</p>

<p>apt install ansiweather</p>

<p>ansiweather -l Plymouth, UK</p>

<p><img src="https://git.qoto.org/zleap/documents/-/raw/master/ansiweather.png" alt="Ansi Weather Output"></p>

<p>So what else can we do with this</p>
<ol><li>Send the output to Mastodon with toot post</li></ol>

<p>This is a two step process</p>
<ol><li>ansiweather -l Plymouth, UK &gt; weather.txt</li>
<li>toot post &lt; weather.txt</li></ol>

<p>Will send the weather info to Mastodon.</p>

<p>However this does not include any date info</p>

<p>We can fix this with</p>
<ol><li>date &gt; weatherinfo.txt</li>
<li>ansiweather -l Plymouth, UK &gt;&gt; weatherinfo.txt</li></ol>

<p>then send the whole lot to Mastodon with</p>
<ol><li>toot post &lt; weatherinfo.txt</li></ol>

<p>So, if we put this in to a final shell script we need:-</p>

<pre><code>#send weather info to Mastodon
# current date
date &gt; weatherinfo.txt
# current weather
ansiweather -l Plymouth, UK &gt;&gt; weatherinfo.txt
#send to Mastodon
toot post &lt; weatherinfo.txt
# done
echo done

</code></pre>

<p>Again released under <a href="https://www.gnu.org" rel="nofollow">GPLv3</a></p>

<p>I tried to get festival to speak the weather, it is not perfect but this sort of works,  you will need to direct to weather.txt first.</p>

<p>festival —tts &lt; weather.txt</p>

<p>Looking in to this further, the issue is the brackets etc, so this <a href="https://stackoverflow.com/questions/36547654/remove-colour-code-from-linux-files" rel="nofollow">stackoverflow post</a></p>

<p>strips out the colour formatting</p>

<p>sed &#39;s/\x1b[[^\x1b]*m//g&#39; weatherinfo.txt</p>

<p>Therefore</p>

<p>sed &#39;s/\x1b[[^\x1b]*m//g&#39; weatherinfo.txt &gt; weatherinfo2.txt</p>

<p>Sends the newly formatted text to weatherinfo2.txt</p>

<p>So running back through festival</p>

<p>festival —tts &lt; weather.txt</p>

<p>Is perhaps a little better, but not perfect</p>

<p>So going back to what we wrote earlier to send to Mastodon, the new script</p>

<pre><code>  1 #send weather info to Mastodon
  2 # current date
  3 date &gt; weatherinfo.txt
  4 # current weather
  5 ansiweather -l Plymouth, UK &gt;&gt; weatherinfo.txt
  6 # clean up output with sed
  7 sed &#39;s/\x1b\[[^\x1b]*m//g&#39; weatherinfo.txt &gt; weatherinfo2.txt
  8 #send to Mastodon
  9 toot post &lt; weatherinfo2.txt
 10 # done
 11 echo done

</code></pre>

<p>Produces much nicer output. The top bottom part of this illustrates what was sent before we stripped out the colour formatting</p>

<p>However it still isn&#39;t perfect, as it removes part some of the wording, but it is hopefully getting there.</p>

<p><img src="https://git.qoto.org/zleap/documents/-/raw/master/weatheroutput.png" alt="Weather Output (new)"></p>

<p><strong>REFERENCES</strong></p>
<ul><li><a href="https://www.maketecheasier.com/check-weather-from-terminal-with-ansiweather/" rel="nofollow">Ansi Weather</a></li>
<li><a href="https://www.fsf.org" rel="nofollow">Free Software Foundation</a></li></ul>

<p><strong>TAGS</strong></p>

<p><a href="/paulsutton/tag:YearOfTheFediverse" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">YearOfTheFediverse</span></a>,<a href="/paulsutton/tag:Weather" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Weather</span></a>,<a href="/paulsutton/tag:Scripting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Scripting</span></a>,<a href="/paulsutton/tag:Bash" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Bash</span></a>,<a href="/paulsutton/tag:Linux" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Linux</span></a>,
<a href="/paulsutton/tag:Mastodon" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Mastodon</span></a>,<a href="/paulsutton/tag:ProblemSolving" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">ProblemSolving</span></a>,<a href="/paulsutton/tag:AnsiWeather" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">AnsiWeather</span></a>,<a href="/paulsutton/tag:programming" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">programming</span></a>,
<a href="/paulsutton/tag:Stackoverflow" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Stackoverflow</span></a>,<a href="/paulsutton/tag:sed" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">sed</span></a>,<a href="/paulsutton/tag:cat" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">cat</span></a>,<a href="/paulsutton/tag:grep" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">grep</span></a>,GPL3,<a href="/paulsutton/tag:FSF" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">FSF</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/ansi-weather</guid>
      <pubDate>Sat, 30 Jan 2021 22:42:42 +0000</pubDate>
    </item>
  </channel>
</rss>