5ff94f5ea3d701f9a5f99d48fe33f7e13e07cf8e — glyph 7 months ago 69729f1
Add RSS file and RSS generator
5 files changed, 423 insertions(+), 0 deletions(-)

M Cargo.lock
M Cargo.toml
A rss.xml
A src/bin/generate_rss.rs
M Cargo.lock => Cargo.lock +103 -0
@@ 182,6 182,66 @@ dependencies = [

name = "darling"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858"
dependencies = [

name = "darling_core"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b"
dependencies = [
 "proc-macro2 1.0.12",
 "quote 1.0.4",
 "syn 1.0.19",

name = "darling_macro"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72"
dependencies = [
 "quote 1.0.4",
 "syn 1.0.19",

name = "derive_builder"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0"
dependencies = [
 "proc-macro2 1.0.12",
 "quote 1.0.4",
 "syn 1.0.19",

name = "derive_builder_core"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef"
dependencies = [
 "proc-macro2 1.0.12",
 "quote 1.0.4",
 "syn 1.0.19",

name = "deunicode"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"

@@ 229,6 289,15 @@ dependencies = [

name = "encoding_rs"
version = "0.8.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171"
dependencies = [

name = "error-chain"
version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"

@@ 394,6 463,12 @@ dependencies = [

name = "ident_case"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"

name = "idna"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"

@@ 600,8 675,10 @@ name = "mycelial_technology"
version = "0.1.0"
dependencies = [
 "log 0.4.8",

@@ 783,6 860,16 @@ dependencies = [

name = "quick-xml"
version = "0.17.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe1e430bdcf30c9fdc25053b9c459bb1a4672af4617b6c783d7d91dc17c6bbb0"
dependencies = [

name = "quote"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"

@@ 946,6 1033,16 @@ dependencies = [

name = "rss"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99979205510c60f80a119dedbabd0b8426517384edf205322f8bcd51796bcef9"
dependencies = [

name = "rustc-demangle"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"

@@ 1040,6 1137,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028"

name = "strsim"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"

name = "syn"
version = "0.15.44"
source = "registry+https://github.com/rust-lang/crates.io-index"

M Cargo.toml => Cargo.toml +2 -0
@@ 8,7 8,9 @@ edition = "2018"

log = "0.4"
regex = "1"
rocket = "0.4"
rss = "1"
serde = "1"
serde_derive = "1"
serde_json = "1"

M README.md => README.md +2 -0
@@ 4,6 4,8 @@ Personal website of glyph.

Handwritten HTML and CSS organised into templates ([Tera](https://tera.netlify.app/)), served with [Rocket](https://rocket.rs/) and proxied through Nginx.

Includes a custom RSS generator (`src/bin/generate_rss.rs`).

## License

[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)

A rss.xml => rss.xml +208 -0
@@ 0,0 1,208 @@
<rss version="2.0"><channel><title>mycelial technology</title><link>https://mycelial.technology</link><description>glyph&apos;s RSS feed. Biophilic musings on carbon-based and silicon-based technologies.</description><item><title>Sauerkraut: Beginnings</title><link>https://mycelial.technology/bacteria/sauerkraut-beginnings</link><description><![CDATA[<article>
      <h2>Sauerkraut: Beginnings</h2>
      <i>22 October, 2019</i>
        <img src="/bacteria/sauerkraut_jar.jpeg" alt="Colour photo in portrait orientation of a 3L jar filled with purple sauerkraut-in-the-making. The jar is on a wooden countertop and is covered by a blue and white cloth. A glass jar with water is visible inside the bigger jar. Bubbles can be seen forming on the surface of the sauerkraut mixture / solution." style="width: 100%;" />
        <figcaption>Counter-top fermentation factory.</figcaption>
      <p>I started my first batch of sauerkraut on Sunday - something I’ve been meaning to do for a few months.</p>
      <p>1 red cabbage, 1/2 apple, 1 carrot, cut finely, sprinkled with salt, massaged and pressed down into a 3L jar. I had to add a little brine after 24 hours to ensure the vegetables were completely covered. I also added a glass jar with water to act as a weight.</p>
      <p>It’s already bubbling and smelling delicious. Fermentation is like hospitality management for microbes.
    </article>]]></description><pubDate>22 October, 2019</pubDate></item><item><title>Sauerkraut: Bottled</title><link>https://mycelial.technology/bacteria/sauerkraut-bottled</link><description><![CDATA[<article>
      <h2>Sauerkraut: Bottled</h2>
      <i>31 October, 2019</i>
      <p>Today I bottled up some of the sauerkraut from my first batch. It has been going for 11 days; no taste of cabbage anymore and it tastes super tangy. Intrigued to see how the flavour develops.</p>
      <p>Also transferred some chaga (Inonotus obliquus), reishi (Ganoderma lucidum) and turkey tail (Trametes versicolor)-infused coconut oil to a smaller jar.</p>
      <p>All of it will be gifted to friends in the valley; gifted by the combined efforts of the sun, soil, water, plants, bacteria and humyns.</p>
        <img src="/bacteria/sauerkraut_mountain.jpeg" alt="Colour photo showing five glass jars, one small and four large, in a row on a wooden handrail. The first jar contains a cream-coloured mixture of coconut oil, while the other jars are filled with purple sauerkraut. Trees and a mountain can be seen in the background on the right. A brick building appears along the left margin of the photo." style="width: 100%;" />
        <figcaption>Vibrant delights in the valley.</figcaption>
    </article>]]></description><pubDate>31 October, 2019</pubDate></item><item><title>Adventures with I²C</title><link>https://mycelial.technology/computers/i2c-adventures</link><description><![CDATA[<article>
      <h2>Adventures with I²C</h2>
      <i>26 January, 2019</i>
      <p>I went to London last weekend to attend the Agorama Web Jam and had a super groovy time. Everyone was so friendly and welcoming. Felt great to be hanging with cypherhomies in proximal timespace, dreaming and growing brighter futures together. I got to meet and chat with @eb4890 about PeachCloud and gained a better understanding of their plans around dyndns with SSB integration. Stoked to see that developing! It was also really encouraging to hear different folx voicing the need / desire for plug-n-plug p2p devices; fuel for the inner fire. Big thanks to all involved.</p>
      <p>TLDR: Real-Time Clock Module added to Pi / PeachCloud (I²C is working on Debian Buster ARM64)</p>
      <p>I spent most of my week doing web design work on another project. Finally got that finished and deployed yesterday and decided some hardware hacking would be a nice change of pace. Adding a real-time clock (RTC) felt like an achievable goal - one which would allow me to lean a little further into basic electronics & hardware shenanigans. @mikey already had this on the ‘next steps’ list for PeachCloud:</p>
      <blockquote>add Real-Time Clock to keep track of time (so you can be off-grid and still know the time)</blockquote>
      <p>I received a DS1338 RTC module as a Christmas gift for this project (thanks Dad). The datasheet can be accessed <a href="http://www.hobbytronics.co.uk/datasheets/DS1338-RTC.pdf" title="DS1338-RTC Datasheet">here</a>. A note from the retailer’s website:</p>
      <blockquote>A Real Time Clock Module with battery backup using the easy to use DS1338 chip. The DS1338 is functionally the same as the popular DS1307 chip with the difference being that the DS1338 works at any voltage from 3V to 5V making it easy to use on either 3.3V and 5V systems without modification or logic level conversion. Ideal for your project including Arduino and Raspberry Pi projects.</blockquote>
      <p>I received my first lesson in soldering last week and attached pins to the RTC. That made it a simple process to plug the module into my breadboard and connect it to the Pi. The module works on I²C and only requires 4 connecting wires (power, ground, SDA, SCL). The I²C pins on the Pi include a fixed 1.8 kohms pull-up resistor to 3.3v, meaning that no additional resistors needed to be included in the wiring setup.</p>
        <img src="/computers/pi_rtc.jpeg" alt="DS1338 RTC module plugged-into a breadboard & connected to a Raspberry Pi." style="width: 100%;" />
        <figcaption>DS1338 RTC module plugged-into a breadboard & connected to a Raspberry Pi.</figcaption>
      <p>Following the AdaFruit guide to <a href="https://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi/set-up-and-test-i2c">Adding a Real Time Clock to Raspberry Pi</a> (with small additions), I was able to run an I²C scan and verify that the module was wired correctly to the Pi:</p>
      <code>sudo apt-get install python-smbus i2c-tools</code><br>
      <code>sudo modprobe i2c-dev</code><br>
      <code>sudo i2cdetect -y 1</code><br>
      <p>The final command in the sequence prints an array to the console, with 68 denoting the presence of the RTC module. This is a sign that the device is properly wired and connected. Great! This is where things started to get tricky…</p>
      <p>If we were running Raspbian for this project the next steps would be pretty simple. As it turns out, the process for Debian Buster ARM64 is quite a bit more complicated. A <a href="https://code.overdrivenetworks.com/blog/2018/07/debian-buster-on-a-raspberry-pi-3-model-b-plus/">blog post</a> I found last night neatly summarizes the pros and cons of this choice:</p>
        <img src="/computers/debian_pi_pros_cons.png" alt="List of advantages and disadvantages of running Debian Buster ARM64 on Raspberry Pi." style="width: 100%;" />
        <figcaption>List of advantages and disadvantages of running Debian Buster ARM64 on Raspberry Pi.</figcaption>
      <p>No kidding! There were, however, a few crumbs along the way to sustain me over the course of the journey. These included <a href="https://raspberrypi.stackexchange.com/questions/41277/what-is-needed-to-get-i%c2%b2c-working-with-debian-jessie">What is needed to get I²C working with Debian Jessie?</a> and <a href="https://raspberrypi.stackexchange.com/questions/60084/i2c-transfer-failed-flooding-the-logs">"I2C transfer failed" flooding the logs.</a></p>
      <p>I appended <code>dtoverlay=i2c-rtc,ds1307</code> and <code>dtparam=i2c_arm=on</code> to <code>/boot/firmware/config.txt</code> and <code>i2c-dev</code> to <code>/etc/modules</code> but the RTC device was still not coming under control of the kernel driver. When I looked at <code>/var/log/kern.log</code> I found an <code>i2c could not read clock-frequency property</code> error which led me to the second of the two posts linked in the paragraph above. It seemed I would need to decompile, patch and recompile the device tree blob for my Pi. I copied <code>/boot/firmware/bcm2837-rpi-3-b.dtb</code> from the Pi to my laptop for the following steps:</p>
      <code>sudo apt-get install device-tree-compiler</code><br>
      <code>cd /place/where/dtb/file/was/pasted</code><br>
      <code>dtc -I dtb -O dts > bcm2837-rpi-3-b.dts</code><br>
      <p>That gave me a human-readable decompiled device tree (dts). I then manually added <code>clock-frequency = <0x186a0>;</code> to the generated dts file (line 570 for me).</p>
      <p>Recompiled the dts to binary blob format:</p>
      <code>dtc -O dtb -o bcm2837-rpi-3-b.dtb bcm2837-rpi-3-b.dts</code>
      <p>This left me with a patched dtb to replace the faulty dtb on the Pi. At this point I was thinking: ‘I don’t know what I’m doing but it feels pretty cool’. Once I’d patched the dtb and rebooted my Pi I no longer had clock-frequency errors in the kernel logs - a minor victory! Still, I couldn’t seem to get the RTC kernel driver to work. Eventually I returned to <a href="https://www.raspberrypi.org/forums/viewtopic.php?p=330617">Instructions to Configure DS1307 or DS1338 RTC</a> and had another go:</p>
      <code>sudo modprobe i2c-bcm2835</code><br>
      <code>sudo bash</code><br>
      <code>echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device</code><br>
      <code>sudo modprobe rtc-ds1307</code>
      <p>I ran <code>sudo i2cdetect -y 1</code> for the 234th time and bingo! It works! <i>Running around room celebrating.</i></p>
        <img src="/computers/i2c_working.jpeg" alt="Screenshot of terminal showing successful configuration of I²C RTC module." style="width: 100%;" />
        <figcaption>Screenshot of terminal showing successful configuration of I²C RTC module.</figcaption>
      <p>This is really exciting because it opens the door to (relatively) easy integration of other I²C devices (sensors, LCD displays etc.). Next step will be to fine-tune the process so that everything loads correctly on boot. If you stuck with me this far - thanks for reading!</p>
     </article>]]></description><pubDate>26 January, 2019</pubDate></item><item><title>ESP8266 with DHT11 and LCD Display</title><link>https://mycelial.technology/computers/esp8266-dht11</link><description><![CDATA[<article>
      <h2>ESP8266 with DHT11 and LCD Display</h2>
      <i>5 August, 2019</i>
      <p>I had fun putting together a simple electronics project over the weekend: NodeMCU dev board (ESP8266) with a DHT11 temperature and humidity sensor and DF Robot RGB LCD display.</p>
        <img src="/computers/esp8266_temp.jpeg" alt="Black and white photo in portrait orientation showing electronics on a striped table-cloth. A NodeMCU dev board appears in the lower-right, DHT11 sensor in the top-left, and an LCD in the top-right. Text on the display reads: temp: 18.0 and humidity: 64. The display is propped-up by a white pyramid (mycelium) and a wooden floor is just visible in the background." style="width: 100%;" />
        <figcaption>The basic setup.</figcaption>
      <p>The code is quite simple: connect to the local WiFi network and create a UDP server. Respond to UDP requests on port 3210 with a temperature and humidity reading from the sensor. Write the temperature and humidity to the display every two seconds.</p>
      <p>Arduino (C++) code: <a href="https://github.com/mycognosist/esp8266_dht11_udp">mycognosist/esp8266_dht11_udp</a></p>
      <p>I’ll be using this setup to monitor environmental conditions in my cultivation space. I plan on doing another version with LoRa for the main lab up the road. Will be great to do some remote-sensing from the comfort of my living room.</p>
      <p>One thing you can’t see in the photo is the sweet pink pastel backlight. I’d been thinking about lunarpunk aesthetics (thanks to a post by @Jackalope) - and, in particular, how I associate pastel tones with lunarpunk. I wanted to try out pastel colours on this display and ended up checking out the Wikipedia entry on Pastel (color). Lo and behold, it mentions:</p>
      <blockquote cite="https://en.wikipedia.org/wiki/Pastel_(color)">
        <p>There is also a type of goth style called pastel goth which combines the pastel color palette with classical goth fashion elements.</p>
        <footer>- <a href="https://en.wikipedia.org/wiki/Pastel_(color)"><cite>Pastel (color) Wikipedia page</cite></a></footer>
      <p>I did not know that. Rad.</p>
     </article>]]></description><pubDate>5 August, 2019</pubDate></item><item><title>Cross-Compiling Rust for Debian Buster on Raspberry Pi 3B+</title><link>https://mycelial.technology/computers/rust-compilation</link><description><![CDATA[<article>
      <h2>Cross-Compiling Rust for Debian Buster on Raspberry Pi 3B+</h2>
      <i>18 May, 2020</i>
      <p>Install target platform:</p>
      <code>rustup target add aarch64-unknown-linux-gnu</code>
      <p>Install toolchain:</p>
      <code>rustup toolchain install nightly-aarch64-unknown-linux-gnu</code>
      <p>Install aarch64-linux-gnu-gcc:</p>
      <code>sudo apt-get install gcc-aarch64-linux-gnu</code>
      <p>Configure the linker*:</p>
      <code>export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc</code>
      <p>Compile release build:</p>
      <code>cargo build --release --target=aarch64-unknown-linux-gnu</code>
      <p>* Another approach is to create `cargo-config` in the root directory of the repo and add the following:</p>
      <code>linker = "aarch64-linux-gnu-gcc"</code>
    </article>]]></description><pubDate>18 May, 2020</pubDate></item><item><title>Grow Together</title><link>https://mycelial.technology/fungi/grow-together</link><description><![CDATA[<article>
      <h2>Grow Together</h2>
      <i>29 March, 2018</i>
      <p>Yesterday, while pulling out dead lettuce stalks that had bolted, produced seed and died, I found a large mushroom attached to the roots of one of the plants (then another, and another)! I’m now less certain of my classification of the mushroom in the previous photo as a member of the Astraeus genus. I’ll have to do some investigating. If anyone here recognizes it, please let me know!</p>
      <p>This is one of the neatest examples of ectomycorrhizal symbiosis I’ve seen with my own eyes. You can see the dense white mycelium covering some regions of the root system. The mycelium forms a sheath around the root-tips and assists the plant by channeling water and minerals directly to it. The plant (usually) pays the fungus back with sugars and / or lipids (the transfer of lipids from plant to mycelium is a very recent finding).</p>
      <p>It seems the onset of rains and cooler weather, along with - potentially - the death of the plant, have prompted the networks of this species to produce mushrooms. All of the ones I have found so far have been growing in association with lettuce. Let’s practice the mycorrhizal way and nurture interdependence!</p>
      <p>So much love for the House of Wu Wei and all the myriad creatures who live here!</p>
        <img src="/fungi/earthstar.jpeg" style="width: 100%;" />
        <figcaption>You look interesting! I wonder what’s going on…</figcaption>
        <img src="/fungi/earthstar_roots.jpeg" style="width: 100%;" />
        <figcaption>Inter-species companionship.</figcaption>
        <img src="/fungi/earthstar_mycelium.jpeg" style="width: 100%;" />
        <figcaption>Makes me wonder how long these species have been dancing one another into being?</figcaption>
    </article>]]></description><pubDate>29 March, 2018</pubDate></item><item><title>Lichens in Space</title><link>https://mycelial.technology/fungi/lichen-space</link><description><![CDATA[<article>
      <h2>Lichens in Space</h2>
      <i>28 May, 2020</i>
        <img src="/fungi/xanthoria_fun_dye.jpeg" style="width: 100%;" />
        <figcaption>Xanthoria elegans lichen in cross-section, stained with FUN-1 dye.</figcaption>
      <p>So I think many of us have a basic understanding of what a lichen is: a symbiotic mutualism between a fungus and algae / cyanobacteria. The fungus provides a cosy home for the algae, along with water, nutrients and anchorage; while the algae photosynthesises and provides the fungus with carbohydrates. As Trevor Goward puts it: “Lichens are fungi that have discovered agriculture”. Put another way, lichen are fungi with solar panels. But I’ve only recently learned that the situation is far more complex than this simple 1:1 rendering of fungus and algae.</p>
      <blockquote cite="https://en.wikipedia.org/wiki/Lichen#Miniature_ecosystem_and_holobiont_theory">
        <p>Symbiosis in lichens is so well-balanced that lichens have been considered to be relatively self-contained miniature ecosystems in and of themselves. It is thought that lichens may be even more complex symbiotic systems that include non-photosynthetic bacterial communities performing other functions as partners in a holobiont.</p>
        <footer>- <a href="https://en.wikipedia.org/wiki/Lichen#Miniature_ecosystem_and_holobiont_theory"><cite>Lichen Wikipedia page</cite></a></footer>
      <p>Holobiont - now that’s a rad word.</p>
      <blockquote cite="https://en.wikipedia.org/wiki/Holobiont">
        <p>A holobiont is an assemblage of a host and the many other species living in or around it, which together form a discrete ecological unit. The concept of the holobiont was defined by Dr. Lynn Margulis in her 1991 book Symbiosis as a Source of Evolutionary Innovation. Holobionts include the host, virome, microbiome, and other members, all of which contribute in some way to the function of the whole. Well-studied holobionts include reef-building corals and humans.</p>
        <footer>- <a href="https://en.wikipedia.org/wiki/Holobiont"><cite>Holobiont Wikipedia page</cite></a></footer>
      <p>Another rather famous character in the lichen holobiont is the tardigrade! I wonder what it would be like to experience the lichen holobiont as a tardigrade - some sort of wondrous forested village perhaps? Maybe more like a landscape of networked villages, with all sorts of nanobiomes in between?</p>
      <p>Anywho, I digress. While listening to an episode of the In Defense of Plants podcast yesterday, specifically Ep. 80 - Lichens and Their Conservation, I learned that one species of lichen has been shown to be capable of surviving exposure to space and a simulated Martian atmosphere!</p>
      <p>The lichen Xanthoria elegans (which we can now think of as a holobiont and not a simple two-partner symbiosis) was exposed to space conditions for 18 months during a series of experiments on the International Space Station (ISS). This included exposure to vacuum, extreme cold, solar radiation and cosmic radiation. This was the first long-term exposure of eukaryotic organisms to space conditions in LEO, as well as a simulated Martian environment.</p>
      <p>Upon returning to Earth, the samples were tested for viability: “the lichen photobiont showed an average viability rate of 71%, whereas the even more resistant lichen mycobiont showed a rate of 84%”. They were still alive and capable of growth! The Martian experiment showed even livelier results:</p>
      <blockquote cite="https://pdfs.semanticscholar.org/a8f6/a68e6db11f7b2bed133f434be742e1d4d390.pdf">
        <p>The X. elegans samples exposed on the ISS in Mars-analogue conditions showed slightly higher viability and clearly higher photosynthetic activity compared with the space vacuum-exposed samples.</p>
        <footer>- <cite>Brandt et al. (2015)</cite></footer>
      <p>Pretty astounding! The paper discusses these findings in light of the panspermian hypothesis:</p>
      <blockquote cite="https://pdfs.semanticscholar.org/a8f6/a68e6db11f7b2bed133f434be742e1d4d390.pdf">
        <p>The Lithopanspermia hypothesis is […] based on a proposal by Thomson (1871), suggesting that life could survive interplanetary travel. Though the 1.5 year mission duration is much shorter than the estimated length of a hypothetical interplanetary transfer e.g. 2.6 Myr for some Mars meteorites (Clark 2001), the results presented indicate that X. elegans might be able to survive a longer duration in space or might be a promising test subject for a Directed Lithopanspermia as proposed by Crick & Orgel (1973)</p>
        <footer>- <cite>Brandt et al. (2015)</cite></footer>
      <p>So cool. Humyns have long dreamed of space colonies and interstellar journeys. Perhaps these dreams are genetic memories as much as simulated futures. Perhaps we have already surfed solar winds in peer-to-peer assemblages, crossing galaxies in holobiontic parties; expectant, hopeful, that Life might grow yet further.</p>
      <p>Here's a link to the full paper:</p>
      <p><a href="https://pdfs.semanticscholar.org/a8f6/a68e6db11f7b2bed133f434be742e1d4d390.pdf">Viability of the lichen Xanthoria elegans and its symbionts after 18 months of space exposure and simulated Mars conditions on the  ISS - Brandt et al. (2015)</a></p>
    </article>]]></description><pubDate>28 May, 2020</pubDate></item><item><title>Potato Tech</title><link>https://mycelial.technology/plants/potato-tech</link><description><![CDATA[<article>
      <h2>Potato Tech</h2>
      <i>31 December, 2017</i>
      <p>I shared lunch with some permaculture friends on Christmas day and they gifted me some of their seed potatoes. Today I planted them. Having seen how the plants thrived in my friend’s garden, and having learning more about potato diversity while I was in Peru, I’m excited to experience my first attempt growing them. As I do so, I extend the line of humyns who have woven relationships with this plant over thousands and thousands of years; an honour and a privilege.</p>
      <p>Seeing the potatoes like this is freakin rad! I got to appreciate the potato plant as an energy capture and storage technology: harness solar energy, grow a battery, redeploy solar panels from that battery months later. Beautiful.</p>
        <img src="/plants/potato_battery.jpeg" style="width: 100%;" />
        <figcaption>Warning: battery is reaching critical levels.</figcaption>
        <img src="/plants/potato_sprout.jpeg" style="width: 100%;" />
        <figcaption>The courageous potato perseveres in search of the light.</figcaption>
    </article>]]></description><pubDate>31 December, 2017</pubDate></item><item><title>I Have Been Invited Into a Dance by a Bush with Purple Berries</title><link>https://mycelial.technology/plants/blueberry-dance</link><description><![CDATA[<article>
      <h2>I Have Been Invited Into a Dance by a Bush with Purple Berries</h2>
      <i>20 December, 2017</i>
        <img src="/plants/blueberries.jpeg" style="width: 100%;" />
        <figcaption>Hand-picked blueberry snacks are where it’s at.</figcaption>
      <p>Today I thought about ripeness. How do you know when it’s just right? Well, it’s different for every plant I guess. With blueberries I’m learning to evaluate ripeness based on sight (colour of berry) and touch (firmness when gently squeezed). When I first started picking them, just two weeks ago, I only used my eyes and thus tended to pick unripe, tangy berries. Now I get 'em when they’re oh-so-sweet! In the last few days I’ve also started to notice the rate at which the berries ripen and can time my future visits more precisely.</p>
      <p>The more time I spend with these plants, and the more patient I become, the more fully I come to appreciate their being. So this is then one way to form relationships (and sometimes friendships) with plants: visit them regularly, use all your senses to engage and be patient. I reckon the same approach might work with humyns ;)</p>
      <p>If you ever hang out with herbalists around plants, you’ll probably find they’re very multi-sensory and active in their engagement. Smell the plant, taste it, rub it on your skin; all the more modalities to experience with. This is good to practice, just don’t go and eat all the poisonous stuff. Connecting with knowledgeable people is helpful: they can introduce you to some plants you might want to get to know better while also advising you to steer clear of some others.</p>
      <p>On a somewhat related note: I’m making friends with The Jinj, a neighbourhood cat of the orange variety.</p>
    </article>]]></description><pubDate>20 December, 2017</pubDate></item><item><title>Botanical Deceptions</title><link>https://mycelial.technology/plants/botanical-deceptions</link><description><![CDATA[<article>
      <h2>Botanical Deceptions</h2>
      <i>15 May, 2020</i>
        <img src="/plants/ceropegia_sandersonii.jpeg" alt="An unusual flower which looks like an umbrella with a hollow, tapering stem. The top is white with green speckled petals and frilly egdes. A twisting, dark green vine is blurry in the background." style="width: 100%;" />
        <figcaption><i>Ceropegia sandersonii</i> flower. Photo credit: <a href="https://commons.wikimedia.org/wiki/User:Wildfeuer">Wildfeuer</a>. Shared under a Creative Commons Attribution 2.5 Generic (CC BY 2.5) license.</figcaption>
      <p>I’ve been on a steady one-a-day listening spree of In Defense of Plants podcast episodes. Today I listened to <a href="https://www.indefenseofplants.com/podcast/2019/6/9/ep-216-dying-bees-wasp-venom-and-other-strange-floral-scents">Episode 216: Dying Bees, Wasp Venom, and other Strange Floral Scents</a>, featuring an interview with <a href="https://pollinationresearch.wordpress.com/dr-annemarie-heiduk/">Dr Annemarie Heiduk</a>. If you enjoy geeking out about plants, insects, chemistry or ecology, I highly recommend taking a listen!</p>
      <p>Here’s a brief summary of the part which blew my mind. There are loads more juicy details in the podcast so I’m confident that I’m not spoiling it for you by sharing this.</p>
      <p>There’s a plant (<i>Ceropegia sandersonii</i>) that releases chemical compounds which mimic those released by honey bees when they are wounded (e.g. by spiders). This suite of compounds attracts <i>Desmometopa</i> flies which specialise in stealing food from spiders (they consume the body fluids of the injured bees). The fly comes to the flower expecting a meal, becomes trapped and covered in pollen, and is released a day later when the flower withers - allowing it to visit more flowers.</p>
      <p>How’s that for a pollination syndrome?! Isn’t that just ridiculous! Gettin’ me all fired up on science over here!</p>
      <p>More info can be found on the <a href="https://en.wikipedia.org/wiki/Ceropegia_sandersonii">Wikipedia page for Ceropegia sandersonii</a> and in this article: <a href="http://www.the-scientist.com/?articles.view/articleNo/47214/title/To-Attract-Pollinators--Flower-Mimics-Wounded-Bee/#post143971">To Attract Pollinators, Flower Mimics Wounded Bee.</a></p>
      <p>A friend of mine has a gorgeous vine growing as a potted plant at her house. Only while listening to this episode did I realise it’s a member of the Ceropegia! Now I’m stoked to identify it to species level and ask her ever-so-sweetly if I might take a cutting (or seeds). The one she has looks very much like this <i>C. linearis sub. woodii</i>:</p>
        <img src="/plants/ceropegia_linearis.jpeg" alt="A grayish-pink vine with two heart-shaped, gray-green leaves and an unusual, hollow flower with furry black structures at the tip." style="width: 100%;" />
        <figcaption><i>Ceropegia linearis</i> subspecies woodii flower. Photo credit: <a href="https://en.wikipedia.org/wiki/en:User:MidgleyDJ">Dr. David Midgley</a>. Shared under a Creative Commons Attribution-ShareAlike 2.5 Generic (CC BY-SA 2.5) license.</figcaption>
    </article>]]></description><pubDate>15 May, 2020</pubDate></item><item><title>Aloe There</title><link>https://mycelial.technology/plants/aloe-there</link><description><![CDATA[<article>
      <h2>Aloe There</h2>
      <i>6 June, 2020</i>
        <img src="/plants/aloe_flowers.jpg" alt="Dense cones of golden, tubular flowers dominate the frame, with green succulent leaves at the bottom, a bright blue sky above, and a thatched-roof in the background. Bees can be seen amongst the flowers." style="width: 100%;" />
        <figcaption>Sunshine in the winter time.</figcaption>
      <p>All the aloes are in full bloom right now and it makes me so happy. The bees are pretty stoked about it too, as are the sunbirds.</p>
      <blockquote cite="https://en.wikipedia.org/wiki/Sunbird">
        <p>As nectar is a primary food source for sunbirds, they are important pollinators in African ecosystems. Sunbird-pollinated flowers are typically long, tubular, and red-to-orange in colour, showing convergent evolution with many hummingbird-pollinated flowers in the Americas. A key difference is that sunbirds cannot hover, so sunbird-pollinated flowers and inflorescences are typically sturdier than hummingbird-pollinated flowers, with an appropriate landing spot from which the bird can feed.</p>
        <footer>- <a href="https://en.wikipedia.org/wiki/Sunbird"><cite>Sunbird Wikipedia page</cite></a></footer>
      <p>This is likely <i>Aloe ferox</i>, though it should be said that I’m still learning to differentiate species. It’s categorised as a solitary, non-branching tree aloe. There is another one nearby which is easily 5-6 meters tall. Some species have yellow flowers, while others are orange, red or pink. They are wonderful neighbours. I think I will devote a good portion of my life to caring for aloes and learning more about them. If my spirit has a colour, it is that of the flowers above.</p>
        <img src="/plants/tree_aloe.jpg" style="width: 100%;" />
        <figcaption>Majestic tree aloe amongst the succulents.</figcaption>
    </article>]]></description><pubDate>6 June, 2020</pubDate></item></channel></rss>
