tag:blogger.com,1999:blog-21969957288043990792024-02-23T08:38:54.461+00:00Rob's RamblingsJust a random diary, but also a place to put any technical notes and journals that are worth keeping and sharing.Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.comBlogger105125tag:blogger.com,1999:blog-2196995728804399079.post-56910808541662097042022-11-16T22:13:00.002+00:002022-11-16T22:13:14.796+00:00Adventures in the Fediverse<p>As many of you reading this close to the date of publication, Twitter is in meltdown. Elon Musk has bought it, taking it into private ownership, and has been implementing his own brand of reform. Much has been written elsewhere, so I'll not go into details, but the trashing of the verified status system, sacking of , or resignations by, almost all senior staff, trust & privacy, moderators and developers, this has all caused chaos. As such, anybody with any sense has been looking for an alternative to Twitter.</p><p>This is where the fediverse, principally championed by Mastodon, has stepped up. A distributed, federated, collection of servers, all of which can talk to each other, not operated by any one individual or company, but each instance by their own users. Anybody can set up a server and join in. So I did. This is my tale..</p><p>I won't detail all the problems I had doing this. I'm merely going to indicate what <i>worked.</i> This is why you're here, after all!</p><p>I'm installing on a virtual server, that actually runs on a physical machine at home. This is behind a normal home broadband connection, with a Sophos UTM firewall between then. The ISP supplied router has the UTM as it's DMZ, so all incoming connections are passed directly to that. The UTM has reverse DNAT set up to forward ports 80 and 443 to a virtual machine which ruin <a href="https://nginxproxymanager.com">Nginx Proxy Manager</a> in a docker instance.<br /><br />The domain name is handled by namecheap.com, and in their DNS, I set hostname "@" as "A+Dynamic DNS Record". The UTM supports their flavour of Dynamic DNS directly, so it is set to update this should my visible external IP change.</p><p>Mastodon was installed on a new VM freshly installed using Ubuntu 20.04 and updated with apt update && apt upgrade. (I tried first using the latest version, 22.04, but failed multiple times. YMMV but the docs say 20.04, so I went back to that and succeeded.) I followed <a href="https://docs.joinmastodon.org/admin/install/">this</a> installation guide on the official github repository. This almost worked; almost at the end I got a complaint that Ruby 3.0.4 was required - the guide tells you to install 3.0.3, so I went back and reinstalled ruby, and then continued. </p><p>Do follow the directions to install nginx on your mastodon server, as its used to handle static content as well as passing things to and from the mastodon code., however DO NOT INSTALL CERTBOT/LetsEncrypt.</p><p>THIS is the /etc/nginx/sites-enabled/mastodon file I ended up using:<br />
</p><pre>map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name irrelevant.me.uk 192.168.200.109 "";
keepalive_timeout 70;
sendfile on;
client_max_body_size 0;
root /home/mastodon/live/public;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
add_header Strict-Transport-Security "max-age=31536000";
location / {
try_files $uri @proxy;
}
location ~ ^/(emoji|packs|system/accounts/avatars|system/media_attachments/files) {
add_header Cache-Control "public, max-age=31536000, immutable";
try_files $uri @proxy;
}
location @proxy {
proxy_set_header Host irrelevant.me.uk;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Proxy "";
proxy_pass_header Server;
proxy_pass http://localhost:3000;
proxy_buffering off;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
tcp_nodelay on;
}
location /api/v1/streaming {
proxy_set_header Host irrelevant.me.uk;<br /> proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Proxy "";
proxy_pass http://localhost:4000;
proxy_buffering off;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
tcp_nodelay on;
}
error_page 500 501 502 503 504 /500.html;
}
</pre>
<p></p><p>In server name, I set the official name of the instance, the IP address, and, because all else failed, "" to make it accept anything.<br /><br />The rest based on code in a github post I've now lost the link to, sorry! Note that there is no SSL in here any more.<br /><br />Note also that I has to hard-code the hostname in the <i>proxy set header Host </i>directives. This means that whatever address you use in the URL to connect to the server, it passes the correct hostname through to mastodon. This was the critical bit that stopped me getting 403 errors on any access - it seems that mastodon is locked tight to the domain name you set when you install it.</p><p>Check you can connect locally via http://ip_of_your_server/ and get the front page!</p><p><br /></p><p>In nginx proxy manager, I set nothing unusual. Set the domain name you want to serve, point it at http://ip_of_your_server:80, set Force SSL and allow NPM to deal with letsencrypt to get your SSL set up. </p><p>Your instance should be accessible at the domain name you have set up!</p><p>There are some things I want to tidy up. I've not tested the streaming part yet - I'm seeing 502 errors in the logs, but I'm not sure why yet, or what it is that's using it. Also, every line in the log seems to be coming from the ip of NPM, so there's more to set up here to identify the original IP. However, this is the first time I've used nginx, so it's all a bit of a learning curve. For now, I'm just glad I can actually read and post things!</p>Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-34804562616803917452018-09-17T20:54:00.000+01:002018-09-17T20:54:19.475+01:00Some contemplating on frame storage formats and clashes thereinI recently posted a little bit on how I now store contributed videotex (teletext and viewdata) frames within a database, so as to make accessing them far easier on the application side.<br />
<br />
To do this, I had to decide on exactly <i>how</i> to store the visible content of the frame. Everything else is easy; I crated a secondary table holding key=>value pairs, which means it is very easily expandable, and any application needing particular data can go look for it's own, and not be confused by anything extra.<br />
<br />
So. The frame content itself. I didn't get much help looking at existing storage formats, as I've got at least 17 types documented, and others I know about. I may however have been influenced somewhat by them.<br />
<br />
When you think about a viewdata frame, or a teletext page, you automatically see the 23-25 lines by 40 columns of static image. Almost every frame you will find that has been saved out by a terminal emulator, or teletext captures, will consist of those 920, 960 or 1000 bytes of data, perhaps with some meta-data accompanying, sometimes not. I think that every third-party viewdata host that I have so far encountered also stored its pages so. Individual characters took up a single bytes as per their ASCII character code, and colour and control characters were also stored as a single byte. For teletext, this uses the non-display codes below the space, as there is no concept of cursor movements, carriage returns, etc, on a teletext screen, which is what these values are used for in a serial-terminal based service.<br />
<br />
Prestel, and viewdata generally, is however serial. Frames are sent to the user as ASCII characters, but the colour and control codes are sent as command sequences: Escape then a capital letter. So, what might be stored in a teletext page as "<01>RED<02>GREEN<07>WHITE" would be sent to a viewdata terminal as "<ESC>ARED<ESC>BGREEN<ESC>GWHITE". Short lines would be terminated by a carriage return and linefeed, so reducing the need to send the whole 40 characters.<br />
<br />
Now.. Prestel itself is known to have stored the frame data exactly as it would be sent to the user. There was a hard limit of 920 bytes available to the editor to use, and colour codes, etc, took up two of them. This made creating complicated graphical pages somewhat difficult, as too many colour changes could quickly eat up all the allocation. (Response frames were even worse; you only got 716 bytes to play with!) This is probably why all third party viewdata servers stored their page as the 22x40 character full image, with the control codes stored as per teletext. Doing this allowed for much more colour and graphic rich content than was possible on Prestel itself - the conversion was done on transmission. The actual codes stored varied - some systems used 7 bit data throughout, some used top-bit sett letters to indicate that letter needed the escape sending before it, some used 7 bits for visible characters, and top-bit set control codes (codes in the range 128-159) and at least one had everything with the top bit set!<br />
<br />
So fast forward 30 years, and I'm writing code to handle saved viewdata pages and display them on this new-fangled World Wide Web thing. There is zero support for viewdata and teletext format images, so we have to roll our own, converting saved pages in any number of formats into PNG or GIF (to account for flashing characters) images that a web browser can display.<br />
<br />
As an intermediate stage, I have to pull that 22-24x40 matrix of characters out, before plotting them onto a graphics image for sending to the viewer. This intermediate block of characters I called an "internal" format, and was 7-bit clean, so codes below space for the colour codes, and the rest visible.<br />
<br />
For nearly ten years this worked fine, and this internal, intermediate format, was the format used when I created the page database.<br />
<br />
It is only this week I hit a problem with this, and it is down to a peculiarity with how Prestel stores Response Frames. (And, I assume, other frames that are not simple static pages.)<br />
<br />
A response frame contains a number of fields that are defined by the editor when they create it, and are either filled automatically by the Prestel server when it displays the page, or can contain text or data to be entered by the user. When the user hits # on the last field, they are given the option to send (or not) the page to the IP. It is then delivered to their mailbox in a filled-in state.<br />
<br />
When defining a response frame in the standard Prestel online editor, a field is specified by typing, e,g. Crtl-L n 30 Ctrl-L will create a field of 30 characters length containing the subscribers' name - on pressing the second Ctrl-L the system will display 30 "n"s in the required position. The same procedure is repeated for any other field you request. What gets stored in the Prestel database is a single Ctrl-L and 30 "n"s.<br />
<br />
When you retrieve a page from Prestel using the "Bulk" Online editor, it is sent exactly as stored, so you get the Ctrl-L and sequence of letters alongside the Escape'd colour codes and CR/LFs for short lines. Uploading a replacement frame you specify the layout in the same manner.<br />
<br />
Those of you familiar with the standard ASCII control codes will recognise that Ctrl-L is also known as "Clear Screen", and is a character that is usually sent before sending the frame content. This is probably why it was used for this purpose - finding it in the middle of the frame content would not make sense, so it was re-purposed as a flag for start-of-field. Obviously this is never actually sent to the user, but is replaced by a space when viewing on a terminal.<br />
<br />
Now ...<br />
<br />
I have two small databases in my posession that were pulled back down from Prestel at some point, and these include a number of Response Frames.<br />
<br />
When I converted the data to my "internal" format to load them into the database, this normalised the control codes to 7-bit data, filling that lower 32 bytes of the table. On displaying, these codes were sent as <Esc><code + 64>, this recreating the colour sequences.<br />
<br />
When it comes to a <ctrl l>, however, this was never stored in the database - the normalisation routine ignored it. However, even if it had been saved, on recall, it would have been translated into an <Esc>L, the sequence to end double-height text.<br />
<br />
So, to summarise, the normalisation I did, in most cases, lost the start-of-field character because it wasn't expected in a frame. And if it did make it though, it would be indistinguishable from the "Single Height" code, and as that was allowed anywhere in a response frame, it couldn't be deduced from context.<br />
<br />
I never noticed, because there were so few frames affected, and there was no need to process the fields the code indicated, anyway!<br />
<br />
This last month, however, I've been working on a viewdata host program that will run on a modern server, and which I could use to receate the look and feel of using the original Prestel service. I've been testing this using an actual Prestel terminal, and it's been great fun! It's only when I stumbled across one of these response frames, and decided to support them, that I discovered this problem!<br />
<br />
Looking into how other file formats solved this, it seems that at least one of them uses <Esc> itself as the field indicator. If stored in the database like that, when expanded on recall this would translate into an unused code sequence, in viewdata, so is a suitable alternative. I will translate the affected pages, eventually!<br />
<br />
<br />
So, a decision taken about 10 years ago came back to bite me this week. And it's all to do with 25 year old data in a file format determined 40 years ago that everyone else decided needed to be done differently.<br />
<br />
Well done for making it this far!<br />
<br />
<br />
As an aside .. Prestel added support for "Dynamic frames" which were basically frames that could contain cursor movement characters. This meant you could go back and change things after you had already drawn them. This was easy for them, as they stored data in an as-transmitted form anyway. It's no so easy for host software that expects it's frames to be stored in a fixed matrix! I'll be working on this, one I find some original examples....<br />
<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-8232816269403335732018-09-14T02:44:00.001+01:002018-09-14T02:44:54.307+01:00The Videotex Database - submit your pages now!When I started viewdata.org.uk (and teletext.org.uk), I just uploaded the pages and databases I had as-is, and had my scripts deal with them on an as-accessed basis. This is because I wanted to preserve the data as much as possible - any translation to a new format (such as JPEGs) would inevitably lose data, as well as context.<br />
<br />
As time has moved on, and as the variety of data formats I have had to deal with has proliferated, this has increasingly become somewhat unwieldy. I decided, therefore, to try and rationalise things somewhat.<br />
<br />
Each of the various file formats I was dealing with had different properties. Each had strengths, and each had weaknesses. I could not decide on a single common format to try and convert files into.<br />
<br />
Rather than create a new "perfect" file format, I decided therefore to store the frames within a database. By having a primary table for the page content and certain static data, and a separate table for meta-data, any particular properties a particular file format had could be accommodated.<br />
<br />
Once the data is held within a standardised database, of course, it makes it much easier to access it and use it from many different applications. The first, and most obvious, is the ability to search across the entire database for key words or phrases. This is implemented on the front page of <a href="https://db.viewdata.org.uk/">the database</a>.<br />
<br />
The main in-browser viewer for the saved pages implements a timeline function, where you can see how a given page has changed over time. See, for example, <a href="https://db.viewdata.org.uk/ceefax1/19980917123900/1020001.html">the CEEFAX news headlines</a>.<br />
<br />
And of course, for viewdata pages, once can implement a dial-up host, so 1980s terminals can connect directly into the service and browse it exactly as they did at the time. (This is mostly done, just pending further tidying up!)<br />
<br />
Currently the database contains page data I have collected myself or already been sent. However I am aware that there is a vast amount more out there. <a href="https://twitter.com/grim_fandango">Jason Robertson</a> has been amazing at rescuing teletext pages off old video tapes, and I know of at least one previous Prestel IP that has a massive archive of pages still extant, albeit sat on very old hardware. I've got part of The Gnome At Home, and I know the rest still exists.<br />
<br />
This week's task (one of the various "I'll do something" for Retrochallenge 2018/09) was to create a page for viewers to directly submit their pages to the database. <a href="https://db.viewdata.org.uk/submitfile.php">This is now complete!</a> It actually places the data into a queue, after briefly validating it, so it can be checked and added later. I would welcome any contributions, anything from a single frame to a complete service backup! If you need help, feel free to drop me a line.<br />
<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-78615693563343314872018-09-03T00:07:00.002+01:002018-09-03T00:09:09.174+01:00A Viewdata HostOne of my aims when setting up <a href="https://www.viewdata.org.uk/">viewdata.org.uk</a> was to create a means by which readers could experience connecting to a viewdata service, and also to use such to present what saved pages we had in an appropriate context.<br />
<br />
Sadly, there was nothing available that I could find that would allow me to run an actual host, and although I had some success firing up my old BBC Micro based viewdata BBS, this didn't last long due to multiple hardware failures.<br />
<br />
Back up to today, and, as I mentioned yesterday, John Newcombe has written, and is running, his own viewdata host called TELSTAR. I've discussed some things with John, and had been hoping to blag a copy of the software, but it seems that it's not quite what I am looking for.<br />
<br />
Now, I have been building up a database of frames - this is yet another unfinished project - over at <a href="http://db.viewdata.org.uk/">db.viewdata.org.uk</a>. This database is what I want to use as the source of the data for a host system.<br />
Although it's mostly got teletext loaded up, I do have a complete copy of the PC Plus demo of Micronet loaded up, which can act as a starting point.<br />
<br />
So, what to do? Well it's obvious, write my own host software. I've been putting this off for years, but, it's #retrochallenge time, and I do want to achieve something...<br />
<br />
A few hours last night got the bare bones sorted out, and a bit of time debugging, and we're at a point where I can dial in and navigate between pages! Woo!<br />
<br />
Whereas John has been concentrating on content for his viewdata host, I'm going to be working on making mine more of a "Prestel Emulator"; it should feel as close to the original as possible. I've a lot to do, obviously, but not bad for an few hours work.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1UM_rkim6w6aD8d6GimEUGdHdvOHwl_hlvTrUZ6n2SLU5gbGNh7vP1uBpOFeOaltexcZQ1xSDPyecxtH7tJSNbiYgBxM5gs7o9_LbpUBeh_gpx43-jm0Gj4MSPGLDdh4XFnmF2RAVeMM/s1600/DSC_0866.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1UM_rkim6w6aD8d6GimEUGdHdvOHwl_hlvTrUZ6n2SLU5gbGNh7vP1uBpOFeOaltexcZQ1xSDPyecxtH7tJSNbiYgBxM5gs7o9_LbpUBeh_gpx43-jm0Gj4MSPGLDdh4XFnmF2RAVeMM/s400/DSC_0866.JPG" width="400" /></a></div>
<br />
<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-74098171825120620392018-09-01T17:43:00.000+01:002018-09-01T17:43:08.169+01:00Modem Emulation - an RC2018/09 prologueMost of you will know by now that I'm really into preserving the memory of Prestel and Viewdata systems generally. I run <a href="http://www.viewdata.org.uk/">www.viewdata.org.uk</a> which, while a bit long in the tooth, is going to get a massive update "soon" ... But today I'm going to talk about hardware.<br />
<br />
<a href="https://blog.irrelevant.com/search?q=bbs">Some time back</a>, I fired up my old viewdata BBS "Ringworld" - this operated on a collection of BBC Micros - one per connected user - and an Acorn A5000 acting as fileserver. I connected these to the internet using a motly selection of modems, ATA telephony adapters, and serial terminal adapters.<br />
<br />
The long shot was, for a user dialling in, the call was answered either by the exact same modem it always had been, connected to a SIP ATA - the digital data was transformed to analogue, before being turned back to digital by the modem. This always seemed like a poor idea to me. What would be better is if some bit of software answered that digitised telephone call, looked at the whistles and warbles, and turned it directly into a sequence of ASCII bytes for delivery to a telnet port.<br />
<br />
I had found an program called iaxmodem that allowed an asterisk based PBX to emulate a modem, but it was focused on faxing, and I just couldn't get it to work with the V23 dial-up I wanted. But it was close. I spent the next few years, off and on, searching for changes to that, or SIP based alternatives, with no luck.<br />
<br />
In the meantime, John Newcombe decided to write <a href="https://glasstty.com/wiki/index.php/Introduction_to_the_TELSTAR_Viewdata_system">his own viewdata host service</a>, called Telstar, in Python, and that can be accessed via a raw-socket. (like telnet, but without the features!) There's not a lot of software out there that can talk both Viewdata display protocols and connect to a socket, however. Richard Russell wrote a <a href="https://glasstty.com/wiki/index.php/Introduction_to_the_TELSTAR_Viewdata_system#Connecting_from_a_Modern_PC_or_Mobile_Device">example viewdata client</a> that could do it, and you can connect from BeebEm if you load up a suitable comms package and set the RS423 IP parameters. <br />
<br />
There have also been a couple of projects to produce a "WiFi Modem" that, basically, looks like a hayes-compatible modem that you connect to via RS232, but it in turn connects to your WiFi, and onwards to a telnet port out on the internet. This is great for things like BBC Micros, Commodore 64s, etc., where you can just swap out your period modem for this new device. Not so good for dedicated terminals, or e.g. the ZX Spectrum VTX5000 where the modems are built in.<br />
<br />
Then, out of the blue, an old friend, Darren Storer, posted on the BBC Micro facebook group (I think it was there..) that he'd set up a dial-up number for Telstar, and could people test it. It took me a week or two to get there, but I pulled out a terminal, dialled the number ... and it didn't work. Not at all. I did, however find out the software he was using ... <a href="https://github.com/proquar/asterisk-Softmodem">asterisk-Softmodem</a>. This was exactly the sort of project I'd been looking for all those years. But, it didn't work for him/<br />
<br />
I pulled the code and had a look, and could see nothing wrong. So, firing up an asterisk server, and installing it, I tried to debug. The first issue was my terminal was not locking onto the carrier, so I added a t(-10) to increase the volume, and that sorted that!<br />
<br />
Next problem, I wasn't getting much data on screen - many characters were just missing! This was somewhat easy to diagnose, as I had an inkling after seeing how you configured asterisk to use softmodem - you specified the number of data bits, being between 5 and 8. The example had it as 8. Now Prestel, and of course the terminals, all used 7 bits with even parity. What I was seeing was the terminal being sent 8-bit data, and of course interpreting that as most of the characters having an incorrect parity bit, and ignoring those!<br />
<br />
Now, I can set a software terminal to 8bit data, but not the termnal - there is very little you can configure as a user on these things. Because the project had no support for parity it looked like a dead end, but that wasn't going to stop me - I'd waited years to find this, and wasn't going to give up now!<br />
<br />
Delving into the code, it actually turned out to be a nice simple and straightforward bit of programming. Adding parity support turned out to be fairly easy... I've published the modifications to my own <a href="https://github.com/irrelevantdotcom/asterisk-Softmodem">github fork</a> and submitted a pull request to send them back to the original author.<br />
<br />
So now, I can dial into Telstar, <a href="http://www.ccl4.org/">CCL4</a>, or anywhere I want to set up a number for!<br />
<br />
If you want to try it, the number for Telstar is 0333 340 3311 (from outside UK, +44 333 340 3311). Calls cost the same as an 01 or 02 and are included in any inclusive minutes you may have. Call s are free for <a href="https://aa.net.uk/">A&A</a> customers.)<br />
<br />
I can't guarantee that number will stay up, and it may not work from time to time if I'm tweaking things, but if it turns out useful to you, please let me know in the comments below!<br />
<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-70416147910630828512018-03-16T20:35:00.001+00:002018-03-16T20:48:37.473+00:00Archiving my Filing with tesseractI hate filing. We get lots of paperwork that needs keeping, and it's a pain in the neck. I've got boxes of the stuff, and every time I need something it's a major task to find the item we want.<br />
<br />
So, the plan is to digitise it all. We have a network connected photocopier that will also act as a sheet-fed scanner, saving as PDF files directly onto a network share. That's the first step, scan things.<br />
<br />
But what to do next. A pile of random image-within-a-PDFs isn't much use, not without being sorted into, at least, some sort of order.<br />
<br />
I could just browse the folder, and drag-and-drop the files into the relevant folders, but that's a lot of work and time consuming. I'm a great believer in "let the computer do the work", so I threw together a little script to do the job. Here we go:<br />
<br />
<br />
<pre>#!/bin/ksh
thisFILE="$(whence ${0})"
progName="${0##*/}"
myPID="$$"
FUSERout=$(fuser ${thisFILE} 2>/dev/null)
typeset -i numProc=$(echo "${FUSERout}" | nawk '{print NF}')
if [[ "${numProc}" -gt 1 ]]; then
echo "${progName}: another instance(s) of [${thisFILE}] is currently still running\
[$(echo ${FUSERout} | sed -e 's/ */ /g')] - exiting THIS ${myPID}] run."
exit 1
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
IN="/TheDisc/DocumentArchive/Scans/new/"
OCRD="/TheDisc/DocumentArchive/Scans/ocrd"
BASE="/TheDisc/DocumentArchive"
if [ -z "$1" ]
then
cd $IN
for i in *.jpg; do
if [ -e "$i" ]
then
echo "Processing $i"
tesseract "$i" "$OCRD/$i" pdf
if [ $? -eq 0 ]
then
mv "$i" "$OCRD/$i"
else
mv "$i" "failed/"
fi
else
break
fi
done;
for i in *.pdf; do
if [ -e "$i" ]
then
pdfsandwich "$i" -o "$OCRD/$i"
if [ $? -eq 0 ]
then
rm "$i"
chgrp users "$OCRD/$i"
chmod g+rw "$OCRD/$i"
else
mv "$i" "failed/"
fi
else
break
fi
done
fi
cat $DIR/movematrix.txt | tr -d "\r" | sed 's/\\/\//g' | while read STR
do
if [[ $STR ]]
then
srch=${STR%:*}
dest=${STR#*:}
if [[ $srch ]]
then
echo "Scanning for $srch";
pdfgrep -i -r -H -m 1 "$srch" "$OCRD" | cut -d: -f1 | while read line
do
echo "Moving $line to $dest"
mv --backup=existing --suffix=.dupe "$line" "$BASE/$dest"
done
fi
fi
done
</pre>
<br />
This can be broken down into three sections. The first just makes sure that this is the only instance of the script running - it's intended to be run from a cron task, but it can take some time, and I quickly found out that if I allow another instance to fire up before the previous one finishes, then you can very quickly bring your server to its knees! I can't honestly remember where I got this bit of code from; somewhere on the 'net! Stackoverflow, probably!<br />
<br />
The next section scans through the incoming scans folder and OCRs them! If it's an image file, it uses tesseract-ocr to do the job, creating a nice new PDF at the end. If it's already a PDF, then we use pdfsandwich, which handles all the image extraction, OCR (using tesseract-ocr) and re-compilation with the text layer.<br />
<br />
Finally, load up a "what-goes-where" matrix file, and use pdfgrep to scan all those nice new PDFs to find known matches and move the files off to where they should go.<br />
<br />
movematrix.txt controls all this part. It's a simple file format :<br />
<br />
<pre>National Savings:Bank/NS&I
TSB Bank plc:Bank/TSB
Bank of Scotland plc:Bank/Halifax BoS
Dental Department|Dentist:Medical/Dental
npower:Utilities/npower
TV LICENSING:Utilities\TV Licensing
</pre>
<br />
Basically, it's <search string>:<folder to place matches>, one entry per line. Blank line are ignored.<br />
<br />
You can use multiple search strings, as in the dentist example, separated by |, or indeed any other search parameter syntax allowed by pdfgrep. I'd recommend actually using something like an account number or other unique reference that will allow you to identify correspondence more accurately. But it does the searches in sequence, so if you get "false positives" for some search terms, move them to the end so that others get a chance to catch the documents first.<br />
<br />
By default, the script does a case-insensitive search, and the consequent move does backup sequencing, so you won't lose anything if a file of that name already exists. I also swap about all / and \ so that you can paste in (relative) paths in a Microsoft format, as shown above, and it'll cope. Similarly, we ignore CRs and blank lines, so you can safely edit the file using a Windows editor such as Notepad, and we won't get all messed up.<br />
<br />
Just run the script fairly regularly via cron, and it'll do all your filing for you!<br />
<br />
And of course, if it misses a file, you can still drag-and-drop it manually! Or edit the matrix file to add a search term.<br />
<br />
<br />
Dependencies - ksh, simply for the first "don't run me twice" bit. <a href="https://github.com/tesseract-ocr/tesseract">tesseract-ocr</a>, <a href="http://www.tobias-elze.de/pdfsandwich/index.html">pdfsandwich</a>, <a href="https://pdfgrep.org/">pdfgrep</a>.Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-48441270811738803802017-05-30T21:45:00.000+01:002017-05-30T21:47:14.306+01:00Trying hard<br />
<br />
It's six weeks since my dad died. It's been .... difficult.<br />
<br />
Then the <a href="http://www.bbc.co.uk/news/uk-england-manchester-40010124">suicide bomber</a> at Manchester Arena last week. Targeting kids, and the parents waiting to pick them up. Kids! One casualty was only 8!!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.bbc.co.uk/news/uk-40012738" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Saffie Rose Roussos" border="0" data-original-height="371" data-original-width="660" height="179" src="https://ichef.bbci.co.uk/news/660/cpsprodpb/D9D7/production/_96176755_saffie_pa.jpg" title="Saffie Rose Roussos" width="320" /></a></div>
My daughter is 10. Had her music tastes been different, it's possible we would have been there - she reports one of the kids in her class actually was at the concert; school sent round a letter saying several pupils had been there, but all were safely accounted for. It's only a couple of miles away, I saw some of the ambulances rushing in that night!<br />
<br />
So that hit me hard. I spent the next few days feeling stunned. Shell-shocked, I guess. Fighting back tears all the time. Just like most people in the area! I've been glued to the TV News, glued to Twitter, had local radio on in the car and kitchen... watching the local paper websites.. It does seem that the Police have a handle on things, which is gratifying, and they are making progress tracking down all those whom have connections with the bomber.<br />
<br />
To try and recover, I've tried throwing myself at various unrelated projects. Here are some of them -<br />
<br />
<br />
<ul>
<li>Finishing the stuff I started for Retrochallenge..</li>
<li>Cataloguing and Imaging the <a href="https://twitter.com/irrelevant_com/status/866242465711484928/photo/1">vast number of BBC Micro floppies</a> I have</li>
<li>Adding BBC Micro SSD/DSD/ADx image support to <a href="http://www.tc4shell.com/">TC4Shell</a></li>
<li>Getting a VPN client working on my <a href="https://community.sophos.com/products/unified-threat-management/f/management-networking-logging-and-reporting/92451/pptp-interface-mppe-negotiation/">Sophos UTM 9</a> firewall</li>
<li>Planning content for the new <a href="http://beta.viewdata.org.uk/" rel="nofollow">viewdata.org.uk</a> (but not yet writing any..)</li>
<li>and watching some TV! (Well, netflix..) Normally I hardly ever watch TV..</li>
</ul>
<br />
<br />
Each works for a bit, then I get distracted, interrupted, or just dispirited. So I swap to something else. Right now, I don't feel up to doing any of them.. I've tried ignoring the news this evening, as there's not been anything new anyway.. but that's not helped either.<br />
<br />
Strangely, Mr Biffo wrote <a href="http://www.digitiser2000.com/main-page/my-mental-health-story-by-mr-biffo">a piece this week</a> that resonated with me. It's one of the reasons I'm writing this... I was hoping it would help.<br />
<br />
I'm not much of a sharer.. this is new to me, So, I'm going to leave this here. If anyone wants to jump in help with any of those projects, feel free to get in touch. Apart from watching Telly - the Mrs is happy to do that with me!<br />
<br />
Stay safe, people. Love you all.<br />
<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-81928013980530444212017-04-23T09:20:00.003+01:002017-04-23T09:20:40.399+01:00End of an Era<div class="separator" style="clear: both; text-align: center;">
<a href="https://jod.org.uk/wp-content/uploads/2017/04/cropped-JOD2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://jod.org.uk/wp-content/uploads/2017/04/cropped-JOD2.jpg" width="400" /></a></div>
<br />
Those of you who follow this blog, or my social media accounts, will know that I don't share too much that is personal on-line. Some people do too much of that - I don't need to check Facebook to see what you had for breakfast, and your tweets about how you met your mates for lunch are just white noise. So, I don't do it. <br />
<br />
There will be exceptions, of course, and this is one.<br />
<br />
Given it is the Easter holidays at school, we decided to grab a few days away with our little one. We don't generally go far, so just stuck with Pontins at Prestatyn. Monday to Friday, just a little break.<br />
<br />
Tuesday afternoon, I get the telephone call I never wanted to get. It was my sister, Jenny: she had picked mum up from shopping in town and took her home, and they had found my dad dead at the foot of their stairs. He had fallen while attempting to carry a folding bookshelf back upstairs.<br />
<br />
Obviously I dashed up there immediately - they live in Wigan - and spent the evening with Mum and Jenny, and the police! Any unexpected death needs investigating, apparently. His body was collected eventually, and will be dealt with by the Coroner. I had to return to Wales, but have been in constant contact with Mum and Jenny ever since, Obviously they are both distraught.<br />
<br />
This put a bit of a damper on the holiday, to put it mildly. Obviously I am going to be exceptionally busy too, helping with Mum, dealing with all the funeral, estate, paperwork and so on. I am pretty sure all my hobbies are going on a back burner for now. So, that's it for Retrochallenge this year...<br />
<br />
<br />
Dad was John O'Donnell. He was a world-renowned aeromodeller, having been involved in the hobby for over 70 years, and having held many records. He contributed to the model press regularly and frequently with articles and model plans, He was a keen photographer, and ran a professional photography business doing commercial and wedding photography for a time. As a mathematician he worked in the aeronautical and chemical industries, before finding a home as a lecturer (in statistics.) He enjoyed serious Science Fiction, and was becoming recognised as intensely knowledgeable on the subject. He was intensely organised, and pretty much everything he did is recorded and filed away neatly. We intend to publish as much as we can.<br />
<br />
We have created a memorial site for him at <a href="https://jod.org.uk/">jod.org.uk</a> - please feel free to visit.Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-26691533825281855202017-04-14T23:22:00.001+01:002017-04-14T23:22:22.450+01:00Retrochallenge Day 14A little more work today.<br />
<br />
The teletext viewer javascript currently expects to find the entire teletext service held within the html of the web page as encoded links. This is great for a static archive, as it places very little load on the webserver.<br />
<br />
I had created a quick bit of php that could construct the html page when loaded, which was the source of the pages I <a href="http://www.teletext.org.uk/rob/ttxbrowser.php?gal=cfn/CFN.TT#100" rel="nofollow">linked to</a> last time. This is all well and good, but does not help with the sort of interactive services I would like to use the viewdata version for.<br />
<br />
So today's work has been adding functionality to request pages from a server, thus allowing for ever-changing pages to be served up instead. This involved not only modifying the JavaScript, but writing a server in php to deliver the requested pages. This also brought out some previously unnoticed limitations in my viewdataviewer class, which I was using to parse the stored data serverside.<br />
<br />
So, the class has had some fixes added, server written, and viewer updated. You can play with it <a href="http://www.teletext.org.uk/rob/viewer_index.html#100" rel="nofollow">here</a>, although there isn't actually anything dynamic on it at the moment. Subpages aren't quite working right yet, but most of the rest is!<br />
<br />
(I did break the first demo, btw, in case you were reading yesterday's post today, when I fixed a "bug" in the class file, but hadn't removed the work-around in the html generator! It's fixed, now!)<br />
<br />
<br />
<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-69145749663825939422017-04-13T21:36:00.001+01:002017-04-13T21:37:57.218+01:00Retrochallenge day 13Blimey, where are the days going...<br />
<br />
OK. I've taken the hacked-about teletext-editor-that-acts-as-a-viewer, and split off the hacks. Then I modified the (latest version of) the teletext editor so that it exposes a bit more of it's internals, as the viewer needs that access...<br />
<br />
It took a bit if trial and error, but seems to work. Code is up on <a href="https://github.com/irrelevantdotcom/edit-tf">github</a> and a demo is (temporarilly) <a href="http://www.teletext.org.uk/rob/ttxbrowser.php?gal=cfn/CFN.TT#500" rel="nofollow">here</a>. I added a touch of code to allow direct linking to specific pages while I was at it!<br />
<br />
Now to look at doing the viewdata browser that I was supposed to be doing in the first place!<br />
<br />
<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-42511843939333785992017-04-10T20:11:00.000+01:002017-04-10T20:11:49.474+01:00Retrochallenge Day 2.. er... 8 ..er .. 10Blimey, has it been a week already?<br />
<br />
OK. I've not done much coding since last time, but I have been reading code and <strike>daydreaming</strike> planning out my next move.<br />
<br />
Now Javascript is not my strongest language. I can read it, and modify it, but actually writing new code is a bit of a challenge. Part of the rationale behind this task was to get myself a bit more familiar with this hideously back to front language...<br />
<br />
The teletext browser I used is that created by Adam Dawes based on Simon Rawles (et..al.) edit.tf editor, and grabbed from Jason's captures at uniquecodeanddata.co.uk. The modifications are to add a pile of new functions, and truncate and or redirect others. <br />
<br />
As the original editor has moved on somewhat since this was done, it seems logical that, if I want to do more mods to it, then i should base my code on the latest version. If I can do it in such a way that I do not need to actually modify the editor, just call it, then that would be best. In PHP I would, assuming it was a class, extend the class in a new file and override the relevant functions. So... How to do this in Javascript...<br />
<br />
I tried using prototypes ... but hit the problem that the editor is written with lots of private variables and functions, which the new functions in the viewer refer to. Using the existing editor as the viewer's prototype doesn't work because it cannot access the private variables. Drat.<br />
<br />
<days pass><br />
<br />
After spending more time than I ever expected looking at javascript objects, inheritances, etc., I have decided not to commit myself to ever having to do anything major in this language!!<br />
<br />
Sticking with Javascript, I think the best approach at this point would, after all, be to fork <a href="https://github.com/rawles/edit-tf">edit.tf</a> and modify it to separate out the actual display part from the editor part, that way I can provide for a viewer, indeed, different viewers... Might even be a mod Simon would like...<br />
<br />
Sigh. Bloody Javascript.<br />
<br />
The other option would be to go back to my own viewdata viewer class, which runs serverside to create the images. I understand this, but I was hoping not to have to do this, as it makes updating the "screen" with the page number being keyed dependant on the server, rather than being local.<br />
<br />
<br />
So, ten days in, and all I've achieved is discovering that what I thought would be a simple task is much more complicated than I thought it would be.<br />
<br />
<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-23924159904248601542017-04-01T20:48:00.001+01:002017-04-01T20:50:44.343+01:00Retrochallenge: Day 1<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIjXVu6n6ugwqQOVtmZPNUy06xHjLX2D4vcsu_icpheT-aMb4Vi_kzOqc_Nnmf6JStkmae60TBSvrxfQpNX385D1om_ziEuVdw-2VD5nB5qDAKBetwnqtn42j37qWcMXd9R7_B29CcuKg/s1600/code.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="46" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIjXVu6n6ugwqQOVtmZPNUy06xHjLX2D4vcsu_icpheT-aMb4Vi_kzOqc_Nnmf6JStkmae60TBSvrxfQpNX385D1om_ziEuVdw-2VD5nB5qDAKBetwnqtn42j37qWcMXd9R7_B29CcuKg/s400/code.png" width="400" /></a></div>
<br />
OK. First day, and I have to do something.. .whether I can keep this up is another matter....<br />
<br />
I had a look at the code used for browsing <a href="http://www.uniquecodeanddata.co.uk/teletext76/">Jason's teletext captures</a>. These use a modified version of the <a href="http://edit.tf/">edit.tf</a> teletext <a href="https://github.com/rawles/edit-tf">editor </a>(the 'viewer'), driven by an html page consisting of a mass of links! The viewer grabs all these, displays the first one, then accepts key-presses to get the next page number, as per a teletext page. Plus it allows up/down arrow shenanigans to skip through.<br />
<br />
Teletext, as you should know, shares the exact same display format as Viewdata, namely 24 (or 25) lines of 40 characters of primary colour text and simple block graphics. As control codes take up a space on the line, this makes it harder than you might think to do multicoloured images..<br />
<br />
So, I've got a pile of dumps of teletext pages over at <a href="http://www.teletext.org.uk/">www.teletext.org.uk</a> so the obvious thing to do is use one of those, see if I can use the viewer just as it is. That way I have a starting point, and can begin to understand the code and decide on the particular direction I want to go.<br />
<br />
I've got a php class in working-but-incomplete state that allows me to manipulate viewdata and teletext pages. A quick bit of code to load one of the teletext archives and then spit out each page as a link took me significantly less than an hour, and only 14 lines of new code!<br />
<br />
So... <a href="http://www.teletext.org.uk/index.php?cat=30_Archived-nbsp~Pages&page=65_Live-nbsp~TV-nbsp~1998">from this,</a> <a href="http://www.teletext.org.uk/rob/browser.php?gal=livetv/LIVETV.TT">to this</a>. I think that's a positive step.<br />
<br />
Today has, however, shown up a lot of features currently missing in vv.class that I need to add in, particularly to deal with the viewdata side of things. That is partly what the whole point of what this was for, though: to get an idea of what I need to do next!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbG2teiejZDpQ6diAZyuvSDYWzm8kQVI0T_pxnvihx9vgkm-ig439q0kDPhDqhpaz8PWwO8IczX6fGb9dfZymiPgLpvG3IFSZ2VPDU97HE20gwCiLg-UHAZDyciqgKlX_b9jwUZp_rbf4/s1600/byebye.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="311" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbG2teiejZDpQ6diAZyuvSDYWzm8kQVI0T_pxnvihx9vgkm-ig439q0kDPhDqhpaz8PWwO8IczX6fGb9dfZymiPgLpvG3IFSZ2VPDU97HE20gwCiLg-UHAZDyciqgKlX_b9jwUZp_rbf4/s320/byebye.gif" width="320" /></a></div>
<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-17940411590801790982017-03-30T15:01:00.000+01:002017-03-30T15:06:53.915+01:00Retrochallenge 2017/04OK... after only a few years* hiding away, I've put myself in for this again.<br />
<br />
I've set a much smaller goal this time; something I think I <i>can</i> achieve, instead of something I <i>want to</i> achieve! This is, I think, an important difference. I got nowhere the last two times, mostly because I was a bit too ambitious for the limited time available to me. (I've only sort of partially achieved the "tidy the cable nest" of 2012, and never did get anywhere with the dial-up thing from 2013.)<br />
<br />
So this year's goal: Write something that will allow browsing a (static) viewdata database from a web browser for use with the new Wordpress-based <a href="http://www.viewdata.org.uk/">viewdata.org.uk</a>. I have a browser already, but it's a bit clunky and not very easy to incorporate into anything else. So a nice re-write is in order, whereby I can take advantage of "modern technologies" like javascript and AJAX calls, to make the effect more seamless, and I intend to "borrow" the code behind edit.tf and the teletext-browser version thereof to make things easier..<br />
<br />
If I can do that, I might try and finish off enough of the new version of the website to actually launch it, but no promises!!<br />
<br />
<br />
<span style="font-size: x-small;">* - Four.</span><br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-36833181535699063282017-03-28T09:34:00.002+01:002017-03-30T13:47:53.303+01:00edit.tf hashing in phpFor lack of somewhere else to put it, herewith a port to PHP of the method of encoding a videotex frame into the hash value used by the absolutely excellen <a href="http://edit.tf/">edit.tf</a>.<br />
<br />
Ok, blogger seems to be upset by quoted php... weird. So... <a href="https://www.viewdata.org.uk/rob/function_to_hash.php">Click Here !</a>Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-73922893229906417322017-03-23T21:00:00.001+00:002017-03-23T21:00:44.931+00:00IMAGE, the MUD.More disk delving coughed up the following log file... Anybody else remember IMAGE ?<br />
<br />
<br />
<pre>*
13 December 1985:
Welcome to IMAGE....
Tel. Nos are 0935-78476/7.
The system is running FREE for
debugging.
Demo character is Code:10006
Name: WALLY , Password: DEMO
Paul Chappell
Viewdata Systems (SW) Ltd,
40/42 Hendford,
Yeovil,
Somerset.
Options Available are:
0. Exit
1. Play IMAGE
2. Chatline
Select Option: 1
Enter Your Code Number :10014
Enter Your Character Name:MENOLLY
Enter Your Password :MADSYS
Initialising Data.......... *** MAIL MESSAGES WAITING ***
Enter MAIL to read them
Press Any Key to Continue:
You are at the south end of a long tree lined road leading
off down a steep hill. Through the branches far to the north
you can see the top of a mysterious tower, surrounded by
trees, purched on the top of high hill.
It is warm and dry here.
You can see A DH BROAD SWORD, SOME PLATE ARMOUR, A STAGGERING WROOT,
Command: MAIL
From: KANE
On : 14/12/85 at 18:46:06
------------------------
THANKS FOR THE BUG....
ITS FIXED NOW. YOU CAN GO WEST AND NOT EAST.
Erase Messages ?Y
Command: I N
Your Journey Continues...
You are half way up a steep hill.
To the west you see a gap in the trees that line
the road. The road continues down the hill to
the north and up to the south.
By the gap is a blue sign.
It is warm and dry here.
*
You can see Nothing Special
Command: SCOR
Name: MENOLLY the Peasant
Weap: DH BROAD SWORD
Arm : PLATE ARMOUR
Str : 17
Exp : 35
Gold: 82
Cakes: 28
Last: SCOR
Has : Nothing
Command: WHO
Somewhere about there is:
MENOLLY the Peasant
Command: A STAGGERING WROOT approaches you
N
Your Journey Continues...
You are at the bottom of a steep hill to the south
to the east there is a stone faced building with
a sign hanging from a tall pole by the front door.
To the north you can see a cross roads.
It is warm and dry here.
*
You can see Nothing Special
Command: N
Your Journey Continues...
You are at a large cross roads.
To the west you can see the entrance to a tall
concrete, official looking building surrounded
by trees.
It is warm and dry here.
*
You can see E
Nothing Special
Command:
Your Journey Continues...
This is a corner of a wide empty road
to the west the road leads to a cross roads.
To the north you can see a building at the
side of the road.
It is warm and dry here.
You can see Nothing Special
Command: N
Your Journey Continues...
You are on a long north south road.
On the west side of the road is a long low brick
building with a large illuminated sign on the wall.
To the north you can see a cross roads.
It is warm and dry here.
*
You can see Nothing Special
Command: W
Your Journey Continues...
You are in a small l shaped room. The walls are covered with
light blue wall paper and there is blue carpet on the floor.
Along on wall is a long sofa, again in blue.
A young and pretty receptionist sits at her desk and says,
"i'm sorry but graham carter is out at the moment."
It is warm and dry here.
*
You can see Nothing Special
Command: E
Your Journey Continues...
You are on a long north south road.
On the west side of the road is a long low brick
building with a large illuminated sign on the wall.
To the north you can see a cross roads.
It is warm and dry here.
*
You can see Nothing Special
Command: N
Your Journey Continues...
You are on a long north south road.
A small east west road crosses here.
To the south you can see a large brick building
at the side of the road.
It is warm and dry here.
You can see Nothing Special
Command: N
Your Journey Continues...
You are standing at a cross roads.
Roads lead off in all directions.
To the north there appears to be a tall
sign by the side of the road.
It is warm and dry here.
You can see Nothing Special
Command: N
Your Journey Continues...
You are on a north south road.
On the west side of the road is a long
brick building, with a sign standing
outside on a tall pole.
It is warm and dry here.
*
You can see Nothing Special
Command: N
Your Journey Continues...
You are on the corner of a road which
narrows to the east.
To the south you can see a long brick
building. There is a tall wooded hill
to the north.
It is warm and dry here.
You can see Nothing Special
Command: N
Your Journey Continues...
You are in a dense dark forest
on the lower slopes of a tall hill.
You can see nothing through the tightly
packed trees and thick undergrowth.
It is warm and dry here.
*
You can see Nothing Special
Command: N
Your Journey Continues...
This is a wide clearing in the forest.
At the centre of the clearing is a tall
triangular stone tower. Standing by the
closed heavy wooden door is a small
metal box with some writing on it.
It is warm and dry here.
*
You can see Nothing Special
Command: 093582277 77822
THE HEAVY DOOR SWING OPEN
You are in a small dusty stone room
within the tall tower. In the west wall
is a small doorway leading to a small
metal chamber. A wooden door stands
open to the south.
It is warm and dry here.
*
You can see Nothing Special
Command: W
Your Journey Continues...
This is a small plain metal room.
On the wall there is a small panel
with a big red button on it.
.
There is a small doorway to the east.
It is warm and dry here.
*
You can see Nothing Special
Command: PUSH BURRON
PUSH WHAT?
Command: OUSH BUTTON
I don't understand!
Command: PUSH BUTTON
A METAL PANEL SLIDES ACROSS THE DOORWAY THEN OPENS AGAIN
This is a small plain metal room.
On the wall there is a small panel
with a big red button on it.
.
There is a small doorway to the east.
It is warm and dry here.
*
You can see 9 Gold Crowns,
Command: PUSH BUTTON GET GOLD
Ok...
Command: GET GOLD
There is no gold here!
Command: PUSH BUTTON
A METAL PANEL SLIDES ACROSS THE DOORWAY THEN OPENS AGAIN
This is a small plain metal room.
On the wall there is a small panel
with a big red button on it.
.
There is a small doorway to the east.
The rain swirls about you.
*
You can see Nothing Special
Command: PUSH BUTTON
?
A METAL PANEL SLIDES ACROSS THE DOORWAY THEN OPENS AGAIN
This is a small plain metal room.
On the wall there is a small panel
with a big red button on it.
.
There is a small doorway to the east.
The rain swirls about you.
*
You can see Nothing Special
Command: PUSH BUTTON
A METAL PANEL SLIDES ACROSS THE DOORWAY THEN OPENS AGAIN
This is a small plain metal room.
On the wall there is a small panel
with a big red button on it.
.
There is a small doorway to the west.
It is warm and dry here.
*
You can see Nothing Special
Command: W
Your Journey Continues...
This is a dank underground chamber
dug out of the stone of the hill
there is a doorway to the east.
And a trap door in the floor.
It is warm and dry here.
*
You can see Nothing Special
Command: D
Your Journey Continues...
You are in a small stone room with lichens growing on the walls.
Stone stairs on the west wall lead up to an oak door.
A dim light seeps into the room through an opening in the north wall.
You can just make out a large archway in the east wall.
It is warm and dry here.
*
You can see Nothing Special
Command: E
Your Journey Continues...
You are at the west end of a large dark hall.
The east end is lost in darkness. To the south there is an
archway.
In the gloom you can make out a long wooden table and some
broken chairs.
It is warm and dry here.
*
You can see Nothing Special
Command: E
Your Journey Continues...
You are at the east end of a long hall.
Set into the east wall is a large fire place, but it does not
seem to have been used for many years.
Everything is covered in a thick layer of dust.
There is a crack in the north wall.
It is warm and dry here.
*
You can see 2 Gold Crowns,
Command: GET GOLD
Ok...
Command: N
Your Journey Continues...
South bank of wide fast moving underground river.
To the south is a large crack in the wall.
Across the river in the north wall is a finely carved archway.
There is a sign caved in the rock above the arch,
and a boat tied to the south bank.
It is warm and dry here.
*
You can see Nothing Special
Command: W
Your Journey Continues...
Beside the river there is a spiral stairwell leading down.
There is a narrow path to the east.
It is warm and dry here.
You can see Nothing Special
Command: D
Your Journey Continues...
Small dark chamber. In the centre is a small stone spiral stair
leading up.
You can see a wide exit to the south and you can just make out
a small tunnel to the east.
It is warm and dry here.
You can see Nothing Special
Command: S
Your Journey Continues...
The roof is low here. You have to stoop.
The chamber walls are covered with crumbling mosaics, split
in places by huge cracks. The floor is strewn with rubble.
A glow is coming from an opening in the west wall.
It is warm and dry here.
You can see A WYVERN approaches you
Nothing Special
Command: S
Your Journey Continues...
You find that one of the many holes and cracks in the south
wall is the entrance to a small tunnel which ends at a
't' junction.
It is warm and dry here.
You can see Nothing Special
Command: W
Your Journey Continues...
You are in a very narrow chasm with steep sloping walls.
To the east there is a passage ajoining the north wall.
The chasm continues west.
It is warm and dry here.
You can see Nothing Special
Command: W
Your Journey Continues...
This is a wide empty hall.
Set into the west wall are two huge iron gates guarded by two
fearsome stone dogs.
The gates are old and rusty, and one is slightly open.
It is warm and dry here.
*
You can see Nothing Special
Command: W
Your Journey Continues...
You are in a high passage with richly carved pillars
supporting wide gothic arches. To the east there are some
iron gates. Feint whispers of smoke drift in from the west
of the passage.
It is warm and dry here.
You can see Nothing Special
Command: W
Your Journey Continues...
A high ledge runs around a gigantic cavern.
The opposite side of the cavern is obscured by smoke.
A bright light reveals the dark outline of a tall tower in the
middle of the cavern. The ledge curves to the north and west.
There is a passage leading east.
It is warm and dry here.
You can see A CENTAUR,
Command: W
Your Journey Continues...
The ledge curves north and east.
To the north it narrows to no more than a few inches across
before disappearing into the smoke.
It is warm and dry here.
You can see 6 Gold Crowns,
Command: GET GOLD
Ok...
Command: N
Your Journey Continues...
You are on a wide ledge surrounded by smoke.
To the east it is blocked by a curtain of fire.
To the west the ledge narrows. One end of an old bridge is
attached to the ledge.
The bridge leads south to the top of a high tower.
It is warm and dry here.
You can see Nothing Special
Command: S
Your Journey Continues...
You are at the top of a tall crumbling tower.
There is an old bridge leading north, and stone stairs
leading down.
It is warm and dry here.
You can see Nothing Special
Command: D
Your Journey Continues...
You are in an empty, dusty stone room.
Light pours in through an open door in the north wall.
A stone staircase on the south wall leads upwards.
It is warm and dry here.
You can see Nothing Special
Command: N
Your Journey Continues...
This is a wide dusty courtyard surrounded by walls.
To the north is a large gateway.
To the south is a tall crumbling stone tower.
It is warm and dry here.
You can see Nothing Special
Command: N
Your Journey Continues...
You are standing in a large arched gateway.
The old iron gates have long since rusted, and fallen from their
hinges. To the south is a seemingly empty stone courtyard with a
tall tower at its centre. To the north an old ruined city
stretches into the distance.
It is warm and dry here.
You can see Nothing Special
Command: N
Your Journey Continues...
You are on a crossroads just north of a large archway.
There is a long straight road leading north.
..
The roads are lined with crumbling and ruined buildings.
It is warm and dry here.
You can see Nothing Special
Command: W
Your Journey Continues...
You are halfway along a 40 yard long road.
The road runs parallel with a high stone wall. To the west
you can see a large golden building which shines out like a
beacon amongst the ruins of the city. There is a crossroads to
to the east. There is a dense forrest to the north.
It is warm and dry here.
You can see Nothing Special
Command: W
Your Journey Continues...
You are at the end of the road.
To the south is a large iron double door, set into the
walls of a golden temple.
The road rus off to the east.
To the north is a dark forest.
It is warm and dry here.
You can see Nothing Special
Command: S
Your Journey Continues...
You are in the entrance hall of the temple.
The floor is tiled with bright mosaics and the walls
are hung with rich tapestries. A heavy iron door is set into
the north wall, smaller doors lead off to the east and west.
It is warm and dry here.
You can see Nothing Special
Command: E
Your Journey Continues...
This is a small room with a large basin cut into
the middle of the floor. Ropes are strung across
the room from high on the walls and the remains
of old garments hang from them.
There are doors in the south and west walls.
It is warm and dry here.
You can see 8 Gold Crowns,
Command: GET GOLD
Ok...
Command: S
Your Journey Continues...
There is a long wooden table in this room, with plane
wooden benches along either side. Old plates and mugs
lie scattered on the table and floor. In the east wall
is a large broken stained glass window.
Doors lead off to the north and west.
It is warm and dry here.
You can see Nothing Special
Command: W
Your Journey Continues...
This is a small square room with a spiral stair in the
middle leading up. There are carvings and holy
paintings on the walls.
There is a door in the east wall.
It is warm and dry here.
You can see Nothing Special
Command: U
Your Journey Continues...
You are in a large circular domed room that
seems to be made completely out of gold!
a massive golden alter curves around the north side
of the room. Carved into it is the number '110.25'
in the centre of the room is a spiral stair.
It is warm and dry here.
You can see Nothing Special
Command: WHO
Somewhere about there is:
MENOLLY the Peasant
Command: MAIL KANE
Msg>Is this 110.25 '110.25' the in the 'circular domed room th ...made from gold'
Msg>above the golden tample, the sacred No. required by that guy
Msg>in r the arch over near the white temple .... ? It doesn't work, yet]it
Msg>it's the only number I've yet t found that sounds like it could be
Msg>right........
Msg>.
Msg>.. Ta, Rob.
Msg>
Command: WHO
Somewhere about there is:
MENOLLY the Peasant
Command: INV
You have A DH BROAD SWORD, SOME PLATE ARMOUR, 107 GOLD CROWNS, 28 HONEY CAKES,
Command: SCOR
Name: MENOLLY the Peasant
Weap: DH BROAD SWORD
Arm : PLATE ARMOUR
Str : 17
Exp : 5
Gold: 107
Cakes: 28
Last: SCOR
Has : Nothing
Command: SPELLS
The Commands & Spells You Can use NOW are:
ERROR DETECTED - CONTACT PAUL CHAPPELL.
Filing Character - Please3$ 1$3$# 33 $</pre>
Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-89790708566431041592017-02-17T17:51:00.001+00:002017-02-17T19:17:04.691+00:00University LifeFor us geeks of a certain age, there are some bits of text that immediately bring back memories..<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">Multi-User Dungeon</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">This Mud created:</span><span style="font-family: "courier new" , "courier" , monospace;">5th December 1984 at 19:55:17</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">Welcome! By what name shall I call you?</span></blockquote>
<div>
<br />
<enters name and password></div>
<div>
<br /></div>
<div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">Yes!</span><span style="font-family: "courier new" , "courier" , monospace;">Your last game was today at 15:41:19.</span><br /><br>
<span style="font-family: "courier new" , "courier" , monospace;">Hello again, Amanda the heroine!</span><br/><br/>
<span style="font-family: "courier new" , "courier" , monospace;">Narrow road between lands. </span></blockquote>
<br />
This is, of course, <a href="https://en.wikipedia.org/wiki/MUD1">MUD</a>, the original and many say the best.<br />
<br />
However how about this....<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">The computing department foyer.</span> <br /><br /><span style="font-family: "courier new" , "courier" , monospace;">You are at the main entrance to the computing department. Grooves in the </span><span style="font-family: "courier new" , "courier" , monospace;">carpet indicate where a certain large filing cabinet has been pushed up </span><span style="font-family: "courier new" , "courier" , monospace;">against a wall, thus preventing any students hiding behind it, for late night </span><span style="font-family: "courier new" , "courier" , monospace;">Mud playing sessions. The mugshots of 27 members off staff leer out of you </span><span style="font-family: "courier new" , "courier" , monospace;">from a dark corner. The incessant tap of keyboards comes from a room to the </span><span style="font-family: "courier new" , "courier" , monospace;">south. </span></blockquote>
</div>
<div>
<br />
This comes from a little remembered variant entitled UNI, based on Essex University itself. Sadly I never attended the university myself, so cannot attest to the accuracy of the location descriptions, however I suspect there is some artistic licence at play here:</div>
<div>
<br /></div>
<div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"> The Mathematics Department. </span><br /><br />
<span style="font-family: "courier new" , "courier" , monospace;"> The mathematics department is a creepy place! It is the sort of place in which lunatic asylum movies are filmed. The spirits of long-dead mathematicians come back to haunt unsuspecting students, trying to wipe out future generations of mathematicians with weird and evil calculus courses. Of course, this place is as nothing compared to the unspeakable horrors to the west.... </span></blockquote>
<div>
<br />
And as for..</div>
</div>
<div>
<br /></div>
<div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">The lake. </span><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br /><br />
<span style="font-family: "courier new" , "courier" , monospace;"> Before you stetches an apparantly endless vista of water. It's blackness gives the appearence of incredible depth, and reminds you more of a swamp, than a lake. The ghosts of long dead ducks, poisoned by the wastes from the chemistry department still float on the scum, looking for equally dead fish. A rolling expanse of untamed grassland stretches out to the north-west, whilst the shadow from the tower of the evil Nosferatu to the north strikes terror into the heart of mere students. </span></blockquote>
<div>
<br />
..well!</div>
</div>
<div>
<br /></div>
<div>
Yes, it's true. Some data files from UNI have been found! Originally thought totally lost, some data has surfaced! On a BBC Micro floppy disc, stuck at the back of a box in my spare room for many years... It's apparently not enough to run the game itself, but it is certainly of "historical interest"! What I want to know is what was going through my teenage mind when I tried to download them in the first place, 32 years ago... It wasn't as if I had a DEC-10 to run them on.</div>
<div>
<br /></div>
<div>
I'm trying to get around to cataloguing all my old discs and data,,, expect more gems in future! </div>
<div>
<br /></div>
<div>
Mr MUD himself, <a href="http://mud.co.uk/richard/mud1.htm">Richard Bartle</a> has, of course, been sent copies.. But does anybody know whom the students who wrote this were?</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-14350539793553625752017-02-13T18:21:00.001+00:002017-03-30T14:56:27.784+01:00Some random sinclair ZX80 stuffWay back in the mists of time, as fresh faced thirteen year old, I got to use a borrowed ZX80 at home. I spent a lot of time learning Z80 machine code, as there was only so much you could do in 1K (or even 4K, once it acquired a ram pack!)<br />
<br />
A year later, I got bought the ZX81 kit, which I built, and had just a much fun on, along with loads of peripherals, interface cards, custom-character upgrades. new keyboard... etc.<br />
<br />
Then I encountered a BBC Micro, and that was pretty much that... sold all the sinclair kit, and got myself a Beeb...<br />
<br />
Anyway, perusing some old paperwork, this fell out. It's component information and circuit diagram for a "video upgrade" for the ZX80 (And Microace) which based on the wording "flicker free fun" would seem to be a "slow mode" upgrade...<br />
<br />
Anyway, here it is for your perusal. Maybe it would be of interest to somebody!<br />
<br />
<br />
<a href="https://drive.google.com/file/d/0B8psy-QjZ2F4SmpWTW1yMXFwR0U/view?usp=sharing">Compshop Video Upgrade(pdf)</a>
Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-39316572662688150242015-03-29T17:29:00.002+01:002015-03-29T23:36:53.755+01:00Minecraft, Spigot, Bungeecord and Docker!Tiddler has lately got really "into" <a href="http://minecraft.net/">Minecraft</a>, spending rather too much time watching YouTube videos (Thanks, <a href="http://stampylonghead.org/">Stampy</a>!) and creating her own worlds..<br />
<br />
From my point of view, I quite like the idea of being able to add custom mods, and the (mostly) friendly and open ecosystem that has developed around it. It reminds me very much of my time spent in, and writing patches for, <a href="http://en.wikipedia.org/wiki/WorldsAway">WorldsAway</a>, oh god, nearly 20 years ago... That was a fun time... it's a pity they didn't operate a bug bounty - I found quite a few!<br />
<br />
Anyway, back to Minecraft. She wanted to play with me, so we started off by my downloading and running the official "vanilla" server on one of the linux boxes. It works, but is limited. So I go find out that there is lots of alternate server software available. We end up with a two or three on different ports. But the little box I was running it on really couldn't cope - a low end pentium that usually just ran an asterisk server!<br />
<br />
So lets upgrade. An impulse eBay purchase a few months back had bought me a Dell Poweredge 1950. A rack server, which was currently sitting idle after an initial play. With Dual 4-core Xenons and plenty of RAM, it was obsolete, but still probably the most powerful machine in the house! It was just itching to be used.<br />
<br />
Now, with the prospect of letting the public into the minecraft server at some point, and with an urge to "do things properly", I wanted some form of isolation for the server processes. Running a full blown VPS or virtual machine felt a little overkill, so I started looking around at what was recommended. Now, years back, I used to use jails on FreeBSD, and it seems that the current flavour of the month builds on that concept, and is called <a href="https://www.docker.com/">Docker</a>.<br />
<br />
Now Docker does seem like the bees knees. Reasonable isolation of a process with very little overhead, and in an ostensibly portable fashion Let's use that then.<br />
<br />
Several days of playing and one steep climb up the learning curve later and I'm pretty familiar with the basics.<br />
<br />
Now... Minecraft. ... How to do multiple servers or worlds easily. This brought me to <a href="http://www.spigotmc.org/wiki/bungeecord/">Bungeecord</a>. It is basically a proxy, that will control and switch users between servers. That's better - no need to set up an entry on each client for each server - just do the one, and we can change servers on-the-fly once logged in, and I control all the config from the server itself. This seems to be closely tied to the <a href="http://www.spigotmc.org/">Spigot </a>server sofware, so we might as well use that for the servers.<br />
<br />
OK. The configuration.....<br />
<br />
Firstly, we'll use <a href="http://container42.com/2013/12/16/persistent-volumes-with-docker-container-as-volume-pattern/">data containers</a> for all the, well, data. This means I can delete and re-run things without having to re-configure the servers all the time!<br />
<br />
We're going to be supporting multiple worlds, so in this example, we will call them simply world0, world1, world2, etc. You may wish to use more descriptive names.<br />
<br />
Create a data container..<br />
<br />
<pre>sudo docker run -t -i --name world0-data -v /minecraft busybox true</pre>
<br />
<br />
Create a server..<br />
<br />
<pre>sudo docker run -t -i --volumes-from world0-data -e EULA=true --name world0-server nimmis/spigot</pre>
<br />
<br />
That should all fire up and eventually leave you at a > prompt - type stop to exit.<br />
<br />
Now the more discerning among you will have noticed that we didn't specify any ports to reveal on that run command, so nothing will be able to connect to the server! I know; that's deliberate. We don't want just anybody connecting, after all.<br />
<br />
Next, we need to adjust the config on the server, because bungeecord requires the individual servers to be in offline mode - it handles the authentication itself. The config will be in /minecraft/server.properties, which is within the data container, so it's easy to create temporary access<br />
<br />
<pre>sudo docker run --rm -t -i --volumes-from world0-data centos /bin/bash
cd /minecraft
vi server.properties
exit</pre>
<br />
<br />
You can also use the same technique to install any mods, ready-made maps, or other customisations. If you need to install any extra programs into the container to allow you to fetch these, e.g. wget, ftp, scp, etc., then that's fine - you are working in a temporary container, and you will not affect the programme container, keeping it lean. Only items you place into /minecraft - the data container - will be preserved!<br />
<br />
Repeat for as many worlds/servers as you wish to create!<br />
<br />
Now to use bungeecord to link them all together,<br />
<br />
Create a data container for that too..<br />
<br />
<pre>sudo docker run -ti --name bungee-data -v /bungeecord busybox true</pre>
<br />
<br />
And then create the server container..<br />
<br />
<pre>sudo docker run -ti -p 25565:25565 --volumes-from bungee-data -e EULA=true \
--name bungee --link world0-server:world0 \
--link world1-server:world1 --link world2-server:world2 \
rehf27/bungeecord</pre>
<div>
<br /></div>
This time we are exposing a port to the world! <br />
<br />
Make sure you add a --link for each server you created and wish to give access to.<br />
<br />
After it fires up, and finishes creating everything, key "stop" to exit. The rehf27/bungeecord image drops to a bash prompt on exit, so you can edit the config directly here.<br />
<br />
<pre>vi /bungeecord/config.yml</pre>
<br />
<br />
If you need to do anything more exiting, or adjust things later, you can use the same technique as before to access the configuration from a temporary container -<br />
<br />
<pre>sudo docker run --rm -t -i --volumes-from bungee-data centos /bin/bash</pre>
<br />
<br />
So, edit Bungeecord's config file, and change as appropriate. The main things to alter are the listener ports - change to 25565 (as per the run command above) and the list of servers:<br />
<br />
<pre>servers:
lobby:
motd: '&1Lobby Server'
address: world0:25565
restricted: false
newworld:
motd: '&1A New World'
address: world1:25565
restricted: false
anotherworld:
motd: '&1Another World'
address: world2:25565
restricted: false</pre>
<br />
- the "world0", "world1", etc in the address field comes from the alias, the part after the colon in the --link options on the run command. Each of these is placed in the /etc/hosts file on this container, so that you can locate them, and specifying the link grants the access, so you don't need to open ports!<br />
<br />
Save, and exit.<br />
<br />
Now. start all your servers if they are not already<br />
<br />
<pre>sudo docker start world0-server
sudo docker start world1-server
sudo docker start world2-server
...
sudo docker start bungee</pre>
<br />
Then point your minecraft client at your server IP, and have fun!<br />
<br />
If you add or remove worlds later, you will need to crate a new bungeecord container with the new links. Delete the current one..<br />
<br />
<pre>sudo docker rm bungee</pre>
<br />
<br />
and create the new one, eg..<br />
<br />
<pre>sudo docker run -ti -p 25565:25565 --volumes-from bungee-data -e EULA=true \
--name bungee --link world0-server:world0 \
--link world2-server:world2 \
--link world3-server:world3 --link world4-server:world4 \
rehf27/bungeecord</pre>
<div>
<br /></div>
<br />
Because we used a data container, all existing configuration, mods, plugins, etc., will be preserved! You can open a temporary container to edit the config file for the changes to the list of hosts just as we did before.<br />
<br />
One caveat - stopping and starting a server will give it a different private IP address, which means the bungeecord server won't be able to connect to it - you will have to restart the bungee server to have it update things. (There may be an option somewhere to preserve the private IP assigned to a container, but I've not yet looked for it. If there is, use it!)<br />
<br />
<div>
This took me several days of fun and games to tie down; I hope it's useful to others. </div>
<div>
<br />
<br /></div>
<div>
A quick PS - I've not gone into depth on how to configure Spigot and Bungeecord; just the essentials relating to their interaction within docker. There are many guides and help resources out there that will assist you there. <br />
<br />
For those of you that outgrow a single physical server, having your individual services Dockerised (is that a word yet?) means you can easily transfer them to another server with virtually no changes! <a href="http://wiredcraft.com/blog/multi-host-docker-network/">This useful link</a> shows how to configure "one" docker across multiple physical hosts!<br />
<br />
There also seems to have been work to add new --links to running containers; with a little bit of extra code to interrogate the environment, this should make it possible to dynamically create the Bungeecord config file (or the hosts list at least) and avoid some of the additional configuration steps necessary to add new servers. <br />
<br />
There are lots of ways to improve all this, but the aim of this write-up was to show how I got things working in the first place! :-)</div>
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com18tag:blogger.com,1999:blog-2196995728804399079.post-51077190080637656772015-01-06T16:48:00.002+00:002015-01-06T16:48:09.978+00:00How to annoy your users.1. Use percentages to decide if a seller is "top rated" or "below standard". Never mind that fact that a high volume seller can create 100 unhappy customers without even dropping a feedback percentage point, and keep their "top rated" status, but just a couple of mistakes by someone who manages to sell a few dozen times a month means they are damned for all eternity. Where does "protecting the customers" feature in that? High volume = piss off as many people as you like; we don't care.<br />
<br />
Particularly annoying since the mistakes were caused by a third party (official!!!!!) software we used over-selling items. I could thus justify a "Not Our Fault" as it's not easy to keep track of over 1000 items manually, which was why we wanted to automate it!<br />
<br />
2. Stop that small seller from listing any more items, so they don't have a hope in hell of raising their performance levels again whilst still charging them £60 per month for the shop they now can't use.<br />
<br />
3. Restrict the seller's own personal account as well, because they are "linked" even though they are plainly used for totally different purposes.<br />
<br />
4. When the seller attempts to contact you about the personal account, reply back telling them that their user-id violates their user-id policy, despite it having been used unchanged for nearly 15 YEARS, and if they don't change it immediately, it will be changed for them, and cannot then be changed again for a further month.<br />
<br />
I think that after 15 years, it is at the very least an implied contract term that they find the name acceptable. Particularly as we have been in contact several times before this incident over unrelated matters!<br />
<br />
5. Refuse to discuss even the possibility of compromise. Refuse to even close the accounts when asked to do so. Because they can't close an account that is restricted until it's performance is raised. Which it can't do because WE CAN'T SELL ANYTHING! aaarrrrrrrrrrgggggggghhhhhhhhhh!!!!<br />
<br />
<br />
I'll have to add up the figures, but I think the business actually LOST money trying to sell on eBay recently. Sales have been low, with not enough gross receipts to even cover their fees, never mind cover the cost of the goods sold and make a profit out of it. <br />
<br />
<br />
I want to swear very loudly and break something. This post will have to do for now.<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-71066612263169762522013-11-03T21:48:00.001+00:002013-11-04T08:02:22.093+00:00Home console for Total Television<div class="separator" style="clear: both; text-align: left;">
</div>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkv0iecKZDiLTbGHkKfLq2CVnDDLwchgkWgysXrN0t1ahVkyw-WxPHAlamDEW8wR-FkRDdSULyUSK2VP7gEIBW1aboQFUiKKRPAH5GbeCel3-bw3UNsV-79axSoBlfny4yFkpojpwOTD8/s1600/totaltelevision.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkv0iecKZDiLTbGHkKfLq2CVnDDLwchgkWgysXrN0t1ahVkyw-WxPHAlamDEW8wR-FkRDdSULyUSK2VP7gEIBW1aboQFUiKKRPAH5GbeCel3-bw3UNsV-79axSoBlfny4yFkpojpwOTD8/s320/totaltelevision.png" width="230" /></a><br />
<br />
<br />
<h2 style="text-align: left;">
Home Console for total television?</h2>
<div style="text-align: left;">
Our cover picture, this issue, demonstrates that home electronics of the future need not be stark and futuristic. It is the first actual physical representation of how television and sound of the future might well look in the sitting room of the relatively near future.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
This two-part furniture-treatment in glowing rosewood, was presented for the first time ever by TV science pundit James Burke at a Radio Industries gathering in London on the eve of the start of his recent BBC series "Connections", in which he took an idiosyncratic look at the ways TV might be used in the future. The "home video and computer console" as it was described, has been produced by the Thorn Group under its Ferguson brand, to present how it thinks such a console to cover known and expected advances in home electronics might be developed.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The two modules, moving easily on castors, can be brought together as a unit of furniture, or separated for use individually in different parts of a room.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Lest this should be thought an idle flight of fancy, it should be recorded that a 180-page report from the USA has stated that what it calls IVTs (integrated video terminals) will emerge within the next four years. The report predicts that IVTs will be a billion-dollar industry within ten years. It even puts a price of $1400 (£700 or so) on such units in 1982. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
With typical transatlantic zest for new word pictures, the report (from International Resource Development Inc) says the expected strong consumer demand for interactive TV services will lead to the concept of "narrowcasting" as opposed to broadcasting.</div>
<div style="text-align: left;">
<br />
The IVT is seen as being the primary home tool for: entertainment, publishing access, home environment scheduling, home admin (payment of bills etc), domestic appliance control, self education and correspondence via electronic mail services.</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgh6YXk84P_fvSVF9GcCCCynzhkugfBKi5ZjTwow2O7fWg-qVq7ATdZNNn668gnMtdzXNDnk6GOAx4lTji7eX8pls6pyARSi1UJWSw6G24Ks6AHPBexQLDQR_edaBiOlbFUesEsAF6-No/s1600/ivt.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgh6YXk84P_fvSVF9GcCCCynzhkugfBKi5ZjTwow2O7fWg-qVq7ATdZNNn668gnMtdzXNDnk6GOAx4lTji7eX8pls6pyARSi1UJWSw6G24Ks6AHPBexQLDQR_edaBiOlbFUesEsAF6-No/s320/ivt.png" width="320" /></a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
International Resource Development Inc put Japan ahead when it reported originally, in August last. But it said that the US had a "major opportunity for innovative breakthrough" for the second generation of IVTs.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The report sees the terminals selling through retail outlets initially, but as it "assumes a greater and greater role in the control of other appliances and as the centre of home life, education and correspondence as well as entertainment", it would become more like the motor car in marketing, with specialised dealer outlets.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
It sees manufacture moving eventually away from the present home computer manufacturers, and possibly from the present TV makers too, to the "vertically integrated companies with solid-state computer and consumer manufacturing and sales experience"—companies like Texas Instruments and IBM are named as "likely candidates".</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUlG_pnvPL5xqqD5CMBqGu2PrVqhhzB6DpqtCUPmw6SBWoSNm50WM22CSNTzIov9Jj1gHR53dLGZQP-IdrmQ2Z_za6rzHkrLn4MxDSCdcQPFCzImE1qm_KIXQAxPjqb4UoeZiotg66VfM/s1600/ivt.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUlG_pnvPL5xqqD5CMBqGu2PrVqhhzB6DpqtCUPmw6SBWoSNm50WM22CSNTzIov9Jj1gHR53dLGZQP-IdrmQ2Z_za6rzHkrLn4MxDSCdcQPFCzImE1qm_KIXQAxPjqb4UoeZiotg66VfM/s640/ivt.png" width="506" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Key to the controls -</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Starting from the left, the units contain: </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
1 A display panel for digital time and programme selection by LCD (liquid crystal display).</div>
2 Drawer one, with removable remote control for TV programmes, teletext and viewdata operation. Also a<br />
"vote "button by which, if cable TV is established, immediate response to questions asked in a TV studio can be accurately measured. This is already on test in the US.<br />
3 Drawer two, a home video system — the all-electronic operation reduces the size from today's bulkier models.<br />
4 Drawer three, has a floppy disc unit — computer memory store for instant information retrieval.<br />
5 Drawer four, a stereo audio cassette unit with all-electronic function controls. Cassettes can also store<br />
viewdata or other pulse-coded information.<br />
6 A telephone handset moulded to match the cabinet. To be replaced, when available, by a videophone instrument.<br />
7 Drawer five, a keyboard for home computer programming, advanced video games and viewdata messages, plus a print-out facility for messages or processed information.<br />
8 A retractable small screen monitor for checking incoming or outgoing information to be processed by other elements of the console.<br />
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
And, of course, the large wall-screen with monitor screens for showing other programmes, viewdata and teletext messages, or even pictures from in-house closed-circuit cameras for security or domestic needs.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<i>First published in Viewdata and TV user, January 1979.</i></div>
<div style="text-align: left;">
<i><br /></i></div>
<div style="text-align: left;">
(Just think; you could do all that today on a mobile phone! Maybe I should do an emulator..)<i><br /></i></div>
<div style="text-align: left;">
<i><br /></i></div>
<div style="text-align: left;">
<br /></div>
Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0tag:blogger.com,1999:blog-2196995728804399079.post-11718290132469754092013-10-26T21:42:00.001+01:002013-10-26T21:42:20.377+01:00Prestashop - deleting redundant images.One of the things I wrote when I first set up a webstore using Prestashop was a product import routine from one of our suppliers, that created the initial products.<br />
<br />
Among other things, this included all the images for the product.<br />
<br />
Now, the supplier provided separate thumbnail and large images in their links, which were dutifully imported. So each product ended up with two apparently identical images, but the second was bigger than the first! I'd not really bothered to clean this up, as it didn't really affect anything.<br />
<br />
Now however, with eBay's new picture standards in the offing, and the standard prestashop eBay module being somewhat.. um... inflexible... (more on my work on this at a later date!) I've realised that I need to get rid of all these unnecessary images.<br />
<br />
The end result is the rather simple little module below. This will appear in the "Other Modules" category. Once installed, and configure pressed, it will present you with a load of images!<br />
<br />
Where a product has two (or more) images, numerically in sequence (so they were created at the same time) and the first is the cover picture, it will show the first two. Alongside each pair is a checkbox, already ticked.<br />
<br />
Scroll down .. If the pictures are the same, leave it ticked. If they are different, clear the tick.<br />
<br />
If you press the submit at the bottom, it will delete the first image from the product for each line that you leave ticked.<br />
<br />
This does for me. It may not do for you. Put your store into maintenance mode and make backups of your filesystem AND database before you even install this. I offer this with no warranty whatsoever. Do not complain if it all goes horribly wrong - just restore and then work out why.<br />
<br />
<a href="http://www.irrelevant.com/software/imgcheck.zip" rel="nofollow">Download ImgClean 1.0 here.</a><br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com1tag:blogger.com,1999:blog-2196995728804399079.post-9420115606225878532013-08-09T11:37:00.001+01:002013-08-09T11:37:45.487+01:00Prestashop - switching to shared stock.Another useful tid-bit of information.<br />
<br />
If you use <a href="http://www.prestashop.com/">Prestashop</a> for your online e-commerce, then you may be aware of their "Multistore" feature - basically, you can use the same installation to run completely different shops; the difference being the URL you access them from.<br />
<br />
So what, you might think. That's not really much more use thant just running two copies on different virtual hosts. Well, the strength is that you can share products, customers, stock levels, discounts, pretty much everything ... <i>if you want to</i>. Plus, of course, it's only one installation to keep up to date.<br />
<br />
Great, this suited an installation I did a while back. Unfortunately, although the products were set as shared across all stores, somehow in the several iterations of testing the option to share stock levels was not. Since the vast majority of products are unique to each store, with only a few cross-overs, nobody noticed, until now.<br />
<br />
OK, simple, we thought. Switch the option on now.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBQOVUprzPtcllrNZNuZqUbOCqdSdZKvidqxx9PxDQ7hFCTurUPmgEANpagyOAL9cPKxv1po5mB_wgL5FSG8fm_Nk4BAhxzmjeZ9e7wa7wxeSf3NBFJvY5uZEAe6i7JGdr-Jw5wrQsoLA/s1600/sharewarning.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Share available quantities between shops of this group. When changing this option, all available products quantities will be reset to 0." border="0" height="64" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBQOVUprzPtcllrNZNuZqUbOCqdSdZKvidqxx9PxDQ7hFCTurUPmgEANpagyOAL9cPKxv1po5mB_wgL5FSG8fm_Nk4BAhxzmjeZ9e7wa7wxeSf3NBFJvY5uZEAe6i7JGdr-Jw5wrQsoLA/s640/sharewarning.jpg" title="Share available quantities between shops of this group. When changing this option, all available products quantities will be reset to 0." width="640" /></a></div>
<br />
Eek... all quantities will be reset to zero....<br />
<br />
Not what we want at all.<br />
<br />
Checking the code, we see that yes indeed, when changing this setting, sure enough, it deletes everything from the "stock_available" table for the affected shops.<br />
<br />
The stock_available table has two relevant fields in it - <i>id_shop</i> and <i>id_shop_group.</i><br />
<i><br /></i>
When stock is held for an individual shop, the first is filled in, and the group is zero. When it's shared between a group of shops, it's the other way around.<br />
<br />
Since the only table affected when you do the switch is the stock_available one, it seems logical therefore that this is the only source of data that we need to preserve.<br />
<br />
Much testing in my sandbox shop therefore resulted in the following bit of code necessary to preserve the stock across the change. READ ON BEFORE TRYING THIS OUT!<br />
<br />
<pre>update ps_stock_available set id_shop_group=1, id_shop = 0;</pre>
<br />
Yep! All we need to do is update the group field, and clear the shop field! Of course, if you have more shops that you don't want affected, you should include a "where" clause to restrict whose products this affects.<br />
<br />
You need to do this <i>before</i> you change the shared stock setting. Also, it will fail if you have any products with stock held individually. This code will list any of these -<br />
<br />
<pre>select p.id_product, pa.id_product_attribute, count(sa.id_shop) as shops
from ps_product p LEFT JOIN ps_product_attribute pa ON (pa.id_product =
p.id_product ) JOIN ps_stock_available sa on p.id_product = sa.id_product
and sa.id_product_attribute = IF(pa.id_product_attribute IS NULL,0,
pa.id_product_attribute) group by sa.id_product, sa.id_product_attribute
having count(*) > 1;</pre>
<br />
Yep, that's a bit longer, sorry! It's got three tables to cross-reference.<br />
<br />
It it comes up with any, this code will tell you more about which stores an item is held in, and how much is in each store, etc -<br />
<br />
<pre>select * from ps_stock_available where id_product = 782;</pre>
<br />
(That's for product #782, of course - adjust as necessary!)<br />
<br />
If, as I found, the products had zero stock in the secondary stores, you can just delete all but one of the records -<br />
<br />
<pre>delete from ps_stock_available where id_product = 782 and id_shop <> 2;</pre>
<br />
Re-run the check again, then do the conversion.<br />
<br />
This is easiest, of course, from the mysql command line, but if you use a web-based tool, you should be able to manage if it will accept typed mysql command lines.<br />
<br />
I should give you the obvious warnings -<br />
<br />
<span style="color: red;">BACKUP YOUR DATABASE FIRST!!</span> Preferably using outside tools such as mysqldump<br />
Then examine the backup file - does it look like it holds all your data??<br />
<span style="color: red;">PUT YOUR SHOP INTO MAINTENANCE MODE.</span> You don't want customers confusing things.<br />
<span style="color: red;">TEST IT THOROUGHLY.</span> If you are not convinced everything is right, restore from your backup!Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com2tag:blogger.com,1999:blog-2196995728804399079.post-38901867995453947092013-07-16T22:55:00.001+01:002013-07-16T22:55:50.442+01:00Retrochallenge 2013In a fit of madness, I decided to re-enter this years competition.<br />
<br />
If you cast your mind back, I entered last time with the intention of sorting out my "man cave" as the attic was described, in order to get the viewdata BBS back up and running. <br />
<br />
Unfortunately, building work interrupted matters, and I didn't get very far. More unfortunately, the building work stalled, and I <em>still</em> don't have a safe floor up there, so pretty much everything is still in boxes. A year on. The tale of what happened and what went wrong is going to make a great story at some point, but not yet.<br />
<br />
So, this year, I've been hoping to get something working under emulation. The ideal would be an emulated modem that can answer VoIP phone calls, and pass the user to an emulated server of some sort. Modems and VoIP are reckoned not to work very well, but that's the "modern" types. V23 has no problem at all, as I proved when using the real stuff over it.<br />
<br />
The trick is going to get a software modem working at such a slow speed! IAXmodem uses SpanDSP, which proports to support the old FSK modems, including V23, but I've not yet managed to get it working. Part of the issue is that the whole thing is geared up for faxing, so assumes some level of intelligence from the far end. V23 modems, particularly the 25 year old ones, don't do anything intelligent! <br />
<br />
So, that's the task this month. Getting iaxmodem (initially) to answer a call from an ancient terminal. Then I'll hook it up to a BBC micro emulator and run the BBS entirely virtually. <br />
<br />
I'm acutely concious that over half the month is over, and I've not done anything yet!<br />
<br />
Long term goal is to find a backup of the original Prestel software and databases, run up a GEC mini-computer emulator, and actually run the real thing. But so far that's been elusive. Anybody know of <em>any</em> surviving discs or tapes from Prestel itself?<br />
<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com3tag:blogger.com,1999:blog-2196995728804399079.post-30962248472411306222013-02-18T10:56:00.000+00:002013-02-18T10:56:57.110+00:00Teaser...<br />
Please note:<br />
<br />
If you wish to attach a length of timber to a brick wall, and you find that the screw stops going in any further, it's likely that you are doing something wrong -<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBrCJZoWb8eyqZ3zO61w-oMsQKjRywgarruNR7nwtXk9zOujCuLEWbwxAcVpqllY0Rzb-8UG1FhlIljVOizOW1X723cxPhXKeDtnkP5IbwUJlzTJLN1plTTvJS8kGxT4OdKgxGeANdBAI/s1600/IMG_4066.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBrCJZoWb8eyqZ3zO61w-oMsQKjRywgarruNR7nwtXk9zOujCuLEWbwxAcVpqllY0Rzb-8UG1FhlIljVOizOW1X723cxPhXKeDtnkP5IbwUJlzTJLN1plTTvJS8kGxT4OdKgxGeANdBAI/s400/IMG_4066.JPG" width="400" /></a></div>
<br />
This is to be expected if you didn't drill and plug the wall. The screw will work it's way through the plaster, and stop when it hits the bricks. <br />
<br />
This also, of course, means that it's not really attached to the wall, either.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjxqBcY-wpfm2ax2Ao0X8rz3h9DjWSHwuUqJLEYeCJlmmegsEFqD15vZC9Mdeng-aw12nIYfb98k4GAznfQsCsONHQnwh4mU1ItrLbI527Yo0swYf9Ch1l2uZ0f16Tmts-vGVWQsGGgM/s1600/IMG_4079.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipjxqBcY-wpfm2ax2Ao0X8rz3h9DjWSHwuUqJLEYeCJlmmegsEFqD15vZC9Mdeng-aw12nIYfb98k4GAznfQsCsONHQnwh4mU1ItrLbI527Yo0swYf9Ch1l2uZ0f16Tmts-vGVWQsGGgM/s640/IMG_4079.JPG" width="480" /></a></div>
<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com2tag:blogger.com,1999:blog-2196995728804399079.post-40257171633293045662013-01-05T22:42:00.002+00:002013-01-05T22:42:29.825+00:00Google Play: Couldn't sign inMy better half has an android tablet, which I've already touched upon. It's configured with her Google account, and works fine for gmail, youtube, etc., but one thing that's been bugging her for ages is an inability to purchase anything from the <a href="https://play.google.com/store" target="_blank">Google Play store</a>. Free apps are apparently OK, but not paid-for or, indeed, in-game purchases.<br />
<br />
The error we get is a page headed "Couldn't sign in" with the rather unhelpful "An error occurred connecting to the Google servers". <br />
<br />
Searching these found advice such as "clear the cache", "reinstall the play app", "Disable 2-step authentication" even. But nothing worked.<br />
<br />
I have, however, found the problem, so am documenting it here for others to search for and find.<br />
<br />
Her Google account is actually a Google Apps account - it uses an email address based off a custom domain rather than a googlemail or gmail domain. This seems to be the root of the issue. In the store, the payment options are done via "<a href="http://wallet.google.com/" target="_blank">Google Wallet</a>" which, when accessed on the laptop, when logged into Google as her, brought up a page "Reinstate your Google Wallet online account - If you’ve arrived at this page, it means that your Google Wallet online account is currently suspended."<br />
<br />
It turns out that any administrative action on a Google Apps based account automatically suspends access to Wallet! Presumably they think that a domain's administrator is not to be trusted with their users' card details. There's a form to fill in to get access back - give the last transaction details, last four digits of card number, etc. It's not much help when the account has never been used before and so we didn't have any details to fill in.. It also looks like that's then sent off to Google themselves to action, manually.<br />
<br />
In the end, the solution was not to use that account. She's got a hotmail email address that already has a Google profile associated with it, so we logged into Wallet with that, and then set that up as an additional account on the tablet. It's mail is already fetched by gmail and added into the Apps mail, so that means any correspondence won't be lost. Jobs a good 'un.<br />
<br />
So, if you are getting this error just in the Google Play store, and your account is a google Apps account, then you have two choices - don't use that account for the store, or login via the website, fill in the recovery form, and hope for the best.<br />
<br />Robhttp://www.blogger.com/profile/15492761714688454925noreply@blogger.com0