I saw a tweet from  James Abela:

Just found this amazing tool to convert any @scratch project into a #Mac #App. You can now literally use this kid’s tool to put apps together! Incredible and I managed this in less than a minute! #everyonecancode #scratch #appinamin #coding How to make a Scratch Project into a Mac OS app in under 1 minute – YouTube

The TurboWarp Packager Converts Scratch projects into HTML files, zip archives, or executable programs for Windows, macOS, and Linux. but it is linked to several tools that are part of TurboWarp:

TurboWarp is a Scratch mod that compiles projects to JavaScript to make them run really fast.

Now the sort of thing I do with scratch is certainly not in need of speeding up or turned into an application! But I have seen many really complicated scratch programs, but my needs are simple.

I did recall a maths project we made in class a couple of years ago, when working on probability & chance. The project throws dices a number of times. Of course the class wanted to run it many many times, but it got a bit slow once we got to 10 million throws.

Here is the Project on Scratch:

And in Turbowarp:

For me 100 million throws took 1056.443 seconds in Scratch and 21.784 seconds in Turbowarp. I guess device, browser, operating system and the direction of the wind might change these results a bit. I also expect the code could be a lot better;-)

I’ve just read On Reshaping: Tooling WordPress with nothing other than it’s URLs – CogDogBlog

Alan covers many of the interesting url patterns that can produce sets of posts in WordPress. I knew of some, but there are several gems I’d not discovered. Combining dates and taxonomies for example. RSS Feeds for all of these and finally RSS feeds for searches.

Many of these could all be used as links on your site in the same ways as a simple category can be added to a menu. It reminds me of one of my favourite plugins Display Posts which lists posts filtered in every which way. 

The RSS ones might be used to show a dynamic set of links from a different WordPress site. For example Alan mentions HyperCard in his post, by using the url for the RSS feed for a search on his site for HyperCard I can use the RSS block to show search results for HyperCard on Alan’s site:

I don’t usually use the block editor on this site. To insert the RSS block I switched to the block editor, inserted the block and switched back.

This is a bit kludgy but apart from some bother with paragraphs it seems to work.  Once you have added the block and switch back to the classic editor the block is invisible in the Visual view but you see:

<!-- wp:rss {"feedURL":"https://cogdogblog.com/?s=Hypercard\u0026feed=rss2"} /--> in the text editor. You could just save the snippet, and change the url for later use. (Or just use the block editor it seems to be the future).

See also Hidden in the Code – Read Write Respond found via a search for a possilbe featured image

I occasionally use Word Cloud generators for school use, for example a header on a blog post. Each time I just search and try a couple until I find one that is free, doesn’t need a sign-up and does what I want.

I’ve also occasionally used iPad apps, but never found one I like enough to remember.

This week I needed one again but given I has 30 minutes free I searched for commandline wordclouds instead. This took me to amueller/word_cloud: A little word cloud generator in Python.

A bit of copy pasting in the terminal got this installed. I can now make lists of words in a text file and quickly create a word cloud with something like this:

wordcloud_cli --text spelling-list-1.txt --imagefile spelling-list-1.png --width 800 --height 400 --colormap tab20

It only take a few seconds. I could batch process a pile of lists all at once.

The app has a lot of features, colour schemes, size variations, fonts and the like and is beautifully documented: Command Line Interface — wordcloud 1.8.1 documentation.

The featured image uses text from Get Drunk! a handy test text.

wordcloud_cli --text get\ drunk.txt --imagefile getdrunk-3.png --width 800 --height 400 --colormap tab20 --fontfile /Library/Fonts/GiddyupStd.otf

Over the last few years I’ve had quite a bit of fun with micro:bits. Given I’ve been using the same ones all that time they were pretty good value. It is great to see them getting a bit more traction in Scottish schools.

We are to get some more free ones: Scottish schools to receive 20 micro:bits. This will be great. I’ve got access to plenty but the new ones have some nice new features. Built-in microphone, speaker, capacitive touch sensor, and power save button. The speaker will be particularly welcome, avoiding a bit of footering . The power button too as I’ve found that detaching the battery is quite tricky for small fingers. I hope they arrive soon.

There are also a lot more support events & materials for classes appearing.

19 May 11 – 11:45 Code Along with micro:bit – Relaxation & Mindful Breathing looks fun, but clashes with our sports day. My class did participate in a couple of similar scratch events via Teams. Although these were not anything I could not have covered myself. I did find the pupils were extra engaged with a virtual teacher and peers.

You don’t even need micro:bits to take part,

Micro:bit not required as you can still take part using the MakeCode simulator.

