removed deprecated JS
completed import of 3rd party dependencies added url to README.md init GitHub version "Hermes 1.0b"
This commit is contained in:
parent
abc4fb2c21
commit
b16fa60929
81 changed files with 65818 additions and 0 deletions
165
js/SL.Astro.js
Normal file
165
js/SL.Astro.js
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
/**
|
||||
* @preserve Copyright (c) 2018 T. F. Raaion, www.sublunar.space
|
||||
* License MIT: http://www.opensource.org/licenses/MIT
|
||||
*
|
||||
* SUBLUNAR ALMANAC
|
||||
*/
|
||||
var SL = SL || {};
|
||||
|
||||
/**
|
||||
* Astronomical and astrological calculations
|
||||
*/
|
||||
SL.Astro = (function() {
|
||||
|
||||
/**
|
||||
* Astronomical calculations
|
||||
* @public {Object} moon - holds definitions and labels
|
||||
* @public {function} moonPhase() - calculate moon phase from phase angle and lunar day
|
||||
*/
|
||||
var Nomy = (function() {
|
||||
|
||||
/**
|
||||
* moon object with definitions
|
||||
*/
|
||||
var moon = {
|
||||
phase : {
|
||||
symbol : [ "void", "🌑", "🌒", "🌓", "🌔", "🌕", "🌖", "🌗", "🌘" ],
|
||||
name : ["void", "new", "waxing crescent", "first quarter", "waxing gibbous", "full", "waning gibbous", "last quarter", "waning crescent" ]
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* moonPhase function returns the current phase of the moon
|
||||
* @param {Object} lunar - Object with lunar day, phase angle and phase (% illumination) of a moment
|
||||
* @return {int} phase - number from 1 (new moon) to 5 (full moon) to 8 (waning crescent)
|
||||
*/
|
||||
function moonPhase(lunar) {
|
||||
var sphase;
|
||||
var g;
|
||||
var phase;
|
||||
if ( lunar.angle < 180 ) sphase = "new";
|
||||
if ( lunar.angle < 168 ) sphase = "crescent";
|
||||
if ( lunar.angle < 95 ) sphase = "quarter";
|
||||
if ( lunar.angle < 85 ) sphase = "gibbous";
|
||||
if ( lunar.angle < 12 ) sphase = "full";
|
||||
// sweph returns the phase angle just between 0° and 180°, so in order
|
||||
// to find whether it is waxing or waning, we utilize the lunar day:
|
||||
if ( lunar.day < 16 ) g = "waxing";
|
||||
if ( lunar.day >= 16 ) g = "waning";
|
||||
if ( sphase == "new" ) phase = 1;
|
||||
if ( sphase == "full" ) phase = 5;
|
||||
if ( sphase == "quarter" && g == "waxing") phase = 3;
|
||||
if ( sphase == "quarter" && g == "waning") phase = 7;
|
||||
if ( sphase == "crescent" && g == "waxing" ) phase = 2;
|
||||
if ( sphase == "crescent" && g == "waning" ) phase = 8;
|
||||
if ( sphase == "gibbous" && g == "waxing" ) phase = 4;
|
||||
if ( sphase == "gibbous" && g == "waning" ) phase = 6;
|
||||
return phase;
|
||||
}
|
||||
return {
|
||||
moonPhase: moonPhase,
|
||||
moon : moon
|
||||
}
|
||||
}());
|
||||
|
||||
/**
|
||||
* Astrological calculations
|
||||
* @public {Object} planet - holds definitions and labels
|
||||
* @public {Object} zodiac - holds definitions and labels
|
||||
* @public {function} zodToDeg() - calculates longitudes in the format "02° Aries 12" to float degrees
|
||||
* @public {function} getZodiac() - returns the zodiac sign for given degrees (tropical or sidereal)
|
||||
*/
|
||||
var Logy = (function() {
|
||||
/**
|
||||
* planet object with definitions
|
||||
*/
|
||||
var planet = {
|
||||
name : [ "void", "Sun", "Moon", "Mars", "Mercury", "Jupiter", "Venus", "Saturn" ],
|
||||
ruler : {
|
||||
greek : [ "void", "Helios", "Selene", "Ares", "Hermes", "Zeus", "Aphrodite", "Kronos" ],
|
||||
roman: [ "void", "Sol", "Luna", "Mars", "Mercury", "Jupiter", "Venus", "Saturn" ]
|
||||
},
|
||||
symbol : [ "void", "☉", "☽", "♂", "☿", "♃", "♀", "♄" ],
|
||||
day : [ "void", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
|
||||
order : [ 0, 1, 6, 4, 2, 7, 5, 3 ]
|
||||
}
|
||||
|
||||
/**
|
||||
* zodiac object with definitions
|
||||
*/
|
||||
var zodiac = {
|
||||
name : [ "void", "Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo", "Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces" ],
|
||||
symbol : [ "void", "♈", "♉", "♊", "♋", "♌", "♍", "♎", "♏", "♐", "♑", "♒", "♓" ],
|
||||
ruler : [ 0, 3, 6, 4, 2, 1, 4, 6, 3, 5, 7, 7, 5 ]
|
||||
}
|
||||
|
||||
/**
|
||||
* zodToDeg function converts zodiacal degree notation to degrees
|
||||
* @param {string} zcoord - a string in zodiacal degree notation, e.g. "14° Taurus 34"
|
||||
* @return {float} degrees
|
||||
*/
|
||||
function zodToDeg(zcoord) {
|
||||
var zdef = zodiac; // global variable needs to be declared before using this function
|
||||
if(zcoord) {
|
||||
var z = zcoord.split(" ");
|
||||
var m = 0;
|
||||
for (var i = 0, len = 13; i < len; i++) {
|
||||
if (zdef.name[i] == z[1] || zdef.symbol[i] == z[1] ) m = i-1;
|
||||
}
|
||||
return parseFloat(z[0]) + m * 30 + parseFloat(z[2]) / 60;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* degToZod function converts degrees to zodiacal degree notation
|
||||
* @param {string} deg - degrees
|
||||
* @param {int} - 1 for sidereal zodiac, anything else for tropical
|
||||
* @return {float} a string in zodiacal degree notation, e.g. "14° Taurus 34"
|
||||
*/
|
||||
function degToZod(deg, sidereal =-1) {
|
||||
var zdef = zodiac;
|
||||
if ( $("#zodiac").is(':checked') && sidereal != 0 ) sidereal = 1;
|
||||
if ( sidereal == 1 ) {
|
||||
deg -= 24.11722222222; // degrees difference between tropical and sidereal
|
||||
}
|
||||
if ( deg >= 360.0 ) deg = Math.abs(deg - 360.0);
|
||||
var zod = getZodiac(deg, 0);
|
||||
var diff = ( zod.sign - 1 ) * 30.0;
|
||||
var degrees = deg - diff;
|
||||
var first = Math.floor(degrees);
|
||||
var second = Math.round((degrees - first) * 60.0);
|
||||
return first+" "+zdef.symbol[zod.sign]+" "+second;
|
||||
}
|
||||
|
||||
/**
|
||||
* getZodiac function returns the zodiac sign and decan for a given longitude
|
||||
* @param {float} deg - decimal longitude degrees
|
||||
* @param {int} sidereal - 1 for sidereal zodiac, other number for tropical zodiac
|
||||
* @return {Object} obj.sign - zodiac sign 1-12, obj.decan - zodiac decan 1-36
|
||||
*/
|
||||
function getZodiac(deg, sidereal = -1) {
|
||||
if ( $("#zodiac").is(':checked') && sidereal != 0 ) sidereal = 1;
|
||||
if ( sidereal == 1 ) {
|
||||
deg -= 24.11722222222; // degrees difference between tropical and sidereal
|
||||
}
|
||||
if ( deg >= 360.0 ) deg = Math.abs(deg - 360.0);
|
||||
deg += 0.0001; // added to compensate rounding, resulting in 0° to 29.99° being Aries instead of 0° to 30°
|
||||
var obj = {
|
||||
sign: Math.ceil(deg / 30),
|
||||
decan: Math.ceil(deg / 10)
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
return {
|
||||
planet : planet,
|
||||
zodiac : zodiac,
|
||||
zodToDeg : zodToDeg,
|
||||
degToZod : degToZod,
|
||||
getZodiac : getZodiac
|
||||
}
|
||||
}());
|
||||
return {
|
||||
Nomy : Nomy,
|
||||
Logy : Logy,
|
||||
}
|
||||
}());
|
||||
588
js/SL.Calendar.js
Normal file
588
js/SL.Calendar.js
Normal file
|
|
@ -0,0 +1,588 @@
|
|||
/**
|
||||
* @preserve Copyright © 2018 T. F. Raaion, www.sublunar.space
|
||||
* (MIT): http://www.opensource.org/licenses/MIT
|
||||
*
|
||||
* SUBLUNAR ALMANAC
|
||||
*/
|
||||
var SL = SL || {};
|
||||
|
||||
//Defines Calendar Objects and Methods
|
||||
/**
|
||||
* Methods and objects to generate the calendar
|
||||
* @public {function} modules() - loads all plugin modules defined in an Array in index.html and adds their filters to the navbar
|
||||
* @public {function} make() - creates the grid of planetary hours for given coordinates and time in Settings
|
||||
* @public {Array} moments - holds all the JSON Ephemeris objects to calculate the calendar data
|
||||
* @public {function} hourInfo() - creates a temporary DOM object to be displayed as hour info upon clicking a planetary hour object
|
||||
* @public {function} comboFilter() - is a filter function for Isotope to include all selected tags and operations within a filter but exclude between each other
|
||||
* @public {function} getGeoCode() - set latitude, longitude, and UTC-Offset form fields for a given place entered in Settings
|
||||
* @public {function} about() - creates a DOM object with the "About" text for SUBLUNAR ALMANAC.
|
||||
* @public {function} reset() - simulates a resizing of the browser window. Needed hack for a display glitch in the modals.
|
||||
* @public {function} resetFileInput() - resets the file selection button in Settings
|
||||
* @public {function} download() - download a JSON object as a file
|
||||
*/
|
||||
SL.Calendar = (function() {
|
||||
|
||||
/**
|
||||
* about function creates a DOM object with the "About" text for SUBLUNAR ALMANAC
|
||||
*/
|
||||
function about() {
|
||||
$('<div/>').loadTemplate($("#tpl-modal"), {
|
||||
title : '<center><h1 class="stoke">SUBLUNAR ALMANAC</h1></center>',
|
||||
right : '<center><p><style>.bmc-button img{width: 27px !important;margin-bottom: 1px !important;box-shadow: none !important;border: none !important;vertical-align: middle !important;}.bmc-button{line-height: 36px !important;height:37px !important;text-decoration: none !important;display:inline-flex !important;color:#000000 !important;background-color:#FFFFFF !important;border-radius: 3px !important;border: 1px solid transparent !important;padding: 1px 9px !important;font-size: 22px !important;letter-spacing: 0.6px !important;box-shadow: 0px 1px 2px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;margin: 0 auto !important;font-family:\'Cookie\', cursive !important;-webkit-box-sizing: border-box !important;box-sizing: border-box !important;-o-transition: 0.3s all linear !important;-webkit-transition: 0.3s all linear !important;-moz-transition: 0.3s all linear !important;-ms-transition: 0.3s all linear !important;transition: 0.3s all linear !important;}.bmc-button:hover, .bmc-button:active, .bmc-button:focus {-webkit-box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;text-decoration: none !important;box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;opacity: 0.85 !important;color:#000000 !important;}</style><link href="https://fonts.googleapis.com/css?family=Cookie" rel="stylesheet"><a class="bmc-button" target="_blank" href="https://www.buymeacoffee.com/sublunar"><img src="https://www.buymeacoffee.com/assets/img/BMC-btn-logo.svg" alt="Buy me a coffee"><span style="margin-left:5px">Buy me a coffee</span></a> <a class="github-button" href="https://github.com/sublunarspace/sublunar.almanac" data-size="large" aria-label="Star sublunarspace/sublunar.almanac on GitHub">GitHub</a></p><p><a href="https://opensource.org/licenses/MIT" target="_blank">(MIT)</a> © 2018 T. F. Raaion / <a href="http://sublunar.space">sublunar space</a></p></center><hr /><center><p>Astronomical calculations are based on <br /><a href="http://www.astro.com/swisseph/swephinfo_e.htm" target="_blank">Swiss Ephemeris API</a>, © 1997-2016 Astrodienst AG, <a href="https://opensource.org/licenses/GPL-2.0" target="_blank">(GPLv2.0+)</a><br />and the <a href="http://www.moshier.net/#Astronomy" target="_blank">Table of New Moon Dates</a> by Steve Moshier.</p><p>The front-end relies on the following Javascript Libraries:<br /><a href="https://jquery.com/" target="_blank">jQuery 3.2.1</a>, © JS Foundation, <a href="https://opensource.org/licenses/MIT" target="_blank">(MIT)</a><br /><a href="https://getbootstrap.com/" target="_blank">Bootstrap 3.3.7</a>, © Twitter, Inc., <a href="https://opensource.org/licenses/MIT" target="_blank">(MIT)</a><br /><a href="https://github.com/codepb/jquery-template/" target="_blank">jQuery.loadTemplate</a>, © 2013 Paul Burgess and other contributors, <a href="https://opensource.org/licenses/MIT" target="_blank">(MIT)</a><br /><a href="http://momentjs.com" target="_blank">MomentJS 2.18.1</a>, © Tim Wood, Iskren Chernev, Moment.js contributors, <a href="https://opensource.org/licenses/MIT" target="_blank">(MIT)</a><br /><a href="http://isotope.metafizzy.co" target="_blank">Isotope 3.0.4</a>, © 2017 Metafizzy, <a href="https://opensource.org/licenses/GPL-3.0" target="_blank">(GPLv3)</a><br /><a href="http://defiantjs.com" target="_blank">DefiantJS 1.4.1</a>, © 2013-2017, Hakan Bilgin, <a href="https://opensource.org/licenses/MIT" target="_blank">(MIT)</a><br /><a href="http://ricostacruz.com/nprogress" target="_blank">NProgress</a>, © 2013, 2014 Rico Sta. Cruz, <a href="https://opensource.org/licenses/MIT" target="_blank">(MIT)</a><br /><a href="https://github.com/klokantech/javascript" target="_blank">OsmNamesAutocomplete</a>, © 2016 Klokan Technologies GmbH, <a href="https://opensource.org/licenses/GPL-3.0" target="_blank">(GPLv3)</a><br /><a href="https://github.com/darkskyapp/tz-lookup" target="_blank">tzlookup</a>, by The Dark Sky, LLC, <a href="https://creativecommons.org/publicdomain/zero/1.0/" target="_blank">(CC0 1.0 Universal)</a><br /><a href="https://github.com/nwcell/ics.js/" target="_blank">ics.js</a>, © 2018 Travis Krause, <a href="https://opensource.org/licenses/MIT" target="_blank">(MIT)</a></p><p>The design is based on<br /><a href="http://bootswatch.com" target="_blank">bootswatch v3.3.7</a>, © 2012-2017 Thomas Park, <a href="https://opensource.org/licenses/MIT" target="_blank">(MIT)</a>.</center><script async defer src="https://buttons.github.io/buttons.js"></script>'
|
||||
})
|
||||
.appendTo('#modals')
|
||||
.attr('id', 'aboutSLC')
|
||||
.attr('tabindex', '-1')
|
||||
.attr('role', 'dialog')
|
||||
.addClass('modal fade autoModal')
|
||||
.find('.col-sm-4').closest('.row')
|
||||
.find('.col-sm-8').attr('class', 'col-sm-12').closest('.row')
|
||||
.find('.col-sm-4').remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* resetWindow function simulates a resizing of the browser window. Needed hack for a display glitch in the modals.
|
||||
*/
|
||||
function resetWindow() {
|
||||
var resizeEvent = window.document.createEvent('UIEvents');
|
||||
resizeEvent .initUIEvent('resize', true, false, window, 0);
|
||||
window.dispatchEvent(resizeEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* resetFileInput resets the file selection button in Settings
|
||||
*/
|
||||
function resetFileInput() {
|
||||
$('#fileInput').wrap('<form>').closest('form').get(0).reset();
|
||||
$('#fileInput').unwrap();
|
||||
$('#fileInputLabel').removeClass('btn-danger btn-success').addClass('btn-default').find('span').html('Select File');
|
||||
}
|
||||
|
||||
/**
|
||||
* download a JSON object as a file
|
||||
* @param {Object} exportObj - JSON Object to be downloaded
|
||||
* @param {string} exportName - file name for the JSON Object to be downloaded
|
||||
* found here: https://stackoverflow.com/questions/19721439/download-json-object-as-a-file-from-browser
|
||||
*/
|
||||
function download(exportObj, exportName, query = "query"){
|
||||
var dataStr = "data:text/json;charset=utf-8," + encodeURIComponent('{"'+query+'":'+JSON.stringify(exportObj)+'}');
|
||||
var downloadAnchorNode = document.createElement('a');
|
||||
downloadAnchorNode.setAttribute("href", dataStr);
|
||||
downloadAnchorNode.setAttribute("download", exportName + ".json");
|
||||
document.body.appendChild(downloadAnchorNode); // required for firefox
|
||||
downloadAnchorNode.click();
|
||||
downloadAnchorNode.remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* getGeoCode function to set latitude, longitude, and UTC-Offset form fields for a given place entered in Settings
|
||||
* @param {Object} item - JSON Object returned from kt.OsmNamesAutocomplete (see index.html)
|
||||
*/
|
||||
function getGeoCode(item) {
|
||||
$('#lat').addClass('loading');
|
||||
$('#lon').addClass('loading');
|
||||
$('#offset').addClass('loading');
|
||||
// find timezone with tzlookup for lat and long returned from kt.OsmNamesAutocomplete JSON
|
||||
// and extract UTC offset from a string in the format "(UTC+03:00)":
|
||||
$.getJSON( "https://raw.githubusercontent.com/dmfilipenko/timezones.json/master/timezones.json", function( zones ) {
|
||||
var off = JSON.search( zones, '//*[utc="'+tzlookup(item.lat, item.lon)+'"]');
|
||||
$('#lat').val(item.lat);
|
||||
$('#lon').val(item.lon);
|
||||
var os;
|
||||
// it's a dirty hack solution...
|
||||
if ( off[0].text ) {
|
||||
if ( off[0].text.split(')')[0] == '(UTC') os = 0;
|
||||
else {
|
||||
if ( item.lon < 0 ) os = parseInt(off[0].text.split(')')[0].split('-')[1].split(':')[0], 10)*-1;
|
||||
if ( item.lon > 0 ) os = parseInt(off[0].text.split(')')[0].split('+')[1].split(':')[0], 10);
|
||||
}
|
||||
} else os = "???";
|
||||
$('#offset').val(os);
|
||||
$('#lat').removeClass('loading');
|
||||
$('#lon').removeClass('loading');
|
||||
$('#offset').removeClass('loading');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Hours object with variable and function to generate the grid of planetary hours
|
||||
* @public {Object} moments - JSON object holding all the data returned from the swiss ephemeris calculations done by pmom.c
|
||||
* @public {function} make() - creates the grid of planetary hours for given coordinates and time
|
||||
*/
|
||||
var Hours = (function() {
|
||||
|
||||
/**
|
||||
* moments JSON object with all returned moments from pmom.c. Filled by make()
|
||||
*/
|
||||
var moments = [];
|
||||
|
||||
/**
|
||||
* make function creates the grid of planetary hours for given coordinates and time in Settings
|
||||
* @param {int} days - number of days to be calculated
|
||||
* @param {int} ts - unix timestamp of first day of the calendar to be calculated
|
||||
* @param {float} lat - decimal degrees latitude of place on Earth
|
||||
* @param {float} lon - decimal degrees longitude of place on Earth
|
||||
*/
|
||||
function make(days, ts, lat, lon ) {
|
||||
if ( days > 60 ) {
|
||||
alert("Sorry, the calculation is limited to 60 days at the moment! Calculating the first 60 out of your desired "+days+" days!");
|
||||
days = 60;
|
||||
}
|
||||
$('#grid').empty();
|
||||
$('#download').remove();
|
||||
Filter.load();
|
||||
var files = document.getElementById('fileInput').files;
|
||||
// check if JSON file is loaded. If not, calculate...
|
||||
if (files.length <= 0) {
|
||||
var url = "pmom.php?days="+days+"&ts="+ts+"&lat="+lat+"&lon="+lon;
|
||||
fetch(url)
|
||||
.then(function(response) {
|
||||
return response.json();
|
||||
})
|
||||
.then(function(json) {
|
||||
Hours.moments = json.query;
|
||||
for (var i = 0, len = Hours.moments.length; i < len; i++) {
|
||||
var everyday = setTimeout( Hour.make, 10, Hours.moments[i], i, Hours.moments.length, everyday);
|
||||
NProgress.set(i/Hours.moments.length);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// display calendar data from JSON file
|
||||
var fr = new FileReader();
|
||||
fr.onloadend = function(e) {
|
||||
try {
|
||||
var result = JSON.parse(e.target.result);
|
||||
} catch (e) {
|
||||
NProgress.done();
|
||||
$('#settings').modal('show');
|
||||
$('#fileInputLabel').removeClass('btn-success').addClass('btn-danger').find('span').html('FILE ERROR');
|
||||
alert("Sorry, wrong file format!");
|
||||
SL.Calendar.resetFileInput();
|
||||
return false;
|
||||
}
|
||||
Hours.moments = result.query;
|
||||
if ( Hours.moments.length > 0 ) {
|
||||
for (var i = 0, len = Hours.moments.length; i < len; i++) {
|
||||
var everyday = setTimeout( Hour.make, 10, Hours.moments[i], i, Hours.moments.length, everyday);
|
||||
NProgress.set(i/Hours.moments.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
fr.readAsText(files.item(0));
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
make: make,
|
||||
moments : moments,
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
/**
|
||||
* Hour object with variable and function to generate a single planetary hour
|
||||
* @public {function} make() - creates a DOM object of a planetary hour based on a template defined in index.html
|
||||
* @public {function} info() - creates a temporary DOM object to be displayed as hour info upon clicking a planetary hour object
|
||||
*/
|
||||
var Hour = (function() {
|
||||
|
||||
/**
|
||||
* make function creates a DOM object of a planetary hour based on a template defined in index.html
|
||||
* @param {Object} data - a single hour JSON object with all data to build a DOM object
|
||||
* @param {int} j - increment number of hour object
|
||||
* @param {int} all - total number of objects to be created
|
||||
* @param {int} timeout - holds the ID value returned by setTimeout() in Hours.make()
|
||||
*/
|
||||
function make(data, j, all, timeout) {
|
||||
var now = new moment.utc().unix();
|
||||
var m = data;
|
||||
if ( $("#future").is(':checked') && now > m.ts ) return false;
|
||||
var zodiac = SL.Astro.Logy.getZodiac(m.ephemeris.sun.deg);
|
||||
var moonsign = SL.Astro.Logy.getZodiac(m.ephemeris.sun.deg);
|
||||
var extraData = Module.data(m);
|
||||
$('<div/>').loadTemplate($("#tpl-planetaryhour"), {
|
||||
ruler : SL.Astro.Logy.planet.symbol[(m.planetary.day.no+1)],
|
||||
date : new moment.unix(m.ts).utc().add($('#offset').val(), 'h').format('D/M'),
|
||||
hourstart : new moment.unix(m.planetary.hour.start).utc().add($('#offset').val(), 'h').format('HH:mm'),
|
||||
hourruler : m.planetary.hour.no+1,
|
||||
hournumber : SL.Astro.Logy.planet.symbol[SL.Astro.Logy.planet.order[((m.planetary.hour.no+1+(m.planetary.day.no*24) - 1) % 7 ) + 1]],
|
||||
hourend : new moment.unix(m.planetary.hour.end).utc().add($('#offset').val(), 'h').format('HH:mm'),
|
||||
})
|
||||
.addClass('col-md-2 centered planetaryhour')
|
||||
.addClass(Module.classes(extraData))
|
||||
.attr('id', 'moment_'+j)
|
||||
.attr('ts', m.ts)
|
||||
.appendTo('#grid');
|
||||
if ( m.planetary.hour.no > 11 ) {
|
||||
$('#moment_'+j).addClass('night-hour');
|
||||
}
|
||||
if ( j == all-1 ) {
|
||||
if ( $('#search').val() != '' && $('#fileInput').val() == '') {
|
||||
$('<button/>').attr('role', 'button').attr('target', '_blank').attr('id', 'download').html('Download File').addClass('btn btn-default pull-left').prependTo('#settings .modal-footer');
|
||||
$('#download').on('click', function() {
|
||||
SL.Calendar.download(Hours.moments, $('#search').val().split(' ').join('_')+'_'+new moment.unix(Hours.moments[0].ts).utc().format('DDMMMYYYY')+'-'+new moment.unix(Hours.moments[0].ts).utc().add($('#days').val(), 'days').format('DDMMMYYYY'));
|
||||
});
|
||||
}
|
||||
SL.Calendar.resetFileInput();
|
||||
$('.planetaryhour').on('click', SL.Calendar.hourInfo);
|
||||
NProgress.done();
|
||||
clearTimeout(timeout);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* info function creates a temporary DOM object to be displayed as hour info upon clicking a planetary hour object
|
||||
*/
|
||||
function info() {
|
||||
var myid = $(this).attr('id');
|
||||
var idx = myid.split('_')[1];
|
||||
var mom = Hours.moments[idx];
|
||||
var ts = mom.planetary.hour.start;
|
||||
if ( $("#hourinfo").length ) $("#hourinfo").remove();
|
||||
$('<div/>').loadTemplate($("#tpl-modal"), {
|
||||
title : SL.Astro.Logy.planet.day[mom.planetary.day.no+1]+", "+new moment.unix(mom.ts).utc().add($('#offset').val(), 'h').format('MMM D')+", Hour: "+(mom.planetary.hour.no+1),
|
||||
right : '<ul id="houractions" class="option-set"></ul>\n',
|
||||
left : '<ul id="hourinfos" class="option-set"></ul>\n'
|
||||
}).appendTo('#modals').attr('id', 'hourinfo').attr('tabindex', '-1').attr('role', 'dialog').addClass('modal fade autoModal');
|
||||
$('#p-info').html(
|
||||
$('#hourinfos').append(
|
||||
'<li> </li>\n'+
|
||||
'<li>Lunar Day: '+(mom.lunar.day+1)+'</li>\n'+
|
||||
'<li>'+SL.Astro.Nomy.moon.phase.symbol[SL.Astro.Nomy.moonPhase(mom.lunar)]+' '+SL.Astro.Nomy.moon.phase.name[SL.Astro.Nomy.moonPhase(mom.lunar)]+'</li>\n'+
|
||||
'<li>Phase: '+Math.round(mom.lunar.phase * 100)+'%</li>\n'+
|
||||
'<li>Angle: '+Math.round(mom.lunar.angle * 100) / 100+'°</li>\n'+
|
||||
'<li> </li>\n'
|
||||
));
|
||||
var chaldean = ["Moon", "Mercury", "Venus", "Sun", "Mars", "Jupiter", "Saturn"];
|
||||
chaldean.forEach(function(planet) {
|
||||
$('#hourinfos').append(
|
||||
'<li><b>'+planet+'</b></li>\n'+
|
||||
'<li>Position: '+SL.Astro.Logy.degToZod(eval("mom.ephemeris."+planet.toLowerCase(planet)+".deg"))+'</li>\n'+
|
||||
'<li>Sign: '+SL.Astro.Logy.zodiac.name[SL.Astro.Logy.getZodiac(eval("mom.ephemeris."+planet.toLowerCase()+".deg")).sign]+'</li>\n'+
|
||||
'<li>Ruler: '+SL.Astro.Logy.planet.name[SL.Astro.Logy.zodiac.ruler[SL.Astro.Logy.getZodiac(eval("mom.ephemeris."+planet.toLowerCase()+".deg")).sign]]+'</li>\n'+
|
||||
'<li> </li>\n');
|
||||
});
|
||||
$('#houractions').html('');
|
||||
var tags = [];
|
||||
var extData = Module.data(mom);
|
||||
Object.keys(extData).forEach(function(key) {
|
||||
if (!extData[key].hasOwnProperty("hide") || (extData[key].hasOwnProperty("hide") && extData[key].hide != "info"))
|
||||
tags.push(extData[key].tags);
|
||||
var appender = '#houractions .'+key+'-actions';
|
||||
if ( Module.modules[key].definitions.hasOwnProperty("group") && Module.modules[key].definitions.group.hasOwnProperty("info") ) {
|
||||
if ( !$('li.info-section-'+Module.modules[key].definitions.group.id).length ) {
|
||||
$('#houractions').append(
|
||||
$('<ul/>').append(
|
||||
'<li> </li>\n'+
|
||||
'<li class="info-section-'+Module.modules[key].definitions.group.id+'"><b>'+Module.modules[key].definitions.group.text+'</b></li>\n'+
|
||||
'<li><ul class="'+Module.modules[key].definitions.group.id+'-actions"></ul>\n</li>\n'
|
||||
)
|
||||
);
|
||||
}
|
||||
appender = '#houractions .'+Module.modules[key].definitions.group.id+'-actions';
|
||||
}
|
||||
else {
|
||||
$('#houractions').append(
|
||||
$('<ul/>').append(
|
||||
'<li> </li>\n'+
|
||||
'<li><b>'+Module.modules[key].definitions.name+'</b></li>\n'+
|
||||
'<li><ul class="'+key+'-actions"></ul>\n</li>\n'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (extData[key].data) extData[key].data.forEach(function(el) {
|
||||
if (!el.hasOwnProperty("hide") || (el.hasOwnProperty("hide") && el.hide != "info"))
|
||||
$(appender).append('<li>'+el.action+'</li>\n');
|
||||
});
|
||||
});
|
||||
var tagcloud = tags.join(" ").split(' ').sort();
|
||||
$('#houractions').append( '<br /><b>Tags</b><br />\n'+$.unique( tagcloud ).join(" "));
|
||||
var title = SL.Astro.Logy.planet.day[mom.planetary.day.no+1]+"+Hour+"+(mom.planetary.hour.no+1);
|
||||
var desc = $('#hourinfos').html()+'\n\n'+$('#houractions').text();
|
||||
$('<a/>').attr('role', 'button').attr('target', '_blank').attr('href',
|
||||
'http://www.google.com/calendar/render?action=TEMPLATE&text='
|
||||
+title
|
||||
+'&dates='+new moment.unix(mom.planetary.hour.start).format('YYYYMMDD[T]HHmmss[Z]')+'/'+new moment.unix(mom.planetary.hour.end).format('YYYYMMDD[T]HHmmss[Z]')
|
||||
+'&details='+encodeURIComponent(desc.replace(/<[^>]+>/g, ''))+'&trp=false&sf=true&output=xml'
|
||||
).html('to GCalendar').addClass('btn btn-default').prependTo('#hourinfo .modal-footer');
|
||||
$('<a/>').attr('role', 'button').attr('id', 'ics').attr('target', '_blank').html('iCal File').addClass('btn btn-default').prependTo('#hourinfo .modal-footer');
|
||||
$('#ics').on('click', function() {
|
||||
var iCal = ics();
|
||||
iCal.addEvent(title, desc.replace(/<[^>]+>/g, '').split('\n').join('\\n').split('\\n\\n').join('\\n').split(' ').join(''), $('#lat').val()+' '+$('#lon').val(), new moment.unix(mom.planetary.hour.start).utc().format('DD MMM YYYY HH:mm:ss [GMT]'), new moment.unix(mom.planetary.hour.end).utc().format('DD MMM YYYY HH:mm:ss [GMT]'));
|
||||
iCal.download('planetary-'+title);
|
||||
});
|
||||
$('#hourinfo').modal('show');
|
||||
}
|
||||
|
||||
return {
|
||||
make: make,
|
||||
info : info
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
/**
|
||||
* Filter object with variable and functions to filter the planetary hours by the plugin modules
|
||||
* @public {function} load() - loads all plugin modules defined and adds their filters
|
||||
* @public {function} modal() - creates DOM objects to be displayed as navbar menu items and modal hosting all the filter options of a plugin module
|
||||
* @public {function} comboFilter() - is a filter function for Isotope to include all selected tags and operations within a filter but exclude between each other
|
||||
*/
|
||||
var Filter = (function() {
|
||||
|
||||
/**
|
||||
* load function loads all plugin modules defined in an Array in index.html and adds their filters
|
||||
*/
|
||||
function load() {
|
||||
$("#filterList").empty();
|
||||
Object.keys(Module.modules).forEach(function(plugin) {
|
||||
if ( $("#moduleSelect label .module_"+plugin).is(':checked') ) {
|
||||
var definitions = Module.modules[plugin].definitions;
|
||||
modal(plugin, definitions);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* modal function creates DOM objects to be displayed as navbar menu items and modal hosting all the filter options of a plugin module
|
||||
* @param {sting} id - id of a plugin module
|
||||
* @param {Object} pluginDefinitions - holds all the definitions defined in a plugin module
|
||||
*/
|
||||
function modal(id, pluginDefinitions) {
|
||||
var items = pluginDefinitions.actions;
|
||||
// check if filters navbar menu item should be grouped ("group" property in plugin module definition)
|
||||
// create bootstrap dropdown menu if needed
|
||||
if ( pluginDefinitions.hasOwnProperty("group") ) {
|
||||
if ( !$('#group_'+pluginDefinitions.group.id).length ) {
|
||||
var dropdown = '<li id="group_'+pluginDefinitions.group.id+'" class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-filter"></span> '+pluginDefinitions.group.text+'<span class="caret"></span></a><ul class="dropdown-menu"></ul></li>';
|
||||
$(dropdown).appendTo("#filterList");
|
||||
}
|
||||
var navitem = '<li><a data-toggle="modal" data-target="#'+id+'" href="#">'+pluginDefinitions.name+'</a></li>\n';
|
||||
$('#group_'+pluginDefinitions.group.id+' ul').append(navitem);
|
||||
// otherwise just throw it into the menu bar
|
||||
} else {
|
||||
var navitem = '<li><p class="navbar-btn"><a class="btn btn-default" data-toggle="modal" data-target="#'+id+'" href="#"><span class="glyphicon glyphicon-filter"></span> '+pluginDefinitions.name+'</a></p></li>\n';
|
||||
$(navitem).appendTo("#filterList");
|
||||
}
|
||||
// prepare variables and juggle data to create Tags and Operations to be displayed in the filter modal
|
||||
var title = $('#navigation a[data-target="#'+id+'"]').clone();
|
||||
var tagline = "";
|
||||
var actions = "";
|
||||
var menuItems = {};
|
||||
var tags = [];
|
||||
items.forEach(function(item) {
|
||||
item.forEach(function(i) {
|
||||
if (!i.hasOwnProperty("hide") || (i.hasOwnProperty("hide") && i.hide != "filter")) {
|
||||
if (i.id)
|
||||
menuItems[i.id] = {action: i.action, tags: i.tags};
|
||||
if (i.tags) {
|
||||
i.tags.split(" ").forEach(function(tag) {
|
||||
tags.push(tag);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
var uniqtags = $.unique(tags);
|
||||
// create DOM objects
|
||||
uniqtags.sort().forEach(function(tag) {
|
||||
tagline += '<li><input type="checkbox" class="actiontag" value=".'+tag+'" id="'+id+'-'+tag+'" /> '+tag+'</li>\n';
|
||||
});
|
||||
Object.keys(menuItems).forEach(function(key) {
|
||||
actions += '<li class="operation '+menuItems[key].tags+'"><input type="checkbox" value=".'+id+'-'+key+'" id="'+id+'-'+key+'" /> '+menuItems[key].action+'</li>\n ';
|
||||
});
|
||||
// load template defined in index.html and append all filter data
|
||||
$('<div/>').loadTemplate($("#tpl-modal"), {
|
||||
title : 'Filter by '+pluginDefinitions.name,
|
||||
right : '<h4>Operations</h4><ul class="option-set">'+actions+'</ul>\n',
|
||||
left : '<h4>Tags</h4><ul class="option-set">'+tagline+'</ul>\n'
|
||||
}).appendTo('#modals').attr('id', id).attr('tabindex', '-1').attr('role', 'dialog').addClass('modal fade autoModal')
|
||||
.find('.col-sm-4')
|
||||
.addClass('actionlistfilter')
|
||||
.find('ul')
|
||||
.attr('id', id+'-tags' )
|
||||
.attr('data-group', id )
|
||||
.parents('.modal-body')
|
||||
.find('.col-sm-8')
|
||||
.addClass('filteroptions')
|
||||
.find('ul')
|
||||
.attr('id', id+'-actions')
|
||||
.attr('data-group', id+'-actions' );
|
||||
}
|
||||
|
||||
/**
|
||||
* comboFilter is a filter function for Isotope to include all selected tags and operations within a filter but exclude between each other
|
||||
* based on https://codepen.io/desandro/pen/MebyMR
|
||||
*/
|
||||
function comboFilter() {
|
||||
var combo = [];
|
||||
for ( var prop in filters ) {
|
||||
var group = filters[ prop ];
|
||||
if ( !group.length ) {
|
||||
// no filters in group, carry on
|
||||
continue;
|
||||
}
|
||||
// add first group
|
||||
if ( !combo.length ) {
|
||||
combo = group.slice(0);
|
||||
continue;
|
||||
}
|
||||
// add additional groups
|
||||
var nextCombo = [];
|
||||
// split group into combo: [ A, B ] & [ 1, 2 ] => [ A1, A2, B1, B2 ]
|
||||
for ( var i=0; i < combo.length; i++ ) {
|
||||
for ( var j=0; j < group.length; j++ ) {
|
||||
var item = combo[i] + group[j];
|
||||
nextCombo.push( item );
|
||||
}
|
||||
}
|
||||
combo = nextCombo;
|
||||
}
|
||||
var comboFilter = combo.join(', ');
|
||||
return comboFilter;
|
||||
}
|
||||
|
||||
return {
|
||||
load: load,
|
||||
modal: modal,
|
||||
comboFilter: comboFilter
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
/**
|
||||
* Module object with variable and functions to load plugin modules and use them to calculate the data for each planetary hour
|
||||
* @public {Object} modules - holds all plugin modules
|
||||
* @public {function} load() - loads all plugin modules defined in an Array in index.html and adds their filters
|
||||
* @public {function} data() - collects all the tags and operations from all plugin modules for a single planetary hour and bundles them
|
||||
* @public {function} classes() - takes all operations() of all plugin modules for a single planetary hour and creates classes for the DOM object, so Isotope can filter them
|
||||
*/
|
||||
var Module = (function() {
|
||||
|
||||
/**
|
||||
* object to hold all plugin modules
|
||||
*/
|
||||
var modules = {};
|
||||
|
||||
/**
|
||||
* load function loads all plugin modules defined in an Array in index.html and adds their filters
|
||||
* @param {Array} array - IDs (variable names) of all plugin module to be loaded
|
||||
*/
|
||||
function load(array) {
|
||||
var mod = array;
|
||||
console.log(mod.length+' modules defined');
|
||||
mod.forEach(function(m) {
|
||||
extend(m, eval('module_'+m));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* extend function adds a plugin module to the modules Object
|
||||
* @param {string} name - id of the plugin module
|
||||
* @param {Object} plugin - the plugin Object
|
||||
*/
|
||||
function extend(name,plugin) {
|
||||
modules[name] = plugin;
|
||||
var groupname = '';
|
||||
var checked = '';
|
||||
if ( plugin.definitions.hasOwnProperty("core") && plugin.definitions.core == true ) checked = "checked";
|
||||
if ( plugin.definitions.hasOwnProperty("group") ) groupname = "<b>"+plugin.definitions.group.text+"</b> ";
|
||||
$("#moduleSelect").append('<label class="col-md-6"><input class="module_'+name+'" type="checkbox" '+checked+'> '+groupname+plugin.definitions.name+'</label>');
|
||||
}
|
||||
|
||||
/**
|
||||
* calculate function pushes the astronomical data of a planetary hour to a plugin and returns the plugin's calculation
|
||||
* @param {Object} plugin - the plugin module Object
|
||||
* @param {Object} data - the astronomical data Object of a single planetary hour
|
||||
*/
|
||||
function calculate(plugin, data) {
|
||||
return plugin.calculate(plugin.definitions, plugin.property(data));
|
||||
}
|
||||
|
||||
/**
|
||||
* operations function returns the list of tags and operations defined by a plugin module for a planetary hour
|
||||
* @param {Array} actionArray - the plugin module's response from above's calculate() function
|
||||
* @param {string} idstring - the ID of the plugin
|
||||
*/
|
||||
function operations(actionArray, idstring) {
|
||||
var tags = [];
|
||||
var actions = [];
|
||||
var tagstring = "";
|
||||
var actionstring = "";
|
||||
if ( idstring != "" ) idstring += "-";
|
||||
if (actionArray) {
|
||||
if (Array.isArray(actionArray) && actionArray.length > 0) {
|
||||
for (var i = 0, len = actionArray.length; i < len; i++) {
|
||||
if (!actionArray[i].hasOwnProperty("hide") || (actionArray[i].hasOwnProperty("hide") && actionArray[i].hide != "filter")) {
|
||||
if (actionArray[i].hasOwnProperty('tags') && actionArray[i].tags) tags.push(actionArray[i].tags);
|
||||
if (actionArray[i].hasOwnProperty('action') && actionArray[i].action) actions.push(actionArray[i]);
|
||||
}
|
||||
}
|
||||
if (tags) tagstring = $.unique(tags.join(" ").split(' ')).sort().join(" ");
|
||||
actionstring = actionArray.map(function(el) { return idstring + el.id; }).join(" ");
|
||||
actions.sort();
|
||||
}
|
||||
}
|
||||
var obj = {
|
||||
tags : tagstring,
|
||||
actions : actionstring,
|
||||
data : actionArray
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* data function collects all the list objects from operations() for a single planetary hour and bundles them
|
||||
* @param {Object} data - the astronomical data Object of a single planetary hour
|
||||
* @return {Object} extData - Object with all the operations() of all plugin modules for a single planetary houur
|
||||
*/
|
||||
function data(data) {
|
||||
extData = {};
|
||||
Object.keys(modules).forEach(function(plugin) {
|
||||
if ( $("#moduleSelect .module_"+plugin).is(':checked') )
|
||||
extData[plugin] = operations(calculate(modules[plugin], data), plugin);
|
||||
});
|
||||
return extData;
|
||||
}
|
||||
|
||||
/**
|
||||
* classes function takes all operations() of all plugin modules for a single planetary hour and creates classes for the DOM object, so Isotope can filter them
|
||||
* @param {Object} extData - Object with all the operations() of all plugin modules for a single planetary hour
|
||||
* @return {string} string - string of class names to be added to the DOM object
|
||||
*/
|
||||
function classes(extData) {
|
||||
tags = [];
|
||||
actions = [];
|
||||
string = "";
|
||||
Object.keys(extData).forEach(function(plugin) {
|
||||
//tags.push(extData[plugin].tags);
|
||||
actions.push(extData[plugin].actions);
|
||||
});
|
||||
//if (tags) string = $.unique(tags.join(" ").split(' ')).sort().join(" ") + " ";
|
||||
if (actions) string += actions.sort().join(" ");
|
||||
return string;
|
||||
}
|
||||
|
||||
return {
|
||||
load: load,
|
||||
modules: modules,
|
||||
data: data,
|
||||
classes: classes,
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
return {
|
||||
about : about,
|
||||
getGeoCode : getGeoCode,
|
||||
reset : resetWindow,
|
||||
modules : Module.load,
|
||||
comboFilter : Filter.comboFilter,
|
||||
hourInfo : Hour.info,
|
||||
make : Hours.make,
|
||||
moments : Hours.moments,
|
||||
resetFileInput : resetFileInput,
|
||||
download : download,
|
||||
}
|
||||
|
||||
}());
|
||||
1440
js/modules/astrology.js
Normal file
1440
js/modules/astrology.js
Normal file
File diff suppressed because it is too large
Load diff
1602
js/modules/hygromanteia.js
Normal file
1602
js/modules/hygromanteia.js
Normal file
File diff suppressed because it is too large
Load diff
401
js/modules/keyofsolomon.js
Normal file
401
js/modules/keyofsolomon.js
Normal file
|
|
@ -0,0 +1,401 @@
|
|||
/**
|
||||
* @preserve Copyright (c) 2018 T. F. Raaion, www.sublunar.space
|
||||
* License MIT: http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
//Defines Calendar Objects and Methods
|
||||
var module_kos_pday = {
|
||||
|
||||
definitions: {
|
||||
name: "Planetary Day",
|
||||
group: {
|
||||
id: "kos",
|
||||
text: "Key of Solomon",
|
||||
info: "true"
|
||||
},
|
||||
actions: [
|
||||
[
|
||||
{
|
||||
"id": "92",
|
||||
"action": "profit",
|
||||
"tags": "business"
|
||||
},
|
||||
{
|
||||
"id": "215",
|
||||
"action": "increase of one's property",
|
||||
"tags": "success business"
|
||||
},
|
||||
{
|
||||
"id": "116",
|
||||
"action": "success",
|
||||
"tags": "success"
|
||||
},
|
||||
{
|
||||
"id": "202",
|
||||
"action": "luck",
|
||||
"tags": "success"
|
||||
},
|
||||
{
|
||||
"id": "203",
|
||||
"action": "for gain",
|
||||
"tags": "success"
|
||||
},
|
||||
{
|
||||
"id": "246",
|
||||
"action": "gain favor of kings and authorities",
|
||||
"tags": "authority"
|
||||
},
|
||||
{
|
||||
"id": "269",
|
||||
"action": "contracting friendships",
|
||||
"tags": "friendship"
|
||||
},
|
||||
{
|
||||
"id": "278",
|
||||
"action": "preparing any operations whatsoever of love, of kindness, and of invisibility",
|
||||
"tags": "love friendship magic"
|
||||
},
|
||||
{
|
||||
"id": "280",
|
||||
"action": "good for all extraordinary, uncommon, and unknown operations",
|
||||
"tags": "anything magic"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "274",
|
||||
"action": "embassies; voyages; envoys; messages; navigation; reconciliation; love; and the acquisition of merchandise by water",
|
||||
"tags": "love authority friendship business water"
|
||||
},
|
||||
{
|
||||
"id": "275",
|
||||
"action": "communicating and speaking with spirits",
|
||||
"tags": "magic"
|
||||
},
|
||||
{
|
||||
"id": "281",
|
||||
"action": "recover stolen property",
|
||||
"tags": "treasure"
|
||||
},
|
||||
{
|
||||
"id": "265",
|
||||
"action": "have familiar spirits visit in sleep",
|
||||
"tags": "magic dreams"
|
||||
},
|
||||
{
|
||||
"id": "282",
|
||||
"action": "preparing anything relaed to water",
|
||||
"tags": "water"
|
||||
},
|
||||
{
|
||||
"id": "300",
|
||||
"action": "works of necromancy",
|
||||
"tags": "dead magic"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "125",
|
||||
"action": "war and victory",
|
||||
"tags": "war"
|
||||
},
|
||||
{
|
||||
"id": "126",
|
||||
"action": "winning over an opponent",
|
||||
"tags": "war"
|
||||
},
|
||||
{
|
||||
"id": "222",
|
||||
"action": "destroying one's enemies and opponents",
|
||||
"tags": "war"
|
||||
},
|
||||
{
|
||||
"id": "230",
|
||||
"action": "destruction",
|
||||
"tags": "war"
|
||||
},
|
||||
{
|
||||
"id": "257",
|
||||
"action": "scatter your enemies",
|
||||
"tags": "war"
|
||||
},
|
||||
{
|
||||
"id": "267",
|
||||
"action": "to bring destruction and to give death, and to sow hatred and discord.",
|
||||
"tags": "harm war"
|
||||
},
|
||||
{
|
||||
"id": "275",
|
||||
"action": "communicating and speaking with spirits",
|
||||
"tags": "magic"
|
||||
},
|
||||
{
|
||||
"id": "277",
|
||||
"action": "summoning souls from Hades, especially of those slain in battle",
|
||||
"tags": "magic war"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "272",
|
||||
"action": "eloquence and intelligence; promptitude in business; science and divination; wonders; apparitions; and answers regarding the future",
|
||||
"tags": "business magic divination science"
|
||||
},
|
||||
{
|
||||
"id": "273",
|
||||
"action": "thefts; writings; deceit; and merchandise",
|
||||
"tags": "harm business"
|
||||
},
|
||||
{
|
||||
"id": "276",
|
||||
"action": "recovering thefts by the means of spirits",
|
||||
"tags": "magic treasure"
|
||||
},
|
||||
{
|
||||
"id": "279",
|
||||
"action": "undertaking experiments relating to games, raillery, jests, sports, and the like",
|
||||
"tags": "luck gambling games"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "268",
|
||||
"action": "obtain honours, acquire riches",
|
||||
"tags": "treasure business"
|
||||
},
|
||||
{
|
||||
"id": "269",
|
||||
"action": "contracting friendships",
|
||||
"tags": "friendship"
|
||||
},
|
||||
{
|
||||
"id": "270",
|
||||
"action": "preserving health",
|
||||
"tags": "healing"
|
||||
},
|
||||
{
|
||||
"id": "271",
|
||||
"action": "arriving at all you can desire",
|
||||
"tags": "anything"
|
||||
},
|
||||
{
|
||||
"id": "278",
|
||||
"action": "preparing any operations whatsoever of love, of kindness, and of invisibility",
|
||||
"tags": "love friendship magic"
|
||||
},
|
||||
{
|
||||
"id": "280",
|
||||
"action": "good for all extraordinary, uncommon, and unknown operations",
|
||||
"tags": "anything magic"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "269",
|
||||
"action": "contracting friendships",
|
||||
"tags": "friendship"
|
||||
},
|
||||
{
|
||||
"id": "63",
|
||||
"action": "love",
|
||||
"tags": "love"
|
||||
},
|
||||
{
|
||||
"id": "186",
|
||||
"action": "travelling",
|
||||
"tags": "travelling journey"
|
||||
},
|
||||
{
|
||||
"id": "278",
|
||||
"action": "preparing any operations whatsoever of love, of kindness, and of invisibility",
|
||||
"tags": "love friendship magic"
|
||||
},
|
||||
{
|
||||
"id": "280",
|
||||
"action": "good for all extraordinary, uncommon, and unknown operations",
|
||||
"tags": "anything magic"
|
||||
},
|
||||
{
|
||||
"id": "283",
|
||||
"action": "preparing lots, poisons, powders for madness and the like",
|
||||
"tags": "protection animals"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "263",
|
||||
"action": "summon the souls from Hades who died a natural death",
|
||||
"tags": "magic"
|
||||
},
|
||||
{
|
||||
"id": "264",
|
||||
"action": "bring good or bad fortune to buildings",
|
||||
"tags": "protection harm building"
|
||||
},
|
||||
{
|
||||
"id": "265",
|
||||
"action": "have familiar spirits visit in sleep",
|
||||
"tags": "magic dreams"
|
||||
},
|
||||
{
|
||||
"id": "266",
|
||||
"action": "cause good or ill in business, possessions, goods, seeds, fruits, and similar things, in order to acquire learning",
|
||||
"tags": "harm business food agriculture education"
|
||||
},
|
||||
{
|
||||
"id": "267",
|
||||
"action": "to bring destruction and to give death, and to sow hatred and discord.",
|
||||
"tags": "harm war"
|
||||
},
|
||||
{
|
||||
"id": "275",
|
||||
"action": "communicating and speaking with spirits",
|
||||
"tags": "magic"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
property: function(m) {
|
||||
return m.planetary.day.no;
|
||||
},
|
||||
calculate: function(definitions, property) {
|
||||
return definitions.actions[property];
|
||||
}
|
||||
};
|
||||
|
||||
//Defines Calendar Objects and Methods
|
||||
var module_kos_phour = {
|
||||
|
||||
definitions: {
|
||||
name: "Planetary Hour",
|
||||
group: {
|
||||
id: "kos",
|
||||
text: "Key of Solomon",
|
||||
info: "true"
|
||||
},
|
||||
actions: module_kos_pday.definitions.actions
|
||||
},
|
||||
property: function(m) {
|
||||
return m.planetary.hour.no;
|
||||
},
|
||||
calculate: function(definitions, property) {
|
||||
var hourruler = SL.Astro.Logy.planet.order[((property+1+(property*24) - 1) % 7 ) + 1];
|
||||
return definitions.actions[hourruler-1];
|
||||
}
|
||||
};
|
||||
|
||||
//Defines Calendar Objects and Methods
|
||||
var module_kos_astro = {
|
||||
|
||||
definitions: {
|
||||
name: "Astrological Timing",
|
||||
group: {
|
||||
id: "kos",
|
||||
text: "Key of Solomon",
|
||||
info: "true"
|
||||
},
|
||||
actions: [
|
||||
[
|
||||
{
|
||||
"id" : "301",
|
||||
"action" : "Invocation of Spirits, the Works of Necromancy, and the recovery of stolen property",
|
||||
"tags" : "magic dead treasure"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id" : "302",
|
||||
"action" : "love, grace, and invisibility",
|
||||
"tags" : "love good magic"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id" : "303",
|
||||
"action" : "hatred, discord, and destruction",
|
||||
"tags" : "harm war"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id" : "304",
|
||||
"action" : "experiments of a peculiar nature, which cannot be classed under any certain head",
|
||||
"tags" : "magic anything"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id" : "305",
|
||||
"action" : "commence nothing while the Moon is in conjunction with the Sun",
|
||||
"tags" : "nothing"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id" : "306",
|
||||
"action" : "especially auspicious to converse with spirits",
|
||||
"tags" : "magic"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
property: function(m) {
|
||||
return m;
|
||||
},
|
||||
calculate: function(definitions, property) {
|
||||
var array = [];
|
||||
var hourruler = SL.Astro.Logy.planet.order[((property.planetary.day.no+1+(property.planetary.day.no*24) - 1) % 7 ) + 1];
|
||||
var chaldean = ["void", "moon", "mercury", "venus", "sun", "mars", "jupiter", "saturn"];
|
||||
var sunsign = SL.Astro.Logy.getZodiac(property.ephemeris.sun.deg).sign;
|
||||
var moonsign = SL.Astro.Logy.getZodiac(property.ephemeris.moon.deg).sign;
|
||||
// Mars + Saturn conjunct Moon
|
||||
var combo = [[1,5],[1,7],[1,4]];
|
||||
var orb = 13.0;
|
||||
combo.forEach(function(c, idx) {
|
||||
var diff = eval("property.ephemeris."+chaldean[c[0]]+".deg") - eval("property.ephemeris."+chaldean[c[1]]+".deg");
|
||||
var angle = Math.min( Math.abs(diff), 360-Math.abs(diff) );
|
||||
if ( ( angle <= orb || Math.abs(angle - 90) <= orb || Math.abs(angle - 180) <= orb ) ) {
|
||||
if ( chaldean[c[1]] == "mars") {
|
||||
module_kos_pday.definitions.actions[2].forEach( function(c) {
|
||||
array.push(c);
|
||||
});
|
||||
}
|
||||
if ( chaldean[c[1]] == "saturn") {
|
||||
module_kos_pday.definitions.actions[6].forEach( function(c) {
|
||||
array.push(c);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Moon combust
|
||||
var orb = 15.0;
|
||||
if ( angle <= orb && chaldean[c[1]] == "sun" ) {
|
||||
array.push(definitions.actions[4][0]);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Moon in Earth sign
|
||||
if ( moonsign == 2 || moonsign == 6 || moonsign == 10 )
|
||||
array.push(array.push(definitions.actions[0][0]));
|
||||
|
||||
// Moon in fiery sign
|
||||
if ( moonsign == 1 || moonsign == 5 || moonsign == 9 )
|
||||
array.push(array.push(definitions.actions[1][0]));
|
||||
|
||||
// Moon in watery sign
|
||||
if ( moonsign == 4 || moonsign == 8 || moonsign == 12 )
|
||||
array.push(array.push(definitions.actions[2][0]));
|
||||
|
||||
// Moon in airy sign
|
||||
if ( moonsign == 3 || moonsign == 7 || moonsign == 11 )
|
||||
array.push(array.push(definitions.actions[3][0]));
|
||||
|
||||
// Moon and Sun in airy sign
|
||||
if ( ( moonsign == 3 || moonsign == 7 || moonsign == 11 ) && ( sunsign == 3 || sunsign == 7 || sunsign == 11) && property.planetary.day.no == 4 && hourruler == 4 ) {
|
||||
array.push(array.push(definitions.actions[5][0]));
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
};
|
||||
688
js/modules/lunarmansions.js
Normal file
688
js/modules/lunarmansions.js
Normal file
|
|
@ -0,0 +1,688 @@
|
|||
/**
|
||||
* @preserve Copyright (c) 2018 T. F. Raaion, www.sublunar.space
|
||||
* License MIT: http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
var module_lunarmansion = {
|
||||
|
||||
/**
|
||||
* plugin module definitions
|
||||
*/
|
||||
definitions: {
|
||||
name: "Mansion", // how it appears in the navbar menu and info modal
|
||||
group: {
|
||||
id: "lunar", // id of the group
|
||||
text: "Lunar" // label of the group's dropdown menu
|
||||
},
|
||||
actions: [ // array of actions and tags for the filters
|
||||
[0],
|
||||
[
|
||||
{
|
||||
"id": "1",
|
||||
"action": "1 Al-Sharatain / Alnath",
|
||||
"tags": "alsharatain alnath"
|
||||
},
|
||||
{
|
||||
"id": "46",
|
||||
"action": "going on a journey",
|
||||
"tags": "journey"
|
||||
},
|
||||
{
|
||||
"id": "231",
|
||||
"action": "taking medicine",
|
||||
"tags": "healing"
|
||||
},
|
||||
{
|
||||
"id": "232",
|
||||
"action": "making a servant flee",
|
||||
"tags": "harm"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "2",
|
||||
"action": "2 Al-Butain / Albotain",
|
||||
"tags": "albutain albotain"
|
||||
},
|
||||
{
|
||||
"id": "233",
|
||||
"action": "dig streams, wells",
|
||||
"tags": "water"
|
||||
},
|
||||
{
|
||||
"id": "234",
|
||||
"action": "finding lost treasures",
|
||||
"tags": "treasure"
|
||||
},
|
||||
{
|
||||
"id": "235",
|
||||
"action": "have plenty of corn",
|
||||
"tags": "agriculture food business"
|
||||
},
|
||||
{
|
||||
"id": "236",
|
||||
"action": "strengthen prisons",
|
||||
"tags": "protection war building captivity"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "3",
|
||||
"action": "3 Al-Thuraiya / Azoraya",
|
||||
"tags": "althuraiya azoraya"
|
||||
},
|
||||
{
|
||||
"id": "236",
|
||||
"action": "strengthen prisons",
|
||||
"tags": "protection war building captivity"
|
||||
}, {
|
||||
"id": "237",
|
||||
"action": "protect sailors at sea",
|
||||
"tags": "sailing protection"
|
||||
}, {
|
||||
"id": "87",
|
||||
"action": "practicing alchemy",
|
||||
"tags": "alchemy"
|
||||
}, {
|
||||
"id": "144",
|
||||
"action": "doing something that has to do with fires",
|
||||
"tags": "fire"
|
||||
}, {
|
||||
"id": "205",
|
||||
"action": "causing love in a couple",
|
||||
"tags": "love couple"
|
||||
}
|
||||
], // 3
|
||||
[
|
||||
{
|
||||
"id": "4",
|
||||
"action": "4 Al-Dabaran / Aldebaran",
|
||||
"tags": "aldabaran aldebaran"
|
||||
},
|
||||
{
|
||||
"id": "238",
|
||||
"action": "make master shrink back from servant",
|
||||
"tags": "harm"
|
||||
}
|
||||
], // 4
|
||||
[
|
||||
{
|
||||
"id": "5",
|
||||
"action": "5 Al-Haqa / Almices",
|
||||
"tags": "alhaqa almices"
|
||||
},
|
||||
{
|
||||
"id": "205",
|
||||
"action": "causing love in a couple",
|
||||
"tags": "love couple"
|
||||
}, {
|
||||
"id": "239",
|
||||
"action": "set boys to learn skills",
|
||||
"tags": "children education"
|
||||
}, {
|
||||
"id": "240",
|
||||
"action": "safeguarding travellers",
|
||||
"tags": "journey protection"
|
||||
}, {
|
||||
"id": "241",
|
||||
"action": "improve buildings",
|
||||
"tags": "building"
|
||||
}
|
||||
], // 5
|
||||
[
|
||||
{
|
||||
"id": "6",
|
||||
"action": "6 Al-Hana / Athaya",
|
||||
"tags": "alhana athaya"
|
||||
},
|
||||
{
|
||||
"id": "242",
|
||||
"action": "bring friendship",
|
||||
"tags": "love friendship"
|
||||
}
|
||||
], // 6
|
||||
[
|
||||
{
|
||||
"id": "7",
|
||||
"action": "7 Al-Dhira / Aldira",
|
||||
"tags": "aldira aldhira"
|
||||
},
|
||||
{
|
||||
"id": "237",
|
||||
"action": "protect sailors at sea",
|
||||
"tags": "sailing protection"
|
||||
}, {
|
||||
"id": "242",
|
||||
"action": "bring friendship",
|
||||
"tags": "love friendship"
|
||||
}, {
|
||||
"id": "243",
|
||||
"action": "increase trade and profit",
|
||||
"tags": "business"
|
||||
}, {
|
||||
"id": "244",
|
||||
"action": "increase crops",
|
||||
"tags": "food agriculture business"
|
||||
}, {
|
||||
"id": "245",
|
||||
"action": "expel flies",
|
||||
"tags": "protection animals"
|
||||
}, {
|
||||
"id": "246",
|
||||
"action": "gain favor of kings and authorities",
|
||||
"tags": "authority"
|
||||
}
|
||||
], // 7
|
||||
[
|
||||
{
|
||||
"id": "8",
|
||||
"action": "8 Al-Nathrah / Annathra",
|
||||
"tags": "alnathrah annathra"
|
||||
},
|
||||
{
|
||||
"id": "46",
|
||||
"action": "going on a journey",
|
||||
"tags": "journey"
|
||||
},
|
||||
{
|
||||
"id": "236",
|
||||
"action": "strengthen prisons",
|
||||
"tags": "protection war building captivity"
|
||||
}, {
|
||||
"id": "242",
|
||||
"action": "bring friendship",
|
||||
"tags": "love friendship"
|
||||
}, {
|
||||
"id": "247",
|
||||
"action": "expel mice and bugs",
|
||||
"tags": "protection animals"
|
||||
}
|
||||
], // 8
|
||||
[
|
||||
{
|
||||
"id": "9",
|
||||
"action": "9 Al-Tarf / Atarf",
|
||||
"tags": "altarf atarf"
|
||||
},
|
||||
{
|
||||
"id": "248",
|
||||
"action": "protect from another man's claims",
|
||||
"tags": "protection business"
|
||||
}
|
||||
], // 9
|
||||
[
|
||||
{
|
||||
"id": "10",
|
||||
"action": "10 Al-Jabhah / Algebha",
|
||||
"tags": "aljabhah algebha"
|
||||
},
|
||||
{
|
||||
"id": "236",
|
||||
"action": "strengthen prisons",
|
||||
"tags": "protection war building captivity"
|
||||
}, {
|
||||
"id": "241",
|
||||
"action": "improve buildings",
|
||||
"tags": "building"
|
||||
}, {
|
||||
"id": "242",
|
||||
"action": "bring friendship",
|
||||
"tags": "love friendship"
|
||||
}, {
|
||||
"id": "249",
|
||||
"action": "cause love between a man and a woman",
|
||||
"tags": "love"
|
||||
}
|
||||
], // 10
|
||||
[
|
||||
{
|
||||
"id": "11",
|
||||
"action": "11 Al-Zubrah / Azobra",
|
||||
"tags": "alzubrah azobra"
|
||||
},
|
||||
{
|
||||
"id": "241",
|
||||
"action": "improve buildings",
|
||||
"tags": "building"
|
||||
}, {
|
||||
"id": "243",
|
||||
"action": "increase trade and profit",
|
||||
"tags": "business"
|
||||
}, {
|
||||
"id": "250",
|
||||
"action": "release captives",
|
||||
"tags": "captivity"
|
||||
}, {
|
||||
"id": "251",
|
||||
"action": "travel safely in hot places",
|
||||
"tags": "journey protection"
|
||||
}, {
|
||||
"id": "252",
|
||||
"action": "increase wealth of allies",
|
||||
"tags": "business friendship"
|
||||
}
|
||||
], // 11
|
||||
[
|
||||
{
|
||||
"id": "12",
|
||||
"action": "12 Al-Sarfah / Acarfa",
|
||||
"tags": "alsarfah acarfa"
|
||||
},
|
||||
{
|
||||
"id": "244",
|
||||
"action": "increase crops",
|
||||
"tags": "food agriculture business"
|
||||
}, {
|
||||
"id": "253",
|
||||
"action": "help allies, authorities, captives and servants",
|
||||
"tags": "aid friendship authorities captivity"
|
||||
}
|
||||
], // 12
|
||||
[
|
||||
{
|
||||
"id": "13",
|
||||
"action": "13 Al-Awwah / Alahue",
|
||||
"tags": "alawwah / alahue"
|
||||
},
|
||||
{
|
||||
"id": "243",
|
||||
"action": "increase trade and profit",
|
||||
"tags": "business"
|
||||
}, {
|
||||
"id": "244",
|
||||
"action": "increase crops",
|
||||
"tags": "food agriculture business"
|
||||
}, {
|
||||
"id": "246",
|
||||
"action": "gain favor of kings and authorities",
|
||||
"tags": "authority"
|
||||
}, {
|
||||
"id": "250",
|
||||
"action": "release captives",
|
||||
"tags": "captivity"
|
||||
}, {
|
||||
"id": "251",
|
||||
"action": "travel safely in hot places",
|
||||
"tags": "journey protection"
|
||||
}
|
||||
], // 13
|
||||
[
|
||||
{
|
||||
"id": "14",
|
||||
"action": "14 Al-Simak / Azimech",
|
||||
"tags": "alsimak azimech"
|
||||
},
|
||||
{
|
||||
"id": "237",
|
||||
"action": "protect sailors at sea",
|
||||
"tags": "sailing protection"
|
||||
}, {
|
||||
"id": "242",
|
||||
"action": "bring friendship",
|
||||
"tags": "love friendship"
|
||||
}, {
|
||||
"id": "249",
|
||||
"action": "cause love between a man and a woman",
|
||||
"tags": "love"
|
||||
}, {
|
||||
"id": "254",
|
||||
"action": "heal the sick by drugs, medicine",
|
||||
"tags": "healing"
|
||||
}, {
|
||||
"id": "255",
|
||||
"action": "destroy lust",
|
||||
"tags": "harm love"
|
||||
}, {
|
||||
"id": "256",
|
||||
"action": "improve luck of kings",
|
||||
"tags": "authority"
|
||||
}
|
||||
], // 14
|
||||
[
|
||||
{
|
||||
"id": "15",
|
||||
"action": "15 Al-Ghafr / Algarfa",
|
||||
"tags": "alghafr algarfa"
|
||||
},
|
||||
{
|
||||
"id": "234",
|
||||
"action": "finding lost treasures",
|
||||
"tags": "treasure"
|
||||
}, {
|
||||
"id": "233",
|
||||
"action": "dig streams, wells",
|
||||
"tags": "water"
|
||||
}, {
|
||||
"id": "257",
|
||||
"action": "scatter your enemies",
|
||||
"tags": "war"
|
||||
}
|
||||
], // 15
|
||||
[0, {
|
||||
"id": "16",
|
||||
"action": "16 Al-Zubana / Azubene",
|
||||
"tags": "alzubana azubene"
|
||||
}], // 16
|
||||
[
|
||||
{
|
||||
"id": "17",
|
||||
"action": "17 Al-Iklil / Alichil",
|
||||
"tags": "aliklil alichil"
|
||||
},
|
||||
{
|
||||
"id": "237",
|
||||
"action": "protect sailors at sea",
|
||||
"tags": "sailing protection"
|
||||
}, {
|
||||
"id": "205",
|
||||
"action": "causing love in a couple",
|
||||
"tags": "love couple"
|
||||
}, {
|
||||
"id": "241",
|
||||
"action": "improve buildings",
|
||||
"tags": "building"
|
||||
}, {
|
||||
"id": "242",
|
||||
"action": "bring friendship",
|
||||
"tags": "love friendship"
|
||||
}, {
|
||||
"id": "249",
|
||||
"action": "cause love between a man and a woman",
|
||||
"tags": "love"
|
||||
}
|
||||
], // 17
|
||||
[
|
||||
{
|
||||
"id": "18",
|
||||
"action": "18 Al-Qalb / Alcalb",
|
||||
"tags": "alqalb alcalb"
|
||||
},
|
||||
{
|
||||
"id": "241",
|
||||
"action": "improve buildings",
|
||||
"tags": "building"
|
||||
}, {
|
||||
"id": "250",
|
||||
"action": "release captives",
|
||||
"tags": "captivity"
|
||||
}], // 18
|
||||
[
|
||||
{
|
||||
"id": "19",
|
||||
"action": "19 Al-Shaulah / Exaula",
|
||||
"tags": "alshaulah exaula"
|
||||
},
|
||||
{
|
||||
"id": "240",
|
||||
"action": "safeguarding travellers",
|
||||
"tags": "journey protection"
|
||||
}, {
|
||||
"id": "244",
|
||||
"action": "increase crops",
|
||||
"tags": "food agriculture business"
|
||||
}], // 19
|
||||
[
|
||||
{
|
||||
"id": "20",
|
||||
"action": "20 Al-Naaim / Nahaym",
|
||||
"tags": "alnaaim nahaym"
|
||||
},
|
||||
{
|
||||
"id": "236",
|
||||
"action": "strengthen prisons",
|
||||
"tags": "protection war building captivity"
|
||||
}, {
|
||||
"id": "240",
|
||||
"action": "safeguarding travellers",
|
||||
"tags": "journey protection"
|
||||
}, {
|
||||
"id": "241",
|
||||
"action": "improve buildings",
|
||||
"tags": "building"
|
||||
}, {
|
||||
"id": "259",
|
||||
"action": "tame vicious beasts",
|
||||
"tags": "animals"
|
||||
}, {
|
||||
"id": "260",
|
||||
"action": "people you want to come to you",
|
||||
"tags": "people"
|
||||
}, {
|
||||
"id": "261",
|
||||
"action": "for allying good men with each other",
|
||||
"tags": "friendship"
|
||||
}], // 20
|
||||
[
|
||||
{
|
||||
"id": "21",
|
||||
"action": "21 Al-Baldah / Elbelda",
|
||||
"tags": "albaldah elbelda"
|
||||
},
|
||||
{
|
||||
"id": "240",
|
||||
"action": "safeguarding travellers",
|
||||
"tags": "journey protection"
|
||||
}, {
|
||||
"id": "243",
|
||||
"action": "increase trade and profit",
|
||||
"tags": "business"
|
||||
}, {
|
||||
"id": "244",
|
||||
"action": "increase crops",
|
||||
"tags": "food agriculture business"
|
||||
}], // 21
|
||||
[
|
||||
{
|
||||
"id": "22",
|
||||
"action": "22 Sa'd al-Dhabih / Caadaldeba",
|
||||
"tags": "sadaldhabih caadaldeba"
|
||||
},
|
||||
{
|
||||
"id": "254",
|
||||
"action": "heal the sick by drugs, medicine",
|
||||
"tags": "healing"
|
||||
}, {
|
||||
"id": "261",
|
||||
"action": "for allying good men with each other",
|
||||
"tags": "friendship"
|
||||
}], // 22
|
||||
[
|
||||
{
|
||||
"id": "23",
|
||||
"action": "23 Sa'd Bula / Caaddebolach",
|
||||
"tags": "sadbula caaddebolach"
|
||||
},
|
||||
{
|
||||
"id": "242",
|
||||
"action": "bring friendship",
|
||||
"tags": "love friendship"
|
||||
}, {
|
||||
"id": "254",
|
||||
"action": "heal the sick by drugs, medicine",
|
||||
"tags": "healing"
|
||||
}, {
|
||||
"id": "261",
|
||||
"action": "for allying good men with each other",
|
||||
"tags": "friendship"
|
||||
}], // 23
|
||||
[
|
||||
{
|
||||
"id": "24",
|
||||
"action": "24 Sa'd al Suud / Caddacohot",
|
||||
"tags": "sadalsuud caddacohot"
|
||||
},
|
||||
{
|
||||
"id": "205",
|
||||
"action": "causing love in a couple",
|
||||
"tags": "love couple"
|
||||
}, {
|
||||
"id": "243",
|
||||
"action": "increase trade and profit",
|
||||
"tags": "business"
|
||||
}, {
|
||||
"id": "262",
|
||||
"action": "soldiers to report victory",
|
||||
"tags": "war"
|
||||
}], // 24
|
||||
[
|
||||
{
|
||||
"id": "25",
|
||||
"action": "25 Sa'd al-Akhbiyah / Caadalhacbia",
|
||||
"tags": "sadalakhbiyah caadalhacbia"
|
||||
},
|
||||
{
|
||||
"id": "241",
|
||||
"action": "improve buildings",
|
||||
"tags": "building"
|
||||
}], // 25
|
||||
[
|
||||
{
|
||||
"id": "26",
|
||||
"action": "26 Al-Fargh al-Awwal / Almiquedam",
|
||||
"tags": "alfarghalawwal almiquedam"
|
||||
},
|
||||
{
|
||||
"id": "236",
|
||||
"action": "strengthen prisons",
|
||||
"tags": "protection war building captivity"
|
||||
}, {
|
||||
"id": "240",
|
||||
"action": "safeguarding travellers",
|
||||
"tags": "journey protection"
|
||||
}, {
|
||||
"id": "241",
|
||||
"action": "improve buildings",
|
||||
"tags": "building"
|
||||
}, {
|
||||
"id": "242",
|
||||
"action": "bring friendship",
|
||||
"tags": "love friendship"
|
||||
}], // 26
|
||||
[
|
||||
{
|
||||
"id": "27",
|
||||
"action": "27 Al-Fargh al-Thani / Algarf almuehar",
|
||||
"tags": "alfarghalthani algarfalmuehar"
|
||||
},
|
||||
{
|
||||
"id": "243",
|
||||
"action": "increase trade and profit",
|
||||
"tags": "business"
|
||||
}, {
|
||||
"id": "254",
|
||||
"action": "heal the sick by drugs, medicine",
|
||||
"tags": "healing"
|
||||
}, {
|
||||
"id": "261",
|
||||
"action": "for allying good men with each other",
|
||||
"tags": "friendship"
|
||||
}], // 27
|
||||
[
|
||||
{
|
||||
"id": "28",
|
||||
"action": "28 Batn al-Hut / Arrexhe",
|
||||
"tags": "batnalhut arrexhe"
|
||||
},
|
||||
{
|
||||
"id": "236",
|
||||
"action": "strengthen prisons",
|
||||
"tags": "protection war building captivity"
|
||||
}, {
|
||||
"id": "205",
|
||||
"action": "causing love in a couple",
|
||||
"tags": "love couple"
|
||||
}, {
|
||||
"id": "240",
|
||||
"action": "safeguarding travellers",
|
||||
"tags": "journey protection"
|
||||
}, {
|
||||
"id": "243",
|
||||
"action": "increase trade and profit",
|
||||
"tags": "business"
|
||||
}, {
|
||||
"id": "244",
|
||||
"action": "increase crops",
|
||||
"tags": "food agriculture business"
|
||||
}], // 28
|
||||
],
|
||||
mansion : {
|
||||
tropical : [
|
||||
"void",
|
||||
"12 Aries 51",
|
||||
"25 Aries 42",
|
||||
"8 Taurus 34",
|
||||
"21 Taurus 25",
|
||||
"4 Gemini 17",
|
||||
"17 Gemini 8",
|
||||
"0 Cancer 0",
|
||||
"12 Cancer 51",
|
||||
"25 Cancer 42",
|
||||
"8 Leo 34",
|
||||
"21 Leo 25",
|
||||
"4 Virgo 17",
|
||||
"17 Virgo 8",
|
||||
"0 Libra 0",
|
||||
"12 Libra 51",
|
||||
"25 Libra 42",
|
||||
"8 Scorpio 34",
|
||||
"21 Scorpio 25",
|
||||
"4 Sagittarius 17",
|
||||
"17 Sagittarius 8",
|
||||
"0 Capricorn 0",
|
||||
"12 Capricorn 51",
|
||||
"25 Capricorn 42",
|
||||
"8 Aquarius 34",
|
||||
"21 Aquarius 25",
|
||||
"4 Pisces 17",
|
||||
"17 Pisces 8",
|
||||
"360 Aries 0"
|
||||
],
|
||||
constellational : [
|
||||
"void",
|
||||
"3 Taurus 0",
|
||||
"18 Taurus 0",
|
||||
"29 Taurus 0",
|
||||
"10 Gemini 0",
|
||||
"24 Gemini 0",
|
||||
"9 Cancer 0",
|
||||
"20 Cancer 0",
|
||||
"7 Leo 0",
|
||||
"18 Leo 0",
|
||||
"28 Leo 0",
|
||||
"12 Virgo 0",
|
||||
"22 Virgo 0",
|
||||
"27 Virgo 0",
|
||||
"24 Libra 0",
|
||||
"4 Scorpio 0",
|
||||
"15 Scorpio 0",
|
||||
"3 Sagittarius 0",
|
||||
"10 Sagittarius 0",
|
||||
"24 Sagittarius 0",
|
||||
"13 Capricorn 0",
|
||||
"16 Capricorn 0",
|
||||
"4 Aquarius 0",
|
||||
"12 Aquarius 0",
|
||||
"23 Aquarius 0",
|
||||
"4 Pisces 0",
|
||||
"23 Pisces 0",
|
||||
"9 Aries 0",
|
||||
"0 Taurus 0",
|
||||
]
|
||||
}
|
||||
},
|
||||
/**
|
||||
* property defines the main set of the astronomical data of the planetary hour used to calculate a filterable definition of operations and tags
|
||||
*/
|
||||
property: function(m) {
|
||||
return m.ephemeris.moon.deg;
|
||||
},
|
||||
/**
|
||||
* calculate receives the definitions from above and the property from above and calculates a return array of objects with id, operation, and tags
|
||||
*/
|
||||
calculate: function(definitions, property) {
|
||||
var mansions = definitions.mansion.tropical;
|
||||
var mansion = 1;
|
||||
while ( property > SL.Astro.Logy.zodToDeg(mansions[mansion], 0) ) mansion++;
|
||||
return definitions.actions[mansion];
|
||||
}
|
||||
};
|
||||
394
js/modules/moon.js
Normal file
394
js/modules/moon.js
Normal file
|
|
@ -0,0 +1,394 @@
|
|||
/**
|
||||
* @preserve Copyright (c) 2018 T. F. Raaion, www.sublunar.space
|
||||
* License MIT: http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
//Defines Calendar Objects and Methods
|
||||
var module_lunarphase = {
|
||||
|
||||
definitions: {
|
||||
core: true,
|
||||
name: "Phase",
|
||||
group: {
|
||||
id: "lunar",
|
||||
text: "Lunar"
|
||||
},
|
||||
actions: [
|
||||
[0],
|
||||
[
|
||||
{
|
||||
"id": "1",
|
||||
"action": "New Moon",
|
||||
"tags": "waning dark"
|
||||
},
|
||||
{
|
||||
"id": "9",
|
||||
"action": "Waning Moon",
|
||||
"tags": "waning"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "2",
|
||||
"action": "Waxing Crescent Moon",
|
||||
"tags": "waxing crescent"
|
||||
},
|
||||
{
|
||||
"id": "10",
|
||||
"action": "Waxing Moon",
|
||||
"tags": "waxing"
|
||||
},
|
||||
{
|
||||
"id": "11",
|
||||
"action": "Crescent Moon",
|
||||
"tags": "crescent"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "3",
|
||||
"action": "First Quarter Moon",
|
||||
"tags": "waxing quarter half"
|
||||
},
|
||||
{
|
||||
"id": "10",
|
||||
"action": "Waxing Moon",
|
||||
"tags": "waxing"
|
||||
},
|
||||
{
|
||||
"id": "13",
|
||||
"action": "Half Moon",
|
||||
"tags": "half"
|
||||
},
|
||||
{
|
||||
"id": "14",
|
||||
"action": "Quarter Moon",
|
||||
"tags": "quarter"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "4",
|
||||
"action": "Waxing Gibbous Moon",
|
||||
"tags": "waxing gibbous"
|
||||
},
|
||||
{
|
||||
"id": "10",
|
||||
"action": "Waxing Moon",
|
||||
"tags": "waxing"
|
||||
},
|
||||
{
|
||||
"id": "12",
|
||||
"action": "Gibbous Moon",
|
||||
"tags": "gibbous"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "5",
|
||||
"action": "Full Moon",
|
||||
"tags": "waxing full"
|
||||
},
|
||||
{
|
||||
"id": "10",
|
||||
"action": "Waxing Moon",
|
||||
"tags": "waxing"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "6",
|
||||
"action": "Waning Gibbous Moon",
|
||||
"tags": "waning gibbous"
|
||||
},
|
||||
{
|
||||
"id": "9",
|
||||
"action": "Waning Moon",
|
||||
"tags": "waning"
|
||||
},
|
||||
{
|
||||
"id": "12",
|
||||
"action": "Gibbous Moon",
|
||||
"tags": "gibbous"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "7",
|
||||
"action": "Last Quarter Moon",
|
||||
"tags": "waning quarter half"
|
||||
},
|
||||
{
|
||||
"id": "9",
|
||||
"action": "Waning Moon",
|
||||
"tags": "waning"
|
||||
},
|
||||
{
|
||||
"id": "13",
|
||||
"action": "Half Moon",
|
||||
"tags": "half"
|
||||
},
|
||||
{
|
||||
"id": "14",
|
||||
"action": "Quarter Moon",
|
||||
"tags": "quarter"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "8",
|
||||
"action": "Waning Crescent Moon",
|
||||
"tags": "waning crescent"
|
||||
},
|
||||
{
|
||||
"id": "9",
|
||||
"action": "Waning Moon",
|
||||
"tags": "waning"
|
||||
},
|
||||
{
|
||||
"id": "11",
|
||||
"action": "Crescent Moon",
|
||||
"tags": "crescent"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
property: function(m) {
|
||||
return SL.Astro.Nomy.moonPhase(m.lunar);
|
||||
},
|
||||
calculate: function(definitions, property) {
|
||||
return definitions.actions[property];
|
||||
}
|
||||
};
|
||||
|
||||
//Defines Calendar Objects and Methods
|
||||
var module_lunarday = {
|
||||
|
||||
definitions: {
|
||||
core: true,
|
||||
name: "Day",
|
||||
group: {
|
||||
id: "lunar",
|
||||
text: "Lunar"
|
||||
},
|
||||
actions: [
|
||||
[0],
|
||||
[
|
||||
{
|
||||
"id": "1",
|
||||
"action": "Lunar Day 1",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "2",
|
||||
"action": "Lunar Day 2",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "3",
|
||||
"action": "Lunar Day 3",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "4",
|
||||
"action": "Lunar Day 4",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "5",
|
||||
"action": "Lunar Day 5",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "6",
|
||||
"action": "Lunar Day 6",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "7",
|
||||
"action": "Lunar Day 7",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "8",
|
||||
"action": "Lunar Day 8",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "9",
|
||||
"action": "Lunar Day 9",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "10",
|
||||
"action": "Lunar Day 10",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "11",
|
||||
"action": "Lunar Day 11",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "12",
|
||||
"action": "Lunar Day 12",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "13",
|
||||
"action": "Lunar Day 13",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "14",
|
||||
"action": "Lunar Day 14",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "15",
|
||||
"action": "Lunar Day 15",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "16",
|
||||
"action": "Lunar Day 16",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "17",
|
||||
"action": "Lunar Day 17",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "18",
|
||||
"action": "Lunar Day 18",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "19",
|
||||
"action": "Lunar Day 19",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "20",
|
||||
"action": "Lunar Day 20",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "21",
|
||||
"action": "Lunar Day 21",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "22",
|
||||
"action": "Lunar Day 22",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "23",
|
||||
"action": "Lunar Day 23",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "24",
|
||||
"action": "Lunar Day 24",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "25",
|
||||
"action": "Lunar Day 25",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "26",
|
||||
"action": "Lunar Day 26",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "27",
|
||||
"action": "Lunar Day 27",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "28",
|
||||
"action": "Lunar Day 28",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "29",
|
||||
"action": "Lunar Day 29",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "30",
|
||||
"action": "Lunar Day 30",
|
||||
"tags": ""
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
property: function(m) {
|
||||
return m.lunar.day;
|
||||
},
|
||||
calculate: function(definitions, property) {
|
||||
return definitions.actions[property];
|
||||
}
|
||||
};
|
||||
194
js/modules/pgm.js
Normal file
194
js/modules/pgm.js
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
/**
|
||||
* @preserve Copyright (c) 2018 T. F. Raaion, www.sublunar.space
|
||||
* License MIT: http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
//Defines Calendar Objects and Methods
|
||||
var module_pgm_lsign = {
|
||||
|
||||
definitions: {
|
||||
name: "Lunar Sign",
|
||||
group: {
|
||||
id: "pgm",
|
||||
text: "PGM",
|
||||
info: "true"
|
||||
},
|
||||
actions: [
|
||||
[
|
||||
{
|
||||
"id": "1",
|
||||
"action": "fire divination or love charm (VII.284ff)",
|
||||
"tags": "divination love"
|
||||
},
|
||||
{
|
||||
"id": "21",
|
||||
"action": "Oracle statue of Hermes (V.370ff)",
|
||||
"tags": "divination animation"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "2",
|
||||
"action": "Incantation to a lamp (VII.284ff)",
|
||||
"tags": "divination"
|
||||
},
|
||||
{
|
||||
"id": "22",
|
||||
"action": "Ring for success, favour and victory (animation) (XII.270ff)",
|
||||
"tags": "animation success"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "3",
|
||||
"action": "Spell for winning favour (VII.284ff)",
|
||||
"tags": "luck"
|
||||
},
|
||||
{
|
||||
"id": "13",
|
||||
"action": "Perform spells of binding (III.275ff)",
|
||||
"tags": "binding harm"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "4",
|
||||
"action": "Making Phylacteries (VII.284ff)",
|
||||
"tags": "protection"
|
||||
},
|
||||
{
|
||||
"id": "14",
|
||||
"action": "Perform spells of reconciliation, air divination (III.275ff)",
|
||||
"tags": "divination friendship reconciliation"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "5",
|
||||
"action": "Rings or binding spells (VII.284ff)",
|
||||
"tags": "binding harm protection"
|
||||
},
|
||||
{
|
||||
"id": "15",
|
||||
"action": "Making an amulet against gout (xiv.1003ff)",
|
||||
"tags": "healing"
|
||||
},
|
||||
{
|
||||
"id": "21",
|
||||
"action": "Oracle statue of Hermes (V.370ff)",
|
||||
"tags": "divination animation"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "6",
|
||||
"action": "Everything is rendered obtainable (VII.284ff)",
|
||||
"tags": "anything"
|
||||
},
|
||||
{
|
||||
"id": "16",
|
||||
"action": "Anything is obtainable, bowl divination, as you wish (III.275ff)",
|
||||
"tags": "anything divination"
|
||||
},
|
||||
{
|
||||
"id": "21",
|
||||
"action": "Oracle statue of Hermes (V.370ff)",
|
||||
"tags": "divination animation"
|
||||
},
|
||||
{
|
||||
"id": "22",
|
||||
"action": "Ring for success, favour and victory (animation) (XII.270ff)",
|
||||
"tags": "animation success"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "7",
|
||||
"action": "Necromancy (VII.284ff)",
|
||||
"tags": "necromancy"
|
||||
},
|
||||
{
|
||||
"id": "17",
|
||||
"action": "Perform invocation... spell of release... necromancy (III.275ff)",
|
||||
"tags": "invocation necromancy release"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "8",
|
||||
"action": "Anything inflicting evil (VII.284ff)",
|
||||
"tags": "harm war"
|
||||
},
|
||||
{
|
||||
"id": "22",
|
||||
"action": "Ring for success, favour and victory (animation) (XII.270ff)",
|
||||
"tags": "animation success"
|
||||
},
|
||||
{
|
||||
"id": "23",
|
||||
"action": "send a star ... down (xiv.1180f)",
|
||||
"tags": ""
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "9",
|
||||
"action": "Invocations and incantations to the Sun and the Moon (VII.284ff)",
|
||||
"tags": "prayer invocation"
|
||||
},
|
||||
{
|
||||
"id": "18",
|
||||
"action": "Conduct business (III.275ff)",
|
||||
"tags": "business"
|
||||
},
|
||||
{
|
||||
"id": "21",
|
||||
"action": "Oracle statue of Hermes (V.370ff)",
|
||||
"tags": "divination animation"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "10",
|
||||
"action": "Say whatever you wish for best results (VII.284ff)",
|
||||
"tags": "anything"
|
||||
},
|
||||
{
|
||||
"id": "19",
|
||||
"action": "Do what is appropriate (III.275ff)",
|
||||
"tags": "anything"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "11",
|
||||
"action": "For a love charm (VII.284ff)",
|
||||
"tags": "love"
|
||||
},
|
||||
{
|
||||
"id": "22",
|
||||
"action": "Ring for success, favour and victory (animation) (XII.270ff)",
|
||||
"tags": "animation success"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "12",
|
||||
"action": "For foreknowledge (VII.284ff)",
|
||||
"tags": "divination"
|
||||
},
|
||||
{
|
||||
"id": "20",
|
||||
"action": "OIÔ rite... or love charm (III.275ff)",
|
||||
"tags": "love"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
property: function(m) {
|
||||
return SL.Astro.Logy.getZodiac(m.ephemeris.moon.deg).sign;
|
||||
},
|
||||
calculate: function(definitions, property) {
|
||||
return definitions.actions[property-1];
|
||||
}
|
||||
};
|
||||
94
js/modules/planetary.js
Normal file
94
js/modules/planetary.js
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
/**
|
||||
* @preserve Copyright (c) 2018 T. F. Raaion, www.sublunar.space
|
||||
* License MIT: http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
//Defines Calendar Objects and Methods
|
||||
var module_planetary_hour_ruler = {
|
||||
|
||||
definitions: {
|
||||
core: true,
|
||||
name: "Hour",
|
||||
group: {
|
||||
id : "planetary",
|
||||
text: "Planetary Time"
|
||||
},
|
||||
actions: [
|
||||
[0],
|
||||
[
|
||||
{
|
||||
"id": "4",
|
||||
"action": "Sun / Sol / Helios / Apollo",
|
||||
"tags": "sun sol helios success promotion fame wealth prosperity music athleticism ego self power pride authority leadership creativity spontaneity health vitality"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "7",
|
||||
"action": "Moon / Luna / Selene / Artemis",
|
||||
"tags": "moon luna selene illusion glamour sleep peace beauty prophesy dreams magic emotions travel fertility insight wisdom tenderness unconscious habit rhythm memory mood nurture home melancholy"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "3",
|
||||
"action": "Mars / Ares",
|
||||
"tags": "mars ares courage victory success strength conviction rebellion defense protection war sex confidence assertiveness aggression energy strength ambition impulsiveness malefic"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "6",
|
||||
"action": "Mercury / Hermes",
|
||||
"tags": "mercury hermes communication art transportation change luck gambling fortune chance creativity travel prudent crafty rationality reasoning adaptability variability"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "2",
|
||||
"action": "Jupiter / Zeus",
|
||||
"tags": "jupiter zeus abundance protection prosperity strength wealth healing charming hunting growth expansion prosperity fortune travel business education religion law freedom exploration gambling"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "5",
|
||||
"action": "Venus / Aphrodite",
|
||||
"tags": "venus aphrodite love birth fertility romance gentleness pregnancy friendship passion sex amorousness harmony resilience beauty refinement solidarity affection equality comfort partnership art fashion"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"id": "1",
|
||||
"action": "Saturn / Kronos",
|
||||
"tags": "saturn kronos banishing protection wisdom spirituality cleansing magic death cursing industrious melancholy tranquility malefic focus precision nobility ethics civility goals career achievements dedication authority hierarchy stability virtues productiveness lessons destiny tradition structure balance karma justice limitations restrictions boundaries anxiety tests practicality reality time duty commitment responsibility endurance hardship planning foresight"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
property: function(m) {
|
||||
return m.planetary;
|
||||
},
|
||||
calculate: function(definitions, property) {
|
||||
return definitions.actions[SL.Astro.Logy.planet.order[((property.hour.no+1+(property.day.no*24) - 1) % 7 ) + 1]];
|
||||
}
|
||||
};
|
||||
|
||||
var module_planetary_day_ruler = {
|
||||
|
||||
definitions: {
|
||||
core: true,
|
||||
name: "Day",
|
||||
group: {
|
||||
id : "planetary",
|
||||
text: "Planetary Time"
|
||||
},
|
||||
actions: module_planetary_hour_ruler.definitions.actions
|
||||
},
|
||||
property: function(m) {
|
||||
return m.planetary.day.no;
|
||||
},
|
||||
calculate: function(definitions, property) {
|
||||
return definitions.actions[property+1];
|
||||
}
|
||||
};
|
||||
5
js/require.js
Normal file
5
js/require.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue