<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<author><name>Lee Halls</name></author>
<title>Ramblings of a lost one</title>
<description>Blog posts, code plus general ramblings from me.</description>
<generator>Emacs webfeeder.el</generator>
<link>https://leehalls.net</link>
<atom:link href="https://leehalls.net/rss.xml" rel="self" type="application/rss+xml"/>
<lastBuildDate>Wed, 26 Aug 2026 10:53:49 +0100</lastBuildDate>
<item>
  <title>Travel &amp; heatwaves</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Travel & heatwaves</h1>
</header> <p>
Whlist the UK & Europe was sweltering in the heat at the end of June I was enjoying a much cooler 2wks in Holland, Michigan working at a supplier site on a new cell. 
</p>


 <figure id="org6af7213"> <img src="../images/Holland_MI.jpg" alt="Zoomed image." width="300" style="border:2px solid black;"></img> <figcaption> <span class="figure-number">Figure 1: </span>Holland, MI</figcaption></figure> <p>
Grand Rapids/Holland if you have never been I can honestly and thoroughly recommend a visit especially if you like BEER! just a word of warning they have a fantastic range of dark high percentage beer and it goes down easily …. too easily & you'll know about it.
</p>

 <p>
Visit  <a href="https://www.hopcat.com/holland/beer">Hopcat</a> or  <a href="https://www.newhollandbrew.com/beer/">New Holland Brewing</a> to try Dragon's Milk a deliciously dark & strong 11% or the Triple Mash version at a mere 18% Also keep a look out for the wonderfully named  <a href="https://foundersbrewing.com/our-beer/backwoods-bastard/">Backwoods Bastard</a>! although you may need to drive into Grand Rapids or visit Walmart for that one.
</p>


 <figure id="orgf5ccf2b"> <img src="../images/dark_beer.jpeg" alt="Zoomed image." width="600" style="border:2px solid black;"></img></figure> <div class="caution" id="org86d39fb">
 <p>
If you wake up feeling rough, hungover I did warn you they are easy to drink but incredibly strong!
</p>

</div>
</div>]]></description>
  <link>https://leehalls.net/posts/./heatwavetravel.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./heatwavetravel.html</guid>
  <pubDate>Mon, 29 Jun 2026 08:00:00 +0100</pubDate>
</item>
<item>
  <title>A second attempt</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">A second attempt</h1>
</header> <p>
As written  <a href="blackbird_20260303.html">here</a> the blackbird's were unsuccesful in raising young, I had thought perhaps they no longer considered the garden a viable safe place but regular watching of it & all the visitors we get I noticed them visiting the willow bush and now both Mr & Mrs visit carefully with beaks full of grubs. They land, scan the area, move in one direction, scan the area then move in another sometimes flying into a different bush first. And if you're quiet & have timed it right you can hear the chicks being fed before they fly off again to fetch more.
</p>

 <p>
The willow is a much denser bush, further up the garden away from the wind that whips around the corner of the house too. Its not possible to photograph them unless disturbing the bush which is not something that will be done. So here's nice pic of their home.
</p>



 <p>
 <span class="timestamp-wrapper"> <span class="timestamp">[2026-06-29 Mon] </span></span> well after my return from another work trip ( <a href="heatwavetravel.html">Michigan, USA</a>) the nest is empty and hopefully they managed to raise a family. It's a busy & often dangerous area with magpie's, crow's and the odd raptor visit!
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./blackbird_20260613.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./blackbird_20260613.html</guid>
  <pubDate>Sat, 13 Jun 2026 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Time &amp; interest</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Time & interest</h1>
</header> <p>
It's June 2026, it's raining a perfectly dull grey sky exists which would seem the perfect metaphor for my current mental state. although the weather as reported using my  <a href="wttr.html">wttr</a> integration would seem not that bad 🌤️  🌡️+11°C 🌬️↖26km/h perhaps it is just the fugue of depression, having suffered all week with a bad cold & lost the drive to " <b>do</b>" - everything from updating this blog and other jobs has stalled, the bikes remain in the garage in part because I no longer ride in the rain ( <i>unless caught out</i>) and time ( <i>hours at work & travel</i>) even gaming provides no impetus.
</p>

 <p>
This XKCD comic captures the apathy
</p>


 <figure id="org9d9d206"> <img src="https://imgs.xkcd.com/comics/loop.png" alt="loop.png"></img></figure> <p>
But taking some lines from my favourite book & film … 
</p>
 <ul class="org-ul"> <li>" <i>But in the end, it’s only a passing thing, this shadow. Even darkness must pass. A new day will come. And when the sun shines it will shine out the clearer.</i></li>
 <li>" <i>All we have to decide is what to do with the time that is given us.</i>"   <sup> <a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup></li>
</ul> <p>
It will pass although the frequency of return maybe an issue and so one must fight, fight the darkness within, find the spark and let it shine much easier to write/think than do but you may ask what has this to do with age?
</p>

 <p>
Well thoughts of time passing, taking a view of my internal architecture was never a concept I dealt with before, never considered growing older nor the subject of friends but watching the comraderie and genuine affection seen on Junk & Disorderly <sup> <a id="fnr.2" class="footref" href="#fn.2" role="doc-backlink">2</a></sup> sparks a little envy. Even riding, in my CBR/ZX days I'd think nothing of getting up leaving Derbyshire and heading to Dracula's landing place via the coast road for a coffee & returning over the moors a full day of riding, now I sometimes struggle to pick a route/destination even though one reason for riding is the cathartic emptiness of my brain - just me, my bike & the road and environment, its a reflective experience that no other form of transportation can give. A long straight road gives you chance to zone out, meditate on self, twisties focuses the mind, the environment impacts more forcefully smells, wind, the heat reflected off the road and yet even this is not enough at the moment.
</p>

 <p>
So internal reflection on my surroundings and the utilisation of time is, I feel, an age related input driven by the loss of people, changes in body and perhaps an ever increasing frustration with the world around and the decline of it.
</p>
 <div id="footnotes">
 <h2 class="footnotes">Footnotes: </h2>
 <div id="text-footnotes">

 <div class="footdef"> <sup> <a id="fn.1" class="footnum" href="#fnr.1" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"> <p class="footpara">
LOTR -   <a href="https://www.youtube.com/watch?v=k6C8SX0mWP0">Sam Gamgee</a> @ 1:17 in the video &  <a href="https://www.youtube.com/watch?v=IrOqnZdvI6M">Gandalf to Frodo</a>  @ 2:13
</p></div></div>

 <div class="footdef"> <sup> <a id="fn.2" class="footnum" href="#fnr.2" role="doc-backlink">2</a></sup> <div class="footpara" role="doc-footnote"> <p class="footpara">
 <a href="https://www.henrycole.tv/junk-disorcerly">Junk & Disorderly</a> or as the site link states "junk-disorcerly" basically friends buying, selling, doing up automotive items -  Henry Cole, Skid Willison, Allen Millyard & co a right good watch   
</p></div></div>


</div>
</div></div>]]></description>
  <link>https://leehalls.net/posts/./timeandinterest_20260606.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./timeandinterest_20260606.html</guid>
  <pubDate>Sat, 06 Jun 2026 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Spring is coming! &amp; the blackbird is nesting</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Spring is coming! & the blackbird is nesting</h1>
</header> <p>
I've seen them trying to nest in this bush last year;
</p>


 <figure id="orga0caafe"> <img src="../images/IMG_0598.jpeg" alt="IMG_0598.jpeg" width="300"></img></figure> <p>
Once disturbed by the sparrowhawk they never stayed nor did I see eggs, then finally late last year after the season had finished the old nest fell out in the winds of winter so this is a new build. And here she is keeping a watchful eye out whilst sat on the results of her hardwork;
</p>


 <figure id="orga068475"> <img src="../images/blackbird_nesting_20260303T1625.jpg" alt="blackbird_nesting_20260303T1625.jpg" width="600"></img> <figcaption> <span class="figure-number">Figure 1: </span>Beautiful mom</figcaption></figure> <p>
She flies off every so often but never for long which meant I could see into the nest from the bathroom window to capture a photo or two here I only caught sight of the one egg, but last time she flew out I could see two;
</p>


 <figure id="org1cec0c4"> <img src="../images/blackbird_nesting_20260307.png" alt="blackbird_nesting_20260307.png" width="600"></img></figure> <p>
I'm keeping an eye her but definitely not disturbing her although the bush is only 1.5m from the backdoor I make sure we're not near her and use the bino's from the bathroom window to check on her. She's doing well, hopefully I'll get to see the family.
</p>

 <p>
 <span class="timestamp-wrapper"> <span class="timestamp">[2026-03-14 Sat] </span></span> sad news, the nest has been abandoned 😫
</p>


 <figure id="org90fa4a7"> <img src="../images/IMG_0595.jpeg" alt="IMG_0595.jpeg" width="600"></img> <figcaption> <span class="figure-number">Figure 2: </span>A sad outcome, abandoned.</figcaption></figure> <p>
Had not seen her flying in & out, nor had I seen her sitting on the nest, I suspect the recent high winds which were giving the bush quite a rough ride moved the nest slightly making it more visible as well, when I checked in on her you could see that she was not happy and quite disturbed with her head moving around as the winds blew. A pity for her & me, I was really looking forwards to her success. Still I'll do what I can for the others, keep putting food out, water available and watch them nesting in the trees.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./blackbird_20260303.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./blackbird_20260303.html</guid>
  <pubDate>Tue, 03 Mar 2026 08:00:00 +0000</pubDate>
</item>
<item>
  <title>The weather in your emacs journals</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">The weather in your emacs journals</h1>
</header> <p>
Obviously I like journelly and so went on a dive into getting the weather into my other notes and across platforms eventually stumbling upon wttr.in
</p>

 <div class="info" id="org3b8e759">
 <p>
From the github site:  <a href="https://github.com/chubin/wttr.in">https://github.com/chubin/wttr.in</a> wttr.in is a console-oriented weather forecast service that supports various information representation methods like terminal-oriented ANSI-sequences for console HTTP clients (curl, httpie, or wget), HTML for web browsers, or PNG for graphical viewers.
</p>

</div>

 <p>
I've had a few calls to it that have failed, but most of the time it reports back beautifully. So how do we get the weather from wttr into an orgmode file?
</p>

 <p>
On MS Windows I use this snippet
</p>


 <div class="org-src-container">
 <pre class="src src-batch">'# -*- mode: snippet -*-
'# name: Weather today (wttr.in, prompt city)
'# key: dl
'# --
* `(format-time-string "%Y-%m-%d %a %H:%M")` $1
:PROPERTIES:
:WEEK: `(format-time-string "WK%V")`
:WEATHER: `(let* ((place (read-string "City: " wttr-weather-default-location))
                  (raw (with-temp-buffer
                         (call-process
                          "C:/Windows/system32/curl.exe" nil '(t t) nil
                          "-s"
                          (format "wttr.in/%s?format=4"
                                  (replace-regexp-in-string " " "+" place)))
                         (string-trim (buffer-string)))))
             raw)`
:MILEAGE:
:START:
:FINISH:
:END:
</pre>
</div>

 <p>
and the above returns the weather in this format;
</p>

 <div class="info" id="org8eb6de6">
 <p>
London: ☁️   🌡️+8°C 🌬️↖8km/h
</p>

</div>

 <p>
although you can also use it in your init.el as a function
</p>

 <div class="org-src-container">
 <pre class="src src-elisp">( <span class="org-keyword">defun</span>  <span class="org-function-name">my/get-weather</span> (city)
   <span class="org-doc">"Fetch weather from wttr.in and remove the city prefix."</span>
  ( <span class="org-keyword">let*</span> ((raw (shell-command-to-string
               (format  <span class="org-string">"curl -A curl -s --max-time 5 \"https://wttr.in/%s?format=3\""</span> city)))
         (clean (string-trim raw)))
     <span class="org-comment-delimiter">;; </span> <span class="org-comment">Remove leading 'City: ' if present
</span>    ( <span class="org-keyword">if</span> (string-match  <span class="org-string">"^[</span> <span class="org-string"> <span class="org-negation-char">^</span></span> <span class="org-string">:]+: </span> <span class="org-string"> <span class="org-regexp-grouping-backslash">\\</span></span> <span class="org-string"> <span class="org-regexp-grouping-construct">(</span></span> <span class="org-string">.*</span> <span class="org-string"> <span class="org-regexp-grouping-backslash">\\</span></span> <span class="org-string"> <span class="org-regexp-grouping-construct">)</span></span> <span class="org-string">$"</span> clean)
        (match-string 1 clean)
      clean)))
</pre>
</div>

 <pre class="example">
my/get-weather
</pre>


 <p>
You can tweak the format but as written above  <code>format=3</code> returns something like this;
</p>

 <div class="info" id="org26e6d92">
 <p>
Silao: ☀️   +29°C
</p>

</div>

 <p>
So happy weather recording!
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./wttr.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./wttr.html</guid>
  <pubDate>Wed, 04 Feb 2026 08:00:00 +0000</pubDate>