\ No newline at end of file

A src/bin/generate_rss.rs => src/bin/generate_rss.rs +108 -0
@@ 0,0 1,108 @@
extern crate regex;
extern crate rss;

use regex::Regex;
use rss::{ChannelBuilder, Item};
use std::error;
use std::fs;
use std::fs::File;
use std::io::prelude::*;

fn main() -> Result<(), Box<dyn error::Error>> {
    // create rss channel for mycelial.technology
    let mut channel = ChannelBuilder::default()
        .title("mycelial technology")
            "glyph's RSS feed. Biophilic musings on carbon-based and silicon-based technologies.",

    // list template directories containing articles for syndication
    let bacteria = "./templates/bacteria";
    let computers = "./templates/computers";
    let fungi = "./templates/fungi";
    let plants = "./templates/plants";

    // add directories to a vector
    let mut dirs = Vec::new();

    // create vectors for item fields
    let mut titles = Vec::new();
    let mut pub_dates = Vec::new();
    let mut urls = Vec::new();
    let mut articles = Vec::new();

    // loop through template directories and extract item field values
    for dir in dirs {
        for entry in fs::read_dir(dir)? {
            let entry = entry?;
            let path = entry.path();

            // populate item url vector from article filenames
            let re_url = Regex::new("./templates/(.*).html.tera")?;
            let caps_url = re_url.captures(&path.to_str().unwrap());
            if let Some(url) = caps_url {
                let article_url = url[1].replace("_", "-");
                let full_url = format!("https://mycelial.technology/{}", article_url);

            // open the file (article) and read it to a string
            let mut file = File::open(path)?;
            let mut contents = String::new();
            file.read_to_string(&mut contents)?;

            // populate item title vector from article heading
            let re_h2 = Regex::new("<h2>(.*)</h2>")?;
            let caps_h2 = re_h2.captures(&contents);
            if let Some(title) = caps_h2 {

            // populate pub_date vector from first italic element in article
            let re_i = Regex::new("<i>(.*)</i>")?;
            let caps_i = re_i.captures(&contents);
            if let Some(date) = caps_i {

            // populate article content vector from article element
            let re_article = Regex::new(r"<article>[\s\S]*</article>")?;
            let caps_article = re_article.captures(&contents);
            if let Some(content) = caps_article {

    // get length of titles vector (serves as proxy for total number of articles)
    let library = titles.len();

    // create vector for channel items
    let mut items = Vec::new();

    // loop through vectors of item fields and create items accordingly
    for x in 0..library {
        let mut item = Item::default();

    // add the items to the channel

    // write the channel to file
    let rss_file = File::create("rss.xml")?;