Which until this week I would have though was missing the point. The other day I was re-introducing some of my class to micro:bits. They had made simple rock, paper, scissors shakers. We were discussing the problem of knowing, for sure, if the shake had worked. Two similar results could be due to random selection or by nothing happening. While the pupils were playing with solutions to this one explained he was not going to flash the micro:bit every time. He preferred the simulator! This surprised me, as I think the device is a big draw for most pupils.

The other week New support for teachers launched today | micro:bit. I’ve already found the examples and projects on makecode.microbit.org very useful. I am looking forward to getting to try the ones for the new micro:bits.

In class we have been using the iOS micro:bit app rather than the web. This solves the issue of flashing the micro:bits via usb by using Bluetooth and works really well. We did a bit of work on our arcade devices this session. That meant pupils using the web downloading hex files on their iPads, air dropping to a MacBook and then transferring to the devices. Bluetooth avoids the “one MacBook” bottleneck.

The other bit of micro:bit information I have is that Glow Blogs now supports the embedding of the micro:bit simulator. This enables pupils to share their creations and keep a record of their achievements. I’ve just updated the microbit instructions for Glow Blogs. I hope to see some examples in the wild soon.

File box old HyperCard iconEver since I updated my home Mac to Monterey, OneDrive has been a bit flaky. I updated the app and it has been syncing. But I could not open the app itself or click on it in the menu bar. Attempting to do so grave me a beach ball of doom. Restarting, etc had no effect.

To day my Mac at work, an older iMac with an older system presented me with the message, “The application “OneDrive.app” is not open anymore”. This persisted through a couple of force quotes, resetting OneDrive and restarting. Eventually installing a new version from the App Store and resetting allowed me to set it up again. The syncing has changed so that by default items are kept in the cloud and downloaded on the fly.

On getting home I decided to try and sort out my home Mac too. This was already running the most recent version. Resetting, rebooting several times did not work. Finally I deleted the app using CleanMyMac, to get rid of any stray bits, and reinstalled from the App Store. This then let me go through the setup process again, logging on, enabling extensions, choosing the same folder and all the rest.

I’ve set my mail school work folder to be always downloaded and left the rest in the cloud, I’ll see how this works.

The reset process seems pretty bonkers for a modern application. Opening the application package, navigating to a folder and running a command file!

Hopefully I’ve now got OneDrive sorted for a while, an maybe these notes will help someone else. I do find OneDrive an important time saving device that lets me work from home fairly seamlessly, when it works. I am lucky in that I’ve got a Mac at work, though I worry about it lasting to my retirement.

Well I am quite excited. There is a new plugin in Glow Blogs, H5P. This is quite different from anything else in blogs.

H5P is a system for creating interactive HTML5 content. It can work inside several types of publishing platforms including WordPress.

The range of content types that you can create with H5P is pretty wide. Some are ways of presenting material, accordions, image galleries. Others are learning activities, quizzes, multi-choice questions, word searches and crosswords. More sophisticated types include interactive video. Videos can be paused by viewers to respond to questions and quizzes and 360 tours. Responses to quizzes, cloze procedures etc are gathered from logged on users.

You can combine these content types , or display them on a blog in different ways.

I’ve spent a bit of time making some simple examples for Glow Blogs which has allowed me to start to think about how best to use these.

I’ve also started to build up a small bank of resources for spelling for my class: igh example. So far I am only scratching the surface.

I’ve always enjoyed making online resources for my classes to use. but these can take a lot of time and can be difficult to make presentable or present. The H5P plug-in solves many of these problems and are made “inside” the blog.
Having them on a blog allows resources to be quite easily organised. The Display Posts plug-in or using the make theme helps. Post listing in Gutenberg will be useful too.

Here are a couple of examples embedded from Glow Blogs.

A 360 tour:

and a fill in the missing words exercise.

screenshot of pi.johnj.info/gb

One of the things I am interested in as part of my work on Glow Blogs is what people are using Glow Blogs for.

Glow Blogs is made of of 33 different WordPress multi-sites. One for each Local Authority in Scotland and one central one.

The home page of each LA lists the last few posts. Visiting these pages will give you an idea of what is going on. In the past I’ve opened up each L.A. in a tab in my browser and gone through them. I had a script that would open them all up. I’ve now worked out an easy way to give a quick overview.

Recently I noticed shot-scraper ,Tools for taking automated screenshots of websites . I’ve used various automatic webpage screenshot pages in the past. These have usually been services that either charge money or have shut down. I used webkit2png a wee bit, but ran into now forgotten problems, perhaps around https?