</item>
<item>
  <title>Org insert link</title>
  <description><![CDATA[<div id="content" class="content">
 <p>
I'm in the process of re-writing this blog to move away from hugo and stuff I have no time to go and figure out into just a pure orgmode & emacs publish route. One problem I ran into was inserting links via  <code>C-l</code> did not export correctly into the HTML. 
</p>

 <p>
My folder structure is
</p>

 <div class="org-src-container">
 <pre class="src src-ascii">- Top level
   - .packages
   - assets
       - head.html
       - html_preamble.html
       - images
              - vh_001.jpg
              - 
   - content
       - posts
              - vh.org
              - 
   - .build.sh
   - org-website-publish.el
</pre>
</div>

 <p>
To get them working I wrote a separate insert link function;
</p>

 <div class="org-src-container">
 <pre class="src src-elisp"> <span class="org-comment-delimiter">;; </span> <span class="org-comment">my link insert
</span>( <span class="org-keyword">defun</span>  <span class="org-function-name">my/org-insert-image-link</span> (path)
   <span class="org-doc">"Insert Org link with ../images/filename.ext instead of full PATH."</span>
  ( <span class="org-keyword">interactive</span>  <span class="org-string">"fImage file: "</span>)
  ( <span class="org-keyword">let*</span> ((filename (file-name-nondirectory path))
         (relpath (concat  <span class="org-string">"../images/"</span> filename)))
    (insert (format  <span class="org-string">"[[file:%s]]"</span> relpath))))
</pre>
</div>

 <ul class="org-ul"> <li>and bound it into orgmode function only on key  <code>C-i</code></li>
</ul> <div class="org-src-container">
 <pre class="src src-elisp"> <span class="org-comment-delimiter">;; </span> <span class="org-comment">my link insert
</span>( <span class="org-keyword">with-eval-after-load</span> 'org
  (define-key org-mode-map (kbd  <span class="org-string">"C-c i"</span>)
    #'my/org-insert-image-link))
</pre>
</div>

 <p>
Now in the HTML source my images are coded as   <code><img src="../images/vh_001.JPG" alt="vh_001.JPG"></code> and when served visible in the webpage 😊
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./org_insert_link.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./org_insert_link.html</guid>
  <pubDate>Sun, 25 Jan 2026 08:00:00 +0000</pubDate>
</item>
<item>
  <title>The weather in your emacs journals</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">The weather in your emacs journals</h1>
</header> <div class="note" id="orgc14f36c">
 <p>
From the github site: wttr.in is a console-oriented weather forecast service that supports various information representation methods like terminal-oriented ANSI-sequences for console HTTP clients (curl, httpie, or wget), HTML for web browsers, or PNG for graphical viewers.
</p>

</div>


 <p>
The service is not 100% reliable, I've had a few calls to it that have failed, but most of the time it reports back beautifully.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./drafts/wttr.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./drafts/wttr.html</guid>
  <pubDate>Sat, 24 Jan 2026 08:00:00 +0000</pubDate>
</item>
<item>
  <title>OrgRoam to cosmascope</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">OrgRoam to cosmascope</h1>
</header> <p>
Firstly my org-roam db is small, its limited. I cannot quite seem to get my head  around the concept but I love the visualisation provided by org-roam-ui it reminds me of when I used TheBrain many years ago.
</p>

 <p>
What this does is converts your org-roam files into a format usable by cosmascope so that you can share them, host them on your site but consider it an experiment firstly in using ChatGPT & secondly to see if it was possible to convert org-roam into a usable graph via cosmascope <sup> <a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup>. This is adapted from Kévin Polisano’s obsidian2cosma.py ( <a href="https://github.com/kevinpolisano/obsidian2cosma">https://github.com/kevinpolisano/obsidian2cosma</a>) which converts your Obsidian vault. It is only the first step, you must then create the cosmascope itself.
</p>

 <p>
Consider this as work in progress and to be improved! There are limitations
</p>

 <ul class="org-ul"> <li>cosmascope will not display images if linked in your text</li>
 <li>the script does not handle internal links well ie in the generated log you may see
 <ul class="org-ul"> <li> <code>The following paragraph contains a broken link "[[49F6458C-14AA-4C4B-9F6B-7F007E2199F9|emacs again?]]"</code></li>
 <li>I'm sure there will be other issues but for an experiment and a test on a small org-roam data set it worked quite well.</li>
</ul></li>
</ul> <figure id="org7856441"> <img src="../images/2025-10-19_11-24_orgroamui.png" alt="2025-10-19_11-24_orgroamui.png" width="50%"></img> <figcaption> <span class="figure-number">Figure 1: </span>Org-roam-ui screenshot</figcaption></figure> <figure id="orga44f47d"> <img src="../images/2025-10-19_11-24_cosmascreen.png" alt="2025-10-19_11-24_cosmascreen.png" width="50%"></img> <figcaption> <span class="figure-number">Figure 2: </span>Converted org-roam to cosmoscope</figcaption></figure> <p>
The script is located here on my rarely used github  <a href="https://github.com/drakxtwo/orgroam_cosmascope">https://github.com/drakxtwo/orgroam_cosmascope</a>
</p>


 <p>
but a copy is also below however only the github one will be updated.
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-doc">"""
Convert an Org-roam vault into a collection of Markdown notes readable by Cosma (https://cosma.graphlab.fr/en/)

Usage:
  python orgroam2cosma.py -i input_folder_path -o output_folder_path
                          [--type TYPE] [--tags TAGS]
                          [--creationdate CREATIONDATE]
                          [--zettlr True]
                          [-v]

Example:
  python orgroam2cosma.py -i ~/org-roam -o ./cosma_notes --zettlr True --verbose

Author: adapted from Kévin Polisano’s obsidian2cosma.py by ChatGPT
License: GNU GPL v3.0
"""</span>

 <span class="org-keyword">import</span> os
 <span class="org-keyword">import</span> re
 <span class="org-keyword">import</span> platform
 <span class="org-keyword">import</span> argparse
 <span class="org-keyword">import</span> shutil
 <span class="org-keyword">import</span> unicodedata
 <span class="org-keyword">import</span> csv
 <span class="org-keyword">from</span> pathlib  <span class="org-keyword">import</span> Path
 <span class="org-keyword">from</span> datetime  <span class="org-keyword">import</span> datetime  <span class="org-keyword">as</span> dt

 <span class="org-comment-delimiter"># </span> <span class="org-comment">========== Argument parsing ==========
</span> <span class="org-variable-name">parser</span>  <span class="org-operator">=</span> argparse.ArgumentParser()
parser.add_argument( <span class="org-string">"-i"</span>,  <span class="org-string">"--input"</span>,  <span class="org-builtin">help</span> <span class="org-operator">=</span> <span class="org-string">"Path to the input folder"</span>, required <span class="org-operator">=</span> <span class="org-constant">True</span>)
parser.add_argument( <span class="org-string">"-o"</span>,  <span class="org-string">"--output"</span>,  <span class="org-builtin">help</span> <span class="org-operator">=</span> <span class="org-string">"Path to the output folder"</span>, required <span class="org-operator">=</span> <span class="org-constant">True</span>)
parser.add_argument( <span class="org-string">"--tags"</span>,  <span class="org-builtin">help</span> <span class="org-operator">=</span> <span class="org-string">"Filter notes by tags"</span>, default <span class="org-operator">=</span> <span class="org-constant">None</span>)
parser.add_argument( <span class="org-string">"--creationdate"</span>,  <span class="org-builtin">help</span> <span class="org-operator">=</span> <span class="org-string">"Use file creation date for IDs"</span>, default <span class="org-operator">=</span> <span class="org-constant">False</span>)
parser.add_argument( <span class="org-string">"--zettlr"</span>,  <span class="org-builtin">help</span> <span class="org-operator">=</span> <span class="org-string">"Use Zettlr-style links [text]([[id]])"</span>, default <span class="org-operator">=</span> <span class="org-constant">False</span>)
parser.add_argument( <span class="org-string">"-v"</span>,  <span class="org-string">"--verbose"</span>, action <span class="org-operator">=</span> <span class="org-string">"store_true"</span>,  <span class="org-builtin">help</span> <span class="org-operator">=</span> <span class="org-string">"Verbose mode"</span>)
 <span class="org-variable-name">args</span>  <span class="org-operator">=</span> parser.parse_args()

 <span class="org-variable-name">input_folder</span>  <span class="org-operator">=</span> args. <span class="org-builtin">input</span>
 <span class="org-variable-name">output_folder</span>  <span class="org-operator">=</span> args.output

 <span class="org-keyword">def</span>  <span class="org-function-name">printv</span>(text):
     <span class="org-keyword">if</span> args.verbose:
         <span class="org-builtin">print</span>(text)

 <span class="org-comment-delimiter"># </span> <span class="org-comment">========== Helper functions ==========
</span>
 <span class="org-keyword">def</span>  <span class="org-function-name">creation_date</span>( <span class="org-builtin">file</span>):
     <span class="org-keyword">if</span> platform.system()  <span class="org-operator">==</span>  <span class="org-string">"Windows"</span>:
         <span class="org-keyword">return</span> os.path.getctime( <span class="org-builtin">file</span>)
     <span class="org-keyword">else</span>:
         <span class="org-variable-name">stat</span>  <span class="org-operator">=</span> os.stat( <span class="org-builtin">file</span>)
         <span class="org-keyword">try</span>:
             <span class="org-keyword">return</span> stat.st_birthtime
         <span class="org-keyword">except</span>  <span class="org-type">AttributeError</span>:
             <span class="org-keyword">return</span> stat.st_mtime

 <span class="org-keyword">def</span>  <span class="org-function-name">create_id</span>( <span class="org-builtin">file</span>):
     <span class="org-variable-name">timestamp</span>  <span class="org-operator">=</span> creation_date( <span class="org-builtin">file</span>)  <span class="org-keyword">if</span> args.creationdate  <span class="org-keyword">else</span> dt.now().timestamp()
     <span class="org-keyword">return</span> dt.fromtimestamp(timestamp).strftime( <span class="org-string">'%Y%m%d%H%M%S'</span>)

 <span class="org-keyword">def</span>  <span class="org-function-name">clean_filename</span>(name):
     <span class="org-variable-name">name</span>  <span class="org-operator">=</span> unicodedata.normalize( <span class="org-string">"NFD"</span>, name).encode( <span class="org-string">"ascii"</span>,  <span class="org-string">"ignore"</span>).decode( <span class="org-string">"utf-8"</span>)
     <span class="org-keyword">return</span> name.replace( <span class="org-string">" "</span>,  <span class="org-string">"-"</span>)

 <span class="org-comment-delimiter"># </span> <span class="org-comment">========== Org file parsing ==========
</span>
 <span class="org-keyword">def</span>  <span class="org-function-name">parse_org_frontmatter</span>(content):
     <span class="org-doc">"""Extracts title, tags, and id from Org file headers."""</span>
     <span class="org-variable-name">title_match</span>  <span class="org-operator">=</span> re.search(r <span class="org-string">"^#\+title:\s*(.+)$"</span>, content, re.MULTILINE)
     <span class="org-variable-name">tags_match</span>  <span class="org-operator">=</span> re.search(r <span class="org-string">"^#\+filetags:\s*:?(.+?):?$"</span>, content, re.MULTILINE)
     <span class="org-variable-name">id_match</span>  <span class="org-operator">=</span> re.search(r <span class="org-string">"^:ID:\s*(.+)$"</span>, content, re.MULTILINE)
     <span class="org-variable-name">roamkey_match</span>  <span class="org-operator">=</span> re.search(r <span class="org-string">"^#\+roam_key:\s*(.+)$"</span>, content, re.MULTILINE)

     <span class="org-variable-name">title</span>  <span class="org-operator">=</span> title_match.group(1).strip()  <span class="org-keyword">if</span> title_match  <span class="org-keyword">else</span>  <span class="org-constant">None</span>
     <span class="org-variable-name">tags</span>  <span class="org-operator">=</span> []
     <span class="org-keyword">if</span> tags_match:
         <span class="org-variable-name">tags</span>  <span class="org-operator">=</span> [t.strip()  <span class="org-keyword">for</span> t  <span class="org-keyword">in</span> tags_match.group(1).split( <span class="org-string">":"</span>)  <span class="org-keyword">if</span> t.strip()]
     <span class="org-variable-name">id_</span>  <span class="org-operator">=</span> id_match.group(1).strip()  <span class="org-keyword">if</span> id_match  <span class="org-keyword">else</span>  <span class="org-constant">None</span>
     <span class="org-keyword">if</span>  <span class="org-keyword">not</span> id_  <span class="org-keyword">and</span> roamkey_match:
         <span class="org-variable-name">id_</span>  <span class="org-operator">=</span> roamkey_match.group(1).strip()

     <span class="org-keyword">return</span> { <span class="org-string">"title"</span>: title,  <span class="org-string">"tags"</span>: tags,  <span class="org-string">"id"</span>: id_}

 <span class="org-keyword">def</span>  <span class="org-function-name">convert_org_links</span>(content, title2id):
     <span class="org-doc">"""Convert Org links [[id:xxxx][Label]] or [[file:note.org][Label]] to Cosma Markdown links."""</span>
     <span class="org-keyword">def</span>  <span class="org-function-name">repl</span>( <span class="org-keyword">match</span>):
         <span class="org-variable-name">target</span>  <span class="org-operator">=</span>  <span class="org-keyword">match</span>.group(1)
         <span class="org-variable-name">label</span>  <span class="org-operator">=</span>  <span class="org-keyword">match</span>.group(2)  <span class="org-keyword">or</span>  <span class="org-keyword">match</span>.group(1)

         <span class="org-comment-delimiter"># </span> <span class="org-comment">Org id link: [[id:1234][Label]]
</span>         <span class="org-keyword">if</span> target.startswith( <span class="org-string">"id:"</span>):
             <span class="org-variable-name">id_</span>  <span class="org-operator">=</span> target.replace( <span class="org-string">"id:"</span>,  <span class="org-string">""</span>)
             <span class="org-keyword">return</span> f <span class="org-string">"[</span>{label} <span class="org-string">]([[</span>{id_} <span class="org-string">]])"</span>  <span class="org-keyword">if</span> args.zettlr  <span class="org-keyword">else</span> f <span class="org-string">"[[</span>{id_} <span class="org-string">|</span>{label} <span class="org-string">]]"</span>

         <span class="org-comment-delimiter"># </span> <span class="org-comment">Org file link: [[file:note.org][Label]]
</span>         <span class="org-keyword">elif</span> target.startswith( <span class="org-string">"file:"</span>):
             <span class="org-variable-name">file_ref</span>  <span class="org-operator">=</span> Path(target.replace( <span class="org-string">"file:"</span>,  <span class="org-string">""</span>)).stem
             <span class="org-variable-name">file_ref</span>  <span class="org-operator">=</span> clean_filename(file_ref)
             <span class="org-keyword">if</span> file_ref  <span class="org-keyword">in</span> title2id:
                 <span class="org-variable-name">id_</span>  <span class="org-operator">=</span> title2id[file_ref]
                 <span class="org-keyword">return</span> f <span class="org-string">"[</span>{label} <span class="org-string">]([[</span>{id_} <span class="org-string">]])"</span>  <span class="org-keyword">if</span> args.zettlr  <span class="org-keyword">else</span> f <span class="org-string">"[[</span>{id_} <span class="org-string">|</span>{label} <span class="org-string">]]"</span>
             <span class="org-keyword">else</span>:
                 <span class="org-keyword">return</span> f <span class="org-string">"[[</span>{label} <span class="org-string">]]"</span>

         <span class="org-comment-delimiter"># </span> <span class="org-comment">Normal URL or external link
</span>         <span class="org-keyword">elif</span> re. <span class="org-keyword">match</span>(r <span class="org-string">"https?://"</span>, target):
             <span class="org-keyword">return</span> f <span class="org-string">"[</span>{label} <span class="org-string">](</span>{target} <span class="org-string">)"</span>

         <span class="org-keyword">return</span> f <span class="org-string">"[[</span>{label} <span class="org-string">]]"</span>

     <span class="org-comment-delimiter"># </span> <span class="org-comment">Replace all Org-style links [[target][label]]
</span>     <span class="org-variable-name">content</span>  <span class="org-operator">=</span> re.sub(r <span class="org-string">"\[\[([^\]]+?)\](?:\[([^\]]+)\])?\]"</span>, repl, content)
     <span class="org-keyword">return</span> content

 <span class="org-keyword">def</span>  <span class="org-function-name">convert_images</span>(content):
     <span class="org-doc">"""Convert [[file:img.png]] to ![](img.png)"""</span>
     <span class="org-keyword">return</span> re.sub(r <span class="org-string">"\[\[file:(.+?\.(?:png|jpg|jpeg|gif))\]\]"</span>, r <span class="org-string">"![](\1)"</span>, content)

 <span class="org-comment-delimiter"># </span> <span class="org-comment">========== Main pipeline ==========
</span>
 <span class="org-keyword">def</span>  <span class="org-function-name">main</span>():
    Path(output_folder).mkdir(parents <span class="org-operator">=</span> <span class="org-constant">True</span>, exist_ok <span class="org-operator">=</span> <span class="org-constant">True</span>)

    printv(f <span class="org-string">"Converting Org-roam notes from </span>{input_folder} <span class="org-string"> → </span>{output_folder} <span class="org-string">"</span>)

     <span class="org-variable-name">title2id</span>  <span class="org-operator">=</span> {}
     <span class="org-variable-name">org_files</span>  <span class="org-operator">=</span> []

     <span class="org-comment-delimiter"># </span> <span class="org-comment">Step 1: collect files
</span>     <span class="org-keyword">for</span> root, _, files  <span class="org-keyword">in</span> os.walk(input_folder):
         <span class="org-keyword">for</span> f  <span class="org-keyword">in</span> files:
             <span class="org-keyword">if</span> f.endswith( <span class="org-string">".org"</span>):
                org_files.append(os.path.join(root, f))

     <span class="org-comment-delimiter"># </span> <span class="org-comment">Step 2: extract metadata and create IDs
</span>     <span class="org-keyword">for</span> f  <span class="org-keyword">in</span> org_files:
         <span class="org-builtin">print</span>(f)
         <span class="org-keyword">with</span>  <span class="org-builtin">open</span>(f,  <span class="org-string">"r"</span>, encoding <span class="org-operator">=</span> <span class="org-string">"utf-8"</span>)  <span class="org-keyword">as</span> infile:
             <span class="org-builtin">print</span>(infile.read())
             <span class="org-variable-name">content</span>  <span class="org-operator">=</span> infile.read()
         <span class="org-variable-name">meta</span>  <span class="org-operator">=</span> parse_org_frontmatter(content)
         <span class="org-variable-name">title</span>  <span class="org-operator">=</span> meta[ <span class="org-string">"title"</span>]  <span class="org-keyword">or</span> Path(f).stem
         <span class="org-variable-name">id_</span>  <span class="org-operator">=</span> meta[ <span class="org-string">"id"</span>]  <span class="org-keyword">or</span> create_id(f)
         <span class="org-variable-name">title2id</span>[clean_filename(title)]  <span class="org-operator">=</span> id_

     <span class="org-comment-delimiter"># </span> <span class="org-comment">Step 3: process and export each file
</span>     <span class="org-keyword">for</span> f  <span class="org-keyword">in</span> org_files:
         <span class="org-keyword">with</span>  <span class="org-builtin">open</span>(f,  <span class="org-string">"r"</span>, encoding <span class="org-operator">=</span> <span class="org-string">"utf-8"</span>)  <span class="org-keyword">as</span> infile:
             <span class="org-variable-name">content</span>  <span class="org-operator">=</span> infile.read()
         <span class="org-variable-name">meta</span>  <span class="org-operator">=</span> parse_org_frontmatter(content)
         <span class="org-variable-name">title</span>  <span class="org-operator">=</span> meta[ <span class="org-string">"title"</span>]  <span class="org-keyword">or</span> Path(f).stem
         <span class="org-variable-name">id_</span>  <span class="org-operator">=</span> meta[ <span class="org-string">"id"</span>]  <span class="org-keyword">or</span> title2id[clean_filename(title)]
         <span class="org-variable-name">tags</span>  <span class="org-operator">=</span> meta[ <span class="org-string">"tags"</span>]

         <span class="org-comment-delimiter"># </span> <span class="org-comment">Convert links & images
</span>         <span class="org-variable-name">content</span>  <span class="org-operator">=</span> convert_org_links(content, title2id)
         <span class="org-variable-name">content</span>  <span class="org-operator">=</span> convert_images(content)

         <span class="org-comment-delimiter"># </span> <span class="org-comment">Remove Org metadata lines
</span>         <span class="org-variable-name">content</span>  <span class="org-operator">=</span> re.sub(r <span class="org-string">"^#\+.*$"</span>,  <span class="org-string">""</span>, content, flags <span class="org-operator">=</span>re.MULTILINE)
         <span class="org-variable-name">content</span>  <span class="org-operator">=</span> re.sub(r <span class="org-string">"^:PROPERTIES:[\s\S]*?:END:"</span>,  <span class="org-string">""</span>, content, flags <span class="org-operator">=</span>re.MULTILINE)
         <span class="org-variable-name">content</span>  <span class="org-operator">=</span> content.strip()

         <span class="org-comment-delimiter"># </span> <span class="org-comment">YAML front matter
</span>         <span class="org-variable-name">frontmatter</span>  <span class="org-operator">=</span>  <span class="org-string">"---</span> <span class="org-constant">\n</span> <span class="org-string">"</span>
         <span class="org-variable-name">frontmatter</span>  <span class="org-operator">+=</span> f <span class="org-string">"title: </span>{title} <span class="org-constant">\n</span> <span class="org-string">"</span>
         <span class="org-variable-name">frontmatter</span>  <span class="org-operator">+=</span> f <span class="org-string">"id: </span>{id_} <span class="org-constant">\n</span> <span class="org-string">"</span>
         <span class="org-keyword">if</span> tags:
             <span class="org-variable-name">frontmatter</span>  <span class="org-operator">+=</span> f <span class="org-string">"tags: [</span>{', '.join(tags)} <span class="org-string">]</span> <span class="org-constant">\n</span> <span class="org-string">"</span>
         <span class="org-variable-name">frontmatter</span>  <span class="org-operator">+=</span>  <span class="org-string">"---</span> <span class="org-constant">\n\n</span> <span class="org-string">"</span>

         <span class="org-variable-name">md_content</span>  <span class="org-operator">=</span> frontmatter  <span class="org-operator">+</span> content  <span class="org-operator">+</span>  <span class="org-string">"</span> <span class="org-constant">\n</span> <span class="org-string">"</span>
         <span class="org-variable-name">out_name</span>  <span class="org-operator">=</span> clean_filename(Path(title).stem)  <span class="org-operator">+</span>  <span class="org-string">".md"</span>
         <span class="org-variable-name">out_path</span>  <span class="org-operator">=</span> os.path.join(output_folder, out_name)

         <span class="org-keyword">with</span>  <span class="org-builtin">open</span>(out_path,  <span class="org-string">"w"</span>, encoding <span class="org-operator">=</span> <span class="org-string">"utf-8"</span>)  <span class="org-keyword">as</span> outfile:
            outfile.write(md_content)

        printv(f <span class="org-string">"[OK] </span>{os.path.basename(f)} <span class="org-string"> → </span>{out_name} <span class="org-string">"</span>)

     <span class="org-comment-delimiter"># </span> <span class="org-comment">Step 4: save title→id mapping
</span>     <span class="org-keyword">with</span>  <span class="org-builtin">open</span>(os.path.join(output_folder,  <span class="org-string">"_title2id.csv"</span>),  <span class="org-string">"w"</span>, newline <span class="org-operator">=</span> <span class="org-string">""</span>)  <span class="org-keyword">as</span> csvfile:
         <span class="org-variable-name">writer</span>  <span class="org-operator">=</span> csv.writer(csvfile)
        writer.writerows(title2id.items())

    printv(f <span class="org-string">"✅ Conversion complete! </span>{ <span class="org-builtin">len</span>(org_files)} <span class="org-string"> notes processed."</span>)

 <span class="org-keyword">if</span>  <span class="org-builtin">__name__</span>  <span class="org-operator">==</span>  <span class="org-string">"__main__"</span>:
    main()

</pre>
</div>
 <div id="footnotes">
 <h2 class="footnotes">Footnotes: </h2>
 <div id="text-footnotes">

 <div class="footdef"> <sup> <a id="fn.1" class="footnum" href="#fnr.1" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"> <p class="footpara">
Cosmascope ( <a href="https://cosma.arthurperret.fr">https://cosma.arthurperret.fr</a>) describes itself as a knowledge visualisation tool for knowledge workers and it allows you to create an HTML page which displays much like org-roam-ui or obsidians graph.
</p></div></div>


</div>
</div></div>]]></description>
  <link>https://leehalls.net/posts/./orgroamcosma.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./orgroamcosma.html</guid>
  <pubDate>Sat, 18 Oct 2025 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Journelly your orgmode journal on IOS</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Journelly your orgmode journal on IOS</h1>
</header> <p>
For those that know of its existence the combined power of emacs & org mode for everything from simple note taking to complex journal writing, website creation, literate programming and more simply makes it an indispensable tool but its very power comes from its roots which means it is desktop centric and although a lot of my usage is in an MS environment to really leverage the most from the combination it should be in linux environment but getting back to the mobile journal topic - yes there are mobile clients;
</p>

 <table> <colgroup> <col class="org-left"></col> <col class="org-left"></col> <col class="org-left"></col></colgroup> <tbody> <tr> <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
</tr> <tr> <td class="org-left">beorg</td>
 <td class="org-left">🍎</td>
 <td class="org-left"> <a href="https://www.beorgapp.com">https://www.beorgapp.com</a></td>
</tr> <tr> <td class="org-left">plainorg</td>
 <td class="org-left">🍎</td>
 <td class="org-left"> <a href="https://xenodium.com/plain-org-for-ios">https://xenodium.com/plain-org-for-ios</a></td>
</tr> <tr> <td class="org-left">orgro</td>
 <td class="org-left">🤖🍎</td>
 <td class="org-left"> <a href="https://orgro.org">https://orgro.org</a></td>
</tr> <tr> <td class="org-left">metanote   <sup> <a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup></td>
 <td class="org-left">🍎</td>
 <td class="org-left"> <a href="https://metanote-dev.github.io">https://metanote-dev.github.io</a></td>
</tr> <tr> <td class="org-left">orgzly (revived version)</td>
 <td class="org-left">🤖</td>
 <td class="org-left"> <a href="https://www.orgzlyrevived.com">https://www.orgzlyrevived.com</a></td>
</tr> <tr> <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
</tr></tbody></table> <p>
of all these I find  <b> <b>plainorg</b></b> the best for viewing existing files  it renders images nicely and handles internal links &  <b> <b>beorg</b></b> for agenda functions, at the moment there is nothing close to those two on android but the author of plainorg is working on another app one which allows a journalling experience on iOS and you can read an excellent review of it here  <a href="https://www.macobserver.com/tips/round-ups/journelly-journal-app-ios/">https://www.macobserver.com/tips/round-ups/journelly-journal-app-ios/</a> 
</p>

 <p>
The app is called  <a href="https://xenodium.com/journelly-vs-emacs-why-not-both">journelly</a> and it is effectively a polished front end to keeping a true journal in genuine orgmode format. Each entry is automatically populated with the following properties;
</p>

 <div class="org-src-container">
 <pre class="src src-ASCII">:PROPERTIES:
:LATITUDE: 
:LONGITUDE: 
:WEATHER_TEMPERATURE: 
:WEATHER_CONDITION: 
:WEATHER_SYMBOL: 
:END:
</pre>
</div>

 <p>
You do not see these properties when creating an entry but you do see the location and weather as part of the heading
</p>


 <figure id="orga76d4f9"> <img src="../images/journelly_01.png" alt="journelly_01.png"></img></figure> <p>
It is out now on the  <a href="https://apps.apple.com/gb/app/journelly/id6470714669">appstore</a> priced at 14.99GBP it might seem a little high but I think its worth it. I've been using it almost daily to capture notes, events and to as the name suggests journal & I instantly have access in emacs.
</p>

 <p>
I've found it that useful that I'm considering a change to my normal journalling method & I'm currently re-writing a python script to plot the journelly recorded locations on a map.
</p>

 <p>
The one thing I am missing is the ability to see a  <code>TODO</code> as a subheading, I'm not suggesting journelly become a todo list or task manager but my journal is often the first place a task will land especially if I am out for example on a ride-out I'll make notes, take photos but also possibly add a task to visit a shop when its open, or whatever. Then these tasks in my journals are available in emacs on the desktop, Alvaro and I had a good exchange about this and at the moment sub headings are disabled due to the way it treats all headings as equal. Nevertheless as a standalone application built around orgmode it is excellent.
</p>
 <div id="footnotes">
 <h2 class="footnotes">Footnotes: </h2>
 <div id="text-footnotes">

 <div class="footdef"> <sup> <a id="fn.1" class="footnum" href="#fnr.1" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"> <p class="footpara">
The site shows as having an android version but it is not found when searching the store 
</p></div></div>


</div>
</div></div>]]></description>
  <link>https://leehalls.net/posts/./orgjournal.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./orgjournal.html</guid>
  <pubDate>Mon, 05 May 2025 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Location heatmap for Journelly</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Location heatmap for Journelly</h1>
</header> <p>
Following on from  <a href="orgjournal.html">a journal in orgmode/IOS</a> I have expertly crafted ( <i>read massively bodged</i>) a python script to create a heatmap of locations using folium.
</p>

 <p>
It simply reads in your Journelly.org file, checks for the lat/lon lines  & stores them into a pandas dataframe ( <i>I was thinking of doing more with the df</i>) and updates the folium map object before saving the interactive HTML file.
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">import</span> pandas  <span class="org-keyword">as</span> pd 
 <span class="org-keyword">import</span> folium
 <span class="org-keyword">from</span> folium.plugins  <span class="org-keyword">import</span> HeatMap

 <span class="org-variable-name">flag</span>  <span class="org-operator">=</span>  <span class="org-variable-name">i</span>  <span class="org-operator">=</span>  <span class="org-variable-name">lat</span>  <span class="org-operator">=</span>  <span class="org-variable-name">lon</span>  <span class="org-operator">=</span> 0
 <span class="org-comment-delimiter">#</span> <span class="org-comment">create map object centred around your location & define save location
</span> <span class="org-variable-name">map_object</span>  <span class="org-operator">=</span> folium.Map(location  <span class="org-operator">=</span> [52.88489542624623,  <span class="org-operator">-</span>1.42548966136386], zoom_start  <span class="org-operator">=</span> 10 )

 <span class="org-keyword">with</span>  <span class="org-builtin">open</span>( <span class="org-string">"/Users/leehalls/Documents/dumpground/Journelly.org"</span>)  <span class="org-keyword">as</span>  <span class="org-builtin">file</span>:
   <span class="org-keyword">for</span> item  <span class="org-keyword">in</span>  <span class="org-builtin">file</span>:
     <span class="org-keyword">if</span>  <span class="org-string">"LATITUDE"</span>  <span class="org-keyword">in</span> item:
         <span class="org-variable-name">lat</span>  <span class="org-operator">=</span> item[11:20]
     <span class="org-keyword">if</span>  <span class="org-string">"LONGITUDE"</span>  <span class="org-keyword">in</span> item:
         <span class="org-variable-name">lon</span>  <span class="org-operator">=</span> item[12:21]
         <span class="org-variable-name">i</span>  <span class="org-operator">+=</span> 1
     <span class="org-keyword">if</span> flag  <span class="org-operator">==</span> 0:
         <span class="org-variable-name">done</span>  <span class="org-operator">=</span> 1  <span class="org-comment-delimiter">#</span> <span class="org-comment">create dataframe
</span>         <span class="org-variable-name">df</span>  <span class="org-operator">=</span> pd.DataFrame({ <span class="org-string">"lat"</span>:[lat], <span class="org-string">"lon"</span>:[lon]})
     <span class="org-keyword">if</span> done  <span class="org-operator">==</span> 1:
         <span class="org-keyword">if</span> flag  <span class="org-operator">!=</span> i:
                 <span class="org-variable-name">flag</span>  <span class="org-operator">=</span> i
                 <span class="org-variable-name">data</span>  <span class="org-operator">=</span> { <span class="org-string">"lat"</span>:[lat],  <span class="org-string">"lon"</span>:[lon]}
                 <span class="org-variable-name">df_new_rows</span>  <span class="org-operator">=</span> pd.DataFrame(data)  <span class="org-comment-delimiter">#</span> <span class="org-comment">create new dataframe with last values
</span>                 <span class="org-variable-name">df</span>  <span class="org-operator">=</span> pd.concat([df, df_new_rows])  <span class="org-comment-delimiter">#</span> <span class="org-comment">add last values to cumulative dataframe
</span>                HeatMap(df_new_rows).add_to(map_object)  <span class="org-comment-delimiter">#</span> <span class="org-comment">add last location to heatmap
</span>
map_object.save(r <span class="org-string">"/Users/leehalls/Documents/dumpground/map.html"</span>)
</pre>
</div>



 <figure id="org7edabe8"> <img src="../images/heatmap_01.png" alt="heatmap_01.png"></img></figure> <figure id="orge7b189f"> <img src="../images/heatmap_02.png" alt="heatmap_02.png"></img></figure></div>]]></description>
  <link>https://leehalls.net/posts/./orgjournalheatmap.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./orgjournalheatmap.html</guid>
  <pubDate>Mon, 05 May 2025 08:00:00 +0100</pubDate>
</item>
<item>
  <title>A thing of beauty</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">A thing of beauty</h1>
</header> <p>
From having these  <a href="biking.html">getting back to motorcycling</a> to this;
</p>


 <figure id="org78b270f"> <img src="../images/IMG_0182.jpeg" alt="IMG_0182.jpeg"></img></figure> <p>
Thats it - no other words 😍
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./bobber.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./bobber.html</guid>
  <pubDate>Sun, 13 Apr 2025 08:00:00 +0100</pubDate>
</item>
<item>
  <title>A lazy day with the camera</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">A lazy day with the camera</h1>
</header> <p>
Finally some nice weather and I had chance to pick up the camera again whilst sat in the garden, only a short time but managed to get two photos I am very happy with;  
</p>


 <figure id="org98b63bc"> <img src="../images/robin.png" alt="robin.png"></img> <figcaption> <span class="figure-number">Figure 1: </span>Fly for dinner?</figcaption></figure> <hr></hr> <figure id="org8e82aa8"> <img src="../images/starling.png" alt="starling.png"></img></figure></div>]]></description>
  <link>https://leehalls.net/posts/./birds20250406.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./birds20250406.html</guid>
  <pubDate>Sun, 06 Apr 2025 08:00:00 +0100</pubDate>
</item>
<item>
  <title>orgmode power yet confusion</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">orgmode power yet confusion</h1>
</header> <p>
I'm not a power user of orgmode yet it is a piece of software i use daily. My emacs diary.org file has around 100 sexp entries, plus events, appointments spanning 7yrs. The problem i had was sexp entries show up in the emacs diary but would not show up in any mobile client, as usual with org there are many ways to achieve the same thing. For example a sexp entry could look like  <code>%%(diary-cyclic 14 1 10 2025) Blue bin</code> so is a reminder to put the right colour bin out every 2wks works great when in emacs but outside? this entry is better, simpler and achieves the same results;
</p>

 <ul class="org-ul"> <li> <span class="timestamp-wrapper"> <span class="timestamp"><2025-01-24 Fri +2w> </span></span></li>
</ul> <p>
it shows the entry up every 2wks just the same as the sexp but works across the mobile apps as well. Why did i choose sexp in the first place for something so mundane? I guess it was because I just carried over the concept from the anniversary function where i could have the number of years show up since the event ie 
</p>

 <ul class="org-ul"> <li>%%(org-anniversary 1969 2 14) Arthur Dent - %d yrs old</li>
</ul> <p>
of course there is another way to capture repeating events one that allows you to add notes if something unique occurs for the specific repeat entry;
</p>

 <p>
 <a href="https://karl-voit.at/2017/01/15/org-clone-subtree-with-time-shift/">https://karl-voit.at/2017/01/15/org-clone-subtree-with-time-shift/</a>
</p>

 <p>
Lesson learned is that in org there is more than one way to skin a cat.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./orgmodeoptions.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./orgmodeoptions.html</guid>
  <pubDate>Sun, 26 Jan 2025 08:00:00 +0000</pubDate>
</item>
<item>
  <title>Lights out</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Lights out</h1>
</header> <p>
I wrote quite  a long post here about  <a href="lightpollution.html#ID-021D55E2-ED21-4DE8-BBFC-3F45D3D2C7A0">light pollution</a> & energy consumption which linked into my assertion that there's not enough  backlink "darkness"  in the world. The premise of it was, to turn out street lights and it is possibly coming to pass with councils starting to turn lights out. OK it is a cost cutting drive but that was also a major part of my posts and if done right, in the right areas its only going to be a benefit. This article posted on the BBC News website entitled "Why are English councils turning off street lights?"  <a href="https://www.bbc.co.uk/news/articles/c0mzkgxr22po.amp">https://www.bbc.co.uk/news/articles/c0mzkgxr22po.amp</a> seems to indicate that councils are either starting to switch off between specific hours or dimming both of which are good. I travel a lot and the number of roads I drive on across Europe which are dark compared to here is incredible. Our world is built on consumption of energy and short sightedly pushing people into electric cars is not the answer for either global warming, light pollution or energy consumption. 
</p>

 <p>
Again if we are serious about the planet about making a difference the conversation must widen into more realistic and achievable areas. 
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./lightsout_20241119.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./lightsout_20241119.html</guid>
  <pubDate>Tue, 19 Nov 2024 08:00:00 +0000</pubDate>
</item>
<item>
  <title>Time, broken themes and a rewrite</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Time, broken themes and a rewrite</h1>
</header> <p>
This post links in with  <a href="travelling.html">travelling</a> because again it refers to the sense of having no time, but also it shows what happens if you update software without keeping an eye on the changes … the theme I used no longer builds with the version hugo now installed  <code>hugo v0.136.5+extended darwin/arm64 BuildDate=2024-10-24T12:26:27Z VendorInfo=brew</code> and there are so many errors and elements broken due to internal hugo changes I'm not even sure I could update it. So either I revert back to level of hugo which works or I try out something new - new it is.
</p>

 <p>
I'm trialling the  <a href="https://themes.gohugo.io/themes/hugo-theme-til/">Today I Learned</a> or  <a href="https://github.com/mrmierzejewski/hugo-theme-console">Console</a> and both though they are completely different, the TIL theme the author notes is still in the early beta stage but I figured it worth a try as I like the idea of the graph, reminds me of org-roam or obsidians graph something I'm still getting used to but has potential. The title of the  <code>TIL</code> theme is true as I have now learned to use hugo specific exports  <a href="https://ox-hugo.scripter.co/doc/shortcodes/">https://ox-hugo.scripter.co/doc/shortcodes/</a> and this was because the graph uses backlinks to draw itself and the style of those links is  <code>{{</code>  <code>< backlink "travelling"</code>  <code>>}}</code> which does not translate well so after a little reading I found using~< backlink "travelling" >~  <code>}} @@</code> did the job however I'm sure there is a better way. One thing I was missing is the gallery element which I used for my photography side though I found this one:  <a href="https://github.com/mfg92/hugo-shortcode-gallery/tree/master">https://github.com/mfg92/hugo-shortcode-gallery/tree/master</a> and once added as a sub-module the shortcode is available and working well. Check out his photography here:  <a href="https://matze.rocks/images/">https://matze.rocks/images/</a> the one with black squirrel perfectly separated from the background and staring into you is my favourite so far but the one of an ibex? in B&W framed by the foliage really appeals to the old B&W developer in me.
</p>

 <p>
Previously tags & categories provided the interlinking, perhaps the graph can be made to work for them instead of backlinks? though I like the idea of making something specifically linked but there is also the point that it might not be advisable working backlinks into all posts ( <i>you can see in the graph below this post links to the travel one</i>) I like it but perhaps one should learn from the reason for this update, it was simple enough to migrate to this theme but adding the shortcode breaks other themes so perhaps do not use or add that functionality. Maybe the lesson is that unless you take ownership of the theme or freeze at a certain software level then you're always going to face some major changes.
</p>

 <p>
I still haven't decided which one to use, I am slowly migrating content to both themes to see what they're like but for a while I'll trial one and see how I feel.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./20241116_update.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./20241116_update.html</guid>
  <pubDate>Sat, 16 Nov 2024 08:00:00 +0000</pubDate>
</item>
<item>
  <title>Limited time lots of travel</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Limited time lots of travel</h1>
</header> <div class="preview" id="org753cfad">
 <p>
craxy taxi ride, beautiful Mexico.
</p>

</div>


 <p>
Time is a commodity which seems to be scarce at the minute, need it to update my projects upon which some of the content of this website rely and of course my own education but due to various reasons and maybe a lack of drive on my part has meant nothing new has been written.
</p>

 <p>
Plus work travel took a good chunk of time away with among many smaller trips to various locations, a long one of two months based in Silao. Long hours but an  <b>awesome</b> set of people helped make the situation weirdly enjoyable despite the circumstances and we achieved a tremendous result given the timeframe.
</p>

 <p>
Still it wasnt all work in those two months as I did get the odd day off … around 4 … but during which I managed to get another tattoo
</p>



 <figure id="org151ba79"> <img src="../images/20230513_163439.jpeg" alt="20230513_163439.jpeg" width="300"></img> <figcaption> <span class="figure-number">Figure 1: </span>new ink</figcaption></figure> <p>
and visit the beautiful city of Guanajuato
</p>


 <figure id="orgccf7d3d"> <img src="../images/20230528_180208.jpeg" alt="20230528_180208.jpeg"></img> <figcaption> <span class="figure-number">Figure 2: </span>Guanajuato</figcaption></figure> <p>
And take one of the most  <i>"enjoyable"</i> taxi rides i have had for a long time. With my driver praying to God on the twisty roads as he tried to make up time. He was at times cutting it close, tyre squeal, almost head-on into a bus. Entertaining.
</p>



 <figure id="orga99ebec"> <img src="../images/guanajuato.png" alt="guanajuato.png"></img></figure> <p>
 <span class="timestamp-wrapper"> <span class="timestamp">[2024-11-23 Sat] </span></span> decided to add a zoomed view of one section of the road to show just how twisty entertaining it was;
</p>


 <figure id="org79dc225"> <img src="../images/zoomed_road.png" alt="zoomed_road.png"></img></figure> <div class="caution" id="org114b353">
 <p>
Yes i know it was probably a rip-off, there was a more direct route which I did not know at the time and took on the way back but it was a fun ride, plenty of switch-backs and mountain scenery.
</p>

</div>
</div>]]></description>
  <link>https://leehalls.net/posts/./travelling.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./travelling.html</guid>
  <pubDate>Sat, 05 Aug 2023 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Using org without emacs</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Using org without emacs</h1>
</header> <p>
Is it possible to use org without emacs? 
</p>

 <p>
For most people it would seem from various internet searches that what keeps them using emacs is orgmode. It is certainly true for me that 75% of my emacs usage is purely org based with the rest being python ( <i>yes i know its not good python</i>), tramp and the odd text edit though i still find SublimeText an easier option for somethings. Though to answer the question posed at the start the answer was always no, yes we have the various mobile options such as  <a href="https://www.orgzly.com">orgzly</a>,  <a href="https://orgro.org">orgro</a>,  <a href="https://metanote-dev.github.io">metanote</a>,  <a href="https://plainorg.com">plainorg</a> but some of these have limited functionality and personal opinion ahead … I would say are more an extension of the desktop org allowing you to view your data and capture basic info and for the desktop you needed emacs but
</p>

 <p>
perhaps not anymore ….
</p>

 <p>
As a long time  <a href="https://www.sublimetext.com">SublimeText</a> user i was surprised i had missed this, previously i had tried orgmode for sublime but then stumbled upon Org Extended  <a href="https://github.com/ihdavids/orgextended">https://github.com/ihdavids/orgextended</a> something which looks to bring most of the org\emacs functionality outside of emacs.
</p>

 <p>
Here we have what appears to be as close as possible a fully functional orgmode implementation outside of emacs. It has syntax highlighting, folding headers, tags, links etc and also a reasonably functional agenda. Certainly there is nothing to stop you creating and modifying complex org documents in it even images are shown inine for example;
</p>


 <figure id="orgff1ab96"> <img src="../images/sublime_orgimage.png" alt="sublime_orgimage.png"></img></figure> <p>
Which shows SublimeText 4 on a mac editing a long file i wrote about getting gauges working for a home monitoring system.
</p>

 <p>
You can see here the Agenda view with days having activity shown with a red square around them
</p>


 <figure id="org3716e0b"> <img src="../images/sublime_agenda.png" alt="sublime_agenda.png"></img></figure> <p>
It doesnt have all the functionality of an emacs based org-agenda for example repeating todo items stored in my diary file show up irrespective that they are not due for another 6months ie
</p>

 <div class="org-src-container">
 <pre class="src src-org">++ TODO Kawasaki roadtax :bike:vehicle:
 <span class="org-org-special-keyword">DEADLINE:</span>  <span class="org-org-date"><2023-04-01 Sat +1y -14d></span>
 <span class="org-org-drawer">:PROPERTIES:</span>
 <span class="org-org-special-keyword">:LAST_REPEAT:</span>  <span class="org-org-property-value"> <span class="org-org-date">[2022-03-26 Sat 11:48]</span></span>
 <span class="org-org-drawer">:END:</span>
</pre>
</div>

 <p>
and the various entries i have setup using SEXP do not show eg
</p>

 <div class="org-src-container">
 <pre class="src src-org"> <span class="org-org-sexp-date">%%(org-anniversary 1969 2 14) Arthur Dent - %d yrs old</span>
</pre>
</div>

 <p>
though I have not spent long looking at all the configuration options nor reading through the quite extensive documentation but on an initial review it looks more than capable and very promising to bring org outside of emacs, well worth a look.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./orgnoemacs.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./orgnoemacs.html</guid>
  <pubDate>Sat, 01 Apr 2023 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Moving to HomeAssistant</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Moving to HomeAssistant</h1>
</header> <p>
A long time ago i setup & wrote my own  <a href="https://github.com/drakxtwo/dragelec">home monitoring system</a> using wireless temperature sensors and a current clamp across the incoming feed to the house for electricity monitoring ( <i>take a look at the projects section for flask socketio</i>) Using it i was able to educate the step-son about taking 90 minute long showers without contributing to the bills <sup> <a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup> i then moved house leaving the current clamp hardware in place  <i>duh</i> then what with getting the house sorted, travelling for work and subsequent long hours on my return i never set it up again besides the long shower taker had buggered off saving me loads of cash :-)
</p>

 <p>
Still i had the temperature sensors lying around and the knowledge/program was still lurking so i decided to restart it but then i found  <a href="https://www.home-assistant.io">HomeAssistant</a> and realised then and there to ditch trying to do it all myself.
</p>

 <p>
Using a raspberry pi, MQTT and HomeAssistant i had everything i had before and much more….
</p>

 <p>
Although I had set the Pi up once more recording just temperatures adding the excellent MotionEye to capture video of movement on my drive/garage the visual interface, graphs, weaather forecast etc was all gone so i was just recording for its own sake. Pretty pointless. But now using HomeAssistant i am once again making use of the data with nice visuals
</p>


 <figure id="org8fe6ac0"> <img src="../images/home_assistant_1.png" alt="home_assistant_1.png"></img></figure> <p>
and much more with all the integrations that the software offers i think it could end up being like an emacs init.el constantly being added to or tweaked for example i have;
</p>

 <ul class="org-ul"> <li>daily report of the cost for gas & electricity</li>
 <li>live streaming of the camera feeds from motioneye</li>
 <li>info on all my hardware (server status, temperature, network and processer loads etc)</li>
</ul> <figure id="orge146743"> <img src="../images/home_assistant_2.png" alt="home_assistant_2.png"></img></figure> <ul class="org-ul"> <li>weather forecast</li>
 <li>calendar</li>
 <li>radio (this is work in progress but it will be playing a Polish radio station on command)</li>
 <li>historical data if i want to check</li>
</ul> <p>
all the above is in a nice interface accessible via web browser with my longer term goal to use an old Android tablet as the always on interface maybe even replacing Alexa. I havent even scratched the surface yet what with scenarios, events, automation theres lots to look into. Dont just take my word for it, a short google search will throw up tons of info and links to other people on their HA journey.
</p>
 <div id="footnotes">
 <h2 class="footnotes">Footnotes: </h2>
 <div id="text-footnotes">

 <div class="footdef"> <sup> <a id="fn.1" class="footnum" href="#fnr.1" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"> <p class="footpara">
The electric shower used the most power in the house so was easy to monitor, hence when the ampage was excessive for a period of time that i defined, at first the program emailed me a report of time length & amount, that i used hoping that showing the data would educate and change behaviour … it did not.  <b>HOWEVER</b> turning off the internet to a specific IP address when a shower exceeded a set time :-) well surprise surprise teenagers love the internet and its loss was galling. Shorter showers here we come! 
</p></div></div>


</div>
</div></div>]]></description>
  <link>https://leehalls.net/posts/./homeassist.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./homeassist.html</guid>
  <pubDate>Sat, 28 Jan 2023 08:00:00 +0000</pubDate>
</item>
<item>
  <title>A sparrow for breakfast</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">A sparrow for breakfast</h1>
</header> <p>
I've been lucky enough to see this guy a few times, always a fleeting flutter of feathers and trills and as the others tried to evade, successfully i might add. This time though one was not quick enough but i was with a lot of luck and accidental timing, because i was filling the kettle when the bush infront of the window moved and out flew this fellow;
</p>

 <p>
 <img src="../images/20230121_091048.jpg" alt="20230121_091048.jpg"></img>
He sat there for a whilst just seemingly comtemplating his next move before lanching back into the bush which came alive once more with noise and movement before silence …
</p>

 <p>
Out he flew with breakfast
</p>

 <p>
 <img src="../images/20230121_091159.jpg" alt="20230121_091159.jpg"></img>
A look around, pluck a few feathers and then off he goes with the prize. I'm not winning any photographic awards here i was just fortunate to have my phone to hand to grab a few shots through hazy windows and thats enough. How many people get to see something like this up close without evening leaving home?
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./sparrow.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./sparrow.html</guid>
  <pubDate>Thu, 26 Jan 2023 08:00:00 +0000</pubDate>
</item>
<item>
  <title>Python export for specific tagged headlines &amp; files</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Python export for specific tagged headlines & files</h1>
</header> <p>
 <span class="timestamp-wrapper"> <span class="timestamp">[2022-11-11 Fri] </span></span> renamed this article because in my mind "parser" indicates something more than this is. This is just a way to read an org file and extract headings identifed with a specific tag and only the linked files for that heading/tag not all the files i have stored in the data directory.
The reason this genuine example of poor python exists is because of my workflow … so i keep project notes in org files ( <i>of course!</i>) and any associated files that are linked eg emails or images are saved in the relevant sub-directory eg
</p>

 <div class="org-src-container">
 <pre class="src src-batch">- top dir
  - all orgfiles
  - project_dir_1
  - project_dir_2
  - project_dir_3
</pre>
</div>


 <p>
However if i want to share specific tagged topics to say handover a part of the project to someone else or perhaps for financial arguments I can export or publish ( <i>in fact i've got quite a good publish.el</i>) but whilst this copies only the nodes that are specifically tagged it also copies  <b>every</b> single file that is stored in the project sub-directory. Not good when some topics are private or covered by an NDA nor if i want to keep the size down. I did search and search but came up empty weirdly so as i sort of expected this to be a normal requirement but perhaps thats the point of the emacs\org combination. It is so malleable we can create our own curated libraries hence who is to say what is "normal" thus i created this monstrosity however i may have missed something but in the meantime it is here if anyone wants to try it or if anyone can show me a better way please do!
</p>

 <p>
What is it? 
</p>
 <ul class="org-ul"> <li>well it is a python program to take a specified orgfile, parse it searching the headers for specific tags and then only output to the export directory the files specifically associated with those tagged nodes.</li>
</ul> <p>
What is not good at?
</p>
 <ul class="org-ul"> <li>its crude, the output doesnt consider sub-headings etc so everything is treated with the HTML  <code><H1></code> tag and images are not re-sized or have size attributes applied or in other words if you've a big image in your orgfile that you resized using the</li>
</ul> <div class="org-src-container">
 <pre class="src src-emacs-lisp">#+ATTR_HTML:  <span class="org-builtin">:width</span> 200
#+ATTR_ORG:  <span class="org-builtin">:width</span> 200
</pre>
</div>

 <p>
attributes …. well thats ignored.
</p>

 <p>
Also weirdly some links do not have a space applied so the continuation text is immediately after the link, a minor problem but from a visual point an annoying one. 
</p>

 <p>
Does it work?
</p>
 <ul class="org-ul"> <li>Yes, i've tested it on macBook air copying across one specific project file and its sub-dir ( <i>data safety!</i>) a file with 1049 lines and with a sub-directory containing >300mB of files and it only copied across those files that were pertinent outputting an HTML file that was if not nice to look at usable.</li>
</ul> <p>
Is it perfect?
</p>
 <ul class="org-ul"> <li> <b>HELL NO</b> …. did you read my sites intro? i'm an amateur i do this because i find it interesting & could be a lot better at it but because i dont program frequently a bit like language usage ( <i>i was conversational in German, understood a lot of Japanese & Swedish and others</i>) if you dont use it well it dies and you end up remembering only "konichi wa" or "Minä rakastan sinua" if you speak any Finnish.</li>
</ul> <p>
So on to the code:
</p>

 <p>
First it relies on two libraries the orgparse library which can be found here:  <a href="https://github.com/karlicoss/orgparse">https://github.com/karlicoss/orgparse</a> and then an org to html library  <a href="https://github.com/honmaple/org-python">https://github.com/honmaple/org-python</a> 
</p>

 <p>
Import the libraries needed
</p>
 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">from</span> orgparse  <span class="org-keyword">import</span> load, loads
 <span class="org-keyword">from</span> orgpython  <span class="org-keyword">import</span> to_html
 <span class="org-keyword">import</span> shutil
 <span class="org-keyword">import</span> re
 <span class="org-keyword">import</span> os
</pre>
</div>

 <p>
next we load the file to parse entries for
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-variable-name">root</span>  <span class="org-operator">=</span> load( <span class="org-string">'project_340.org'</span>)
</pre>
</div>

 <p>
open the output for file for writing;
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-variable-name">f</span>  <span class="org-operator">=</span>  <span class="org-builtin">open</span>( <span class="org-string">'export/test.html'</span>,  <span class="org-string">'w'</span>)
</pre>
</div>

 <p>
this is the old function is called to write the headline and raw body
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">def</span>  <span class="org-function-name">output</span>(hdg,body):
     <span class="org-comment-delimiter"># </span> <span class="org-comment">write heading & body to file
</span>     <span class="org-builtin">print</span>( <span class="org-string">'creating output'</span>)
    f.write(hdg)
    f.write( <span class="org-string">'</span> <span class="org-constant">\n</span> <span class="org-string">'</span>)
    f.write(body)
</pre>
</div>

 <p>
now replaced with
</p>
 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">def</span>  <span class="org-function-name">convert</span>(hdg, bodytext):
     <span class="org-comment-delimiter"># </span> <span class="org-comment">here be dragons 
</span>     <span class="org-comment-delimiter">#</span> <span class="org-comment">print(to_html(bodytext, toc=True, offset=0, highlight=True))
</span>     <span class="org-comment-delimiter">#</span> <span class="org-comment">f.write(to_html(hdg, toc=True,offset=0,higlight=True))
</span>    f.write( <span class="org-string">'<h1>'</span>  <span class="org-operator">+</span> hdg  <span class="org-operator">+</span>  <span class="org-string">'</h1>'</span>)
    f.write(to_html(bodytext, toc <span class="org-operator">=</span> <span class="org-constant">True</span>, offset <span class="org-operator">=</span>0, highlight <span class="org-operator">=</span> <span class="org-constant">True</span>))
</pre>
</div>

 <p>
function to identify the filename inside the body text, here we split the entire text into individual words and poll through them to find the relevant text
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-comment-delimiter"># </span> <span class="org-comment">old function
</span> <span class="org-keyword">def</span>  <span class="org-function-name">copyfile</span>(filename): 
     <span class="org-comment-delimiter"># </span> <span class="org-comment">here be dragons
</span>     <span class="org-keyword">for</span> word  <span class="org-keyword">in</span> filename.split():
         <span class="org-keyword">if</span>  <span class="org-string">'file:'</span>  <span class="org-keyword">in</span> word:
             <span class="org-variable-name">fn</span>  <span class="org-operator">=</span> word[7:word.find( <span class="org-string">']'</span>)]
            shutil.copyfile(fn,  <span class="org-string">'export/'</span> <span class="org-operator">+</span>fn)
</pre>
</div>

 <p>
the problem with above function is that i need to re-write my outlook email save macro, currently it saves the filename with spaces so the above will split the filename at the space meaning i may not have the complete filename eg  <code>[[file:this_example would be saved incorrectly.msg]]</code> this next function avoids the problem by using regex something which i still even after all these years haven't got to grips with.
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">def</span>  <span class="org-function-name">copyfile</span>(filename):
     <span class="org-variable-name">pattern</span>  <span class="org-operator">=</span> re. <span class="org-builtin">compile</span>(r <span class="org-string">'[\[\]]+'</span>)
     <span class="org-variable-name">inputtxt</span>  <span class="org-operator">=</span>  <span class="org-builtin">filter</span>( <span class="org-constant">None</span>, pattern.split(filename))
     <span class="org-keyword">for</span> dat  <span class="org-keyword">in</span> inputtxt:
         <span class="org-keyword">if</span>  <span class="org-string">"file:"</span>  <span class="org-keyword">in</span> dat:
             <span class="org-variable-name">fn</span>  <span class="org-operator">=</span> dat[5:]
             <span class="org-variable-name">name</span>  <span class="org-operator">=</span> dat.split( <span class="org-string">'/'</span>)
             <span class="org-builtin">dir</span>  <span class="org-operator">=</span>  <span class="org-string">'export/'</span>  <span class="org-operator">+</span> (name[0][5:])
             <span class="org-builtin">print</span>( <span class="org-string">'filename info'</span>,  <span class="org-builtin">dir</span>)
            os.makedirs( <span class="org-builtin">dir</span>, exist_ok <span class="org-operator">=</span> <span class="org-constant">True</span>)
            shutil.copyfile(dat[5:],  <span class="org-builtin">dir</span>  <span class="org-operator">+</span> <span class="org-string">'/'</span>  <span class="org-operator">+</span>name[1])        
</pre>
</div>

 <p>
What it effectively does is split the body text identified by orgparse into each word then looks for the keyword  <code>file</code> and then we split the first 7 characters from the string to remove  <code>[[file:</code> element before using find to identify the position of the square close bracket and so have isolated the filename into the variable  <code>fn</code> and this repeated for every file link found in the body text allowing us to copy only the relevant files to our export directory.
</p>


 <p>
Finally the main section parsing the orgfile - note we use format='raw' to get the complete org link
</p>

 <div class="org-src-container">
 <pre class="src src-python">
 <span class="org-comment-delimiter"># </span> <span class="org-comment">traverse through all the nodes/headings
</span> <span class="org-keyword">for</span> node  <span class="org-keyword">in</span> root[1:]:   <span class="org-comment-delimiter"># </span> <span class="org-comment">[1:] for skipping root itself
</span>     <span class="org-comment-delimiter">#</span> <span class="org-comment">conditional choose headings which match specific tags
</span>     <span class="org-keyword">if</span> node.tags  <span class="org-operator">==</span>  <span class="org-builtin">set</span>([ <span class="org-string">'the_tag_i_want'</span>]):
         <span class="org-variable-name">hdg</span>  <span class="org-operator">=</span> node.heading
         <span class="org-variable-name">bdy</span>  <span class="org-operator">=</span> node.get_body( <span class="org-builtin">format</span> <span class="org-operator">=</span> <span class="org-string">'raw'</span>)
        copyfile(bdy)
        convert(hdg,bdy)

f.close()
 <span class="org-builtin">print</span>( <span class="org-string">'----'</span>)
</pre>
</div>
</div>]]></description>
  <link>https://leehalls.net/posts/./orgparse.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./orgparse.html</guid>
  <pubDate>Fri, 28 Oct 2022 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Back to motorcycles</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Back to motorcycles</h1>
</header> <p>
However when the financial crash hit in '08 something had to go and the bike no matter how much i tried to justify its life was just one expense too many, she had to go so with bitter regret my beautiful, sexy ZX6 departed for pastures new and lo as each year passed i'd sit and listen to all those fuckers still riding, the roar of the engine increasing as they perhaps exceeded the A-road speed limit and so it continued year after year until i could no longer stand it.
</p>

 <p>
I spent over a year searching for something often torn between the desire to cafe-racer an old CB750 or similar and the need for speed. I'd mark bikes on ebay or other sites but by the time i had made my mind up they'd gone. In the end i bought something i had not even considered looking at and which neither fits the cafe-racer or need for speed categories;
</p>


 <figure id="org0104f27"> <img src="../images/benelli_2.jpg" alt="benelli_2.jpg"></img> <figcaption> <span class="figure-number">Figure 1: </span>Benelli 502C</figcaption></figure> <p>
 <img src="../images/benelli_1.jpg" alt="benelli_1.jpg"></img>
It is a nice looking bike, gets a lot of questions\comments mostly from people wanting to copy the rear end for their projects plus the fuel tank is  <b>massive</b> i was used to a re-fueling stop anywhere between 90-120miles yet this thing just keeps on going.
</p>

 <p>
There are a few shortcomings … 
</p>

 <ul class="org-ul"> <li>[1] power is one - yes she is easy to ride, quick to chuck into corners but be prepared to hit the gearbox often unless you dont mind stopping midway through an overtake as the rev-limiter kicks in, treat her a bit like an old two-stroke. That said for a simple cruise with a bit of fun in the twisties she's alright and something I've learned with age its not all about the power, the overtake but enjoying the ride. See the countryside pass by not fly by!</li>

 <li>[2] Dashboard - yes its a nice looking TFT display but there two significant-ish concerns. Firstly it often becomes unreadable in full sunlight and though you are not going to breaking many records i dont think Mr Plod will accept the excuse " <i>i cannae see me dashboard when suns out</i>" secondly perhaps laughably watch what happens when you switch to night riding … the fuel gauge and temperature display swap sides.</li>
</ul> <p>
Despite those the ride is fun, she looks good, and she was cheap we're talking about 5200 on the road but since the purchase of the Benelli i still kept my eyes on ebay and over a year ago ended up with a second bike, this time a full on cruiser and one from 1997.
</p>


 <figure id="org67dbf64"> <img src="../images/vn800_1.jpg" alt="vn800_1.jpg"></img> <figcaption> <span class="figure-number">Figure 2: </span>Old school VN800</figcaption></figure> <p>
She really doesnt struggle with power\torque and to be honest combine a cruiser with an open face helmet, a pair of shades and good weather it is awesome. Yes ground clearance is now almost non-existent and lean angles are not double digits, and yes the suspension may have gone a little soft ( <i>scraped through the exhaust</i>) but it is just so much fun. Makes me wish i had gone this route sooner although there are other issues with owning an older girl …. the new E10 petrol might be something to consider and well …. she broke down on me, leaving me stranded except for a fellow biker who happened to be driving past in his van! Saved me a long walk home.
</p>

 <p>
That decision hasn't been made though but for the Benelli it is time to go, i've had my 3yrs of fun but have reached the limit and it is time to go different though what? Bikes are a personal thing and finding the right one is not so easy the search has restarted…….
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./biking.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./biking.html</guid>
  <pubDate>Sat, 04 Jun 2022 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Realtime data plot</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Realtime data plot</h1>
</header> <p>
Following on from my earlier smoothiecharts trying to use smoothiecharts with flask-socketio for realtime data i managed to get an alternative working this time using charts  <a href="https://www.chartjs.org/">https://www.chartjs.org/</a> Using this i am now able to generate random data ( <i>in lieu of external input values</i>) and have them graphed in realtime on a line chart created using the api. The main part of the flask-python element consists of the data creation routine
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-type">@application.route</span>( <span class="org-string">'/'</span>)
 <span class="org-keyword">def</span>  <span class="org-function-name">index</span>():
     <span class="org-keyword">return</span> render_template( <span class="org-string">'data_acq.html'</span>)

 <span class="org-type">@application.route</span>( <span class="org-string">'/chart-data'</span>)
 <span class="org-keyword">def</span>  <span class="org-function-name">chart_data</span>():
     <span class="org-keyword">def</span>  <span class="org-function-name">generate_random_data</span>():
         <span class="org-keyword">while</span>  <span class="org-constant">True</span>:
             <span class="org-variable-name">timestamp</span>  <span class="org-operator">=</span> datetime.now().strftime( <span class="org-string">'%H:%M:%S'</span>)
             <span class="org-variable-name">tc1</span>  <span class="org-operator">=</span>  <span class="org-builtin">round</span>(random.random()  <span class="org-operator">*</span> 100)

             <span class="org-variable-name">json_data</span>  <span class="org-operator">=</span> json.dumps(
                { <span class="org-string">'time'</span>: timestamp,  <span class="org-string">'value0'</span>: tc1})
             <span class="org-keyword">yield</span> f <span class="org-string">"data:</span>{json_data} <span class="org-constant">\n\n</span> <span class="org-string">"</span>
             <span class="org-variable-name">values</span>  <span class="org-operator">=</span> (timestamp,tc1)
             <span class="org-variable-name">header</span>  <span class="org-operator">=</span> [ <span class="org-string">'timestamp'</span>, <span class="org-string">'tc1'</span>]
            time.sleep(1)
             <span class="org-builtin">print</span>(values)

     <span class="org-keyword">return</span> Response(generate_random_data(), mimetype <span class="org-operator">=</span> <span class="org-string">'text/event-stream'</span>)
</pre>
</div>

 <p>
and then inside the appropriate html file we have'
</p>

 <ul class="org-ul"> <li>the link to the charting library</li>
</ul> <div class="org-src-container">
 <pre class="src src-html">< <span class="org-function-name">head</span>>
    < <span class="org-function-name">meta</span>  <span class="org-variable-name">charset</span>= <span class="org-string">"UTF-8"</span>>
    < <span class="org-function-name">title</span>> <span class="org-underline"> <span class="org-bold">realtime chart demo</span></span></ <span class="org-function-name">title</span>>
    < <span class="org-function-name">link</span>  <span class="org-variable-name">href</span>= <span class="org-string">"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css"</span>  <span class="org-variable-name">rel</span>= <span class="org-string">"stylesheet"</span>>
    < <span class="org-function-name">link</span>  <span class="org-variable-name">href</span>= <span class="org-string">"https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.css"</span>  <span class="org-variable-name">rel</span>= <span class="org-string">"stylesheet"</span>>
</ <span class="org-function-name">head</span>>
</pre>
</div>

 <ul class="org-ul"> <li>then the body contains the div element for the line chart</li>
</ul> <div class="org-src-container">
 <pre class="src src-html">< <span class="org-function-name">div</span>  <span class="org-variable-name">class</span>= <span class="org-string">"container"</span>>
    < <span class="org-function-name">div</span>  <span class="org-variable-name">class</span>= <span class="org-string">"row"</span>>
        < <span class="org-function-name">div</span>  <span class="org-variable-name">class</span>= <span class="org-string">"col-12"</span>>
            < <span class="org-function-name">div</span>  <span class="org-variable-name">class</span>= <span class="org-string">"card"</span>>
                < <span class="org-function-name">div</span>  <span class="org-variable-name">class</span>= <span class="org-string">"card-body"</span>>
                    < <span class="org-function-name">canvas</span>  <span class="org-variable-name">id</span>= <span class="org-string">"canvas"</span>></ <span class="org-function-name">canvas</span>>
                </ <span class="org-function-name">div</span>>
            </ <span class="org-function-name">div</span>>
        </ <span class="org-function-name">div</span>>
    </ <span class="org-function-name">div</span>>
</ <span class="org-function-name">div</span>>
</pre>
</div>

 <ul class="org-ul"> <li>and the javascript to receive the data from the flask app</li>
</ul> <div class="org-src-container">
 <pre class="src src-javascript"><script src= <span class="org-string">"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"</span>></script>
<!--suppress JSUnresolvedLibraryURL -->
<script src= <span class="org-string">"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"</span>></script>
<!--suppress JSUnresolvedLibraryURL -->
<script src= <span class="org-string">"https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js"</span>></script>

<script>
    $(document).ready( <span class="org-keyword">function</span> () {
         <span class="org-keyword">const</span>  <span class="org-variable-name">config</span> = {
            type:  <span class="org-string">'line'</span>,
            data: {
                labels: [],
                datasets: [{
                    label:  <span class="org-string">"TC1"</span>,
                    backgroundColor:  <span class="org-string">'rgb(255, 179, 179)'</span>,
                    borderColor:  <span class="org-string">'rgb(255, 179, 179)'</span>,
                    data: [],
                    fill:  <span class="org-constant">false</span>,
                }
],
            },
            options: {
                responsive:  <span class="org-constant">true</span>,
                title: {
                    display:  <span class="org-constant">true</span>,
                    text:  <span class="org-string">'Random value'</span>
                },
                tooltips: {
                    mode:  <span class="org-string">'index'</span>,
                    intersect:  <span class="org-constant">false</span>,
                },
                hover: {
                    mode:  <span class="org-string">'nearest'</span>,
                    intersect:  <span class="org-constant">true</span>
                },
                scales: {
                    xAxes: [{
                        display:  <span class="org-constant">true</span>,
                        scaleLabel: {
                            display:  <span class="org-constant">true</span>,
                            labelString:  <span class="org-string">'Time'</span>
                        }
                    }],
                    yAxes: [{
                        display:  <span class="org-constant">true</span>,
                        ticks: {
                        suggestedMin: 50,
                        suggestedMax: 200},
                        scaleLabel: {
                            display:  <span class="org-constant">true</span>,
                            labelString:  <span class="org-string">'Value'</span>
                        }
                    }]
                }
            }
        };


         <span class="org-keyword">const</span>  <span class="org-variable-name">context</span> = document.getElementById( <span class="org-string">'canvas'</span>).getContext( <span class="org-string">'2d'</span>);

         <span class="org-keyword">const</span>  <span class="org-variable-name">lineChart</span> =  <span class="org-keyword">new</span>  <span class="org-type">Chart</span>(context, config);

         <span class="org-keyword">const</span>  <span class="org-variable-name">source</span> =  <span class="org-keyword">new</span>  <span class="org-type">EventSource</span>( <span class="org-string">"/chart-data"</span>);

        source.onmessage =  <span class="org-keyword">function</span> ( <span class="org-variable-name">event</span>) {
             <span class="org-keyword">const</span>  <span class="org-variable-name">data</span> = JSON.parse(event.data);
             <span class="org-keyword">if</span> (config.data.labels.length === 100) {
                config.data.labels.shift();
                config.data.datasets[0].data.shift();
            }
            document.getElementById( <span class="org-string">'time'</span>).innerHTML = data.time;
            document.getElementById( <span class="org-string">'tc1'</span>).innerHTML = data.value0;
            config.data.labels.push(data.time);
            config.data.datasets[0].data.push(data.value0);
            lineChart.update();
        }
    });
</script>
</pre>
</div>

 <p>
Adding all this together results in a line graph that is updated every second looking like
</p>


 <figure id="org8af4f31"> <img src="../images/chart.min.js_example.png" alt="chart.min.js_example.png"></img></figure> <p>
with a simple table underneath that also shows the last value received. Currently it shows 100 values on the chart before each one is "lost" like a FIFO system but we can change this by altering the value in the HTML file
</p>

 <div class="org-src-container">
 <pre class="src src-javascript"> <span class="org-keyword">if</span> (config.data.labels.length === 100) {
    config.data.labels.shift();
    config.data.datasets[0].data.shift();
}
</pre>
</div>

 <p>
So changing the value seen above dictates how many values are plotted on the chart before being moved off it, following the above it should easily be possible for anyone to build a chart with multiple realtime values shown.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./realtimedata.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./realtimedata.html</guid>
  <pubDate>Wed, 29 Dec 2021 08:00:00 +0000</pubDate>
</item>
<item>
  <title>Wild Parakeets</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Wild Parakeets</h1>
</header> <p>
I've known for a while now that in the local area we have a flock of parakeets flying free, I'd seen them last year when walking the dog and again this year but this is the first time they've spent anytime actually around where i live. There is approximately 10 to 12 birds and you definitely know when they are around! Communicative squawky little fellows they are too.
</p>

 <p>
This week they've been in the trees at the back of my garden and i was finally home and near the camera when one turned up today.
</p>


 <figure id="org01188f4"> <img src="../images/wild_parakeet.jpg" alt="wild_parakeet.jpg"></img></figure></div>]]></description>
  <link>https://leehalls.net/posts/./parakeets.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./parakeets.html</guid>
  <pubDate>Fri, 03 Sep 2021 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Orgmode insert image</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Orgmode insert image</h1>
</header> <p>
My workflow relies on orgmode, currently ( <i>may change</i>  <sup> <a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup>) all orgfiles for each project reside in a top level folder and then i create a subfolder for each project into which all data is stored (emails\images\project files etc) and the org file links to these eg;
</p>

 <blockquote>
 <p>
~ top level folder
</p>
 <ul class="org-ul"> <li>project 1 orgfile</li>
 <li>project 2 orgfile</li>
 <li>project <sub>1</sub> <sub>data</sub> <ul class="org-ul"> <li>email <sub>1</sub> <sub>for</sub> <sub>project</sub> <sub>1</sub></li>
 <li>image <sub>for</sub> <sub>project</sub> <sub>1</sub></li>
</ul></li>
 <li>project <sub>2</sub> <sub>data</sub> <ul class="org-ul"> <li>email <sub>1</sub> <sub>for</sub> <sub>project</sub> <sub>2</sub></li>
 <li>image <sub>for</sub> <sub>project</sub> <sub>2</sub></li>
</ul></li>
</ul></blockquote>

 <p>
When it comes to image capture i either launch greenshot and save everything to a temporary capture folder or launch the windows snipping tool & then choose where to save the image the issue with this workflow is that its not smooth. After i have captured the image there is another or several steps to insert the image into the main org file and hence become usuable.
</p>

 <p>
Being avid consumer of knowledge i'm constantly searching ways to improve myself and the things i do and have recently been investigating  <a href="https://www.orgroam.com/">orgroam</a> and so stumbled across nobiot's github blog on emacs in Windows 10  <b> <a href="https://github.com/nobiot/Zero-to-Emacs-and-Org-roam">Zero to Emacs and Org-roam</a></b> aimed at Windows users. In there he has code to launch the snipping tool and insert a link into the org folder although he has it looking specifically for an  <code>images</code> folder. The first lot of code worked out of the box but i could not get the folder chooser section at the end of his  <a href="https://github.com/nobiot/Zero-to-Emacs-and-Org-roam/blob/main/115.How-to-enable-insert-image-from-clipboard.md">blog page</a> to work. Probably just me being dumb ¯\ <sub>(ツ)</sub>_/¯ but no matter what i tried it just wouldn't gel so i attempted to fudge my own version and ended up with the following;
</p>

 <div class="org-src-container">
 <pre class="src src-emacs-lisp">( <span class="org-keyword">defun</span>  <span class="org-function-name">my/take-screenshot</span> ()
   <span class="org-doc">"Take a screenshot into a time stamped unique-named file in the
 directory of your choice, in my case I use helm to traverse & select then insert a link to this file."</span>
  ( <span class="org-keyword">interactive</span>)
  ( <span class="org-keyword">let*</span> ((dirname (file-relative-name
               (read-directory-name   <span class="org-string">"Choose the image directory: "</span>))))
       ( <span class="org-keyword">setq</span> filename (concat dirname
                      (format-time-string  <span class="org-string">"%Y%m%d%H%M"</span>)  <span class="org-string">".png"</span>)))
        <span class="org-comment-delimiter">;; </span> <span class="org-comment">(setq filename (concat default-directory
</span>        <span class="org-comment-delimiter">;;                </span> <span class="org-comment">(format-time-string "%Y%m%d%H%M") ".png"))
</span>      (shell-command  <span class="org-string">"snippingtool /clip"</span>)
      (shell-command (concat  <span class="org-string">"powershell -command \"Add-Type -AssemblyName System.Windows.Forms;if ($([System.Windows.Forms.Clipboard]::ContainsImage())) {$image = [System.Windows.Forms.Clipboard]::GetImage();[System.Drawing.Bitmap]$image.Save('"</span> filename  <span class="org-string">"',[System.Drawing.Imaging.ImageFormat]::Png); Write-Output 'clipboard content saved as file'} else {Write-Output 'clipboard does not contain image data'}\""</span>))
      (insert (concat  <span class="org-string">"[[file:"</span> filename <span class="org-string">"]]"</span>))
  )
</pre>
</div>

 <p>
So far it seems to work well though i've yet to put it too intensive use. Feel free to try it, i cant take any credit for it as the idea and code mostly came from nobiot. 
</p>
 <div id="footnotes">
 <h2 class="footnotes">Footnotes: </h2>
 <div id="text-footnotes">

 <div class="footdef"> <sup> <a id="fn.1" class="footnum" href="#fnr.1" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"> <p class="footpara">
instead of having the org file residing in the top level directory i may simply create the project folder as normal and store the org file within it along with all notes\emails\images etc  
</p></div></div>


</div>
</div></div>]]></description>
  <link>https://leehalls.net/posts/./win10_snip.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./win10_snip.html</guid>
  <pubDate>Sun, 25 Jul 2021 08:00:00 +0100</pubDate>
</item>
<item>
  <title>More garden photography</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">More garden photography</h1>
</header> <p>
Everyday a family of starlings raucously visit the garden, searching for the meal worms i leave and taking baths. They often take upto five baths a day!! Fortunately one of the young ones decided to take a break and pose rather handsomely for a wee photo shoot.
</p>


 <figure id="orgab829e5"> <img src="../images/starling_1.jpg" alt="starling_1.jpg"></img></figure> <figure id="orgb350477"> <img src="../images/starling_2.jpg" alt="starling_2.jpg"></img></figure></div>]]></description>
  <link>https://leehalls.net/posts/./more_gardenphoto.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./more_gardenphoto.html</guid>
  <pubDate>Sun, 16 May 2021 08:00:00 +0100</pubDate>
</item>
<item>
  <title>VL53L1X &amp; a Raspberry Pico</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">VL53L1X & a Raspberry Pico</h1>
</header> <div class="note" id="orgf87676c">
 <p>
 <span class="timestamp-wrapper"> <span class="timestamp">[2021-09-03 Fri] </span></span> update: as you'll see here ( <a href="https://www.reddit.com/r/raspberry_pi/comments/pf5zej/having_problems_with_a_vl53l1x_with_micropython/">reddit link</a>) someone has ported the CircuitPython driver to MicroPython for some reason I never found it when I started this but his github driver can be found here:  <a href="https://github.com/truckershitch/micropython-vl53l0x">https://github.com/truckershitch/micropython-vl53l0x</a>
</p>

</div>

 <p>
I've had an idea for checking the height of a equipment during its movement for some time now and thought the small form factor of the pico + the VL53L1X sensor would be an ideal candidate. So after much searching and trial/error it seemed it wasnt possible until i stumbled across a few threads in the micro-python forum and the openmv github site and i now have a working setup;
</p>

 <p>
The sensor is wired as follows;
</p>
 <table> <colgroup> <col class="org-left"></col> <col class="org-left"></col> <col class="org-left"></col></colgroup> <tbody> <tr> <td class="org-left"> </td>
 <td class="org-left">GP num</td>
 <td class="org-left">pin num</td>
</tr> <tr> <td class="org-left">SDA</td>
 <td class="org-left">GP4</td>
 <td class="org-left">pin 6</td>
</tr> <tr> <td class="org-left">SCL</td>
 <td class="org-left">GP5</td>
 <td class="org-left">pin 7</td>
</tr> <tr> <td class="org-left">GND</td>
 <td class="org-left">GND</td>
 <td class="org-left">pin 8</td>
</tr> <tr> <td class="org-left">+ve</td>
 <td class="org-left">3v3out</td>
 <td class="org-left">pin 36</td>
</tr></tbody></table> <figure id="org67f70fb"> <img src="../images/vl53l1x_2.jpg" alt="vl53l1x_2.jpg"></img></figure> <p>
In order to get it working you'll need to copy the  <code>vl53l1x.py</code> file from;
</p>
 <ul class="org-ul"> <li> <a href="https://github.com/openmv/openmv/blob/master/scripts/libraries/vl53l1x.py">https://github.com/openmv/openmv/blob/master/scripts/libraries/vl53l1x.py</a></li>
</ul> <p>
then edit it and replace
</p>

 <ul class="org-ul"> <li>search & replace all  <code>pyb</code> with  <code>machine</code></li>
 <li>search & replace all  <code>delay</code> with  <code>lightsleep</code></li>
</ul> <p>
Or you can download the version from my github page  <a href="https://github.com/drakxtwo/vl53l1x_pico/tree/main">https://github.com/drakxtwo/vl53l1x_pico/tree/main</a>
</p>

 <p>
You can test to see if  a device is found by;
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">from</span> machine  <span class="org-keyword">import</span> I2C
 <span class="org-keyword">from</span> vl53l1x  <span class="org-keyword">import</span> VL53L1X
 <span class="org-keyword">import</span> time

 <span class="org-variable-name">sda</span> <span class="org-operator">=</span>machine.Pin(4)
 <span class="org-variable-name">scl</span> <span class="org-operator">=</span>machine.Pin(5)
 <span class="org-variable-name">i2c</span> <span class="org-operator">=</span>machine.I2C(0,sda <span class="org-operator">=</span>sda,scl <span class="org-operator">=</span>scl,freq <span class="org-operator">=</span>400000)
 <span class="org-builtin">print</span>( <span class="org-string">'scanning bus..'</span>)
 <span class="org-variable-name">devices</span>  <span class="org-operator">=</span> i2c.scan()
 <span class="org-keyword">if</span>  <span class="org-builtin">len</span>(devices)  <span class="org-operator">==</span> 0:
   <span class="org-builtin">print</span>( <span class="org-string">"No i2c device !"</span>)
 <span class="org-keyword">else</span>:
   <span class="org-builtin">print</span>( <span class="org-string">'i2c devices found:'</span>, <span class="org-builtin">len</span>(devices))
  
 <span class="org-keyword">for</span> device  <span class="org-keyword">in</span> devices:  
     <span class="org-builtin">print</span>( <span class="org-string">"Decimal address: "</span>,device, <span class="org-string">" | Hexa address: "</span>, <span class="org-builtin">hex</span>(device))
</pre>
</div>

 <p>
Assuming we can found a sensor then the code to read from it is;
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">from</span> machine  <span class="org-keyword">import</span> I2C
 <span class="org-keyword">from</span> vl53l1x  <span class="org-keyword">import</span> VL53L1X
 <span class="org-keyword">import</span> time

 <span class="org-variable-name">i2c</span>  <span class="org-operator">=</span> I2C(0)
 <span class="org-variable-name">distance</span>  <span class="org-operator">=</span> VL53L1X(i2c)

 <span class="org-keyword">while</span>  <span class="org-constant">True</span>:
     <span class="org-builtin">print</span>( <span class="org-string">"range: mm "</span>, distance.read())
    time.sleep_ms(50)
</pre>
</div>

 <p>
with output as follows;
</p>

 <div class="org-src-container">
 <pre class="src src-python">MicroPython v1.14 on 2021 <span class="org-operator">-</span>02 <span class="org-operator">-</span>05; Raspberry Pi Pico  <span class="org-keyword">with</span> RP2040
Type  <span class="org-string">"help()"</span>  <span class="org-keyword">for</span> more information.
 <span class="org-operator">>>></span>  <span class="org-operator">%</span>Run  <span class="org-operator">-</span>c $EDITOR_CONTENT
 <span class="org-builtin">range</span>: mm  174
 <span class="org-builtin">range</span>: mm  174
 <span class="org-builtin">range</span>: mm  172
 <span class="org-builtin">range</span>: mm  172
 <span class="org-builtin">range</span>: mm  172
 <span class="org-builtin">range</span>: mm  172
</pre>
</div>

 <p>
Thats as far as i have got, the original pimoroni library allowed for multiplexing the sensors, changing range etc i dont know if thats possible, i'm pleased i got this far!
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./vl53lx_pico.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./vl53lx_pico.html</guid>
  <pubDate>Sun, 04 Apr 2021 08:00:00 +0100</pubDate>
</item>
<item>
  <title>GPG emacs on Windows 10</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">GPG emacs on Windows 10</h1>
</header> <p>
I've been using GPG without any dotemacs configuration & without issue or concern on Win10 machines for a long time but recently I started to recieve "no usable configuration errors" now I know its not because I've made changes to the dotemacs file, altered key etc but on checking log files I have updated to version 3.1.15 of Gpg4win as well as switched emacs to 28.0.50 from 27.1 but that change hasnt created the issue (switch back and it still fails) so it looks like the Gpg4win upgrade has altered something on two separate systems with identical results. To get it working again i've had to modify the dotemacs in a similar fashion to how i run emacs on a locked machine which software installs are not allowed and that is by specifying directly the home and program directories;
</p>

 <div class="org-src-container">
 <pre class="src src-emacs-lisp"> <span class="org-comment-delimiter">;</span> <span class="org-comment">(customize-set-variable epg-debug t)
</span>(customize-set-variable 'epg-gpg-home-directory  <span class="org-string">"C:/Users/lhall/AppData/Roaming/gnupg/"</span>)
(customize-set-variable 'epg-gpg-program  <span class="org-string">"D:/Software/GnuPG/bin/gpg.exe"</span>)
(customize-set-variable 'epg-gpgconf-program  <span class="org-string">"D:/Software/GnuPG/bin/gpgconf"</span>)
(customize-set-variable 'epg-gpgsm-program  <span class="org-string">"D:/Software/GnuPG/bin/gpgsm"</span>)
</pre>
</div>

 <p>
Once the above is done I can now once again en/de-crpyt my data. However i did notice two things;
</p>

 <p>
 <b>First</b>: making a change to my dotemacs file under 28.0.50 means it fails to compile when re-opening emacs  <b>unless</b> i start 27.1 first and then the snapshot emacs runs fine afterwards and on one machine that running ox-hugo export fails with  <code>Error: (file-missing "Searching for program" "No such file or directory" "git")</code> ¯\(° <sub>o</sub>)/¯ I had been considering a switch at home to WSL which seems to work well which allows the use of mu4e maybe this is the push needed? but as orgmode itself is such a fantastic tool for project & information management that it is  <i>emacs</i> for me - it is often the sole purpose of running emacs perhaps some none unix focus would grow its audience?
</p>

 <p>
 <b>Secondly</b>: whilst googling the problem i came across several sites complaining that pgp  <a href="https://latacora.micro.blog/2019/07/16/the-pgp-problem.html">should be shot</a> and from that there is a new apparently easier, less problematic modern alternative to GPG called  <a href="https://github.com/FiloSottile/age">age</a> that in its own words features small explicit keys, no config options, and UNIX-style composability. It is written in GO and on trying it out seems very quick & simple. Now all thats needed is an emacs interface. Example from age site
</p>

 <div class="org-src-container">
 <pre class="src src-bash">$ age-keygen -o key.txt
Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
$ tar cvz ~/data | age -r age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p > data.tar.gz.age
$ age --decrypt -i key.txt data.tar.gz.age > data.tar.gz
</pre>
</div>

 <p>
 <a href="https://github.com/FiloSottile/age">https://github.com/FiloSottile/age</a>
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./gpg_emacsconfig.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./gpg_emacsconfig.html</guid>
  <pubDate>Sat, 13 Mar 2021 08:00:00 +0000</pubDate>
</item>
<item>
  <title>Mouse photography</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Mouse photography</h1>
</header> <p>
Still trying to learn the new lense and manual focus (nearly always used autofocus) so with a turn in the weather it was nice to sit outside and watch/listen. Thats when i noticed the resident mouse decide to sit on his doorstep and watch me.
</p>


 <figure id="orge7ae1a2"> <img src="../images/mouse_01.png" alt="mouse_01.png"></img></figure> <figure id="org7399999"> <img src="../images/mouse_02.png" alt="mouse_02.png"></img></figure> <p>
I'm quite pleased with these two photos, handheld at full zoom and manual focus.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./garden_mouse.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./garden_mouse.html</guid>
  <pubDate>Sat, 27 Feb 2021 08:00:00 +0000</pubDate>
</item>
<item>
  <title>Querying the SQL DB</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Querying the SQL DB</h1>
</header> <p>
This is taken from a previous website post but the problem still remains, my home monitoring system has 4 zone with a wireless temperature sensor in each. They all wake up individually on a periodic basis and each time one sensor outputs data the main program writes an entry into the SQL database for all zones so only the sensor currently transmitting has new data and the previous readings from the other sensors are stored with the new.
</p>

 <p>
What this means is that for given time period i can have a different number of readings for each zone or put another way  <i>my data export is not uniform meaning comparison of time periods is not simple</i>
</p>

 <p>
For example the following SQL select statement 
</p>
 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">for</span> row  <span class="org-keyword">in</span> curs.execute( <span class="org-string">"SELECT * FROM home_mon WHERE DATE>(?) and DATE<(?)"</span>, ( <span class="org-string">'2018-12-01'</span>,  <span class="org-string">'2018-12-25'</span>)):
</pre>
</div>

 <p>
counts 6547 rows for December 2018 whilst the same for 2019 only counts 6516 this discrepancy is larger for some other months. So to compare periods i wrote the following to get one value per hour
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">for</span> row  <span class="org-keyword">in</span> curs.execute( <span class="org-string">"SELECT * FROM home_mon WHERE DATE>(?)"</span>, (yr18,)):
     <span class="org-variable-name">dat</span>  <span class="org-operator">=</span> dt.datetime.fromtimestamp( <span class="org-builtin">int</span>( <span class="org-builtin">float</span>(row[1]))).strftime( <span class="org-string">'%Y-%m-%d %H:%M:%S'</span>)
     <span class="org-variable-name">hr</span>  <span class="org-operator">=</span>  dt.datetime.fromtimestamp( <span class="org-builtin">int</span>( <span class="org-builtin">float</span>(row[1]))).strftime( <span class="org-string">'%H:'</span>)
     <span class="org-keyword">if</span> dat  <span class="org-operator">></span>  <span class="org-string">"2018-12-01"</span>  <span class="org-keyword">and</span> dat  <span class="org-operator"><</span>  <span class="org-string">"2018-12-25"</span>:
         <span class="org-keyword">if</span> hr  <span class="org-operator">!=</span> pasthr18:
             <span class="org-variable-name">pasthr18</span>  <span class="org-operator">=</span> hr
            data_18.append(row[4])
     <span class="org-keyword">if</span> dat  <span class="org-operator">></span>  <span class="org-string">"2019-12-01"</span>  <span class="org-keyword">and</span> dat  <span class="org-operator"><</span>  <span class="org-string">"2019-12-25"</span>:
         <span class="org-keyword">if</span> hr  <span class="org-operator">!=</span> pasthr19:
             <span class="org-variable-name">pasthr19</span>  <span class="org-operator">=</span> hr
            data_19.append(row[4])

     <span class="org-variable-name">cnt</span>  <span class="org-operator">=</span> cnt  <span class="org-operator">+</span> 1
    x.append(cnt)
</pre>
</div>

 <p>
The result of this is for the periods  <b>01-12</b> >  <b>25-12</b> in both years I get 576 values for both meaning a real comparison can now be done.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./sqlquery1.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./sqlquery1.html</guid>
  <pubDate>Sat, 20 Feb 2021 08:00:00 +0000</pubDate>
</item>
<item>
  <title>Panda &amp; SQL pain</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Panda & SQL pain</h1>
</header> <p>
I've left the home monitoring system alone for a few years, its just sat quietly in the garage collating data into an SQL database, the only changes made recently were to move everything onto a Pi4 and add an additional camera into the motioneye system running on the same Pi. So as its a slow day i decided now was the time to update it or rather start work on it. One thing i wanted to do was re-instigate the live readings and an auto graph element and for this i needed to extract data - simple i got my old code somewhere …. somewhere … maybe.
</p>

 <p>
After a bit of searching and playing around i decided to re-write;
</p>

 <p>
Though I spent far longer testing this than i should have. The code when run will sometimes report correctly a full dataframe and yet next time with exactly the same code (no changes) it reports an empty one.  <i>Run it > empty > run it > empty > run it > data</i>
</p>


 <figure id="orge2aae93"> <img src="../images/db_query_fail.PNG" alt="db_query_fail.PNG"></img></figure> <p>
Not sure why -  <i>yet</i>.
</p>

 <p>
Anyway ignoring why it sometimes works and then others dont for now the code is very simple and it outputs an interactive visualisation like;
</p>

 <p>
 <img src="../images/sql_graph_1.png" alt="sql_graph_1.png"></img>
You can find the interactive version  <a href="file:///data/data_out.html">here:</a>
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">import</span> sqlite3
 <span class="org-keyword">import</span> pandas  <span class="org-keyword">as</span> pd
 <span class="org-keyword">import</span> pandas_bokeh
 <span class="org-keyword">from</span> sqlalchemy  <span class="org-keyword">import</span> create_engine 
 <span class="org-keyword">import</span> datetime  <span class="org-keyword">as</span> dt
 <span class="org-builtin">file</span>  <span class="org-operator">=</span>  <span class="org-string">"home_mon_db.sqlite"</span>
pandas_bokeh.output_file( <span class="org-string">'data_out.html'</span>)

 <span class="org-comment-delimiter">#</span> <span class="org-comment">define time window
</span> <span class="org-variable-name">timenow</span>  <span class="org-operator">=</span> dt.datetime.now()
 <span class="org-comment-delimiter"># </span> <span class="org-comment">testing values
</span> <span class="org-variable-name">now_date</span>  <span class="org-operator">=</span>  <span class="org-string">'2021-02-11'</span>
 <span class="org-comment-delimiter">#</span> <span class="org-comment">prev_time = '06:00:00'
</span> <span class="org-comment-delimiter">#</span> <span class="org-comment">now_time = '08:00:00'
</span> <span class="org-comment-delimiter"># </span> <span class="org-comment">programatic values
</span> <span class="org-comment-delimiter">#</span> <span class="org-comment">now_date = timenow.strftime('%Y-%m-%d')
</span> <span class="org-variable-name">prev_time</span>  <span class="org-operator">=</span>  <span class="org-builtin">str</span>((dt.datetime.now()  <span class="org-operator">-</span> dt.timedelta(hours <span class="org-operator">=</span>8,minutes <span class="org-operator">=</span>0)).strftime( <span class="org-string">'%H:%M:%S'</span>))  <span class="org-comment-delimiter"># </span> <span class="org-comment">defines a window to get data from
</span> <span class="org-variable-name">now_time</span>  <span class="org-operator">=</span>  <span class="org-builtin">str</span>(timenow.strftime( <span class="org-string">'%H:%M:%S'</span>))

 <span class="org-builtin">print</span>( <span class="org-string">'DATE:'</span>,now_date, <span class="org-string">'PREVTIME:'</span>,prev_time, <span class="org-string">'NOWTIME'</span>,now_time)

 <span class="org-keyword">try</span>:
         <span class="org-variable-name">cnx</span>  <span class="org-operator">=</span> sqlite3.connect( <span class="org-string">'home_mon_db.sqlite'</span>)
         <span class="org-variable-name">df</span>  <span class="org-operator">=</span> pd.read_sql( <span class="org-string">"SELECT * FROM home_mon WHERE DATE = ? AND time BETWEEN ? AND ?"</span>, cnx, params <span class="org-operator">=</span>{now_date, prev_time, now_time})
 <span class="org-keyword">except</span>  <span class="org-type">ValueError</span>  <span class="org-keyword">as</span> e:
         <span class="org-builtin">print</span>( <span class="org-string">'failed'</span>, e)

 <span class="org-keyword">if</span> df.empty  <span class="org-operator">==</span>  <span class="org-constant">True</span>:
         <span class="org-builtin">print</span>( <span class="org-string">'DataFrame is empty!'</span>)
 <span class="org-keyword">else</span>:
         <span class="org-builtin">print</span>(df)
         <span class="org-variable-name">sel</span>  <span class="org-operator">=</span>df[[ <span class="org-string">'TIME'</span>, <span class="org-string">'EXTERNAL'</span>]]
         <span class="org-comment-delimiter"># </span> <span class="org-comment">sel.plot_bokeh(rangetool=True)  # this i like
</span>        sel.plot_bokeh(
                kind <span class="org-operator">=</span> <span class="org-string">'line'</span>,
                x <span class="org-operator">=</span> <span class="org-string">'TIME'</span>,
                xlabel <span class="org-operator">=</span> <span class="org-string">'TIME'</span>,
                ylabel <span class="org-operator">=</span> <span class="org-string">'Degrees C'</span>,
                title <span class="org-operator">=</span> <span class="org-string">'Sensor inside garage'</span>
        )

 <span class="org-builtin">print</span>( <span class="org-string">'finished'</span>)
cnx.close()
</pre>
</div>
</div>]]></description>
  <link>https://leehalls.net/posts/./pdsql_1.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./pdsql_1.html</guid>
  <pubDate>Sun, 14 Feb 2021 08:00:00 +0000</pubDate>
</item>
<item>
  <title>More garden visitors</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">More garden visitors</h1>
</header> <p>
OK hands up .. these were taken whilst sat inside nice and warm through the window! so not brilliant plus a little poor editing still not bad though
</p>


 <figure id="org859a40b"> <img src="../images/mouse1.jpg" alt="mouse1.jpg"></img></figure> <figure id="org41569a3"> <img src="../images/squirrel_colour2.jpg" alt="squirrel_colour2.jpg"></img></figure></div>]]></description>
  <link>https://leehalls.net/posts/./upclose_visitors.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./upclose_visitors.html</guid>
  <pubDate>Sun, 07 Feb 2021 08:00:00 +0000</pubDate>
</item>
<item>
  <title>New lense</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">New lense</h1>
</header> <p>
So a little splurge and finally got a lense that means i dont have to be within 3m of the thing i'm trying to catch an image of! Still lots to learn but first handheld efforts dont seem to bad.
</p>


 <figure id="orgd5c2d6b"> <img src="../images/squirrel_bandw.jpg" alt="squirrel_bandw.jpg"></img></figure> <figure id="org3a6f88a"> <img src="../images/pigeon.jpg" alt="pigeon.jpg"></img></figure></div>]]></description>
  <link>https://leehalls.net/posts/./new_lense.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./new_lense.html</guid>
  <pubDate>Sat, 06 Feb 2021 08:00:00 +0000</pubDate>
</item>
<item>
  <title>emacs on Windows</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">emacs on Windows</h1>
</header> <p>
Working mostly in the MS Windows environment i keep notes, project records in org and these files have multiple links to documents, images, saved mails etc and most are stored with hyperlinks ( <i>though i may now be migrating to attachments</i>) but when it comes to opening the links then it takes a little extra work. When using helm and initiating links by  <code>C-c C-l</code> and choosing  <code>file</code> this allows me to select files from a list and use completion support to narrow down the list of files. However the  <code>file+sys</code> option does not, so i always chose  <code>file</code>, used helm to help find it, insert the link and then edit it to add the +sys part.
</p>

 <p>
Well not anymore, i stumbled upon the following code;
</p>

 <p>
 <a href="https://stackoverflow.com/questions/11553123/linking-to-files-on-windows-network-share">https://stackoverflow.com/questions/11553123/linking-to-files-on-windows-network-share</a>
</p>

 <div class="org-src-container">
 <pre class="src src-emacs-lisp">(mapc ( <span class="org-keyword">lambda</span> (file-name-matcher)
    (add-to-list 'org-file-apps
                 (cons file-name-matcher 'default) 'append))
  (list  <span class="org-string">"\\.doc\\'"</span>
         <span class="org-string">"\\.xls\\'"</span>
         <span class="org-string">"\\.ppt\\'"</span>))
</pre>
</div>

 <p>
adding this to my dotemacs file means files open without the need for the  <code>file+sys</code> making my life much easier, my modified version adds more file formats
</p>


 <div class="org-src-container">
 <pre class="src src-emacs-lisp">(mapc ( <span class="org-keyword">lambda</span> (file-name-matcher)
    (add-to-list 'org-file-apps
                 (cons file-name-matcher 'default) 'append))
  (list  <span class="org-string">"\\.doc\\'"</span>
         <span class="org-string">"\\.docx\\'"</span>
         <span class="org-string">"\\.xls\\'"</span>
         <span class="org-string">"\\.xlsx\\'"</span>
         <span class="org-string">"\\.ppt\\'"</span>
         <span class="org-string">"\\.pptx\\'"</span>
         <span class="org-string">"\\.msg\\'"</span>))
</pre>
</div>

 <p>
Now i can work with attachments because i've also found out how to add per file folder setting for attachments so by this i mean each org file i have is saved with its project name ie
</p>

 <ul class="org-ul"> <li>project <sub>a</sub></li>
 <li>project <sub>b</sub></li>
</ul> <p>
before i'd create a directory and then manually copy in my files for linking to, now with this at the end of my org files under the heading local variables;
</p>

 <div class="org-src-container">
 <pre class="src src-org"> <span class="org-comment"># Local Variables:</span>
 <span class="org-comment"># org-attach-direction: "project_a/"</span>
 <span class="org-comment"># end:</span>
</pre>
</div>

 <p>
if i add an attachment the folder if it does not exist is created and the file is stored within it.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./emacs_openfiles.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./emacs_openfiles.html</guid>
  <pubDate>Sat, 05 Dec 2020 08:00:00 +0000</pubDate>
</item>
<item>
  <title>COVID North vs South</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">COVID North vs South</h1>
</header> <p>
Its interesting to me that society or rather the portrayal of modern English society is one where the class system of the Oliver Twist era and before no longer exists or has been eroded to almost non-existence.  <b>Bollocks.</b> The number of poorer people going to the alleged " <i>elite</i>" universtities is minimal but I agree that the internet has muddied the water, allowed those with talents to broadcast themselves to a wide audience and earn in some cases significant money but they are still a rarity and have they crossed the divide or simply created another class?
</p>

 <p>
But perhaps if you were cynical an example of class and the truly English North vs South divide you only have to look at the latest COVID19 map to get us out of lockdown from December the 2nd.
</p>

 <figure id="org3abfc40"> <img src="../images/covid_north_south.PNG" alt="covid_north_south.PNG"></img> <figcaption> <span class="figure-number">Figure 1: </span> <a href="https://www.independent.co.uk/life-style/which-tier-postcode-area-lockdown-covid-b1762224.html">https://www.independent.co.uk/life-style/which-tier-postcode-area-lockdown-covid-b1762224.html</a></figcaption></figure> <table> <colgroup> <col class="org-left"></col> <col class="org-left"></col> <col class="org-left"></col></colgroup> <tbody> <tr> <td class="org-left"> <img src="../images/tier1.jpg" alt="tier1.jpg"></img></td>
 <td class="org-left"> <img src="../images/tier2.jpg" alt="tier2.jpg"></img></td>
 <td class="org-left"> <img src="../images/tier3.jpg" alt="tier3.jpg"></img></td>
</tr></tbody></table> <p>
OK its not totally and clearly delineated on the historic North v South divide I mean who classes Stratford Upon Avon as the Midlands or Warrington as historically upper class? (they're in Tier 3) but just about everything on initial glances would appear that the old moniker of working class Midlands and North has been left in lockdown only the wording has changed. One suspects again with a rather cynical eye that this proposed Christmas holiday for lockdown was never real but why not man up and just state the science does not allow for Xmas, the virus does not respect borders, time of year etc I guess because that takes balls and its much easier as a politician to pretend you're doing something when really you are not. 
</p>

 <p>
Instead we now have a map which on face value allows the southern half ( <i>most of it</i>) to have slightly more openness. Still on the bright side … our political elite are rather an aging bunch and one could hope that a clean sweep of the Houses of Parliament etc would allow for some refreshing younger new ideas without the need for a return of Guy Fawkes. Besides it could be worse, pity the poor Welsh where restaurants, pubs must close at 1800 and cannot sell alcohol at anytime even with food. ¯\ <sub>(ツ)</sub>_/¯ 
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./covid_northsouthdivide.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./covid_northsouthdivide.html</guid>
  <pubDate>Thu, 26 Nov 2020 08:00:00 +0000</pubDate>
</item>
<item>
  <title>Lights out</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Lights out</h1>
</header> <p>
:ID:       021D55E2-ED21-4DE8-BBFC-3F45D3D2C7A0
</p>
 <p>
In light ( <i>no pun intended</i>) of the last post it was quite suprising to see more stories on the subject of light pollution filter into my news-stream, from the effect on  <a href="https://www.newscientist.com/article/2258765-light-pollution-is-changing-the-way-cougars-hunt-deer-in-western-us/">cougars hunting in the western US</a> to  <a href="https://www.theguardian.com/environment/2020/nov/02/treat-artificial-light-form-pollution-environment">reduced pollination, affected sleep cycles and more</a>. Although the  <a href="https://www.darksky.org/">dark sky</a> movement has been going for a long time and reading through its site you can find out about the effects of light pollution on animals and humans, energy waste and more I guess we need people to stop being afraid of the dark but it would seem there could be a push to make artificial light a form of environmental pollution the same as other forms that we naturally consider to be pollution. For me this can only be a good thing, as i mentioned in my earlier post the benefits of simply turning the lights off could be immense.
</p>

 <p>
A really good way of visualising how much light there really is in the world at night you can visit   <a href="https://www.lightpollutionmap.info/">https://www.lightpollutionmap.info/</a> and generate a map like;
</p>


 <figure id="org0543535"> <img src="../images/light_pollution_1.png" alt="light_pollution_1.png"></img> <figcaption> <span class="figure-number">Figure 1: </span>Light pollution across the UK</figcaption></figure> <p>
But another interesting site i found is  <a href="https://www.underluckystars.com/if-light-pollution-cleared">https://www.underluckystars.com/if-light-pollution-cleared</a> just look at how the cities could be if we eliminated light pollution;
</p>

 <p>
 <img src="../images/london_nopollution.png" alt="london_nopollution.png"></img>
I love the dark, as i said there isnt enough of it and i really hope light pollution becomes a classified form of pollution worthy of action/sanctions.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./lightpollution.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./lightpollution.html</guid>
  <pubDate>Wed, 04 Nov 2020 08:00:00 +0000</pubDate>
</item>
<item>
  <title>Darkness</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Darkness</h1>
</header> <p>
:ID:       5B73A930-460C-4F9A-9362-7F46CE9ECAF4
</p>
 <p>
I've often been heard muttering the phrase " <i>there's not enough darkness in the world</i>" most who hear it tend to assume i'm talking about we need more death,pestilence, war, famine etc all the "bad" things rather ironic given the COVID situation but i actually mean  <b>its too bright</b>. For a man that loves the sunshine i also embrace the night and i prefer working in the dark or reduced light environment not nightshifts though i've done my fair share of those, in the office i'd often be first one in and the lights would remain off until the second person arrived, at home i never turn on the main lights unless there is a need & by this i mean looking for a needle or a genuine situation where light bright enough to blind for a few moments should one care to look directly at it, is required. 
</p>

 <p>
Besides i like the romance of candles or low lighting.
</p>

 <p>
But in general there are too many lights, the night sky is no longer lit by stars, the moon loses its majesty and nature pays a price.
</p>

 <p>
There is also the consumption of energy, in these days of global warming, the desire to cut energy usage we still light the night sky like we're afraid of the dark. One rather large gripe i have is that most roads and motorways are lit permanently at night why? i've got headlights? i can drive safely in the dark I'm not afraid of it and i'm quite capable of moderating my speed to suit the conditions. Should there be an accident give the emergency services an override then anyone approaching the lights knows its a good idea to slow down, put them at interchanges/exits but not every 200m or switch every alternate one off. Just think of the power we'd save.
</p>

 <p>
So given the above viewpoint it was quite a surprise to see an article pop up on my news feed about Germany with the headline:  <a href="https://phys.org/news/2020-08-germany-dim-night-insects.html">Germany plans to dim lights at night to save insects</a> ok its only a draft law but imagine if it became reality, if every country did the same. The power savings alone could be impressive but if it did have a positive affect on the insect population then  <i>woop dee fucking doo dah</i> thats a win in many ways. I know people say things were different in my day and that its a perception rather than reality but in this case its true. Things were different when i was younger, there were more bees and their hated cousin the wasp  <sup> <a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup>, more birds & in general more nature  <sup> <a id="fnr.1.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup>. Now i know it is not lighting that is solely to blame and not the biggest contributor to the decline but it is surely one of the easier things we can change  <b>without impact on us?</b>
</p>

 <p>
Shouldnt we be doing everything possible in this time? it would seem to me that even picking the easy targets such as lighting reduction would cumulatively yield benefits all around and what i dont understand is why such things are seemingly not on the table, its ok to push for the big things (removal of coal power, reduction in old automotive technology BTW  <i>i dont think the push for electric is the way forward but thats a different topic</i>) but these things are not instant wins, they take years if not decades to achieve but in the meantime we could be doing more with simple, easy to change and positive steps.
</p>

 <p>
Fair play to Germany for trying and here's hoping the law becomes reality and its effect is proven.
</p>
 <div id="footnotes">
 <h2 class="footnotes">Footnotes: </h2>
 <div id="text-footnotes">

 <div class="footdef"> <sup> <a id="fn.1" class="footnum" href="#fnr.1" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"> <p class="footpara">
The most comprehensive assessment yet of the state of nature in the UK has found that the area occupied by more than 6500 species has shrunk by 5 per cent since 1970  <a href="https://www.newscientist.com/article/2218235-thousands-of-uk-wildlife-and-plant-species-are-in-decline/">https://www.newscientist.com/article/2218235-thousands-of-uk-wildlife-and-plant-species-are-in-decline/</a>
</p></div></div>


</div>
</div></div>]]></description>
  <link>https://leehalls.net/posts/./darkness.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./darkness.html</guid>
  <pubDate>Fri, 07 Aug 2020 08:00:00 +0100</pubDate>
</item>
<item>
  <title>outlook events for orgmode</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">outlook events for orgmode</h1>
</header> <p>
If like me you spend all your working life in MS products and yet you still want to or do rely on orgmode to give you some semblance of sanity, then this might help. Its not a bidirectional synchronisation and i only wanted the appointments for today to show. It queries Outlook for any confirmed appointments in the calendar and then outputs a single orgmode file in my main org folder which is automatically added to the agenda. The following code originally taken from  <a href="https://sukhbinder.wordpress.com/2020/04/08/get-outlook-entries-with-python-3/">https://sukhbinder.wordpress.com/2020/04/08/get-outlook-entries-with-python-3/</a> then gutted and adapted for my needs queries MS Outlook for the events in the calendar. I've restricted it for one day but changing the variable  <code>num_days</code> can output more if you wanted. 
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-comment-delimiter"># </span> <span class="org-comment">taken from https://sukhbinder.wordpress.com/2020/04/08/get-outlook-entries-with-python-3/
</span> <span class="org-comment-delimiter"># </span> <span class="org-comment">modified 2020.08.07
</span>
 <span class="org-keyword">import</span> win32com.client
 <span class="org-keyword">import</span> datetime  <span class="org-keyword">as</span> dt

 <span class="org-variable-name">f</span>  <span class="org-operator">=</span>  <span class="org-builtin">open</span>( <span class="org-string">'C:/Users/lee.halls/Documents/orgfiles/today.org'</span>,  <span class="org-string">'w'</span>)

 <span class="org-keyword">def</span>  <span class="org-function-name">getEndtime</span>(start_time,org_duration):
     <span class="org-variable-name">org_duration</span>  <span class="org-operator">=</span> org_duration  <span class="org-operator">/</span> 60
     <span class="org-variable-name">the_time</span>  <span class="org-operator">=</span> dt.datetime.strptime(start_time,  <span class="org-string">'%H:%M'</span>)
     <span class="org-variable-name">new_time</span>  <span class="org-operator">=</span> the_time  <span class="org-operator">+</span> dt.timedelta(hours <span class="org-operator">=</span>org_duration)
     <span class="org-keyword">return</span> new_time.strftime( <span class="org-string">'%H:%M'</span>)

 <span class="org-variable-name">Outlook</span>  <span class="org-operator">=</span> win32com.client.Dispatch( <span class="org-string">"Outlook.Application"</span>)
 <span class="org-variable-name">ns</span>  <span class="org-operator">=</span> Outlook.GetNamespace( <span class="org-string">"MAPI"</span>)

 <span class="org-variable-name">appointments</span>  <span class="org-operator">=</span> ns.GetDefaultFolder(9).Items
appointments.Sort( <span class="org-string">"[Start]"</span>)
appointments. <span class="org-variable-name">IncludeRecurrences</span>  <span class="org-operator">=</span>  <span class="org-string">"True"</span>

 <span class="org-comment-delimiter"># </span> <span class="org-comment">define date range
</span> <span class="org-variable-name">num_days</span>  <span class="org-operator">=</span> 1
 <span class="org-variable-name">today</span>  <span class="org-operator">=</span> dt.datetime.today()
 <span class="org-variable-name">begin</span>  <span class="org-operator">=</span> today.date().strftime( <span class="org-string">"%d/%m/%Y"</span>)
 <span class="org-variable-name">tomorrow</span>  <span class="org-operator">=</span> dt.timedelta(num_days)  <span class="org-operator">+</span> today
 <span class="org-variable-name">end</span>  <span class="org-operator">=</span> tomorrow.date().strftime( <span class="org-string">"%d/%m/%Y"</span>)

 <span class="org-comment-delimiter"># </span> <span class="org-comment">restrict appointments in outlook to today
</span> <span class="org-variable-name">appointments</span>  <span class="org-operator">=</span> appointments.Restrict(
     <span class="org-string">"[Start] >= '"</span>  <span class="org-operator">+</span> begin  <span class="org-operator">+</span>  <span class="org-string">"' AND [END] <= '"</span>  <span class="org-operator">+</span> end  <span class="org-operator">+</span>  <span class="org-string">"'"</span>)

 <span class="org-comment-delimiter"># </span> <span class="org-comment">loop through appointments
</span> <span class="org-keyword">for</span> a  <span class="org-keyword">in</span> appointments:
     <span class="org-comment-delimiter">#</span> <span class="org-comment">print(a.Subject, a.Start, a.Duration)
</span>     <span class="org-variable-name">startTime</span>  <span class="org-operator">=</span> (a.Start).strftime( <span class="org-string">"%H:%M"</span>)
     <span class="org-variable-name">endTime</span>  <span class="org-operator">=</span> getEndtime(startTime, a.Duration)
     <span class="org-comment-delimiter"># </span> <span class="org-comment">print ('%s%s%s%s%s%s%s' % ('* ', startTime ,'-', endTime, ' ', a.Subject, '\n'))
</span>     <span class="org-comment-delimiter"># </span> <span class="org-comment">print ('%s%s%s' % ('<', a.Start.strftime('%Y-%m-%d'), '>'))
</span>    f.write ( <span class="org-string">'%s%s%s%s%s%s%s'</span>  <span class="org-operator">%</span> ( <span class="org-string">'* '</span>, startTime , <span class="org-string">'-'</span>, endTime,  <span class="org-string">' '</span>, a.Subject,  <span class="org-string">'</span> <span class="org-constant">\n</span> <span class="org-string">'</span>))
    f.write ( <span class="org-string">'%s%s%s%s'</span>  <span class="org-operator">%</span> ( <span class="org-string">'<'</span>, a.Start.strftime( <span class="org-string">'%Y-%m-%d'</span>),  <span class="org-string">'>'</span>,  <span class="org-string">'</span> <span class="org-constant">\n</span> <span class="org-string">'</span> ))

 
f.close()
</pre>
</div>

 <p>
I've set this to run via windows task scheduler every time i unlock the PC.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./outlook_events.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./outlook_events.html</guid>
  <pubDate>Thu, 06 Aug 2020 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Beginning email analysis for outlook</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Beginning email analysis for outlook</h1>
</header> <p>
 <span class="timestamp-wrapper"> <span class="timestamp">[2020-06-24 Wed 22:36] </span></span> This was originally titled "Outlook email analysis" but on reflection it sounded too presumptious for what is actually shown hence the addition of  " <i>beginning</i>" to the title.
</p>

 <p>
Its been a productive week and this morning i finally got around to trying my hand at using python to conduct some simple Outlook inbox analysis. I've wanted for a long time to have more data visualisation and so another journey begins. The following piece of code is simple and needs improvement but what it does is to connect to the outlook mailbox, and loop through all emails to provide a count of emails received against a persons name for today and it creates an org table output
</p>

 <table> <colgroup> <col class="org-left"></col> <col class="org-right"></col></colgroup> <tbody> <tr> <td class="org-left">2020-06-12</td>
 <td class="org-right"> </td>
</tr> <tr> <td class="org-left">man, Bat</td>
 <td class="org-right">2</td>
</tr> <tr> <td class="org-left">Darwin, Charles</td>
 <td class="org-right">7</td>
</tr> <tr> <td class="org-left">Dent, Arthur</td>
 <td class="org-right">3</td>
</tr> <tr> <td class="org-left">Morgan, Arthur</td>
 <td class="org-right">1</td>
</tr> <tr> <td class="org-left">Pratchett, Terry</td>
 <td class="org-right">1</td>
</tr></tbody></table> <p>
The code is
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">import</span> win32com.client
 <span class="org-keyword">from</span> collections  <span class="org-keyword">import</span> defaultdict
 <span class="org-keyword">from</span> datetime  <span class="org-keyword">import</span> datetime, date
 <span class="org-keyword">import</span> datetime

 <span class="org-variable-name">f</span>  <span class="org-operator">=</span>  <span class="org-builtin">open</span>( <span class="org-string">"test.org"</span>,  <span class="org-string">'a'</span>)

 <span class="org-comment-delimiter"># </span> <span class="org-comment">setup connection to outlook
</span> <span class="org-variable-name">outlook</span>  <span class="org-operator">=</span> win32com.client.Dispatch( <span class="org-string">"Outlook.Application"</span>).GetNamespace( <span class="org-string">"MAPI"</span>)
 <span class="org-variable-name">inbox</span>  <span class="org-operator">=</span> outlook.GetDefaultFolder(6)

 <span class="org-comment-delimiter"># </span> <span class="org-comment">get inbox messages
</span> <span class="org-variable-name">messages</span>  <span class="org-operator">=</span> inbox.Items
 <span class="org-variable-name">message</span>  <span class="org-operator">=</span> inbox.Items.GetFirst()

 <span class="org-comment-delimiter"># </span> <span class="org-comment">define yesterday's date & create dictionary
</span> <span class="org-variable-name">d</span>  <span class="org-operator">=</span> (date.today()  <span class="org-operator">-</span> datetime.timedelta (days <span class="org-operator">=</span>1)).strftime( <span class="org-string">'%Y-%m-%d'</span>)
 <span class="org-variable-name">counts</span>  <span class="org-operator">=</span> defaultdict( <span class="org-builtin">int</span>)

 <span class="org-comment-delimiter"># </span> <span class="org-comment">loop through all messages and check if yesterday < received time then update dictionary
</span> <span class="org-keyword">for</span> message  <span class="org-keyword">in</span> inbox.Items:
     <span class="org-variable-name">received_time</span>  <span class="org-operator">=</span> message.ReceivedTime.strftime( <span class="org-string">'%Y-%m-%d'</span>)
     <span class="org-keyword">if</span> d  <span class="org-operator"><</span> received_time:
         <span class="org-variable-name">counts</span>[message.SenderName]  <span class="org-operator">+=</span>1

f.write( <span class="org-string">'%s%s%s%s'</span>  <span class="org-operator">%</span> ( <span class="org-string">'| '</span>, date.today().strftime( <span class="org-string">'%Y-%m-%d'</span>) ,  <span class="org-string">' |'</span>,  <span class="org-string">'</span> <span class="org-constant">\n</span> <span class="org-string">'</span>))
 <span class="org-keyword">for</span> key  <span class="org-keyword">in</span> (counts):
     <span class="org-builtin">print</span>( <span class="org-string">'|'</span>, key,  <span class="org-string">'|'</span>, counts[key],  <span class="org-string">'|'</span>)
    f.write( <span class="org-string">'%s%s%s%s%s%s'</span>  <span class="org-operator">%</span> ( <span class="org-string">'|'</span>, key,  <span class="org-string">'|'</span>, counts[key],  <span class="org-string">'|'</span>,  <span class="org-string">'</span> <span class="org-constant">\n</span> <span class="org-string">'</span>))


f.close()
</pre>
</div>

 <p>
Next tasks are to have it count all yesterday's msgs, set the script to run first thing every morning or perhaps have it run once a week and compile stats for the week so that there is not too much data.
</p>

 <p>
 <span class="timestamp-wrapper"> <span class="timestamp">[2020-06-13 Sat 10:33] </span></span> now updated for weekly analysis and corrected the misuse of importing datetime as shown in the above example, but also started to play with the xlsxwriter module
</p>

 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-comment-delimiter"># </span> <span class="org-comment">-*- coding: utf-8 -*-
</span> <span class="org-comment-delimiter"># </span> <span class="org-comment">this collects the names and how many emails i received from them for the week
</span>
 <span class="org-keyword">import</span> win32com.client
 <span class="org-keyword">from</span> collections  <span class="org-keyword">import</span> defaultdict
 <span class="org-keyword">import</span> datetime  <span class="org-keyword">as</span> dt
 <span class="org-keyword">from</span> datetime  <span class="org-keyword">import</span> datetime, date
 <span class="org-keyword">import</span> xlsxwriter

 <span class="org-variable-name">f</span>  <span class="org-operator">=</span>  <span class="org-builtin">open</span>( <span class="org-string">"test.org"</span>,  <span class="org-string">'w'</span>)

 <span class="org-comment-delimiter"># </span> <span class="org-comment">setup connection to outlook
</span> <span class="org-variable-name">outlook</span>  <span class="org-operator">=</span> win32com.client.Dispatch( <span class="org-string">"Outlook.Application"</span>).GetNamespace( <span class="org-string">"MAPI"</span>)
 <span class="org-variable-name">inbox</span>  <span class="org-operator">=</span> outlook.GetDefaultFolder(6)

 <span class="org-comment-delimiter"># </span> <span class="org-comment">setup xlsx file
</span> <span class="org-variable-name">workbook</span>  <span class="org-operator">=</span> xlsxwriter.Workbook( <span class="org-string">'outlook_data.xlsx'</span>)
 <span class="org-variable-name">worksheet</span>  <span class="org-operator">=</span> workbook.add_worksheet( <span class="org-string">'WK'</span> <span class="org-operator">+</span>date.today().strftime( <span class="org-string">'%V'</span>))

 <span class="org-comment-delimiter"># </span> <span class="org-comment">get inbox messages
</span> <span class="org-variable-name">messages</span>  <span class="org-operator">=</span> inbox.Items
 <span class="org-variable-name">message</span>  <span class="org-operator">=</span> inbox.Items.GetFirst()

 <span class="org-comment-delimiter"># </span> <span class="org-comment">get week number
</span> <span class="org-variable-name">counts</span>  <span class="org-operator">=</span> defaultdict( <span class="org-builtin">int</span>)
 <span class="org-variable-name">rw</span>  <span class="org-operator">=</span> 0

 <span class="org-comment-delimiter"># </span> <span class="org-comment">create header for file
</span>f.write( <span class="org-string">'%s%s%s%s%s%s'</span>  <span class="org-operator">%</span> ( <span class="org-string">'| '</span>,  <span class="org-string">'Mails received in week'</span>,  <span class="org-string">'| '</span> , date.today().strftime( <span class="org-string">'%V'</span>),  <span class="org-string">' |'</span>,  <span class="org-string">'</span> <span class="org-constant">\n</span> <span class="org-string">'</span>))

 <span class="org-comment-delimiter"># </span> <span class="org-comment">loop through all messages and check if received this week
</span> <span class="org-keyword">for</span> message  <span class="org-keyword">in</span> inbox.Items:
     <span class="org-variable-name">r</span>  <span class="org-operator">=</span> message.ReceivedTime.strftime( <span class="org-string">'%V'</span>)
     <span class="org-keyword">if</span> r  <span class="org-operator">==</span> date.today().strftime( <span class="org-string">'%V'</span>):
         <span class="org-variable-name">counts</span>[message.SenderName]  <span class="org-operator">+=</span>1

 <span class="org-keyword">for</span> key  <span class="org-keyword">in</span> (counts):
     <span class="org-builtin">print</span>( <span class="org-string">'|'</span>, key,  <span class="org-string">'|'</span>, counts[key],  <span class="org-string">'|'</span>)
    worksheet.write(rw, 0, key)
    worksheet.write(rw, 1, counts[key])
    f.write( <span class="org-string">'%s%s%s%s%s%s'</span>  <span class="org-operator">%</span> ( <span class="org-string">'|'</span>, key,  <span class="org-string">'|'</span>, counts[key],  <span class="org-string">'|'</span>,  <span class="org-string">'</span> <span class="org-constant">\n</span> <span class="org-string">'</span>))
     <span class="org-variable-name">rw</span>  <span class="org-operator">+=</span>1


f.close()
workbook.close()

</pre>
</div>
</div>]]></description>
  <link>https://leehalls.net/posts/./outlook_python.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./outlook_python.html</guid>
  <pubDate>Fri, 12 Jun 2020 08:00:00 +0100</pubDate>
</item>
<item>
  <title>emacs lisp &amp; yasnippet templates</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">emacs lisp & yasnippet templates</h1>
</header> <p>
On my home machines I keep a journal and used some fu to determine which machine the journal entry was written on. I also keep a daily log for work normally this consists of start time, mileage to be claimed so the snippet template resembles
</p>

 <pre class="example" id="orgbd34d0f">
# -*- mode: snippet -*-
# name: daily
# key: daily
# --
** `(format-time-string "%Y-%m-%d-%H:%m" (current-time))`
:PROPERTIES:
:LOCATION:
:MILEAGE:
:START: `(format-time-string "%H:%M" (current-time))`
:FINISH:
:END: 
</pre>


 <p>
At the start of everyday when i open up the laptop emacs is always there waiting and in the log for this year i type  <code>daily</code> hit tab and voila my entry for the day commences
</p>

 <pre class="example" id="org568e489">
** 2020-06-05-14:06
   :PROPERTIES:
   :LOCATION: 
   :MILEAGE:
   :START: 14:06
   :FINISH:
   :END: 
</pre>

 <p>
Location, mileage and end time are manually entered and normally i keep location as a set of abbreviations that match the mileage to claim this means using dynamic column view i can get a nice table of times/locations such as;
</p>

 <p>

</p>

 <table> <colgroup> <col class="org-right"></col> <col class="org-left"></col> <col class="org-right"></col> <col class="org-right"></col> <col class="org-right"></col> <col class="org-right"></col> <col class="org-left"></col></colgroup> <thead> <tr> <th scope="col" class="org-right">ITEM</th>
 <th scope="col" class="org-left">LOCATIONS</th>
 <th scope="col" class="org-right">START</th>
 <th scope="col" class="org-right">FINISH</th>
 <th scope="col" class="org-right">MILEAGE</th>
 <th scope="col" class="org-right">EXPENSE</th>
 <th scope="col" class="org-left">TAGS</th>
</tr></thead> <tbody> <tr> <td class="org-right">July 2018</td>
 <td class="org-left"> </td>
 <td class="org-right"> </td>
 <td class="org-right"> </td>
 <td class="org-right">745</td>
 <td class="org-right">207.03</td>
 <td class="org-left"> </td>
</tr> <tr> <td class="org-right">20180705</td>
 <td class="org-left"> </td>
 <td class="org-right">05:56</td>
 <td class="org-right">15:10</td>
 <td class="org-right"> </td>
 <td class="org-right">0.00</td>
 <td class="org-left">:clock <sub>anamoly</sub>:</td>
</tr> <tr> <td class="org-right">20180706</td>
 <td class="org-left"> </td>
 <td class="org-right">07:40</td>
 <td class="org-right">14:00</td>
 <td class="org-right"> </td>
 <td class="org-right">0.00</td>
 <td class="org-left"> </td>
</tr> <tr> <td class="org-right">20180709</td>
 <td class="org-left">MEA-WAR</td>
 <td class="org-right">10:25</td>
 <td class="org-right">17:00</td>
 <td class="org-right">90</td>
 <td class="org-right">0.00</td>
 <td class="org-left">:clock <sub>anamoly</sub>:travel:</td>
</tr> <tr> <td class="org-right">20180710</td>
 <td class="org-left">WAR</td>
 <td class="org-right">07:40</td>
 <td class="org-right">17:00</td>
 <td class="org-right"> </td>
 <td class="org-right">0.00</td>
 <td class="org-left">:travel:</td>
</tr> <tr> <td class="org-right">20180711</td>
 <td class="org-left">WAR</td>
 <td class="org-right">07:40</td>
 <td class="org-right">17:00</td>
 <td class="org-right"> </td>
 <td class="org-right">3.30</td>
 <td class="org-left">:travel:</td>
</tr> <tr> <td class="org-right">20180712</td>
 <td class="org-left">WAR-MEA</td>
 <td class="org-right">07:40</td>
 <td class="org-right">13:30</td>
 <td class="org-right">90</td>
 <td class="org-right">48.45</td>
 <td class="org-left">:travel:clock <sub>anamoly</sub>:</td>
</tr> <tr> <td class="org-right">20180713</td>
 <td class="org-left">MEA-TAM-MEA</td>
 <td class="org-right">07:45</td>
 <td class="org-right">14:00</td>
 <td class="org-right">25</td>
 <td class="org-right">0.00</td>
 <td class="org-left"> </td>
</tr> <tr> <td class="org-right">20180716</td>
 <td class="org-left">MEA-BHX-PARIS</td>
 <td class="org-right">05:00</td>
 <td class="org-right">20:00</td>
 <td class="org-right">25</td>
 <td class="org-right">29.00</td>
 <td class="org-left">:travel:clock <sub>anamoly</sub>:</td>
</tr> <tr> <td class="org-right">20180717</td>
 <td class="org-left">PARIS</td>
 <td class="org-right">08:30</td>
 <td class="org-right">18:30</td>
 <td class="org-right"> </td>
 <td class="org-right">0.00</td>
 <td class="org-left">:travel:clock <sub>anamoly</sub>:</td>
</tr> <tr> <td class="org-right">20180718</td>
 <td class="org-left">PARIS-BHX-MEA</td>
 <td class="org-right">08:30</td>
 <td class="org-right">00:00</td>
 <td class="org-right">25</td>
 <td class="org-right">0.00</td>
 <td class="org-left">:travel:clock <sub>anamoly</sub>:</td>
</tr></tbody></table> <p>
This then at the top of the file gets rendered into a smaller dynamic table so i can see cumulative mileage by month
</p>

 <table> <colgroup> <col class="org-left"></col> <col class="org-left"></col> <col class="org-left"></col> <col class="org-left"></col> <col class="org-right"></col> <col class="org-left"></col></colgroup> <thead> <tr> <th scope="col" class="org-left">ITEM</th>
 <th scope="col" class="org-left">LOCATIONS</th>
 <th scope="col" class="org-left">START</th>
 <th scope="col" class="org-left">FINISH</th>
 <th scope="col" class="org-right">MILEAGE</th>
 <th scope="col" class="org-left">TAGS</th>
</tr></thead> <tbody> <tr> <td class="org-left">April 2018</td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-right">400</td>
 <td class="org-left"> </td>
</tr> <tr> <td class="org-left">May 2018</td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-right">689</td>
 <td class="org-left"> </td>
</tr> <tr> <td class="org-left">June 2018</td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-right">682</td>
 <td class="org-left"> </td>
</tr> <tr> <td class="org-left">July 2018</td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-right">745</td>
 <td class="org-left"> </td>
</tr> <tr> <td class="org-left">August 2018</td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-left"> </td>
 <td class="org-right">155</td>
 <td class="org-left"> </td>
</tr></tbody></table> <p>
now i'm working from home due to COVID i got tired of typing "home" everytime but i know there will be site & supplier visits coming up so i didnt want to alter the template and just add the text "home" so back to the point of this post which was to use a bit of emacs-lisp fu to get the snippet template to auto update location but how?
</p>

 <p>
After a little thinking i came to the conclusion the easiest way would be to identify the network address the laptop is currently on, now admittedly this falls down if by some miracle everywhere i go has the same  <code>192.168.1</code> start for IP address but i'll test that when on the road. I started by reading up on network commands via
</p>

 <p>
 <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Misc-Network.html">https://www.gnu.org/software/emacs/manual/html_node/elisp/Misc-Network.html</a>
</p>

 <p>
i then searched and found  <a href="https://emacs.stackexchange.com/questions/7653/elisp-code-to-check-for-internet-connection">https://emacs.stackexchange.com/questions/7653/elisp-code-to-check-for-internet-connection</a> and this was discussing auto updating packages if the connection was alive.
</p>

 <p>
A bit of playing around i could see  <code>network-interface-list</code> contained the info i wanted 
</p>

 <div class="org-src-container">
 <pre class="src src-elisp">(print (network-interface-list))

#+RESULTS:
: ((lo0 . [127 0 0 1 0]) (lo0 . [0 0 0 0 0 0 0 1 0]) (eth1 . [169 254 195 98 0]) (eth1 . [65152 0 0 0 2226 39545 32787 50018 0]) (wlan2 . [169 254 127 144 0]) (wlan2 . [65152 0 0 0 20906 64385 58821 32656 0]) (wlan1 . [169 254 218 84 0]) (wlan1 . [65152 0 0 0 12504 37352 2860 55892 0]) (wlan0 . [169 254 231 54 0]) (wlan0 . [65152 0 0 0 41016 7035 59478 59190 0]) (eth0 . [192 168 1 14 0]) (eth0 . [65152 0 0 0 4387 56520 32424 30320 0]))
</pre>
</div>

 <p>
but then reading the first site also gave me  <code>network-interface-info</code> so specifying the wireless network or in this case ethernet ( <i>i'm writing this on my main m\c</i>) gives
</p>

 <div class="org-src-container">
 <pre class="src src-elisp">(print (network-interface-info  <span class="org-string">"eth0"</span>))

#+RESULTS:
: ([192 168 1 14 0] [192 168 1 255 0] [255 255 255 0 0] (1 . [244 77 48 24 93 135]) (dynamic running multicast broadcast up))
</pre>
</div>

 <p>
ok so i have the data what next? a little trial and error follows;
</p>

 <div class="org-src-container">
 <pre class="src src-emacs-lisp">(print (network-interface-info  <span class="org-string">"wlan0"</span>))
( <span class="org-keyword">setq</span> x (nth 0 (network-interface-info  <span class="org-string">"wlan0"</span>)))
(print x)
(format  <span class="org-string">"%s"</span> x)
( <span class="org-keyword">if</span> (string-match-p  <span class="org-string">"192 168 1"</span> (format  <span class="org-string">"%s"</span> x))
 <span class="org-string">"home"</span>
 <span class="org-string">"work"</span>)
</pre>
</div>

 <pre class="example">
home
</pre>


 <p>
there's a lot wrong with the above and i've learned a bit more however given i start with  <b>zero</b> emacs-lisp fu i think i can be spared a little leeway however it does ultimately work and can be pared down to the following;
</p>

 <div class="org-src-container">
 <pre class="src src-emacs-lisp">( <span class="org-keyword">if</span> (string-match-p  <span class="org-string">"192 168 1"</span> (format  <span class="org-string">"%s"</span> (network-interface-info  <span class="org-string">"wlan0"</span>)))
 <span class="org-string">"home"</span>
 <span class="org-string">"work"</span>)
</pre>
</div>

 <pre class="example">
home
</pre>


 <p>
All that needs to happen now is for the code to be incorporated into the snippet;
</p>

 <pre class="example" id="org73459f1">
# -*- mode: snippet -*-
# name: daily
# key: daily
# --
** `(format-time-string "%Y-%m-%d-%H:%m" (current-time))`

:PROPERTIES:
`(if (string-match-p "192 168 1" (format "%s" (network-interface-info "wlan0")))
":LOCATION: HOME"
":LOCATION: ")`
:MILEAGE:
:START: `(format-time-string "%H:%M" (current-time))`
:FINISH:
:END:
</pre>

 <p>
Basically an hour of research and testing to save me what? 20s per day? thats going to be a long ROI before it pays off but i like learning and how knows what else may now be automated now that i have a little more fu.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./emacslisp_yasnippet.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./emacslisp_yasnippet.html</guid>
  <pubDate>Fri, 05 Jun 2020 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Website security</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Website security</h1>
</header> <p>
This site already uses HTTPS and SSL but whilst wandering aimlessly through some tech sites i stumbled upon reference to Mozilla's  <a href="https://observatory.mozilla.org/">Observatory</a>  which states;
</p>

 <blockquote>
 <p>
The Mozilla Observatory has helped over 170,000 websites by teaching developers, system administrators, and security professionals how to configure their sites safely and securely.
</p>
</blockquote>

 <p>
Essentially it scans your site for security issues and gives you a report,  <i>hey i thought lets try it</i> so i did and i got an  <b>F</b>  🫨 😥 💩
</p>


 <figure id="orgebd8d39"> <img src="../images/moz_obs_f.png" alt="moz_obs_f.png"></img></figure> <p>
 <b>Ouch</b> that was not what i expected. The report goes into detail on what was wrong and my failures were;
</p>

 <table> <colgroup> <col class="org-left"></col> <col class="org-left"></col> <col class="org-right"></col> <col class="org-left"></col></colgroup> <thead> <tr> <th scope="col" class="org-left">Test</th>
 <th scope="col" class="org-left">Pass</th>
 <th scope="col" class="org-right">Score</th>
 <th scope="col" class="org-left">Reason</th>
</tr></thead> <tbody> <tr> <td class="org-left">Content security policy</td>
 <td class="org-left">:x:</td>
 <td class="org-right">-25</td>
 <td class="org-left">Content security policy (CSP) header not implemented</td>
</tr> <tr> <td class="org-left">HTTPS strict transport security</td>
 <td class="org-left">:x:</td>
 <td class="org-right">-20</td>
 <td class="org-left">HTTP Strict Transport Security (HSTS) header not implemented</td>
</tr> <tr> <td class="org-left">X-Content-Type-Otions</td>
 <td class="org-left">:x:</td>
 <td class="org-right">-5</td>
 <td class="org-left">X-Content-Type-Options header not implemented</td>
</tr> <tr> <td class="org-left">X-Frame-Options</td>
 <td class="org-left">:x:</td>
 <td class="org-right">-20</td>
 <td class="org-left">X-Frame-Options (XFO) header not implemented</td>
</tr> <tr> <td class="org-left">X-XSS-Protection</td>
 <td class="org-left">:x:</td>
 <td class="org-right">-10</td>
 <td class="org-left">X-XSS-Protection header not implemented</td>
</tr></tbody></table> <p>
The games begin! starting with an epic trawl through documentation and sites on how to improve, during this i stumbled upon three that proved useful, written in a language i understood. Firstly Joseph Earl's post on how to  <a href="https://www.josephearl.co.uk/post/static-sites-netlify-security/">improve netlify static site security</a> and secondly Philipp Häfelfinger's post on  <a href="https://haefelfinger.ch/posts/2019/2019-11-12-Migrate-from-jekyll-to-hugo/">migrating from jekyll to hugo</a>
</p>

 <p>
Both proved interesting but on Phillip's he has a section on HTTP headers and using a  <code>.htaccess</code> file to improve security. In the interests of full disclosure i copied the lines except the last two re CSP pasted here for completeness;
</p>

 <pre class="example" id="org72b1cc5">
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header always set X-Content-Type-Options nosniff
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-Xss-Protection "1; mode=block;"
Header always set Referrer-Policy "strict-origin"
</pre>

 <p>
With the above added to a  <code>.htaccess</code> file store this in the static folder such that when hugo is run it copies this to the root of your  <code>public_html</code> folder, re-running the mozilla test now gets me 
</p>

 <p>
 <img src="../images/moz_obs_b.png" alt="moz_obs_b.png"></img>
Much better but still not enough, adding the last two lines from Philipp's post but modified for this site;
</p>

 <pre class="example" id="org4097cbd">
Header always set Content-Security-Policy "default-src 'self' https://leehalls.net https://*.leehalls.net https:; script-src 'self' https://leehalls.net https://*.leehalls.net; style-src 'self' 'unsafe-inline' https://leehalls.net https://*.leehalls.net; img-src 'self' https://leehalls.net https://*.leehalls.net; object-src 'self'; script-src 'self' https://leehalls.net https://*.leehalls.net; require-sri-for style;"
Header always set Access-Control-Allow-Origin "https://leehalls.net"
</pre>


 <p>
Gets me a more detailed report and a score of  <b>B+</b> so not quite what i anticipated given what i had read and it seems the reason is  <i>"Content Security Policy (CSP) implemented unsafely. This includes 'unsafe-inline' or data: inside script-src, overly broad sources such as https: inside object-src or script-src, or not restricting the sources for object-src or script-src."</i>
</p>

 <p>
Obviously a little knowledge is dangerous :weary: more searching and trying to understand what i was doing led me to the third site, the actual Content Security Policy website  <a href="https://content-security-policy.com/">https://content-security-policy.com/</a>
</p>

 <p>
Here it suggested that  <code>default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self'; style-src 'self';base-uri 'self';form-action 'self'</code> is a good starting point for many sites, so i used that instead of the modified code and now my  <code>.htaccess</code> file looks like;
</p>

 <pre class="example" id="orgc99e613">
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header always set X-Content-Type-Options nosniff
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-XSS-Protection "1; mode=block"
Header always set Referrer-Policy "strict-origin"
Header always set Content-Security-Policy "default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self'; style-src 'self';base-uri 'self';form-action 'self';  require-sri-for style;"
Header always set Access-Control-Allow-Origin "https://leehalls.net"
</pre>

 <p>
Running the Observatory report again and i get . . . . 
</p>


 <figure id="org43a6fc4"> <img src="../images/moz_obs_a+.png" alt="moz_obs_a+.png"></img></figure> <p>
I'd say that deserves a 🍺 however I have an A+ rating but when refreshing the site it appears odd, things are not working the way they should a little bit of testing and i needed to add to the  <code>style-src</code> section the following as per Philipp's example ~ style-src 'self' 'unsafe-inline'~ and everything  <i> <b>seems</b></i> to be working ok i just get a recommendation now from the report which states 
</p>

 <blockquote>
 <p>
Almost there!
</p>

 <p>
Your current CSP policy allows the use of 'unsafe-inline' inside of style-src. Moving style attributes into external stylesheets not only makes you safer, but also makes your code easier to maintain.
</p>
</blockquote>

 <p>
So that gives me two red crosses with the second being for   <code>Clickjacking protection, using frame-ancestors</code> still some work to do and i also want to understand why my modification of Phillip's example failed to gain the same A+ rating and there are other things i do not understand & so my dear Watson the game continues!
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./website_security.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./website_security.html</guid>
  <pubDate>Sat, 30 May 2020 08:00:00 +0100</pubDate>
</item>
<item>
  <title>HTML/CSS Agenda for emacs batch output</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">HTML/CSS Agenda for emacs batch output</h1>
</header> <div class="note" id="orgd39e50b">
 <p>

</p>

 <p>
,*UPDATE  <span class="timestamp-wrapper"> <span class="timestamp">[2021-01-03 Sun 13:30]</span></span>*
</p>

 <p>
After posting a reply on reddit to request for help on emacs batch mode and the agenda i realised when i migrated from the pi based server to the macmini replacement i had not re-setup batch mode myself, so following my own advice below i recreated the dotemacs added in the css export from a good working installation, altered the org-super-agenda as described  <a href="../../../leehalls_todayilearned/content_org/all_posts.html#ID-e675bbfa-9aac-4468-bb1c-cb13a015bb08">here</a> and typed in the magic code:
</p>

 <p>
 <code>/usr/local/bin/emacs -Q -batch -l ~/.emacs -eval '(org-batch-store-agenda-views)'</code>
</p>

 <p>
emacs booted up, org-super-agenda began its magic but when viewing the resulting HTML page it was blank. Checking the source shows the agenda, so its exported correctly and in the super-agenda mode but there is something wrong with how the CSS is interpreted, removing the  <code>(setq org-agenda-export-html-style</code> code and the agenda is shown but in the old  <i>plain</i> format.
</p>

 <p>
So for now the following can be ignored. Pretty bad when your own notes let you down :-O
</p>

</div>

 <hr></hr> <p>
 <i>BELOW NOT QUITE ACCURATE!</i>
</p>
 <hr></hr> <p>
Success whhooo … seems sunshine might be good for the brain as i finally have an agenda created in batch mode that renders in a modified gruvbox format (i tweaked the gruvbox el file to my liking). The steps needed;
</p>

 <p>
In your working emacs use  <code>C-a</code> and bring up your formatted agenda and then whilst the focus is on the agenda  <code>M-x</code> and  <code>org-export-htmlize-generate-css</code> this will generate a css file containing all the formatting used, note a lot of it you might not need. Now we have the CSS file we need to add the contents to our dotemacs file.
</p>

 <p>
If you open the file it may start like;
</p>

 <div class="org-src-container">
 <pre class="src src-css"><style type= <span class="org-string">"text/css"</span>>
    <!--
       <span class="org-css-selector">body</span> {
         <span class="org-css-property">color</span>:  <span class="custom-3">#fdf4c1</span>;
         <span class="org-css-property">background-color</span>:  <span class="custom-2">#1d2021</span>;
      }
       <span class="org-css-selector">.org-border</span> {
      }
       <span class="org-css-selector">.org-browse-url-button</span> {
         <span class="org-comment-delimiter">/* </span> <span class="org-comment">browse-url-button</span> <span class="org-comment-delimiter"> */</span>
         <span class="org-css-property">color</span>:  <span class="custom-1">#458588</span>;
         <span class="org-css-property">text-decoration</span>: underline;
      }
       <span class="org-css-selector">.org-buffer-menu-buffer</span> {
         <span class="org-comment-delimiter">/* </span> <span class="org-comment">buffer-menu-buffer</span> <span class="org-comment-delimiter"> */</span>
         <span class="org-css-property">font-weight</span>: bold;
      }
       <span class="org-css-selector">.org-builtin</span> {
         <span class="org-comment-delimiter">/* </span> <span class="org-comment">font-lock-builtin-face</span> <span class="org-comment-delimiter"> */</span>
         <span class="org-css-property">color</span>:  <span class="custom">#fe8019</span>;
      }
</pre>
</div>

 <p>
However we cannot just copy/paste into our dotemacs  <i>oh no</i>, i'm learning there are always some detours or hurdles to take. The bit we are interested in is everything from  <code>body {</code> downwards and not the initial  <code><style type</code> stuff.
</p>

 <p>
So open up the dotemacs file and type 
</p>

 <div class="org-src-container">
 <pre class="src src-elisp">( <span class="org-keyword">setq</span> org-agenda-export-html-style
 <span class="org-string">"<style>

<---- paste the copied code here --->

</style>"</span>
</pre>
</div>

 <p>
What you should see (shortened form shown) is something like;
</p>

 <div class="org-src-container">
 <pre class="src src-elisp">( <span class="org-keyword">setq</span> org-agenda-export-html-style
 <span class="org-string">"<style>
      body {
        color: #fdf4c1;
        background-color: #1d2021;
      }
      .org-border {
      }
      .org-browse-url-button {
        /* browse-url-button */
        color: #458588;
        text-decoration: underline;
      }
      a:hover {
        text-decoration: underline;
      }
</style>"</span>

)
</pre>
</div>

 <p>
Now when running the command  <code>/usr/local/bin/emacs -Q -batch -l ~/.emacs -eval '(org-batch-store-agenda-views)'</code> emacs should output your agenda in  <b>gloriously</b> formatted HTML.
</p>

 <p>
Good luck!
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./emacs_batch.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./emacs_batch.html</guid>
  <pubDate>Fri, 29 May 2020 08:00:00 +0100</pubDate>
</item>
<item>
  <title>batch agenda output via html</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">batch agenda output via html</h1>
</header> <p>
Success! Previously I mentioned difficulty in getting the agenda output using the command line in HTML form however now after a bit of baking in today's glorious sunshine i figured it out. As normal i'd overlooked the obvious and discounted all the info i had reviewed.
</p>

 <p>
My old command looks like
</p>

 <p>
 <code>/usr/local/bin/emacs -Q --batch --load ~/.emacs --eval='(org-batch-agenda "c" org-agenda-files (quote ("/srv/dev-disk-by-id-usb-Seagate_Portable_NAA570VH-0-0-part1/drakx/orgfiles/")) org-agenda-span (quote week))' > /srv/dev-disk-by-id-usb-Seagate_Portable_NAA570VH-0-0-part1/drakx/orgfiles/agenda.txt</code>
</p>

 <p>
and this is entered into the scheduled job section of the OMV server setup;
</p>

 <p>
 <img src="../images/omv_cron_agenda.png" alt="omv_cron_agenda.png"></img>
It works very well but lacked the formatting of an HTML output, now the new command looks like;
</p>

 <p>
 <code>/usr/local/bin/emacs -Q -batch -l ~/.emacs -eval '(org-batch-store-agenda-views)'</code>
</p>

 <p>
and this does have HTML output  <b>however</b> it is not achievable without some modification of the org-super-agenda setup in the dotemacs file. As shown on many including the official site there are lines to show what output format we want, i just overlooked it.
</p>

 <p>
The following is a section from my dotemacs which shows the org-super-agenda setup for one command;
</p>

 <div class="org-src-container">
 <pre class="src src-elisp">'(( <span class="org-string">"c"</span>  <span class="org-string">"Super view"</span>
   ((agenda  <span class="org-string">""</span> ((org-agenda-overriding-header  <span class="org-string">""</span>)
                (org-super-agenda-groups
                 '(( <span class="org-builtin">:name</span>  <span class="org-string">""</span>
                           <span class="org-builtin">:time-grid</span> t
                           <span class="org-builtin">:date</span> today
                           <span class="org-builtin">:order</span> 1)))))
    (alltodo  <span class="org-string">""</span> ((org-agenda-overriding-header  <span class="org-string">""</span>)
                 (org-super-agenda-groups
                  '(( <span class="org-builtin">:log</span> t)
                    ( <span class="org-builtin">:name</span>  <span class="org-string">"family stuff"</span>
                            <span class="org-builtin">:discard</span> ( <span class="org-builtin">:deadline</span> future)
                            <span class="org-builtin">:tag</span>  <span class="org-string">"family"</span>
                            <span class="org-builtin">:order</span> 8)
                    ( <span class="org-builtin">:name</span>  <span class="org-string">"house stuff"</span>
                            <span class="org-builtin">:discard</span> ( <span class="org-builtin">:deadline</span> future)
                            <span class="org-builtin">:tag</span>  <span class="org-string">"house"</span>
                            <span class="org-builtin">:order</span> 8)
                    ( <span class="org-builtin">:name</span>  <span class="org-string">"tech stuff"</span>
                            <span class="org-builtin">:discard</span> ( <span class="org-builtin">:deadline</span> future)
                            <span class="org-builtin">:tag</span> ( <span class="org-string">"tech"</span>  <span class="org-string">"emacs"</span>)
                            <span class="org-builtin">:order</span> 1)

                    )))))
   nil
   ( <span class="org-string">"~/agenda.html"</span>)
   )
</pre>
</div>


 <p>
The critical part of this for batch processing is;
</p>

 <div class="org-src-container">
 <pre class="src src-elisp">nil
( <span class="org-string">"~/agenda.html"</span>)
</pre>
</div>

 <p>
This tells the batch command how to save and where to save the agenda when it runs from the commandline. At the moment there is no fancy CSS applied but you get basic CSS and this is because  <i>quoting: "when you run Emacs in batch mode, it has no display and therefore no colored faces, so that HTMLIZE will pick up simpler versions of the faces and use those."</i>  <sup> <a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup></p>

 <p>
Now a small modification of Tasker's scene to use a webview box instead of text and voila i now have a nicely formatted agenda on display on my phone.
</p>
 <div id="footnotes">
 <h2 class="footnotes">Footnotes: </h2>
 <div id="text-footnotes">

 <div class="footdef"> <sup> <a id="fn.1" class="footnum" href="#fnr.1" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"> <p class="footpara">
quote taken from the man himself on the org mailing list:  <a href="https://lists.gnu.org/archive/html/emacs-orgmode/2009-02/msg00321.html">https://lists.gnu.org/archive/html/emacs-orgmode/2009-02/msg00321.html</a> 
</p></div></div>


</div>
</div></div>]]></description>
  <link>https://leehalls.net/posts/./emacs_batchorgagenda.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./emacs_batchorgagenda.html</guid>
  <pubDate>Wed, 27 May 2020 08:00:00 +0100</pubDate>
</item>
<item>
  <title>orgmode, android and Tasker</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">orgmode, android and Tasker</h1>
</header> <nav id="table-of-contents" role="doc-toc"> <h2>Table of Contents</h2>
 <div id="text-table-of-contents" role="doc-toc">
 <ul> <li> <a href="#orgb4cd878">The capture scenes look like this;</a></li>
 <li> <a href="#org2f2047d">The task element</a></li>
 <li> <a href="#org7857c30">Finally if all goes well</a></li>
 <li> <a href="#org3e7bef7">The "read my agenda" scene</a></li>
 <li> <a href="#org0cc9bb4">XML for the main task above looks like;</a></li>
 <li> <a href="#org201212f">XML for the photocapture scene</a></li>
</ul></div>
</nav> <p>
Yes i know orgzly exists and whilst it is an excellent app it just doesn't feel  <i>right</i> or perhaps quick enough for me, I use it but only as a "refer to" method ie a viewer of pgp encrypted passwords or other entries and not as a capture/entry or agenda viewing system and yet because i wanted a way of quickly capturing tasks & sometimes tasks with photos I created several scenes in  <a href="https://tasker.joaoapps.com/">Tasker</a> which work for me, using these i have to simply click an icon and can have a task populated with the right orgmode format, date etc and ready to enter text. The capture scenes write to a  <code>staging_ground.org</code> file which is automagically sync'd via syncthing to my main machine and the agenda scene simply reads the cron-generated text output of the org agenda.
</p>

 <p>
One downside of this approach is that Tasker is no longer available without Google Play so for an alternative ROM you're pretty stuffed :anguished:
</p>

 <p>
from the  <a href="https://tasker.joaoapps.com/faq-ov.html#dh">FAQ</a> of Tasker
</p>

 <blockquote>
 <p>
Why is Tasker only sold via Play Store now ?
App prices have been driven so low that the only way to make any profit is to make an extremely large amount of sales.
</p>

 <p>
Any sales channel that has even a little bit of administrative overhead is therefore out of the question because of the formula
</p>

 <p>
large-number-of-sales x little-overhead = large-overhead
A small developer can't handle a large overhead.
</p>
</blockquote>
 <div id="outline-container-orgb4cd878" class="outline-2">
 <h2 id="orgb4cd878">The capture scenes look like this;</h2>
 <div class="outline-text-2" id="text-orgb4cd878">
 <p>
 <img src="../images/tasker_org_capture.jpg" alt="tasker_org_capture.jpg"></img>
After attempting to recreate the tasks/scenes on another phone i realise there is quite a bit to them which isnt immediately obvious for example placing the focus on the text edit box. Hence a re-write of this post to try and give more info.
</p>

 <p>
As with all programming it helps if you give the constructs meaningful names so that finding, using and understanding them in the future is easier ie the text edit box in the scene above would normally be called  <code>TextEdit1</code> but i've called it  <code>My_OrgTextEdit</code> 
</p>

 <p>
 <img src="../images/tasker_myorgtext_s.jpg" alt="tasker_myorgtext_s.jpg"></img>
if you've got lots of scenes or tasks it giving them useful names aids identifying what each one does plus note the CamelCase format this is to differentiate between global and local variables
</p>

 <blockquote>
 <p>
Global vs. Local Variables
Variables which have an all-lower-case name (e.g. %fruit <sub>bar</sub>) are local, meaning that their value is specific to the task or scene in which they are used.
</p>

 <p>
Variables which have one or more capital letters in their name (e.g. %Car, %WIFI) are global, meaning that wherever they are accessed from the same value is returned.
</p>

 <p>
REF:  <a href="https://tasker.joaoapps.com/userguide/en/variables.html">https://tasker.joaoapps.com/userguide/en/variables.html</a>
</p>
</blockquote>

 <p>
Once you've created a scene as above ( <i>two buttons, 1 label and 1 textedit box</i>) you need the textedit box to have the focus. You can do this by long pressing on the actual box to reveal another menu, from this choose focus and you'll see the box will now have a star inside it eg
</p>

 <p>
 <img src="../images/tasker_focus_s.jpg" alt="tasker_focus_s.jpg"></img>
The next thing we need to do with the textedit box is to set a task within it, a short tap on the textedit element opens up its settings screen and here we can set fonts, colours and text changed;
</p>

 <p>
 <img src="../images/tasker_txtchanged_s.jpg" alt="tasker_txtchanged_s.jpg"></img>
Tasker recognises when the content has changed and because of the task above stores the result in the variable  <code>My_OrgTxt</code> a full example is;
</p>

 <p>
 <img src="../images/tasker_txtchanged1_s.jpg" alt="tasker_txtchanged1_s.jpg"></img>
Finally for the scene we need a cancel and an ok/accept button, as before a short tap on the button element brings up the settings screen and we create a task this time under the  <code>tap</code> function
</p>

 <p>
 <img src="../images/tasker_writefile.jpg" alt="tasker_writefile.jpg"></img>
For the cancel button we simply have the task to destroy the scene if using text entry but if capturing a photo then we want the button to actually delete the unused photo and not litter.
</p>
</div>
</div>
 <div id="outline-container-org2f2047d" class="outline-2">
 <h2 id="org2f2047d">The task element</h2>
 <div class="outline-text-2" id="text-org2f2047d">
 <p>
The capture scenes do nothing without the main task which is made up of multiple steps my photo capture task is the more complex and if you can replicate this then capturing simple text is a lot easier;
</p>

 <p>
 <img src="../images/tasker_orgtask.jpg" alt="tasker_orgtask.jpg"></img>
Essentially this group of actions in the task perform the following
</p>

 <table class="zebra-striping sane-table"> <colgroup> <col class="org-left"></col> <col class="org-left"></col></colgroup> <thead> <tr> <th scope="col" class="org-left">#</th>
 <th scope="col" class="org-left">Description</th>
</tr></thead> <tbody> <tr> <td class="org-left">1</td>
 <td class="org-left">Tasker opens the camera app and within 3s or so snaps a photo and saves it with the filename we defined</td>
</tr> <tr> <td class="org-left">2</td>
 <td class="org-left">We set our own variable to the Tasker internal one which contains the filesystem path of the last photo taken</td>
</tr> <tr> <td class="org-left">3</td>
 <td class="org-left">Split the variable and save just the filename part</td>
</tr> <tr> <td class="org-left">4</td>
 <td class="org-left">Move this file into our org folder</td>
</tr> <tr> <td class="org-left">5</td>
 <td class="org-left">Show the capture scene</td>
</tr> <tr> <td class="org-left">6</td>
 <td class="org-left">Set the clipboard to our standard orgmode TODO format with the file details already in</td>
</tr> <tr> <td class="org-left">7</td>
 <td class="org-left">Launch another of the Tasker apps (autoinput) to paste the clipboard into the scene</td>
</tr></tbody></table> <p>
Most of the above is straight forwards,  <b>#7</b> the autoinput element needs a little more explanation, define the action as normal from the Tasker options and then from the autoinput config menu ensure that the  <code>Type:</code> is set to focus and  <code>Action:</code> to paste as below;
</p>

 <p>
 <img src="../images/tasker_autoinput1.jpg" alt="tasker_autoinput1.jpg"></img>
The eagle eyed will see one other line which states  <code>Is Tasker Action: true</code> this is necessary otherwise the autoinput  <i>task</i> will fail, you can set this option by scrolling to the bottom of the autoinput configuration screen and choosing advanced
</p>


 <figure id="orga5c70eb"> <img src="../images/tasker_autoinput1.jpg" alt="tasker_autoinput1.jpg"></img></figure></div>
</div>
 <div id="outline-container-org7857c30" class="outline-2">
 <h2 id="org7857c30">Finally if all goes well</h2>
 <div class="outline-text-2" id="text-org7857c30">
 <p>
So once all that is complete we end up with a scene with auto-populated text waiting for more input;
</p>

 <p>
 <img src="../images/example_task.jpg" alt="example_task.jpg"></img>
Type away and pressing the green accept button and within a few seconds the magic of syncthing whirs away in the background, refresh the emacs org agenda and voila.
</p>

 <p>
 <img src="../images/staginggnd_org.png" alt="staginggnd_org.png"></img>
Opening the task allows me to see any notes i've added and of course the photo to go with it.
</p>
</div>
</div>
 <div id="outline-container-org3e7bef7" class="outline-2">
 <h2 id="org3e7bef7">The "read my agenda" scene</h2>
 <div class="outline-text-2" id="text-org3e7bef7">
 <p>
The "read my agenda" scene is much simpler the task reads in the text file and stores the contents in a variable before launching the agenda scene
</p>

 <p>
 <img src="../images/tasker_readagenda.jpg" alt="tasker_readagenda.jpg"></img>
Whilst the scene has a textbox which reads the variable and prints
</p>

 <p>
 <img src="../images/tasker_agendascenetask.jpg" alt="tasker_agendascenetask.jpg"></img>
Finally the agenda looks like;
</p>

 <p>
 <img src="../images/tasker_agendascene.jpg" alt="tasker_agendascene.jpg"></img>
Each of the above has an icon on my Android home screen so with one tap i can create a photonote in an org file or read my agenda in true orgmode output. HTML would be better, the agenda looks better  <del>but i was not yet able to get HTML output working via a cronjob and using org-super-agenda.</del>  <b>2020-05-27 now working see footnote >  <sup> <a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup></b>
</p>
</div>
</div>
 <div id="outline-container-org0cc9bb4" class="outline-2">
 <h2 id="org0cc9bb4">XML for the main task above looks like;</h2>
 <div class="outline-text-2" id="text-org0cc9bb4">
 <div class="org-src-container">
 <pre class="src src-xml"> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">TaskerData</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">""</span>  <span class="org-nxml-attribute-local-name">dvi</span>= <span class="org-string">"1"</span>  <span class="org-nxml-attribute-local-name">tv</span>= <span class="org-string">"5.9.2"</span> <span class="org-nxml-tag-delimiter">></span>
         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Task</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"task4"</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">cdate</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1586619219286</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">cdate</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">edate</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1590482529265</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">edate</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">id</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">4</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">id</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">nme</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">My_OrgPhoto</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">nme</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">pri</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">7</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">pri</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Action</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"act0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"7"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">101</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">PT-%DATE-%TIME</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg4"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg5"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1280x720</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg6"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg7"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg8"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"1"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg9"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Action</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Action</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"act1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"7"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">547</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">%My_OrgPhoto</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">%FOTO</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg4"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg5"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Action</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Action</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"act2"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"7"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">590</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">%My_OrgPhoto</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">/</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Action</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Action</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"act3"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"7"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">400</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">%My_OrgPhoto</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">orgFiles/staging_img</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Action</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Action</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"act4"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"7"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">47</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">My_OrgPhoto_s</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"100"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"100"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg4"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg5"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"1"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg6"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"1"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg7"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"1"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Action</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Action</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"act5"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"7"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">105</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">* TODO %DATE-%TIME - PHOTONOTE
[[file:staging_img/%My_OrgPhoto3]]</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Action</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Action</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"act6"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"7"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1732635924</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Bundle</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Vals</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"val"</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">ActionId</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">null</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">ActionId</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">ActionId-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">ActionId-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">ActionType</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">32768</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">ActionType</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">ActionType-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">ActionType-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">EnableDisableAccessibilityService</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">null</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">EnableDisableAccessibilityService</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">EnableDisableAccessibilityService-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">EnableDisableAccessibilityService-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">FieldSelectionType</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">2</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">FieldSelectionType</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">FieldSelectionType-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">FieldSelectionType-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">IsFirstAction</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">false</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">IsFirstAction</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">IsFirstAction-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.Boolean</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">IsFirstAction-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">IsTaskerAction</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">true</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">IsTaskerAction</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">IsTaskerAction-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.Boolean</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">IsTaskerAction-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">NearbyText</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">null</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">NearbyText</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">NearbyText-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">NearbyText-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Password</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">null</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Password</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Password-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Password-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">RepeatInterval</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">null</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">RepeatInterval</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">RepeatInterval-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">RepeatInterval-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">RepeatTimes</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">null</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">RepeatTimes</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">RepeatTimes-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">RepeatTimes-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">StoredAction</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">null</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">StoredAction</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">StoredAction-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">StoredAction-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">TextToWrite</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">null</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">TextToWrite</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">TextToWrite-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">TextToWrite-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">com.twofortyfouram.locale.intent.extra.BLURB</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">Type: Focus
Action : Paste
Is Tasker Action: true</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">com.twofortyfouram.locale.intent.extra.BLURB</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">com.twofortyfouram.locale.intent.extra.BLURB-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">com.twofortyfouram.locale.intent.extra.BLURB-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.RELEVANT_VARIABLES</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">StringArray sr=""</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">%err
Error Code
Only available if you select </span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">amp</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">lt;b</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">amp</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">gt;Continue Task After Error</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">amp</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">lt;/b</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">amp</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">gt; and the action ends in error</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">%errmsg
Error Message
Only available if you select </span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">amp</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">lt;b</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">amp</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">gt;Continue Task After Error</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">amp</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">lt;/b</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">amp</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">gt; and the action ends in error</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">/_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;&</span> <span class="org-nxml-entity-ref-name">lt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-text">/StringArray</span> <span class="org-nxml-entity-ref-delimiter">&</span> <span class="org-nxml-entity-ref-name">gt</span> <span class="org-nxml-entity-ref-delimiter">;</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.RELEVANT_VARIABLES</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.RELEVANT_VARIABLES-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">[Ljava.lang.String;</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.RELEVANT_VARIABLES-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">FieldSelectionType ActionType plugininstanceid plugintypeid </span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.subbundled</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">true</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.subbundled</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.subbundled-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.Boolean</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">net.dinglisch.android.tasker.subbundled-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">plugininstanceid</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">931c2a84-a888-45e8-a2e3-8a19eff825e6</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">plugininstanceid</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">plugininstanceid-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">plugininstanceid-type</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">plugintypeid</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">com.joaomgcd.autoinput.intent.IntentPerformAction</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">plugintypeid</span> <span class="org-nxml-tag-delimiter">></span>
                                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">plugintypeid-type</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">java.lang.String</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">plugintypeid-type</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Vals</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Bundle</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">com.joaomgcd.autoinput</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">com.joaomgcd.autoinput.activity.ActivityConfigPerformAction</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"23"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Action</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Img</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"icn"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"2"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">nme</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">camera</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">nme</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">pkg</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">net.dinglisch.android.ipack.bluewhitepearlhd</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">pkg</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Img</span> <span class="org-nxml-tag-delimiter">></span>
         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Task</span> <span class="org-nxml-tag-delimiter">></span>
 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">TaskerData</span> <span class="org-nxml-tag-delimiter">></span>

</pre>
</div>
</div>
</div>
 <div id="outline-container-org201212f" class="outline-2">
 <h2 id="org201212f">XML for the photocapture scene</h2>
 <div class="outline-text-2" id="text-org201212f">
 <div class="org-src-container">
 <pre class="src src-xml"> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">TaskerData</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">""</span>  <span class="org-nxml-attribute-local-name">dvi</span>= <span class="org-string">"1"</span>  <span class="org-nxml-attribute-local-name">tv</span>= <span class="org-string">"5.9.2"</span> <span class="org-nxml-tag-delimiter">></span>
         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">dmetric</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1440.0,2792.0</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">dmetric</span> <span class="org-nxml-tag-delimiter">></span>
         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Scene</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"sceneMy_OrgPhoto_s"</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">cdate</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1586846659080</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">cdate</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">edate</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1590482654993</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">edate</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">gridSize</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">30</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">gridSize</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">heightLand</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">-1</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">heightLand</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">heightPort</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">2086</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">heightPort</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">nme</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">My_OrgPhoto_s</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">nme</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">widthLand</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">-1</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">widthLand</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">widthPort</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1241</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">widthPort</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">EditTextElement</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"elements0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">12</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">32,186,1182,1284,35,1225,1290,977</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">valueselectedTask</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">55</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">valueselectedTask</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">TextEdit1</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"14"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"100"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg4"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">#FF00FF00</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg5"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg6"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"5"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg7"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg8"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"1000"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">RectElement</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"background"</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">4</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">-1,-1,-1,-1,-1,-1,-1,-1</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">#FF000000</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg4"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"1"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg5"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">#FF000000</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg6"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg7"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">RectElement</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">EditTextElement</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">ButtonElement</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"elements1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">clickTask</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">57</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">clickTask</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">4</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1021,25,192,160,472,745,434,775</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">Button1</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"8"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"100"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg4"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">#FF000000</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg5"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg6"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Img</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg7"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"2"</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">nme</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">cuteball_go</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">nme</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">pkg</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">net.dinglisch.android.ipack.ilikebuttonshd</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">pkg</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Img</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">ButtonElement</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">ButtonElement</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"elements2"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">clickTask</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">58</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">clickTask</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">4</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">32,25,186,160,35,1429,205,175</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">Button2</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"16"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"100"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg4"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">#FF000000</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg5"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg6"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Img</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg7"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"2"</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">nme</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">aqua_shutdown</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">nme</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">pkg</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">net.dinglisch.android.ipack.ilikebuttonshd</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">pkg</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Img</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">ButtonElement</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">TextElement</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"elements3"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">4</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">298,25,620,173,327,1429,677,190</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">Text1</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">ORG PHOTO CAPTURE</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"14"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"100"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg4"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">#FF3EFF00</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg5"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg6"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg7"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg8"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">RectElement</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"background"</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">4</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">flags</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">-1,-1,-1,-1,-1,-1,-1,-1</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">geom</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">#8D000000</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg4"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg5"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">#FF000000</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg6"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg7"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">RectElement</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">TextElement</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">PropertiesElement</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"props"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"1"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">#33FFFFFF</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"0"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg4"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">Capture</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg5"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Img</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg6"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"2"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg7"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">PropertiesElement</span> <span class="org-nxml-tag-delimiter">></span>
         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Scene</span> <span class="org-nxml-tag-delimiter">></span>
         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Task</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"task55"</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">cdate</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1586900574760</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">cdate</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">edate</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1586900574760</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">edate</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">id</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">55</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">id</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">pri</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">102</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">pri</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Action</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"act0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"7"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">195</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">My_OrgPhoto_s</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">TextEdit1</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"2"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">%orgTXT</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Action</span> <span class="org-nxml-tag-delimiter">></span>
         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Task</span> <span class="org-nxml-tag-delimiter">></span>
         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Task</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"task57"</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">cdate</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1586846843950</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">cdate</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">edate</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1586846843950</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">edate</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">id</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">57</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">id</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">pri</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">102</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">pri</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Action</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"act0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"7"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">410</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">orgFiles/staging_gnd.org</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">%orgTXT</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg2"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"1"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Int</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg3"</span>  <span class="org-nxml-attribute-local-name">val</span>= <span class="org-string">"1"</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Action</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Action</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"act1"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"7"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">49</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">My_OrgPhoto_s</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Action</span> <span class="org-nxml-tag-delimiter">></span>
         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Task</span> <span class="org-nxml-tag-delimiter">></span>
         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Task</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"task58"</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">cdate</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1586900945194</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">cdate</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">edate</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">1586900945194</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">edate</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">id</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">58</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">id</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">pri</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">102</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">pri</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Action</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"act0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"7"</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">49</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">code</span> <span class="org-nxml-tag-delimiter">></span>
                         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-element-local-name">Str</span>  <span class="org-nxml-attribute-local-name">sr</span>= <span class="org-string">"arg0"</span>  <span class="org-nxml-attribute-local-name">ve</span>= <span class="org-string">"3"</span> <span class="org-nxml-tag-delimiter">></span> <span class="org-nxml-text">My_OrgPhoto_s</span> <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Str</span> <span class="org-nxml-tag-delimiter">></span>
                 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Action</span> <span class="org-nxml-tag-delimiter">></span>
         <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">Task</span> <span class="org-nxml-tag-delimiter">></span>
 <span class="org-nxml-tag-delimiter"><</span> <span class="org-nxml-tag-slash">/</span> <span class="org-nxml-element-local-name">TaskerData</span> <span class="org-nxml-tag-delimiter">></span>
</pre>
</div>
</div>
</div>
 <div id="footnotes">
 <h2 class="footnotes">Footnotes: </h2>
 <div id="text-footnotes">

 <div class="footdef"> <sup> <a id="fn.1" class="footnum" href="#fnr.1" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"> <p class="footpara">
new commandline using org-batch-store-agenda-views and a small mod to my dotemacs file code results in HTML output, 
</p></div></div>


</div>
</div></div>]]></description>
  <link>https://leehalls.net/posts/./android_taskerorg.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./android_taskerorg.html</guid>
  <pubDate>Sun, 24 May 2020 08:00:00 +0100</pubDate>
</item>
<item>
  <title>COVID19</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">COVID19</h1>
</header> <p>
Currently as of Thursday 21 May 2020 @ 16:09 there has been for the UK  <b>36,042 deaths</b> associated with the virus, 250,908 lab-confirmed cases and for the rest of the world inc UK data its 5,067,579 cases &  <b>332,711 deaths</b>  <sup> <a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup>. So its a very real threat and has had a significant impact not only on families but countries with some close to the brink of bankruptcy and being forced to chose letting people live in lockdown and to continue the disease control measures or sending them back to work and possibly die. Despite all this, for me personally, the enforced lockdown has been brilliant.
</p>

 <p>
Perhaps sadly in some peoples eyes I've had to make no changes to my personal life, there has been no loss nor sense of isolation. I've had time to work on my projects, the garden, the house, continue on my own journey of learning as well as become more self-reliant ie no dropbox, reduced google etc
</p>

 <p>
I've never been one for the social scene and am comfortable with the multitude of voices in my head for company so to be shut inside the confines of my home & garden was no trouble. OK i've not been furloughed the entire time and undertook several weeks of working from home supporting both the UK and European operations but with this there was no pressure associated with the smalltalk needed when present with people and definitely no time vs traffic pressure to meet the Victorian workhouse ethic of you must clock-on.
</p>

 <p>
When furloughed properly there was simply no pressure at all.
</p>

 <p>
I still woke before 0700 but the day was mine and there was no time constraints, no rolling of the normally loaded dice to see what the M42, A38 or M6 was going to be like on a journey to a factory, office or airport. I could react and change plans to suit the weather which has been for the most part magnificent. Even when officially working at home i was  <b>more productive</b> both personally and professionally but alas slowly like with the rest of Europe the UK is being forced into sending people back to work and my time is becoming shorter and in all honesty i'll miss it. I already see this as perhaps a trial of what retirement could be like should i be lucky enough to last that long and be healthy enough to enjoy it.
</p>

 <p>
COVID19 is possibly here to stay, whether we the general public ever get to understand the real reason for its existence with all the politics and conspiracy theories that surround us I'd say is doubtful, it sure isnt 5G but is it down to the human consumption of anything & everything living, wet markets, biological experimentation? who knows, there are lessons to be learnt though but will we?
</p>

 <p>
Its been an interesting "experiment" civilisation as we have come to it know teeters on a knife edge it's been proven by COVID that it doesnt take much for the veneer of civility to disappear and the true nature of the human beast to be shown or to point our economic frailty. It's perhaps a little ironic that in this time of idiocy with that lunatic Trump and our own Brexit what the world actually needs is more global cooperation not the closing of borders and the introversion of countries.
</p>

 <p>
Still with COVID i'm reminded of something i've long enjoyed listening to & reading -  <a href="https://www.gutenberg.org/files/36/36-h/36-h.htm">War of the Worlds</a>
</p>

 <blockquote>
 <p>
“Perhaps I am a man of exceptional moods. I do not know how far my experience is common. At times I suffer from the strangest sense of detachment from myself and the world about me; I seem to watch it all from the outside, from somewhere inconceivably remote, out of time, out of space, out of the stress and tragedy of it all.”
</p>
</blockquote>

 <p>
and perhaps there is hope
</p>

 <blockquote>
 <p>
These germs of disease have taken toll of humanity since the beginning of things–taken toll of our prehuman ancestors since life began here. But by virtue of this natural selection of our kind we have developed resisting power; to no germs do we succumb without a struggle
</p>
</blockquote>

 <p>
For those whom lockdown has been a painful experience
</p>

 <blockquote>
 <p>
The day seemed, by contrast with my recent confinement, dazzlingly bright, the sky a glowing blue. A gentle breeze kept the red weed that covered every scrap of unoccupied ground gently swaying. And oh! the sweetness of the air!
</p>
</blockquote>
 <div id="footnotes">
 <h2 class="footnotes">Footnotes: </h2>
 <div id="text-footnotes">

 <div class="footdef"> <sup> <a id="fn.1" class="footnum" href="#fnr.1" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"> <p class="footpara">
Data taken from the UK goverment website and the European Centre for Disease Prevention and Control
</p></div></div>


</div>
</div></div>]]></description>
  <link>https://leehalls.net/posts/./covid19.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./covid19.html</guid>
  <pubDate>Fri, 22 May 2020 08:00:00 +0100</pubDate>
</item>
<item>
  <title>emacs, orgmode, hugo + ox-hugo</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">emacs, orgmode, hugo + ox-hugo</h1>
</header> <p>
OK so i dont pretend to be an all knowing computer geek in fact just the opposite i'm aging computer enthusiast that grew up in the golden age of electronics and computers but i do have some understanding from starting out with BBC's,Spectrums and hacking high score tables or re-programming the header so the game could run from microdrive instead of C90 tape :wink:  through to TCL for aero engine data analysis and then python for a home monitoring system but my decision to start afresh, move to a new domain and use hugo + ox-hugo has had me reaching for a glass of the strong stuff and several relaxing hours getting my arse handed to me on COD!
</p>

 <p>
You may ask  <i>Why if you use orgmode already did you struggle with ox-hugo?</i> well despite all the excellent documentation provided by Kaushal and following the example of Ken Grimes it just didnt twig, for me something was missing.
</p>

 <p>
I normally keep one blog post per org file, each one saved with the date as the filename eg  <code>20200508.org</code> but wanted to try and jump to the ox-hugo preferred  <b>one file to rule all</b> method because with a file per post i sometimes struggled to link between them and i wanted to use more of orgmode's features. So i tried to take an old post and tweak it, i refactored the tags and categories added export features and jumped right in, needless to say it didnt work. 
</p>

 <p>
What i was doing was thinking the top heading was for each post ie
</p>

 <pre class="example" id="orga2c9418">
* post 1                                                         :@emacs:org:
:PROPERTIES:
:export_file_name: post1
:export_description: my big dumbass
:END:
 now onto the rest blah blah

* post 2
:PROPERTIES:
:export_file_name: post2
:export_description: my big dumbass
:END:
 now onto the rest blah blah
</pre>

 <p>
It was not until i found  <a href="https://www.shanesveller.com/blog/2018/02/13/blogging-with-org-mode-and-ox-hugo/">Shane Sveller's</a> site that the lights switched on, he has a really clear explanation and what did it for me a full proper example page. Definitely worth visiting his site for full details but in brief i should have been doing something like this;
</p>
 <pre class="example" id="orge5bde62">

* Posts
:PROPERTIES:
:EXPORT_HUGO_SECTION: posts
:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :noauthor true :nocomment true :nopaging true :noread true
:END:

** starting afresh
:PROPERTIES:
:export_file_name: 
:export_description: 
:END:
</pre>

 <p>
So each blog or post is a subheading of the main and the same goes for pages bloody easy really. OK in my limited defense i was also trying to apply a theme to the posts and getting lost there with trying to tweak the output at the time as well as trying to understand how to "ox-hugo". For example;
</p>

 <p>
A  <code>TODO</code> in a post is output by ox-hugo in markdown as;
</p>

 <div class="org-src-container">
 <pre class="src src-markdown"># <span class="org-todo done DONE">DONE</span> automatically rebuild my orgmode & sync to my phone {#automatically-rebuild-my-orgmode-and-sync-to-my-phone}
</pre>
</div>

 <p>
every single theme i tried converts this into MASSIVE text in old HTML terms  <code><H1></code> or bigger ie
</p>

 <p>
 <img src="../images/example_todo.png" alt="example_todo.png"></img>
 i spent a lot of time trying different themes just to see if they did something different then i tried to edit the CSS files and i know nothing about CSS
</p>

 <p>
After all this i can recommend if you do not want to learn about css, layouts and other hugo terms i'd probably walk away from hugo but if you're already an orgmode user and want a challenge, want the full org experience for your site then pull up a comfy chair, grab a drink and stick on some meditation music and be prepared but you may find the following reading material useful before you start:
</p>


 <ul class="org-ul"> <li> <a href="https://www.shanesveller.com/blog/2018/02/13/blogging-with-org-mode-and-ox-hugo/">https://www.shanesveller.com/blog/2018/02/13/blogging-with-org-mode-and-ox-hugo/</a></li>
 <li> <a href="https://gtpedrosa.github.io/blog/using-org-mode-and-ox-hugo-to-replace-markdown-in-hugo-workflow/">https://gtpedrosa.github.io/blog/using-org-mode-and-ox-hugo-to-replace-markdown-in-hugo-workflow/</a></li>
 <li> <a href="https://people.umass.edu/weikaichen/post/emacs-ox-hugo/">https://people.umass.edu/weikaichen/post/emacs-ox-hugo/</a></li>
 <li> <a href="https://www.petercheng.net/posts/website-v2-setup/">https://www.petercheng.net/posts/website-v2-setup/</a></li>
 <li> <a href="https://joshrollinswrites.com/tags/orgmode/">https://joshrollinswrites.com/tags/orgmode/</a></li>
 <li> <a href="https://www.kengrimes.com/ox-hugo-tutorial/">https://www.kengrimes.com/ox-hugo-tutorial/</a></li>
 <li> <a href="https://github.com/kaushalmodi/ox-hugo">https://github.com/kaushalmodi/ox-hugo</a></li>
 <li> <a href="https://gitlab.com/kaushalmodi/hugo-theme-refined">https://gitlab.com/kaushalmodi/hugo-theme-refined</a></li>
</ul></div>]]></description>
  <link>https://leehalls.net/posts/./oxhugo.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./oxhugo.html</guid>
  <pubDate>Sat, 09 May 2020 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Starting afresh</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Starting afresh</h1>
</header> <p>
So during this lockdown amongst other things i decided to  <i>re</i> kick-start all  projects which had either lay in waiting or been put on hold for more time, for example some of what was on that list was
</p>

 <ul class="org-ul"> <li>DONE convert old mac mini to OMV5 server</li>
 <li>DONE install syncthing under OMV</li>
 <li>DONE get my orgmode agenda automatically rebuilt & setup sync to my phone</li>
 <li>DONE setup motioneye on a RasPi to monitor my bike</li>
 <li>TODO re-write  <i>dragelec</i> the home monitoring system</li>
 <li>TODO sort photos, improve Affinity workflow</li>
 <li>TODO misc python scripts to mimic a second brain
 <ul class="org-ul"> <li>basically these are scripts which pull data from various sources and output to a journal so for example i use Tasker to track start & end of car journey's which gives me time spent plus GPS coords</li>
</ul></li>
</ul> <p>
There are other jobs but one i had been putting off was a new domain as my current  <code>.eu</code> one may end up being taken to the bottom of the garden and shot because of brexit, i also wanted a more controllable, more orgmode based blogging experience but a wise man once said "Coming back to where you started is not the same as never leaving"  <sup> <a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup> and i can fully agree, I started this journey with some knowledge of hugo, reasonable orgmode knowledge and little if any CSS & to be blunt I feel like i've been dragged by my testicles backwards through a privet hedge by a small bearded dwarf with penchant for dense privet, what i thought would be a relatively simple transition turned out to be taking the red pill down a sewer of broken themes, conflicts and my own lack of understanding of both  <b> <i>hugo</i></b> and  <b> <i>how to write</i></b> in orgmode for ox-hugo. So i am back where started, scratched, a little bloody but wiser and with a  <b>significant</b> amount of respect for Kaushal who not only wrote ox-hugo but this theme i'm using. 
</p>


 <div class="note" id="org16322b1">
 <p>
2021-02-06T14:22 UPDATE decided to re-vamp with different theme
</p>

 <p>
I still dont know what i am doing but have learnt quite a bit delving through different themes CSS files. I want to tweak this theme specifically for TODO lists but for now its time to transfer the content of my old site, refresh the words and update where needed.
</p>

</div>
 <div id="footnotes">
 <h2 class="footnotes">Footnotes: </h2>
 <div id="text-footnotes">

 <div class="footdef"> <sup> <a id="fn.1" class="footnum" href="#fnr.1" role="doc-backlink">1</a></sup> <div class="footpara" role="doc-footnote"> <p class="footpara">
Terry Pratchett - A Hat full of Sky :  <i>i really do recommend reading some of his books for a humorous often cynical but immensely accurate alternative look at life</i> 
</p></div></div>


</div>
</div></div>]]></description>
  <link>https://leehalls.net/posts/./new_start.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./new_start.html</guid>
  <pubDate>Fri, 08 May 2020 08:00:00 +0100</pubDate>
</item>
<item>
  <title>Quick link creation</title>
  <description><![CDATA[<div id="content" class="content">
 <header> <h1 class="title">Quick link creation</h1>
</header> <p>
As the sub-heading to this site suggests this maybe a place to find poor python! I was updating my photography galleries and in doing so creating ox-hugo clickable image links so that the main page shows the thumbnail and a click brings up the main image. Anyway its a pain to go  <code>C-c C-l</code> for each and every file so i cobbled together a dirty and quick python script to trawl a directory and create a text file with the necesary ox-hugo links for clickable images.
</p>

 <p>
The ox-hugo format needed for creating hyperlinked pictures has to resemble;
</p>

 <pre class="example" id="orgb74a30b">
[[file:/img/lifedeath/LifeDeath_002.jpg][file:/img/lifedeath/LifeDeath_002-thumb.jpg]]
</pre>

 <p>
My files are are saved as 
</p>

 <pre class="example" id="orga91adc5">
Name                               Size Type                   Modified  Attr
LifeDeath_001.jpg                460 KB JPEG image      13/01/2019 18:31-------
LifeDeath_001-thumb.jpg         11.5 KB JPEG image      13/01/2019 18:31-------
LifeDeath_002.jpg                464 KB JPEG image      13/01/2019 18:31-------
LifeDeath_002-thumb.jpg         11.8 KB JPEG image      13/01/2019 18:31-------
..
..
</pre>

 <p>
The following poor python does the job of creating the links
</p>
 <div class="org-src-container">
 <pre class="src src-python"> <span class="org-keyword">import</span> glob

 <span class="org-comment-delimiter">#</span> <span class="org-comment">oxhugo link format
</span> <span class="org-comment-delimiter"># </span> <span class="org-comment">[[file:/img/colour/C_ART_0052.jpg][file:/img/colour/C_ART_0052-thumb.jpg]] 
</span> <span class="org-variable-name">output_file</span>  <span class="org-operator">=</span>  <span class="org-builtin">open</span>( <span class="org-string">"link.txt"</span>, <span class="org-string">"a"</span>)

 <span class="org-variable-name">one</span>  <span class="org-operator">=</span>  <span class="org-string">"[[file:/img/lifedeath/"</span>
 <span class="org-variable-name">three</span>  <span class="org-operator">=</span>  <span class="org-string">"][file:/img/lifedeath/"</span>
 <span class="org-variable-name">four</span>  <span class="org-operator">=</span>  <span class="org-string">"]] "</span>

 <span class="org-variable-name">files</span>  <span class="org-operator">=</span> []
 <span class="org-keyword">for</span>  <span class="org-builtin">file</span>  <span class="org-keyword">in</span> glob.glob( <span class="org-string">"*.jpg"</span>):
    files.append( <span class="org-builtin">file</span>)

 <span class="org-variable-name">i</span>  <span class="org-operator">=</span>  <span class="org-variable-name">thumb</span>  <span class="org-operator">=</span> 0
 <span class="org-variable-name">main</span>  <span class="org-operator">=</span> 1
 <span class="org-keyword">while</span> i  <span class="org-operator"><</span>  <span class="org-builtin">len</span>(files):
     <span class="org-keyword">try</span>:
         <span class="org-variable-name">complete</span>  <span class="org-operator">=</span> one  <span class="org-operator">+</span> files[main]  <span class="org-operator">+</span> three  <span class="org-operator">+</span> files[thumb]  <span class="org-operator">+</span> four  <span class="org-operator">+</span>  <span class="org-string">"</span> <span class="org-constant">\n</span> <span class="org-string">"</span>
     <span class="org-keyword">except</span>  <span class="org-type">IndexError</span>:
         <span class="org-builtin">print</span>( <span class="org-string">"finished"</span>)
         <span class="org-keyword">break</span>

    output_file.write(complete)
     <span class="org-variable-name">main</span>  <span class="org-operator">=</span> main  <span class="org-operator">+</span> 2
     <span class="org-variable-name">thumb</span>  <span class="org-operator">=</span> thumb  <span class="org-operator">+</span> 2
</pre>
</div>

 <p>
The resulting output gives me exactly what i needed.
</p>
</div>]]></description>
  <link>https://leehalls.net/posts/./python_oxhugolink.html</link>
  <guid isPermaLink="false">https://leehalls.net/posts/./python_oxhugolink.html</guid>
  <pubDate>Fri, 08 May 2020 08:00:00 +0100</pubDate>
</item>
</channel>
</rss>
