This is a couple of scripts and console applications that dump text entries from Tom Merritt's Chronology of Tech History book for the current day: https://merrittbooks.squarespace.com/2012/10/17/chronology-of-tech-history
It's a nice bit of geeky fun. The idea to use Tom's excellent book like this came from the unix fortune program which has kept me amused whenever I load my homepage for many years.
The Joomla plugin does this:-
- On this day in 1850 - San Jos was incorporated as one of the first cities in California and was the site of the first state capital. It would lose the capital to Vallejo in 1852 but eventually become the center of Silicon Valley and the de facto capital of the technology world.
- On this day in 1884 - Bell and Watson experimented with a line of two twelve-gauge hard-drawn copper wires connecting Boston and New York City. The line worked for about ninety minutes before failing.
- On this day in 1899 - Guglielmo Marconi made the first wireless transmission from France to England. A message was sent 32 miles from Wimereaux near Boulogne, France, to the South Foreland lighthouse near Dover, England. This became an important alternative to laying undersea cables for telegraphy.
Binaries for all platforms are in the archive (along with the joomla plugins). Provided in .tar.gz and .zip for convenience.
|.htaccess||May 25 2014 17:11:11||14b|
|README.rtf rich text README file for everything here|
|README.rtf||May 25 2014 17:11:11||18230b|
|README.txt plain DOS text README file for everything here|
|README.txt||May 25 2014 17:11:11||3964b|
|Tom Merritts Chronology of Tech History Joomla Content Plugin for Joomla 1.5+|
|joomla_plugin_content_tdit_1.5.zip||May 25 2014 17:11:11||95224b|
|Tom Merritts Chronology of Tech History Joomla Content Plugin for Joomla 2.5+ (including 3.0)|
|joomla_plugin_content_tdit_2.5.zip||May 25 2014 17:11:11||95221b|
|Tom Merritts Chronology of Tech History console app - Binaries for OSX, Windows and Linux as tar.gz archive|
|tdit-binaries-all-platforms.tar.gz||May 25 2014 17:11:11||581305b|
|Tom Merritts Chronology of Tech History console app - Binaries for OSX, Windows and Linux as .zip archive|
|tdit-binaries-all-platforms.zip||May 25 2014 17:11:11||582382b|
|Tom Merritts Chronology of Tech History PHP Scripts|
|tdit-php.tar.gz||May 25 2014 17:11:11||94063b|
The source code is here.
Console versions in the binaries are compiled for Linux, OSX, and Windows.
It uses an sqlite3 database for it's storage so you need probably need this installed on your system if it isn't already. A Windows DLL is included with the windows binary which should take care of this. On OSX it should work out of the box. On linux you might need to install sqlite3. On Redhat type distros something like
yum install sqlite
should do the job. On Debian style distros something like
apt-get install sqlite3
Should do the trick.
Command line usage for the console program:-
You can copy the database (tdit.db) to /etc for linux distros, or you can specify where to find the db with the -d command line option. The help from the console app:-
This Day in Tech
Based on Tom Merritt's Chronology of Tech History
Usage: tdit [-d databasefile] [-r] [--help]
-d databasefile : specify the database file to use.
Will try /etc/tdit.db or ./tdit.db if
not specified or found.
-r : print a single random entry for the day
(otherwise print all entries)
--help : print this help
Plain ol' PHP
There is a plain PHP version which can be used by including the edit_functions.php file and calling the tdit() function:-
returns a string with This Day in Tech Quote(s).
Specify the strings 'all' or 'random' as the $action parameter to print all entries for today, or just a single random one respectively.
Does as above but lets you specify a day and month. There is also test script which dumps the whole book.
There is a Joomla 2.5 and a Joomla 1.5> version.
Tested with only Joomla 3.0 and Joomla 1.5 because that is what I had access to.
Install the plugin in the normal way. You need sqlite3 php support on your server (usually built in to PHP5+). To use the plugin, in your content insert
and the text above will be replaced in an article with the either a single event for the day or all the events for the day as a unordered list with the css class tdit_list.
NB: If you get no output for an entry check the tdit/tdit_functions.php file in the joomla plugin install. The htmlentities function was causing output to disappear on one server I tried it on. YMMV.
Building the console programs from source
Download the latest source code from here (click on the zip or tar.gz icons). Extract the archive somewhere. I've built successfully so far for 32 bit linux, 64 bit linux, 32 bit OSX and for 32 bit Windows (on 64 bit windows).
For windows you need a MinGW/msys setup. Though it should build easily enough with any C complier.
It just seemed to work on OSX. On linux you need the usual gcc GNU make etc.
cd into the extracted directory.
make -f nameofthemakefilefortheplatformyouron
make -f Makefile.linux
And it should all build.
NB: The Makefile.linux32 makefile is to build a 32bit binary on a 64bit linux system.
Follow the installation instructions to install.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License as is Tom's original work.
Thanks to Tom Merritt for a great project.