shot-scraper can be automated and extended. It is a command line tool and using these is always an interesting struggle. I usually just follow any instructions blindly, searching any problems as I go. In this case it didn’t take tool long.

Once installed shot-scraper is pretty easy to use. shot-scraper https://johnjohnston.info Dumps an image johnjohnston-info.png

There are a lot of options, you can output jpegs rather than pngs. Run some javascript before taking a screenshot or wait for a while. you can even choose a section of the page to grab.

So I can use shot-scraper to create screenshots of each LA homepage. Then display them on a web page for a quick overview of Glow Blogs.


    cd /Users/john/Documents/scripts/glowscrape/img

    URLLIST="ab as ac an ce cl dd dg ea ed el er es fa fi gc glowblogs hi in mc my na nl or pk re sa sb sh sl st wd wl"
    for i in $URLLIST ;
        /usr/local/bin/shot-scraper -s "#glow-latest-posts" -j "jQuery('.pea_cook_wrapper').hide()" --quality 80 https://blogs.glowscotland.org.uk/"$i" -o  "$i".jpg && continue

This first hides the cookie banner displayed by blogs and then screenshots the #glow-latest-posts section of the page only.

The script continues by copying the image over to my raspberry pi where they are shown on a web page

I hit a couple of problems along the way. The first was that the script stopped running when it could not find the #glow-latest-posts section. This happens on a couple of LAs who have no public blogs. adding && continue to the screenshot fixed that.

The second problem came when I wanted to run the script regularly. OSX schedules tasks with launchd. I’ve used Lingon X to schedule a few of these. Since I recently updated my system I first needed to get a new version of Lingon X. I then found that increased security gave me a few hoops to jump through to get the script to run.

I think it would have been simpler to do the whole job on a raspberry pi. But I was not sure if it would run shot-scraper. I’ll leave that for another day and a newer pi.

This is a pretty trivial use of a very powerful tool. I’ve now got a webpage that gives me a quick overview of what is going on in Glow Blogs and took another baby step in bash.

The first thing that surprised me was the lack of featured Images on the blog posts. These not only make the LA home pages took nicer they also make display blog posts on twitter more attractive.

One of the best $10 I’ve ever spent was on the micro.blog kickstarter. For my money I was pledged:

PDF and ePub versions of the book, plus early access to Micro.blog. You can reserve your Micro.blog username even before the book is finished.

My username is johnjohnston on micro.blog and it has been a big part of my online life since April 2017

This week I got an email from kickstarter. The draft of the Indie Microblogging book is available online at book.micro.blog.

I’ve started dipping into the book rather than reading it through. Being beautifully organised online makes this easy.

The book is lot more comprehensive than I expected. Everything I’ve read so far has delighted me. It includes, history, different platforms, interviews with lots of interesting folk. There is also technical information about microformats and other indieweb technologies. This looks like being very readable and useful.

Manton’s personal way of telling the story makes it easy to read and digest.

A couple of quotes, that might not capture the range and depth of the text but resonated very strongly with me:

Toward decentralization · Indie Microblogging

We want smaller platforms again as was common in the height of Web 2.0. Back then it was more like a fabric of web tools, where one app might build on Flickr’s API, or another app might plug in missing features in early versions of Twitter like search or photo hosting. But with indie microblogging we want to go further, even more decentralized, where platforms fade away and all we have are our own blogs, woven together as a new foundation for the social web.

Part 2: Foundation · Indie Microblogging

There weren’t enough blogs back in 2002, and there aren’t enough now. I have no doubt that some of the blogs created today will be important in the years ahead, maybe contributing to a debate on politics, or showcasing new writing or art, or serving as an archive that reflects today’s culture.

Manton asks for feedback, I’ve not spotted anything I think could be improves so far, my only feedback would be lovely stuff!

In classic primary school book reviews a question is often, who else would like this book? If you are interested in any aspect of social media, blogging or online life you will find something of interest. If you are uneasy about Facebook algorithms, or you dislike the politicians and government announcing and pronouncing on twitter, this is for you.

The weather outside is frightful, but I want to avoid the usual internet distractions.

A while ago I signed up for the Vmail newsletter. This is from VOLE.wtf and seems to be put together from stuff submitted by anyone!

One of the items was Wilderness Land a map of links generated from a google spreadsheet which leads to many rabbit hole sites.

Here are a few:

Featured image: Image from page 130 of “The Canadian field-naturalist” (19… | Flickr found via a search for Public Domain photos and the word Serendipity.

Another favourite source of daily serendipity is the dailywebthing daily pointers.