Notey: a command line notebook

Introducing Notey: command-line notebook.

The glorious ASCII graphics of another command-line session.

I have a real need to keep and remember short snippets of text, for example, my phone number, real name and world-domination plans. Over the years I have used many applications, such as OneNote, Google Keep, Zim, Treepad Lite, Sticky notes etc...etc, but I feel the need for a simpler app, one without any graphical fuss and nonsense. I want the same program to run just as well under Windows as it does under the Linux shell or on my Raspberry Pi. So, with the bit of time I have had on my hands in the current UK lockdown, I have built Notey: command line notebook.

Introduction

You can think of Notey as a bit like Google Keep, but you interact with a series of text commands. I am not 100% serious about this, however, it does work well and is quite powerful in terms of the actions you can perform on your data. There is a comprehensive help system built-in and the very first command you will want to learn is 'help'.

32 commands are available, but you are not expected to remember them all.

Making new pages

Notey is simply a big list of named 'pages'. The first thing you will want to do is create a new page. This is achieved with the 'open' command, for example:

> open cat
This will prompt you to create a new page called 'cat'.

The in-built help documentation for the 'open' command.

As you can see, the 'open' command is used for creating new pages as well as opening existing pages. Most commands in Notey can take various options as parameters (shown above), for example, if you are really sure that you want to create a new page called 'cat' (and not open an existing page called 'cat'), you could type the following:
> open -p cat
Commands can take multiple options, for example:

> open -rpl*d cat

Will create a new page called 'cat', lock it so it cannot be accidentally deleted, automatically tag it with today's date and mark it as 'important'. The option -r then returns a little report showing you what Notey has been up to whilst you were waiting, as you can see in the image below.

Isn't everyone's cat important?

Editing pages

When you have a page open, you will see the page name appears just before the prompt. Pages that are thus 'opened' can be edited in a number of ways. You are most likely to want to add some text to this page.

For example, you could try the following command:

> append Not a dog.

This will enter the text "Not a dog." into this page. Except - it probably won't! You will get an error. Remember how we locked the page in the previous command? Locked pages cannot be (accidentally) edited, so we have to specify that we intend to purposefully unlock our page, edit it and then lock it again.

Try:

> append -ul Not a dog.
> append -ul Like's fishes.

OK. Big wow! You will probably want to see your handiwork. To view a page on the screen, simply type:

> type

Notey has rather helpfully done a lot here. It has reminded me of my own name, as well as the number of pages I have written. It is showing me that my page 'cat' is currently open and that it is 'locked' and 'important'. When I type 'type', I get to read the note on the screen.


Currently, there are related commands for editing your pages, for example: 'prefix' and 'replace', but append will do for now.

Tags

Pages in Notey can be tagged so you can find related information easily.

Let's tag our page with a list of tags:

> tag pets,animals

This will add two tags, 'pets' and 'animals' to the current 'cat' page. We already tagged our page with the current date with the 'open -d' command earlier. Forgotten already? I don't know! Actually, it is easy to get a little confused at times when using Notey, but thankfully there are a number of ways of getting information on what you are doing.

Table of contents

You will want to see what pages you have available in your notebook. The 'toc' command brings up a table of contents. You may want additional information such as a page summary, or list of tags.

Try:

> toc -t

This will display all the pages in the book including a summary of the tags for each page.

Now I will never forget my own address again.

You can also specify a search term to filter the table of contents. For example, need to see only those pages with 'cat' in the title? Try:

> toc -t cat

If you need more advanced filtering then you need to get your head around the 'group' command.

Grouping

Groups allows you to group pages based on a search term or tag name or other property. This allows you to apply commands to all the pages in the group. For example, if you need to add the text 'remember to feed' to all pages with 'cat' in the description, that have been marked as 'important' and have been tagged as '#animals', then you need to get your head around groups.

> group -t pets

Will find all of the pages with a tag '#pets' and put them into the group.

> toc -t@

Will show the table of contents for the current group.


If you search the help documents for the various commands, you can see that the '@' symbol refers to 'all pages in the group'. For example, if you want to append some text to all the pages in the group, try:

> append -@ Remember to feed.

OK - admit it! How many note-taking apps let you edit multiple pages at the same time?

