# QR Codes on Tools / Around the Space

**URL:** <https://discourse.southlondonmakerspace.org/t/qr-codes-on-tools-around-the-space/20985>\
**Category:** Discussion\
**Created:** [1 April 2022 12:22 UTC](https://discourse.southlondonmakerspace.org/t/qr-codes-on-tools-around-the-space/20985 "2022-04-01T12:22:43Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![Kyle](https://discourse.southlondonmakerspace.org/user_avatar/discourse.southlondonmakerspace.org/kyle/32/12237_2.png) [@Kyle](https://discourse.southlondonmakerspace.org/u/Kyle)\
**Post date:** [7 April 2022 21:25 UTC](https://discourse.southlondonmakerspace.org/t/qr-codes-on-tools-around-the-space/20985/18 "2022-04-07T21:25:41Z")

</div>

Thanks Max!

Here’s some browser console code to grab all the tools

```
child_text = (elem) => [...elem.childNodes].filter(elem => elem.nodeType == Node.TEXT_NODE).map(elem => elem.textContent).join('');
copy([...$$('.cooked li > a')].map(e => [child_text(e.parentNode).replace(/^\s*\-\s*/, '').trim(), e.innerText, e.href]).map(l => l.join("\t")).join("\n"))

```

And here’s using command line tools qrencode and imagemagick to build nifty QR codes, abusing the 30% redundancy in -l H qr codes. A 96x96 px logo works well.

```
#! /bin/bash
logo="logo.png"
while IFS="," read -r model tool print induction lone url
do
if ["$print" == "Y"]; then
	filename=$(echo "$model $tool" | sed -r 's/[^A-Za-z0-9_]+/_/g; s/(^\_)|(\_$)//g')
	filename="./out/$filename.png"
	[[$model = ""]] && label="$tool" || label="$model"
	[[$induction = ""]] && i_text="No Induction" || i_text="Induction Required"
	[[$lone = ""]] && l_text="Lone Work Permitted" || l_text="No Lone Working"

	qrencode -s 10 -l H -o "$filename" "$url"
	convert -size 570x770 xc:white -gravity Center "$filename" -composite "$logo" -composite -background none -font Helvetica -pointsize 60 \
	-gravity North caption:"$label" -geometry +0+25 -composite \
	-gravity South caption:"$i_text" -geometry +0+50 -composite \
	-gravity South caption:"$l_text" -geometry +0+0 -composite "$filename"
fi;
done < <(tail -n +2 tool_list.csv

```

I will keep this comment updated as we complete the process.

---

_[View the full topic](https://discourse.southlondonmakerspace.org/t/qr-codes-on-tools-around-the-space/20985)._
