mirror of
https://gitlab.silvrtree.co.uk/martind2000/old-silvrgit.git
synced 2025-01-10 22:05:07 +00:00
Big updates, today, templated slack, cinemas
This commit is contained in:
parent
241e5c3518
commit
296b79fc67
13
.idea/codeStyleSettings.xml
Normal file
13
.idea/codeStyleSettings.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectCodeStyleSettingsManager">
|
||||
<option name="PER_PROJECT_SETTINGS">
|
||||
<value>
|
||||
<XML>
|
||||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
||||
</XML>
|
||||
</value>
|
||||
</option>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
|
||||
</component>
|
||||
</project>
|
10
.idea/inspectionProfiles/Project_Default.xml
Normal file
10
.idea/inspectionProfiles/Project_Default.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
<option name="processComments" value="true" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
7
.idea/inspectionProfiles/profiles_settings.xml
Normal file
7
.idea/inspectionProfiles/profiles_settings.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="PROJECT_PROFILE" value="Project Default" />
|
||||
<option name="USE_PROJECT_PROFILE" value="true" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
@ -65,7 +65,7 @@
|
||||
// let's show a map or do something interesting!
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'https://api.forecast.io/forecast/0657dc0d81c037cbc89ca88e383b6bbf/' + latitude.toString() + ',' + longitude.toString(),
|
||||
url: 'https://api.forecast.io/forecast/0657dc0d81c037cbc89ca88e383b6bbf/' + latitude.toString() + ',' + longitude.toString() + '?units=uk2',
|
||||
data: '',
|
||||
dataType: 'jsonp',
|
||||
timeout: 10000,
|
||||
|
@ -1,33 +1,36 @@
|
||||
var http = require('http'), request = require('request'), cheerio = require('cheerio');
|
||||
|
||||
var eventTimer = 0;
|
||||
var eventCache = {
|
||||
last: 0,
|
||||
data: {},
|
||||
expire: ((60 * 60) * 12) * 1000
|
||||
expire: ((60 * 60) * 12) * 1000,
|
||||
cinema: {}
|
||||
};
|
||||
// 'cwr':{data: {}, last:0};
|
||||
|
||||
|
||||
var cinemas = [{id: 'cwr', url: 'https://film.list.co.uk/cinema/14982-cineworld-renfrew-street/'},
|
||||
{id: 'gsc', url: 'https://film.list.co.uk/cinema/13590-cineworld-glasgow-science-centre/'},
|
||||
{id: 'pho', url: 'https://film.list.co.uk/cinema/12500-showcase-cinema-paisley/'}];
|
||||
|
||||
module.exports = {
|
||||
getEvents: function (req, res) {
|
||||
|
||||
console.log('Getting events...');
|
||||
var j=[], url = 'https://www.list.co.uk/events/days-out/when:this%20weekend/location:Dumbarton(55.9460,-4.5556)/distance:20/';
|
||||
var j = [], url = 'https://www.list.co.uk/events/days-out/when:this%20weekend/location:Dumbarton(55.9460,-4.5556)/distance:20/';
|
||||
|
||||
var now = new Date();
|
||||
|
||||
if ((now - eventCache.last) > eventCache.expire)
|
||||
{
|
||||
request(url, function(err, resp, body) {
|
||||
if ((now - eventCache.last) > eventCache.expire) {
|
||||
request(url, function (err, resp, body) {
|
||||
if (err)
|
||||
throw err;
|
||||
$ = cheerio.load(body);
|
||||
// console.log($);
|
||||
// console.log($);
|
||||
// TODO: scraping goes here!
|
||||
|
||||
$('.resultsRow').each( function(div)
|
||||
{
|
||||
var item={};
|
||||
$('.resultsRow').each(function (div) {
|
||||
var item = {};
|
||||
var eventSummary = $(this).find('.eventSummary').first();
|
||||
var byDate = $(this).find('.byDate').first();
|
||||
|
||||
@ -38,7 +41,6 @@ module.exports = {
|
||||
var price = byDate.find('.price').first();
|
||||
var dt = byDate.find('.dtstart').first().attr('title');
|
||||
|
||||
|
||||
item.title = title.text();
|
||||
item.description = description.text();
|
||||
item.link = link;
|
||||
@ -51,22 +53,83 @@ module.exports = {
|
||||
eventCache.last = now;
|
||||
eventCache.data = j;
|
||||
|
||||
res.render('pages/events',eventCache );
|
||||
res.render('pages/events', eventCache);
|
||||
|
||||
});
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
console.log('Using event cache...');
|
||||
|
||||
res.render('pages/events',eventCache );
|
||||
res.render('pages/events', eventCache);
|
||||
}
|
||||
|
||||
},
|
||||
doGetCinema: function (id) {
|
||||
var cinemaID = cinemas[id].id;
|
||||
var url = cinemas[id].url;
|
||||
var thisCinema = eventCache[cinemaID] || {data: {}, last: 0};
|
||||
console.log(cinemaID);
|
||||
console.log(url);
|
||||
var j = [];
|
||||
|
||||
var now = new Date();
|
||||
|
||||
if ((now - thisCinema.last) > eventCache.expire) {
|
||||
request(url, function (err, resp, body) {
|
||||
console.log('Working');
|
||||
if (err)
|
||||
throw err;
|
||||
$ = cheerio.load(body);
|
||||
|
||||
$('.byEvent').each(function (div) {
|
||||
var item = {};
|
||||
var title = $(this).find('H4').first();
|
||||
var eventSummary = $(this).find('.eventSummary').first();
|
||||
|
||||
var description = eventSummary.find('P').first();
|
||||
var link = ' https://www.list.co.uk' + eventSummary.find('A').first().attr('href');
|
||||
|
||||
item.title = title.text();
|
||||
item.description = description.text();
|
||||
item.link = link;
|
||||
|
||||
j.push(item);
|
||||
});
|
||||
|
||||
thisCinema.last = now;
|
||||
thisCinema.data = j;
|
||||
|
||||
eventCache[cinemaID] = thisCinema;
|
||||
console.log('returning');
|
||||
|
||||
return thisCinema;
|
||||
|
||||
});
|
||||
} else {
|
||||
console.log('Using event cache...');
|
||||
return thisCinema;
|
||||
}
|
||||
},
|
||||
getCinema: function (req, res) {
|
||||
var id = parseInt(req.params.id);
|
||||
console.log('Getting cinema: ' +id);
|
||||
|
||||
var output = module.exports.doGetCinema(id);
|
||||
res.render('pages/cinema', output);
|
||||
},
|
||||
preLoad: function () {
|
||||
var output = module.exports.doGetCinema(0);
|
||||
output = module.exports.doGetCinema(1);
|
||||
output = module.exports.doGetCinema(2);
|
||||
|
||||
setTimeout(function () {
|
||||
module.exports.preLoad();
|
||||
}, eventCache.expire);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
setTimeout(function () {
|
||||
console.log('Pre loading cinemas...');
|
||||
module.exports.preLoad();
|
||||
}, 10000);
|
||||
|
||||
|
||||
|
128
lib/today.js
Normal file
128
lib/today.js
Normal file
@ -0,0 +1,128 @@
|
||||
/**
|
||||
* Created by marti on 30/01/2016.
|
||||
*/
|
||||
|
||||
var http = require('http'), request = require('request'), cheerio = require('cheerio'), Forecast = require('forecast.io'), util = require('util');
|
||||
|
||||
var todayCache = {
|
||||
last: 0,
|
||||
data: {
|
||||
trains: {last: 0, data: []},
|
||||
weather: {}
|
||||
},
|
||||
expire: ((60 * 60) * 1) * 1000
|
||||
};
|
||||
|
||||
var trainList = [
|
||||
{id: 'dbeglq', url: 'http://www.journeycheck.com/scotrail/route?from=DBE&to=GLQ&action=search&savedRoute='},
|
||||
{id: 'glqdbe', url: 'http://www.journeycheck.com/scotrail/route?from=GLQ&to=DBE&action=search&savedRoute='}
|
||||
];
|
||||
|
||||
//https://api.forecast.io/forecast/0657dc0d81c037cbc89ca88e383b6bbf/55.8582846,-4.2593033?units=uk2
|
||||
var forecastOptions = {
|
||||
APIKey: '0657dc0d81c037cbc89ca88e383b6bbf',
|
||||
units: 'uk2'
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getToday: function (req, res) {
|
||||
res.render('pages/today', todayCache);
|
||||
},
|
||||
|
||||
getTrainUpdates: function (id) {
|
||||
console.log('Getting train events...');
|
||||
var url = trainList[id].url;
|
||||
|
||||
var now = new Date();
|
||||
|
||||
// if ((now - eventCache.last) > eventCache.expire) {
|
||||
request(url, function (err, resp, body) {
|
||||
if (err)
|
||||
throw err;
|
||||
$ = cheerio.load(body);
|
||||
var lu = $('DIV#LU').first();
|
||||
lu.find('.updatesSection').each(function (div) {
|
||||
var item = {};
|
||||
var title = $(this).find('.updateTitle').first().find('A').first().text().trim();
|
||||
var description = $(this).find('.updateBodyStart').first().find('.bodyInner').first().find('.primaryStyle').first().text().trim();
|
||||
var splitDesc = description.split('\r\n');
|
||||
item.title = title;
|
||||
|
||||
var wa = [];
|
||||
for (var i = 0; i < splitDesc.length; i++) {
|
||||
var contentCheck = splitDesc[i].trim();
|
||||
if (contentCheck.indexOf('Impact') > 0) contentCheck = '';
|
||||
if (contentCheck.indexOf('Additional Information') > 0) contentCheck = '';
|
||||
if (contentCheck.indexOf('apologise for the delay') > 0) contentCheck = '';
|
||||
if (contentCheck.indexOf('Delay Repay') > 0) contentCheck = '';
|
||||
if (contentCheck.length > 0) wa.push(contentCheck);
|
||||
}
|
||||
item.description = wa.join(' ');
|
||||
todayCache.data.trains.data.push(item);
|
||||
});
|
||||
|
||||
todayCache.data.trains.last = now;
|
||||
// todayCache.data.trains.data = j;
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
updateTrains: function () {
|
||||
todayCache.data.trains.data = [];
|
||||
var output = module.exports.getTrainUpdates(0);
|
||||
output = module.exports.getTrainUpdates(1);
|
||||
|
||||
setTimeout(function () {
|
||||
module.exports.updateTrains();
|
||||
}, todayCache.expire);
|
||||
},
|
||||
|
||||
doGetWeatherOutlook: function () {
|
||||
console.log('Retrieving weather..');
|
||||
var j = {};
|
||||
var forecast = new Forecast(forecastOptions);
|
||||
//55.8582846,-4.2593033
|
||||
forecast.get(55.8582846, -4.2593033, {units: 'uk2'}, function (err, res, data) {
|
||||
if (err) throw err;
|
||||
|
||||
//console.log('data: ' + util.inspect(data));
|
||||
|
||||
j.currently = data.currently.summary;
|
||||
j.today = data.daily.summary;
|
||||
j.alerts = data.alerts || {};
|
||||
|
||||
todayCache.data.weather = j;
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
preLoadToday: function () {
|
||||
try {
|
||||
module.exports.doGetWeatherOutlook();
|
||||
}
|
||||
catch (e) {
|
||||
// statements to handle any exceptions
|
||||
console.log('ERROR:');
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
try {
|
||||
module.exports.updateTrains();
|
||||
}
|
||||
catch (e) {
|
||||
// statements to handle any exceptions
|
||||
console.log('ERROR:');
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
module.exports.preLoadToday();
|
||||
}, todayCache.expire);
|
||||
}
|
||||
};
|
||||
|
||||
setTimeout(function () {
|
||||
// console.log('Pre loading trains...');
|
||||
module.exports.preLoadToday();
|
||||
|
||||
}, 15000);
|
@ -4,6 +4,7 @@
|
||||
"devDependencies": {
|
||||
"cheerio": "^0.19.0",
|
||||
"ejs": "^2.3.4",
|
||||
"forecast.io": "0.0.9",
|
||||
"htmlparser": "^1.7.7",
|
||||
"mammoth": "^0.3.25-pre.1",
|
||||
"request": "^2.67.0",
|
||||
|
24
views/pages/cinema.ejs
Normal file
24
views/pages/cinema.ejs
Normal file
@ -0,0 +1,24 @@
|
||||
<% include ../partials/head %>
|
||||
|
||||
<div class="mui-container">
|
||||
<div class="mui-panel">
|
||||
<div class="mui-text-headline mui-text-accent">Cinema</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="container" class="mui-panel">
|
||||
|
||||
<%
|
||||
for (var i = 0; i < data.length; i++) { %>
|
||||
<div class="mui-row">
|
||||
<div><a href='<%= data[i].link %>'> <%= data[i].title %> </a></div>
|
||||
<p><%= data[i].description %></p>
|
||||
|
||||
</div>
|
||||
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% include ../partials/cinemas %>
|
||||
<% include ../partials/footer %>
|
362
views/pages/slack.ejs
Normal file
362
views/pages/slack.ejs
Normal file
@ -0,0 +1,362 @@
|
||||
<% include ../partials/head %>
|
||||
|
||||
<div class="mui-container">
|
||||
<div class="mui-panel">
|
||||
<div class="mui-text-headline mui-text-accent">Slack - I have plenty of talent and vision I just don't give a damn</div>
|
||||
</div>
|
||||
<div id="container" class="mui-panel">
|
||||
<div class="mui-row">
|
||||
<div class="mui-col-md-3" id="one"></div>
|
||||
<div class="mui-col-md-3 " id="two"></div>
|
||||
<div class="mui-col-md-3 " id="three"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mui-panel">
|
||||
<div class="mui-row">
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Starting Points/Metasites</div>
|
||||
<ul>
|
||||
<li><a href="https://www.silvrtree.co.uk/today">Today</a></li>
|
||||
<li><a href="https://www.silvrtree.co.uk/events">Events</a></li>
|
||||
<li><a href="https://www.silvrtree.co.uk/cinema/0">Cinema</a></li>
|
||||
<li><a href="https://feedly.com/#my">Feedly</a></li>
|
||||
<li><a href="https://www.reddit.com">Reddit</a></li>
|
||||
<li><a href="http://www.facebook.com/">Facebook</a></li>
|
||||
<li><a href="http://www.yahoo.com/">Yahoo!</a></li>
|
||||
<li><a href="https://stackedit.io/editor">Journal Editor</a></li>
|
||||
<li><a href="http://www.unmajestic.com/home/bookmarks.php">Slack Bookmarks</a></li>
|
||||
<li><a href="http://www.rssmix.com/u/7711845">Paleo Mix</a></li>
|
||||
<li><a href="http://status.hivehome.com/">Hive Status</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Tools</div>
|
||||
<ul>
|
||||
<li><a href='https://kanbanflow.com'>Kanban Flow</a></li>
|
||||
<li><a href="https://www.linode.com/">Linode</a></li>
|
||||
<li><a href="http://www.colorzilla.com/gradient-editor/">CSS Gradient Generator</a></li>
|
||||
<li><a href="http://utilities-online.info/xmltojson">XML to JSON</a></li>
|
||||
<li><a href="http://shancarter.com/data_converter">CSV to JSON</a></li>
|
||||
<li><a href="http://cubic-bezier.com/">Cubic Bezier</a></li>
|
||||
<li><a href="http://gskinner.com/RegExr/">RegEx Tool</a></li>
|
||||
<li><a href="http://closure-compiler.appspot.com/home">Closure Compiler</a></li>
|
||||
<li><a href="http://jsonlint.com/">JSON Lint</a></li>
|
||||
<li><a href="http://jsoneditoronline.org/">JSON Editor</a></li>
|
||||
<li><a href="http://www.base64decode.org/">Base64 Decoder</a></li>
|
||||
<li><a href="http://jsbeautifier.org/">JS Beautifier</a></li>
|
||||
<li><a href="http://spritepad.wearekiss.com/">Spritepad</a></li>
|
||||
<li><a href="http://draeton.github.com/stitches/">Sprite Sheet Generator</a></li>
|
||||
<li><a href="http://www.cleancss.com/">CSS Optimizer</a></li>
|
||||
<li><a href="http://fontello.com/">Icon Font Generator</a></li>
|
||||
<li><a href="http://html2jade.aaron-powell.com/">HTML to Jade</a></li>
|
||||
<li><a href="http://cdnjs.com//">Cloudflare JS CDN</a></li>
|
||||
<li><a href="http://www.willpeavy.com/minifier/">HTML Minifier</a></li>
|
||||
<li><a href='https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet'>XSS Cheat Sheet</a></li>
|
||||
<li><a href='http://jsfiddle.net/'>JSFiddle</a></li>
|
||||
<li><a href="http://jsbin.com/">JS Bin</a></li>
|
||||
<li><a href='https://draftin.com/documents'>Draftin</a></li>
|
||||
<li><a href="https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html">Android Asset</a></li>
|
||||
<li><a href="https://xkpasswd.net/s/">Password Generator</a></li>
|
||||
<li><a href="https://howsecureismypassword.net/">Password Checker</a></li>
|
||||
<li><a href="https://archive.today">Archive Today</a></li>
|
||||
<li><a href="http://staticmapmaker.com/google/">Static Map Generator</a></li>
|
||||
<li><a href="https://httpbin.org/">AJAX Endpoints</a></li>
|
||||
<li><a href="https://tools.bartlweb.net/webssh/">WebSSH</a></li>
|
||||
|
||||
<li><span id='newPassword'>Generate Password</span></li>
|
||||
</ul>
|
||||
<div id='passwordOut' class='password' style='display:none;'></div>
|
||||
</div>
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Bitcoin <span id="btc"></span></div>
|
||||
<ul>
|
||||
<li><a href="https://www.bitstamp.net">Bitstamp</a></li>
|
||||
<li><a href="https://www.kraken.net">Kraken</a></li>
|
||||
<li><a href="https://cryptowat.ch/">Cryptowat.ch</a></li>
|
||||
<li><a href="http://www.coindesk.com/price/">BTC Chart</a></li>
|
||||
<li><a href="https://bitcoinwisdom.com/">BTC Chart 2</a></li>
|
||||
<li><a href="http://bitcoinity.org/markets/bitstamp/USD">BitStamp Chart</a></li>
|
||||
<li><a href="http://btc-chart.com/market/bitstamp/86400">Bitstamp Chart 2</a></li>
|
||||
<li><a href="https://bitbargain.co.uk">BitBargin UK</a></li>
|
||||
<li><a href="https://yacuna.com/">Yacuna UK</a></li>
|
||||
<li><a href="http://blockchain.info/">Blockchain</a></li>
|
||||
<li><a href="http://bitminter.com/">Bitminter</a></li>
|
||||
<li><a href="http://preev.com/">BTC Exchange Rate</a></li>
|
||||
<li><a href="http://www.silvrtree.co.uk/watch.html">CFT Watcher</a>
|
||||
<span style="cursor: pointer;"
|
||||
onclick="popitoutSmall('http://www.silvrtree.co.uk/watch.html');"><img
|
||||
src="gfx/popout.png"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mui-row">
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Package Tracking</div>
|
||||
<!-- Computer News -->
|
||||
<ul><li><a href="http://m.ups.com/">UPS</a></li></ul>
|
||||
</div>
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Weather</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="http://www.accuweather.com/ukie/index-forecast.asp?postalcode=G82%201RG">Dumbarton
|
||||
Weather</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.wunderground.com/cgi-bin/findweather/getForecast?query=dumbarton,%20uk&wuSelect=WEATHER">WU
|
||||
Dumbarton Weather</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://weather.yahoo.com/forecast/UKXX0663.html?unit=c">Y! Dumbarton Weather</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.accuweather.com/ukie/index-forecast.asp?postalcode=G9%202SU">Glasgow
|
||||
Weather</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.wunderground.com/cgi-bin/findweather/getForecast?query=glasgow,%20uk&wuSelect=WEATHER">WU
|
||||
Glasgow Weather</a>
|
||||
</li>
|
||||
<li><a href="http://www.nowcast.co.uk/lightning/">Live Lightning</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.upminsterweather.co.uk/test/live_lightning.htm">Other Live Lightning</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.meteorologica.info/freedata_lightning.htm">Closer Live Lightning</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.malvernwx.co.uk/lightning_data/lightning.htm">Multiple Lightning</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.blitzortung.org/Webpages/index.php">European Lightning</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.madpaddler.net/wxlightning.php">East Kilbride Lightning</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.bordersweather.co.uk/wxlightning.php">Borders Lightning</a>
|
||||
</li>
|
||||
<li><a href='http://www.lightningmaps.org/blitzortung/europe/index.php?bo_page=map&lang=en'>Best Live Lightning</a></li>
|
||||
<li><a href="http://www.madpaddler.net/wxais.php">Ships</a></li>
|
||||
<li><a href='http://www.raintoday.co.uk/'>Rain Today</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Free Email WEBpages</div>
|
||||
<!-- Free Email WEBpages -->
|
||||
<ul>
|
||||
<li><a href="http://gmail.google.com/">Gmail</a></li>
|
||||
<li>
|
||||
<a href="http://www.unmajestic.com/webmail/">Unmajestic Webmail</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.artizanconsulting.co.uk/webmail/">Artizan Webmail</a>
|
||||
</li>
|
||||
<li><a href="http://mail.yahoo.com">Yahoo Mail</a></li>
|
||||
<li>
|
||||
<a href="https://www.guerrillamail.com/">Guerrilla Mail Anti Spam</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mui-row">
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Job Searching</div>
|
||||
<ul>
|
||||
<li><a href='https://worksheets.computerfutures.com/'>CF Timesheets</a></li>
|
||||
<li><a href="http://www.monster.co.uk/">monster</a></li>
|
||||
<li><a href="http://www.cwjobs.co.uk/">cwjobs</a></li>
|
||||
<li><a href="http://www.s1jobs.com/myaccount/">s1jobs</a></li>
|
||||
<li><a href="http://www.jobserve.com/">jobserve</a></li>
|
||||
<li><a href="http://www.jobsite.co.uk/jbe/myprofile/">jobsite</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.itjobswatch.co.uk/contracts/scotland/asp.do">IT Jobs Watch Scotland</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Entertainment</div>
|
||||
<!-- Entertainment -->
|
||||
<ul>
|
||||
<li>
|
||||
<a href="http://genre.amazingradio.co.uk:8000/stream.mp3?arplayer=1">Amazing Radio Chill</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.cineworld.co.uk/cinemas/28?fallback=false&isMobileAgent=false">Cineworld</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.showcasecinemas.co.uk/showtimes/default.asp?selectTheatre=8508">Showcase</a>
|
||||
</li>
|
||||
<li><a href="http://www.imdb.com/">Imdb</a></li>
|
||||
<li><a href="http://www.epguides.com/">EPGuides</a></li>
|
||||
<li><a href="http://eztv.it">Eztv</a></li>
|
||||
<li><a href="http://www.mininova.org">Mininova</a></li>
|
||||
<li><a href="http://www.scrapetorrent.com">Scrapetorrent</a></li>
|
||||
<li>
|
||||
<a href="http://glasgow.myvillage.com/events">Whats on In Glasgow</a>
|
||||
</li>
|
||||
<li><a href="http://www.5pm.co.uk/Search/Event/">Local Events</a>
|
||||
</li>
|
||||
<li><a href="http://necta.jansenit.com:8000/necta192.mp3">Nectarine</a>
|
||||
</li>
|
||||
<li><a href="/playlists/str.pls">STR - Space Travel Radio</a>
|
||||
</li>
|
||||
<li><a href="/playlists/musik.drumstep.pls">musik.drumstep</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Travel <span id="fx"></div>
|
||||
<!-- Travel -->
|
||||
<span>DBEGLQ: <span id="dbeglq">---</span></span> <span>GLQDBE: <span id="glqdbe">---</span></span>
|
||||
<div id='trainResults' style='display:none'></div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='http://www.journeycheck.com/firstscotrail'>Journey Check</a>
|
||||
<a href="http://www.bbc.co.uk/travel/2650802/incidents/road">BBC Road
|
||||
news</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://ojp.nationalrail.co.uk/service/ldbboard/dep/DBE/WES/To?ar=true">DBE->WES</a>
|
||||
/
|
||||
<a href="http://www.traintime.uk/index.php?view=desktop&from=DBE&to=WES">Advanced</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://ojp.nationalrail.co.uk/service/ldbboard/dep/WES/DBE/To?ar=true">WES->DBE</a>
|
||||
<span style="cursor: pointer;"
|
||||
onclick="popitout('http://ojp.nationalrail.co.uk/service/ldbboard/dep/WES/DBE/To?ar=true#skip-content-hold');"><img
|
||||
src="gfx/popout.png"></span>
|
||||
/
|
||||
<a href="http://www.traintime.uk/index.php?view=desktop&from=WES&to=DBE">Advanced</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.livedepartureboards.co.uk/ldb/summary.aspx?T=DBE">DBE Board</a>
|
||||
/
|
||||
<a href="http://www.stationboard.uk/index.php?view=desktop&station1=DBE&direction=departures">Advanced</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.livedepartureboards.co.uk/ldb/summary.aspx?T=GLQ">GLQ Trains</a> /
|
||||
<a href="http://www.stationboard.uk/index.php?view=desktop&station1=GLQ&direction=departures">Adv</a> /
|
||||
<a href="http://www.traintime.uk/index.php?view=desktop&from=GLQ&to=DBE">GLQ->DBE</a>
|
||||
</li>
|
||||
<li><a href="http://www.kayak.co.uk/">Kayak</a></li>
|
||||
<li><a href="http://www.travelocity.co.uk/">Travelocity</a></li>
|
||||
<li><a href="http://www.travel.com/sitemap.htm">Travel.com</a></li>
|
||||
<li>
|
||||
<a href="http://www.landings.com/_landings/pages/commercial.html">Airlines</a>
|
||||
</li>
|
||||
<li><a href="http://www.flightstats.com">Landings</a></li>
|
||||
<li>
|
||||
<a href="http://www.lib.utexas.edu/Libs/PCL/Map_collection/map_sites/map_sites.html#general">Maps</a>
|
||||
</li>
|
||||
<li><a href="http://www.sitesatlas.com/Maps/">Maps2</a></li>
|
||||
<li><a href="http://www.itn.net/">ITN</a></li>
|
||||
<li><a href="http://bahn.hafas.de/bin/query.exe/en">HAFAS</a></li>
|
||||
<li><a href="http://bahn.hafas.de/bin/query.exe/en">DieBahn</a></li>
|
||||
<li><a href="http://www.cwrr.com/nmra/travelreg.html">RailUSA</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.trainweb.com/frames_travel.html">TrainWeb</a>
|
||||
</li>
|
||||
<li><a href="http://www.cwrr.com/nmra/travelw2.html">RailWorld</a>
|
||||
</li>
|
||||
<li><a href="http://www.xe.net/currency/">Currency Converter</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.cia.gov/cia/publications/factbook/index.html">CIA</a>
|
||||
</li>
|
||||
<li><a href="http://maps.google.com/">GMaps</a></li>
|
||||
<li><a href='https://unop.uk/tube/'>Tube Status</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="mui-row">
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Computer Software, etc.</div>
|
||||
<ul>
|
||||
<li><a href="">Portable Apps</a></li>
|
||||
<li><a href="http://www.newfreeware.com/">NewFreeware</a></li>
|
||||
<li>
|
||||
<a href="http://www.makeuseof.com/tag/portable-software-usb/">Portable Software</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.portablefreeware.com/">Portable Freeware Collection</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Reference & Special sites</div>
|
||||
<!-- Reference and Special sites -->
|
||||
<ul>
|
||||
<li><a href="http://www.glossarist.com/default.asp">Glossaries</a>
|
||||
</li>
|
||||
<li><a href="http://www.convert-me.com/en/">Converters</a></li>
|
||||
<li>
|
||||
<a href="http://decoder.americom.com/cgi-bin/decoder.cgi">DECODE</a>
|
||||
</li>
|
||||
<li><a href="http://www.rxlist.com/">Drugs</a></li>
|
||||
<li><a href="http://www.ncbi.nlm.nih.gov/PubMed/">Medline</a></li>
|
||||
<li>
|
||||
<a href="http://www.logos.it/dictionary/owa/sp?lg=EN">Translation</a>
|
||||
</li>
|
||||
<li><a href="http://www.onelook.com/">One Look</a></li>
|
||||
<li><a href="http://www.defenselink.mil/">US Military</a></li>
|
||||
<li><a href="http://www.fedworld.gov/">US Fed</a></li>
|
||||
<li><a href="http://www.ih2000.net/ira/legal.htm">Legal</a></li>
|
||||
<li><a href="http://www.nih.gov/">NIH</a></li>
|
||||
<li><a href="http://www.refdesk.com/">RefDESK</a></li>
|
||||
<li><a href="http://www.britannica.com/">Britannica</a></li>
|
||||
<li><a href="http://www.capitolimpact.com/gw/">States</a></li>
|
||||
<li><a href="http://www.packtrack.com/">PackTrack</a></li>
|
||||
<li><a href="http://www.acronymfinder.com/">Acronym</a></li>
|
||||
<li><a href="http://www.visualthesaurus.com/">V-Thes</a></li>
|
||||
<li>
|
||||
<a href="http://www.timelineindex.com/content/home/forced">Timelines</a>
|
||||
</li>
|
||||
<li><a href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="mui-col-md-4">
|
||||
<div class="mui-text-title mui-text-black">Earth and Beyond</div>
|
||||
<!-- Good Reading Misc. -->
|
||||
<ul>
|
||||
<li><a href="http://enbarsenal.com">ENB Arsenal</a></li>
|
||||
<li><a href="http://enb.wikia.com/">ENB Wikia</a></li>
|
||||
<li><a href="http://enb.gearlist.co.uk/">Gear List</a></li>
|
||||
<li><a href='http://forum.enb-emulator.com/'>Emu Forum</a></li>
|
||||
<li><a href="http://net-7.org/wiki/index.php?title=Main_Page">Net 7 Wiki</a></li>
|
||||
<li><a href="http://spaceengineers.wikia.com/wiki/Space_Engineers_Wiki">Space Engineers Wiki</a></li>
|
||||
<li><a href="http://forums.keenswh.com/">Space Engineers Forum</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id='weather' class="mui-panel"></div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<script src="libs/ejs.js"></script>
|
||||
<script src="app.js"></script>
|
||||
</html>
|
13
views/pages/today.ejs
Normal file
13
views/pages/today.ejs
Normal file
@ -0,0 +1,13 @@
|
||||
<% include ../partials/head %>
|
||||
|
||||
<div class="mui-container">
|
||||
<div class="mui-panel">
|
||||
<div class="mui-text-headline mui-text-accent">Today</div>
|
||||
</div>
|
||||
|
||||
<% include ../partials/weather %>
|
||||
<% include ../partials/trains %>
|
||||
|
||||
</div>
|
||||
|
||||
<% include ../partials/footer %>
|
6
views/partials/cinemas.ejs
Normal file
6
views/partials/cinemas.ejs
Normal file
@ -0,0 +1,6 @@
|
||||
<div class="mui-container">
|
||||
<a href="/cinema/0">Cineworld Glasgow</a> /
|
||||
<a href="/cinema/1">Imax Science Centre</a> /
|
||||
<a href="/cinema/2">Showcase Phoenix</a>
|
||||
|
||||
</div>
|
@ -8,8 +8,13 @@
|
||||
<title>Events</title>
|
||||
|
||||
<meta name="Author" content="" />
|
||||
<link href="http://fonts.googleapis.com/css?family=Roboto+Slab:400,300,700" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" type="text/css" href="css/mui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../css/mui.css">
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Roboto Slab', "Helvetica Neue", Helvetica, Arial;
|
||||
}
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
16
views/partials/trains.ejs
Normal file
16
views/partials/trains.ejs
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
<% if (data.trains.data.length > 0 ) {%>
|
||||
<div id="container" class="mui-panel">
|
||||
|
||||
<%
|
||||
for (var i = 0; i < data.trains.data.length; i++) { %>
|
||||
<div class="mui-row">
|
||||
<div><%= data[i].title %></div>
|
||||
<p><%= data[i].description %></p>
|
||||
</div>
|
||||
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
|
||||
<% } %>
|
7
views/partials/weather.ejs
Normal file
7
views/partials/weather.ejs
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
<div id="container" class="mui-panel">
|
||||
<h1>Weather</h1>
|
||||
<div class="mui-row"><div class="mui-col-md-12">Currently: <%=data.weather.currently%></div></div>
|
||||
<div class="mui-row"><div class="mui-col-md-12">Later: <%=data.weather.today%></div></div>
|
||||
</div>
|
@ -1,6 +1,7 @@
|
||||
var express = require('express'), path = require('path'), http = require('http'),
|
||||
fx = require('./lib/fx'), btc = require('./lib/btc'), train = require('./lib/train'),
|
||||
password = require('./lib/password') , clean = require('./lib/clean'), events = require('./lib/events')
|
||||
password = require('./lib/password') , clean = require('./lib/clean'), events = require('./lib/events'),
|
||||
today = require('./lib/today')
|
||||
//train = require('lib/train')
|
||||
/* ,submit = require('./routes/mongo/submit') */
|
||||
;
|
||||
@ -45,6 +46,10 @@ app.configure(function () {
|
||||
|
||||
|
||||
app.use('/events', events.getEvents);
|
||||
app.get('/cinema/:id', events.getCinema);
|
||||
|
||||
app.get('/today', today.getToday);
|
||||
|
||||
|
||||
app.use('/lot', function (req, res) {
|
||||
var pg = require('pg');
|
||||
@ -69,6 +74,11 @@ app.configure(function () {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/slack', function (req, res) {
|
||||
res.render('pages/slack');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user