This is the power of groups in Notey. There is also an 'addto' command, which allows you to manually add pages to the group, and the 'similar' command, which lets you see similar pages.

Similar pages

OK, so, you have spent your time carefully categorising your notes with sensible names and a comprehensive library of tags. Now, it is time for the 'similar ' command. It groups pages from your notebook that are 'similar' to the currently open page.

Namelists

You will frequently want to apply the same command to multiple pages at once. This is where namelists come in.

Try:

> open cat,dog,unicorn

This will prompt you to create three pages called 'cat', 'dog' and 'unicorn' respectively.

You can use the '@' symbol to refer to the current group. For example:

> del cat,unicorn,@

Will prompt you to delete the pages called 'cat', 'dog' and whatever pages are in the current group.

Other stuff, briefly...

A quick tour of some of the other features of Notey.

Your pages can be exported to XML, HTML, plain text or Treepad Lite files.

My Notey notebook as a Treepad lite file (OK, more about Treepad lite another time - spoiler alert - it is no longer a thing but that does not mean it is gone forever!)

You can use Notey as a diary. Simply type:

> diary

This creates a page with the current date for you to record all of your evil machinations from the day (or your good deeds).

You can get a calendar for any month (within reason):

> calendar 2020 06
Next month. Unless you are living in the future (which you most likely are) in which case you know more about June 2020 than I do. It can't get any worse can it? Can it?! Why are you laughing??!

Chain

Notey can accept multiple commands on one line using the 'chain' command.

Eg:

> chain open cat; tag animals; lock

In this case, Notey will diligently open the page 'cat', tag it '#animals' and then lock it. It is vital that each command is separated by a semi-colon.

Future updates

Some things that still need doing:
  • importing pages from files;
  • running scripts from a file;
  • hiding sensitive data;
  • exporting to other formats (MS-Word, anyone?)
There are, no doubt, many bugs, and a lot that could be done more efficiently. But the source code is provided for your entertainment.

Th..th..that's all folks!

Well, that's it for this introduction. I hope you can see that Notey is a powerful personal information management system. There is much more that it can do, but you will have to explore this yourself. Remember it is just for fun and not super secure so it is not a good idea to store sensitive information at this stage.

Notey is currently in an alpha release stage. You are free to download either the python source code or the Windows executable version and do what you like with it. I am sure that I will be adding more functionality soon, and I will be encouraged by anyone who finds it useful - so Tweet ME.


...or click this OneDrive link below...


If you enjoyed this post, then it shows that you have great taste, and you might like to read more of my stuff

RSS for LaMetric

One of the latest apps for LaMetric time is a long-time over-due and incredibly useful and welcome addition - RSS feed.

LaMetric is an internet radio, clock, smart speaker all rolled into one. You can read more about it on this blog. I suggest you head over and buy one now. They really are awesome tech toys.


With the RSS feed app, you can spool your favourite websites directly onto the 8-bit display so you never miss an update again. RSS is a way of pushing content from one website to another, automatically, so you don't have to go the original site to check for updates yourself. Really Simple. I've been waiting for this to appear on LaMetric for a long time now.

Need to know when your favourite blogger has posted? You will know without having to switch on your device. You will be able to read the new content directly on your LaMetric scrolling display in all its 8-bit glory.

RSS app running on Samsung Galaxy Note 9. Setting up your RSS feed is as simple as adding the RSS feed then clicking a few buttons until your feed appears the way you want it on your LaMetric display.

LaMetric Time app 
The app is really easy to use. You simply add the RSS feed into the appropriate edit box and you should find your feed appearing on your LaMetric display immediately.

The hard part is finding a site's RSS feed. Many sites provide you with this (click the orange icon usually located with the other social media links). This is a link to the BBC news RSS feeds to get you started. Finding the RSS feed for a blogger is much more tricky. As far as I can tell, the best way is to use the following:

http://blog.domain.name/feeds/posts/default?alt=rss 

Where blog.domain.name is the domain name for the blog. For example, the RSS feed for this blog is http://superdecade.blogspot.com/feeds/posts/default?alt=rss 

Don't have LaMetric? Get on the interwebs and buy one now!

That's it for today. If you enjoyed this post, then you might like to read some other LaMetric posts, or other posts about RSS feeds. Maybe you just want something completely different.

I've updated my Day Clock

Today I updated my Web Day Clock.

Day clock running on my Dell Chromebook showing the 'spring' colour theme. Who am I kidding? It is grey all year round (but the images do change - I promise!)

The Day Clock features real-time clock, date and some interesting facts about the current day. Each fact has been painstakingly mined from Wikipedia and I am pretty certain that I now have every month of the year covered. It is my fond wish that someday, someone, somewhere will use this clock to tell the time and, in amazement at the current fact, say, 'gosh, that long ago, huh?'.

If you like this post, then you might also like Random Movie Titles.
Failing that, you might just like to move on to my other website.


Moon Phase Program

Need to know when the next few phases of the moon will be?

Time and Date dot com will give you an accurate and reliable moon phase data, should you, for example, be a werewolf. In this case, knowing the exact minute of your upcoming transformation, I imagine, would be incredibly useful information.

I am not a werewolf (to my knowledge), but I am interested in astronomy, ancient computers and a bit of paganism. Therefore, this post is about a different Moon Phase application I often run on my BBC microcomputer and Raspberry Pi running RISC OS.

I hope this post will be of use to amateur astronomers, pagans and lycanthropes everywhere. Following the phases of the moon not only provides great evidence that the world is not a flat plane but studying our celestial neighbour is very relaxing. The moon is more than just a heavenly calendar. Really.

I originally found this program on a disk of public domain software, and it was originally adapted by D. Ambrose from that given in Microsoft QuickBasic 4.5 in Chapter 1 of Numerical Recipes in Basic by J. C. Sprott, CUP 1991. I have adapted the code slightly so that it picks up the time from the BBC micro's inbuilt battery-backed clock, and I also included some nifty 8-bit graphics for the moon phases. I have also changed the date format so it uses the (more correct) IEEE standard (follow that link for an in-depth rant about the subject).

Moon Phases running on the Beebem BBC micro emulator (Note, that this BBC has not been adjusted for the millennium bug as to my knowledge it is NOT 1999 all over).

Moon Phases running on my desktop PC in BBC BASIC for Windows.

I am assuming that this program remains in the public domain, and so I present it here. You can download the code from my OneDrive, and the directory includes:

  • A BBC microcomputer disk image; 
  • BBC BASIC for Windows source code; 
  • a Windows executable file (totally not a virus!); 
  • RISC OS application for Raspberry Pi, 
  • and the source code in plain text for you to do whatever you want with. 


Have fun now.


Could win an award for the best comment ever?

+1 Geek experience points awarded to J. C. Sprott and D Ambrose.

This is all for today, but if you like this sort of thing, then you might like other posts about the BBC microcomputer, or Raspberry Pi. Maybe you just want something completely different, or you are feeling brave enough to click this link.

British Summer Time

This morning, I woke up early thanks to the sun shining through a gap in my curtains and filled the kettle. It is the first day of British Summer Time today, and as my coffee boiled I set the time one hour ahead on the analogue clock in my kitchen and looked forward to the lighter evenings.

It was a bright day in April and the clocks were striking one-eighth multiplied by ninety-six over two.
You would be forgiven for forgetting, or not even noticing, that today was the day the clocks spring forward, as most of our smartphones and most modern computers will automatically account for daylight savings time.

Those of us with a few retro computers in our collection would, however, spend some time today making sure that all our older devices are at the same time as the newer ones.

Setting the time on my BBC Master 128
The BBC micro has a battery-powered clock. It is advisable to change the batteries every couple of years, and certainly, check that they haven't leaked all over the inside of the motherboard during its time forgotten in your attic. The time is set via a simple BASIC statement, as shown.

Analogue clock for the BBC 128 Microcomputer (I actually use this quite a lot)


The disk utilities in DOS running on my IBM PS1
DOS has a similar command line, or you can use the utility built into the operating system.

Mmmm.... DOS!
Nothing says 'daylight savings' quite like an ASCII clock!
For RISCOS on my Raspberry Pi, I have a time setting utility that was originally built on the BBC Master. Here is it doing its thing.

RISCOS Raspberry Pi having the time set to match the PC shown above.

The Acorn Pocket Book II has an option in the 'Time' app to allow you to manually indicate summer time or not. Presumably, so you could set the time for any location on Earth. This may prove to be incredible foresight from Acorn if the United Kingdom chooses to abolish daylight savings in the near future, as I truly expect my Pocket Book to be soldiering on long after the modern laptop I am writing this post on has gone to the recycling plant in the clouds.

Well, that's all from my classic computer collection. This post was just an excuse to show off my various retro machines.

If you liked this post then there is a slim chance you would like this post about my thoughts on date formats and why you are probably getting them wrong, or this post about particle Art. Maybe you are just curious to know what this link does.


RISC OS web server

If you have read this blog before (and I am pretty sure at least one person has) you will know that I am a big fan of RISC OS on Raspberry Pi.

RISC OS is an operating system that has the 'look' of  Linux and the 'feel' of the BBC microcomputer. I have delved into various aspects of RISC OS Pi before.

Whilst looking for web server solutions for RISC OS, I recently discovered WebJames. WebJames is a server with an integrated PHP interpreter. It is available in the PackMan package manager and it is really easy to use. In this post I will show you how to set it up (really easy) and get going as a hoe server.

Once you have finished installing from PacMan, all you need to do is provide a folder called 'Site' and you are good to go.
Packman installs WebJames into :0.$.Apps.Web, however, you can easily move it to any location you like. As most of my files are stored on a removable USB stick, I've put WebJames there. This has got to be the simplest web server ever. No complex configuration; no mucking about with Linux; simply launch the server and point it at some HTML files. As long as WebJames is running on the pi it will dutifully listen on port 80 for any requests.

PackMan (not Pac-man)
There is also an example code package which is worth exploring.

I've only just scratched the surface of what we can do with WebJames, but I am certainly glad it exists.

The first thing you might want to do is create a test site. Here I have provided a new HTML file called index and placed it in the 'site' folder. The test page has a single link that opens a folder called 'files' (useful for grabbing files from the pi onto another machine).

The index test page is shown in StrongEd for RISCOS (although I actually wrote this in qedit for DOS under DOSBox for that extra geekiness).


My first test page running on my Samsung Galaxy Note. Not very exciting, just a link to a folder.

Directory listing of files on the server.

To view your web server test page on your home network, simply point your browser at http://your IP address, for example, mine is http://192.168.1.218

To view your page on your Raspberry Pi instead, try http://127.0.0.1

Well, that's all for today. We have only dipped our feet into the RISC OS server waters. I hope somebody found this a useful guide. I am certainly looking forward to doing more with this software. In fact, the Apache web server I have running on my second Pi is the only reason I actually have a second pi running at all. WebJames really makes RISC OS more and more attractive as an operating system. Oh, and did I mention that you can use BBC BASIC as a server-side scripting language?

If you enjoyed this post, then there is a slim chance you will enjoy this post about my experience of RISC OS on Raspberry Pi, or that time I installed DOSBox on Raspberry Pi, or even something completely different.

A trip to RetroClinic

I recently took my BBC Master microcomputer to RetroClinic for a bit of tender loving care. Mark did an excellent job of fitting a new cherry keyboard as the original keyboard had developed a fault. I also walked away with a new Phillips monitor which has much-improved picture quality than the old one.

Mark also sold me a copy of Wordwise-Plus. This is the word-processor I used when I was grasshopper high to a knee. In fact, I remember writing both GCSE and A-level coursework on this trusty word-processor and it even followed me to university (although it did not survive the experience).

Cherry keyboard for the BBC Master (thanks to Mark from RetroClinic). Looks like a 'beeb' keyboard, feels like a modern cherry keyboard. These keys actually feel soft. The original 'beeb' keyboards were designed to be school-level indestructible as they were intended to survive half a term with those monsters in 3B Mathematics on a Friday afternoon.

Wordwise-Plus comes from a time called '1984', when, as well as all the population being victims of perpetual war, omnipresent government surveillance and propaganda, word-processors were non-WYSIWYG. This means that in order to control the layout of your text you had to enter control codes. This was way more fun than modern word-processors with their boring icons, mouse pointer-aiming, perpetual war, omnipresent government surveillance and propaganda.

Wordwise-Plus menu in glorious MODE 7 running on original hardware and Phillips monitor.
Wordwise also had a built-in macro scripting language. When I was a youngster living on Airstrip One, I actually coded loads of scripts to perform various jobs on my school work, such as applying headers and footers, automatically creating cover pages and numbers, etc. Youngsters today don't know they are born!

