klio 1.4.5 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/astrology/astrologyService.js +36 -1
- package/src/cli/cli.js +47 -9
package/README.md
CHANGED
|
@@ -116,7 +116,7 @@ Then, instead using `--i` for the commands from above you can use `--wp <id>` i.
|
|
|
116
116
|
- **Element distribution**: `klio --el` - Shows element distribution of planets in a horizontal chart. combine with `--wp <id>` or `--i`
|
|
117
117
|
- **Aspect figures**: `klio --af` - Shows active aspect figures like T-squares, Grand Trines, etc. Combine with `--wp <id>` or `--i` or `--d <"DD.MM.YYYY HH:MM>` or `--hs <house-system>`
|
|
118
118
|
- **Transits**: `klio --tr` - Shows personal transits based on birth data. Combine with `--wp <id or --i>` and optional `--d <"DD.MM.YYYY HH:MM>`
|
|
119
|
-
|
|
119
|
+
- **Transit Houses**: `klio --s --tra --i`
|
|
120
120
|
### Past and Future Aspects
|
|
121
121
|
|
|
122
122
|
- **Past aspects**: `klio --v <count> [planet1] [aspect-type] [planet2]` - Shows past aspects (Format: --v <count> planet1 aspectType planet2) Available aspect types: c, o, s, t, se (conjunction, opposition, square, trine, sextile)
|
package/package.json
CHANGED
|
@@ -281,6 +281,39 @@ function calculateHouses(julianDay, houseSystem = 'K', useBirthLocation = false)
|
|
|
281
281
|
});
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
+
// Function to calculate astrological angles from house cusps
|
|
285
|
+
function calculateAstrologicalAngles(houseCusps) {
|
|
286
|
+
// House cusps are in houseCusps[0] to houseCusps[11]
|
|
287
|
+
// In most house systems:
|
|
288
|
+
// ASC (Ascendant) = House 1 cusp (index 0)
|
|
289
|
+
// MC (Medium Coeli/Midheaven) = House 10 cusp (index 9)
|
|
290
|
+
// DESC (Descendant) = House 7 cusp (index 6)
|
|
291
|
+
// IC (Imum Coeli) = House 4 cusp (index 3)
|
|
292
|
+
|
|
293
|
+
return {
|
|
294
|
+
asc: houseCusps[0], // Ascendant
|
|
295
|
+
mc: houseCusps[9], // Medium Coeli (Midheaven)
|
|
296
|
+
desc: houseCusps[6], // Descendant
|
|
297
|
+
ic: houseCusps[3] // Imum Coeli
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Function to convert longitude to sign and degree
|
|
302
|
+
function longitudeToSignDegree(longitude) {
|
|
303
|
+
// Normalize longitude to 0-360 range
|
|
304
|
+
longitude = longitude % 360;
|
|
305
|
+
if (longitude < 0) longitude += 360;
|
|
306
|
+
|
|
307
|
+
// Calculate sign (0-11) and degree within sign (0-30)
|
|
308
|
+
const signIndex = Math.floor(longitude / 30);
|
|
309
|
+
const degreeInSign = longitude % 30;
|
|
310
|
+
|
|
311
|
+
return {
|
|
312
|
+
sign: signs[signIndex],
|
|
313
|
+
degree: degreeInSign.toFixed(2)
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
|
|
284
317
|
// Function to determine the house for a planet
|
|
285
318
|
function getPlanetHouse(planetLongitude, houseCusps) {
|
|
286
319
|
// Normalize planet longitude to 0-360 range
|
|
@@ -2745,5 +2778,7 @@ module.exports = {
|
|
|
2745
2778
|
calculateAspectStatistics,
|
|
2746
2779
|
calculatePlanetComboAspects,
|
|
2747
2780
|
showPlanetComboAspects,
|
|
2748
|
-
calculateNextPlanetIngress
|
|
2781
|
+
calculateNextPlanetIngress,
|
|
2782
|
+
calculateAstrologicalAngles,
|
|
2783
|
+
longitudeToSignDegree
|
|
2749
2784
|
};
|
package/src/cli/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { Command } = require('commander');
|
|
2
2
|
const { planets, signs } = require('../astrology/astrologyConstants');
|
|
3
3
|
const { showRetrogradePlanets } = require('../astrology/retrogradeService');
|
|
4
|
-
const { getCurrentTimeInTimezone, showAspectFigures, analyzeElementDistribution, getTimezoneOffset, calculateJulianDayUTC, calculateHouses, getAstrologicalData, getPlanetHouse, showPlanetAspects, calculatePlanetAspects, getAllActiveAspects, showAllActiveAspects, getBirthDataFromConfig, getPersonDataFromConfig, detectAspectFigures, calculatePersonalTransits, showPersonalTransitAspects, showCombinedAnalysis, calculatePersonalTransitAspects, determineAspectPhase, findExactAspectTime, findLastExactAspectTime, getAspectAngle, getFutureAspects, getPastAspects, analyzeCSVWithDatetime, analyzeHouseDistributionSignificance, analyzeAspectDistributionSignificance, analyzeSignDistributionSignificance, calculateAspectStatistics, calculatePlanetComboAspects, showPlanetComboAspects, getCriticalPlanets, getHouseSystemCode, calculateNextPlanetIngress } = require('../astrology/astrologyService');
|
|
4
|
+
const { getCurrentTimeInTimezone, showAspectFigures, analyzeElementDistribution, getTimezoneOffset, calculateJulianDayUTC, calculateHouses, getAstrologicalData, getPlanetHouse, showPlanetAspects, calculatePlanetAspects, getAllActiveAspects, showAllActiveAspects, getBirthDataFromConfig, getPersonDataFromConfig, detectAspectFigures, calculatePersonalTransits, showPersonalTransitAspects, showCombinedAnalysis, calculatePersonalTransitAspects, determineAspectPhase, findExactAspectTime, findLastExactAspectTime, getAspectAngle, getFutureAspects, getPastAspects, analyzeCSVWithDatetime, analyzeHouseDistributionSignificance, analyzeAspectDistributionSignificance, analyzeSignDistributionSignificance, calculateAspectStatistics, calculatePlanetComboAspects, showPlanetComboAspects, getCriticalPlanets, getHouseSystemCode, calculateNextPlanetIngress, calculateAstrologicalAngles, longitudeToSignDegree } = require('../astrology/astrologyService');
|
|
5
5
|
const { performSetup, showConfigStatus, loadConfig, setAIModel, askAIModel, setPerson1, setPerson2, setPerson, getPersonData, listPeople, deletePerson } = require('../config/configService');
|
|
6
6
|
const { parseAppleHealthXML } = require('../health/healthService');
|
|
7
7
|
const { analyzeStepsByPlanetSign, analyzeStressByPlanetAspects, analyzePlanetAspectsForSleep } = require('../health/healthAnalysis');
|
|
@@ -257,7 +257,7 @@ program
|
|
|
257
257
|
.option('--p <prompt>', 'Asks a question to the AI model (e.g. "Which careers suit this position?")')
|
|
258
258
|
.option('--el', 'Shows the element distribution of planets in a horizontal chart')
|
|
259
259
|
.option('--af', 'Shows active aspect figures like T-squares, Grand Trines, etc.')
|
|
260
|
-
.option('--
|
|
260
|
+
.option('--tra', 'Shows personal transits based on birth data')
|
|
261
261
|
.option('--transit-aspekte', 'Shows personal transit aspects (Transit → Radix)')
|
|
262
262
|
.option('--tr', 'Shows personal transit aspects (Transit → Radix) (short form)')
|
|
263
263
|
.option('--v <count>', 'Shows past aspects between two planets (Format: --v <count> planet1 aspectType planet2)')
|
|
@@ -516,8 +516,8 @@ program
|
|
|
516
516
|
return;
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
// Show personal transits if --
|
|
520
|
-
if (options.
|
|
519
|
+
// Show personal transits if --tra option is specified (no planet required)
|
|
520
|
+
if (options.tra) {
|
|
521
521
|
// Person data is required for transits
|
|
522
522
|
const personDataToUse = getPersonDataToUse(options);
|
|
523
523
|
if (!personDataToUse.data) {
|
|
@@ -604,10 +604,7 @@ program
|
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
console.log('================================================================================');
|
|
607
|
-
|
|
608
|
-
console.log('Example: If Jupiter is in Cancer and you have Scorpio ASC, this shows in which');
|
|
609
|
-
console.log('of your birth houses the transit Jupiter is located.');
|
|
610
|
-
|
|
607
|
+
|
|
611
608
|
// Send question to AI model if --p option is specified
|
|
612
609
|
if (options.p) {
|
|
613
610
|
// Create a data object for AI with transit information
|
|
@@ -1394,6 +1391,34 @@ program
|
|
|
1394
1391
|
|
|
1395
1392
|
console.log('================================================================================');
|
|
1396
1393
|
|
|
1394
|
+
// Show astrological angles if houses were calculated
|
|
1395
|
+
if (houses) {
|
|
1396
|
+
console.log('\nAstrological Angles:');
|
|
1397
|
+
console.log('================================================================================');
|
|
1398
|
+
console.log('| Angle | Sign | Degree |');
|
|
1399
|
+
console.log('================================================================================');
|
|
1400
|
+
|
|
1401
|
+
const angles = calculateAstrologicalAngles(houses.house);
|
|
1402
|
+
|
|
1403
|
+
// ASC (Ascendant)
|
|
1404
|
+
const ascData = longitudeToSignDegree(angles.asc);
|
|
1405
|
+
console.log(`| ASC | ${ascData.sign.padEnd(10)} | ${ascData.degree.padEnd(6)}° |`);
|
|
1406
|
+
|
|
1407
|
+
// MC (Medium Coeli/Midheaven)
|
|
1408
|
+
const mcData = longitudeToSignDegree(angles.mc);
|
|
1409
|
+
console.log(`| MC | ${mcData.sign.padEnd(10)} | ${mcData.degree.padEnd(6)}° |`);
|
|
1410
|
+
|
|
1411
|
+
// DESC (Descendant)
|
|
1412
|
+
const descData = longitudeToSignDegree(angles.desc);
|
|
1413
|
+
console.log(`| DESC | ${descData.sign.padEnd(10)} | ${descData.degree.padEnd(6)}° |`);
|
|
1414
|
+
|
|
1415
|
+
// IC (Imum Coeli)
|
|
1416
|
+
const icData = longitudeToSignDegree(angles.ic);
|
|
1417
|
+
console.log(`| IC | ${icData.sign.padEnd(10)} | ${icData.degree.padEnd(6)}° |`);
|
|
1418
|
+
|
|
1419
|
+
console.log('================================================================================');
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1397
1422
|
if (birthData) {
|
|
1398
1423
|
if (useNatalPositions) {
|
|
1399
1424
|
console.log('\nThis analysis shows your natal planet positions.');
|
|
@@ -1430,6 +1455,18 @@ program
|
|
|
1430
1455
|
};
|
|
1431
1456
|
}
|
|
1432
1457
|
|
|
1458
|
+
// Add astrological angles to AI data if houses were calculated
|
|
1459
|
+
let anglesData = null;
|
|
1460
|
+
if (houses) {
|
|
1461
|
+
const angles = calculateAstrologicalAngles(houses.house);
|
|
1462
|
+
anglesData = {
|
|
1463
|
+
asc: longitudeToSignDegree(angles.asc),
|
|
1464
|
+
mc: longitudeToSignDegree(angles.mc),
|
|
1465
|
+
desc: longitudeToSignDegree(angles.desc),
|
|
1466
|
+
ic: longitudeToSignDegree(angles.ic)
|
|
1467
|
+
};
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1433
1470
|
const aiData = {
|
|
1434
1471
|
planet: 'alle',
|
|
1435
1472
|
sign: 'Multiple',
|
|
@@ -1438,7 +1475,8 @@ program
|
|
|
1438
1475
|
element: 'Multiple',
|
|
1439
1476
|
decan: 'Multiple',
|
|
1440
1477
|
allPlanetData: allPlanetData,
|
|
1441
|
-
houseSystem: houseSystem
|
|
1478
|
+
houseSystem: houseSystem,
|
|
1479
|
+
astrologicalAngles: anglesData
|
|
1442
1480
|
};
|
|
1443
1481
|
|
|
1444
1482
|
await askAIModel(actualOptions.p, aiData);
|