One page from the extensive scripting language manual which is now my bedtime reading for the next week, even though page one warns you that this manual doesn't make good bedtime reading.
My blog: full of awesome goodness and other relics of the Cold War.

I have absolutely no doubt that you will be finding some Wordwise-plus code floating around on these pages sometime soon. I also intend to write a post about how tremendous those red BBC micro function keys are at some point (hint, they are really tremendous).

Mark performing surgery on the Beeb. That's one Speech ROM going in as well as a battery pack replacement.
Th...th..th..that's all folks!


If you enjoyed this post, then you might want to visit your doctor and explain the symptoms to him or her. If you are sticking around for a bit anyway, then you might want to read about some Raspberry Pi posts. If you hate this blog, then you will really hate this post, not to mention this one.
Public noticeboard

Public noticeboard

Last year I set up an experimental public noticeboard on Linoit and was pleased to find that people actually used it and kept their comments child-friendly. So, I have decided to keep it running. You should see a link appearing in the top right of this page.

I am not sure whether blogger will let me embed it below, but you can also find it on my other website.


Pond life

Back in 2014 I wrote a pond life simulation in BBC BASIC for Windows and promised to share the source code.

With thanks to Ed for the prompt, I have spent the morning getting it ready and it is now available for download from my OneDrive.


In this simulation, a number of 'critters' move around a world trying to stay alive. Critters eat grass, and if they don't get enough they die. Each critter is blind and moves around randomly in the hope that they will find food or a mate (they don't have Tinder nor do they have the Tesco app).

There are a number of parameters that you can play around with, including:

  • how many critters start out;
  • how likely a critter is to die of old age or hunger;
  • how quickly the grass grows;
  • how likely two critters will breed;
  • how satisfying the grass is;
  • how many critters can be born in one 'litter';
  • and more.

This simulation is intended as a bit of fun only and I hope you enjoy it. Whilst commenting the source code I have noticed at least two places where the efficiency of the simulation is really bad. I mean REALLY BAD and massive improvements are in the pipeline.

Until then, enjoying being a pond god and I'll see you for the next geeky post which I promise will be about something.

If you want more life simulations, then you might like this post, or, who knows, even these ones.

Maybe you just want to write something on the noticeboard.

DOSBox for RISC OS

I have recently discovered that DOSBox is available for RISC OS. If you didn't already know, DOSBox is an x86 emulator that lets you run all of your favourite DOS software on a wide variety of platforms - including Raspberry Pi's running RISC OS.

This post will primarily deal with DOSBox running under RISC OS, but it is hoped that my reader will immediately go and grab a copy for her own OS, if not get the wonderful RISC OS installed on Raspberry Pi, like, this minute.

How to install
Simply find DosBox in the '!PackMan' package manager. What are you waiting for?

Getting started
The first thing you will want to do is create a folder on your Pi for all of your delicious DOS programs. The next step is to map this folder to a drive in DOS.

When you first launch DOSBox, you will see the Z: drive. There is not much you can do here. The names of your drives will be different, however on my machine:

mount c SDFS::RISCOSpi.$ (maps the Pi SD card as 'C:' drive)
mount d Fat32fs.RISCDISC.$ (maps my 'RISCDISC' flash card as 'D:' drive)
mount a RAM::RAMDISC0.$ (maps the ram drive as 'A:' drive)

If you need a primer in DOS commands.

To change to a new drive, type drive letter followed by a colon:

A: (will change to drive A)

To navigate to a new sub-directory:

cd directoryName

To move up one level:

cd..

To run a program, look for a .exe .bat or .com file (and type it)

To read a text file:

type filename

To get a directory listing

dir
or
dir /p (paged mode)
dir /w (wide mode)

For more help with DOSBox, type 'help'.


The software
This is the reason you want DOSBox, to run all of that amazing software written before 1990 (before Ant and Dec were a thing and when MTV was actually about music).

I spent this morning raiding my IBM 286 PC for games and apps that I'll probably want to run under RISC OS. Here is some of my DOS software running on my Raspberry Pi:

One of the ubiquitous chess programs for DOS. This one is quite good. I'm going to let it beat me later.

I have no idea what I am doing but I'm glad I get to fly around in a spaceship that looks like it has been drawn by my ten-year-old nephew.

Dangerous Dave, no relation to Rik Dangerous, or Danger Dog.

Well Done, Dave!


Can you defeat the invaders' dastardly 'move right... then move left' strategy?

''Wilbling Wilf was a favourite of mine. Written by now computer security expert Graham Cluely @gcluely. The aim of the game is to guide Wilf through all infinity levels dopping jam from your leaky jam sandwich, whilst not getting eaten by the evil Glumphs!

Intra-Galactic Battles. I often dust this off and have a battle

Intra-Galactic Battles. Did someone say Startrek? It's okay, some of the ships look like they have been copied from Starwars too. Nevertheless, this is a truly awesome game. You choose to build ships from one of four different races and then go toe-to-toe in a slugging match of resource management against the computer.

Yay! ASCII clock and calendar. I don't know why I don't do a blog post about ASCII clocks. Oh, wait, I already have.

There is now even more reason to leave your Raspberry Pi switched on all day. Relax as you watch the virtual fish tank do its thing. Can you see the little snail?

Hello

Problems
As with most emulators, you will find some of your software does not run as expected. I encountered a few programs that would disable the mouse in RISC OS, or cause the whole system to freeze. On the whole, software tended to behave itself.

The sound emulation sometimes goes a lot wrong. Typically adjusting the emulated system speed will fix this problem. You can speed up and slow down the emulation (essential for Wilf) using CRTL+f11 and CTRL+f12.

You will also probably want to drop the resolution of RISC OS. Click on the monitor icon on the bottom right of the icon bar and select 800 x 600 for an authentic experience, depending on your own hardware.

Th...th...th...th...that's all folks!
If you enjoyed this post then you should go and get DOSBox installed on your Raspberry Pi. If you are sticking around for a bit, then you might like to read some posts about Intra-Galactic Battles, or just something completely different.

Lunar Eclipse Jan 2019

This morning, I woke up at 4am, dragged my geeky body out of bed, grabbed a coffee and braved the freezing Yorkshire air to observe the eclipse.

Our ancient ancestors had various explanations for the eclipse or blood moon. The Chinese thought that an eclipse was caused by a giant cosmic toad-like dragon; the ancient Mesopotamians though that it was an attack by demons; the ancient Mayan civilisation thought that the moon was eaten by a jaguar; while the Egyptians assumed it was a beastly cow that was to blame.

Although we now know that a lunar eclipse is caused by the full moon crossing the plane of the ecliptic, the explanations of demonic animal attack described above are still more accurate than the best explanations of the most gifted flat-earth astronomers, who, to date, have failed repeatedly to provide a model for their flat earth belief. Although it is lamentable, that 2% of the population claim to believe that the earth is flat, this is not a post about how wrong flat earth supporters are. If you want to read about flat earth, I suggest this post.

I wanted to create this post to show the two apps I use for predicting eclipses, one old, one new, or in other words, how did I know that I needed to wake up at 4am this morning (and not as my colleague put it, 'I was coming to work this morning and I noticed that the moon looked a bit funny')?

My trusty go-to eclipse app on the BBC Microcomputer
The first app is 'eclipse' for the BBC Microcomputer. It reliably predicts lunar eclipses, even showing start times and end times with a graphic. The image shows the path of the moon (small circle) through the Earth's shadow (big circle). I still run this on my trusty BBC Micro. I think that it came on a Beebug magazine once. I am always impressed with its accuracy (EDIT image shown is NOT from this morning).

The second is Eclipse Guide developed by Vito Technology, Inc. who also developed the wonderful Sky Walk 2 app. This app is ostensibly a new and improved version of the app above, with better graphics, maps and a bit more information, oh and you can carry it around in your pocket.

Eclipse guide, showing handy information, such as when you need to go outside to freeze and when you need to get excited and tell people who are currently inside to come outside, and when to tell people that it is too late, they have missed it.

Skipping ahead to the near future, this is the app with details about a future solar eclipse, unless you are reading this in the future and the eclipse has already happened.
Well, that's it for today, suffice to say that the eclipse was a beautiful sight to see and I am looking forward to the next one, albeit partial on the 16th July.

If you are sticking around and have nothing better to do, then you might like to look at some similar posts from the history of this blog.

Label