kerykeion 4.2.0__py3-none-any.whl → 4.2.2__py3-none-any.whl
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.
Potentially problematic release.
This version of kerykeion might be problematic. Click here for more details.
- kerykeion/aspects/__init__.py +1 -1
- kerykeion/aspects/aspects_utils.py +1 -20
- kerykeion/aspects/natal_aspects.py +27 -24
- kerykeion/aspects/synastry_aspects.py +29 -23
- kerykeion/charts/kerykeion_chart_svg.py +60 -64
- kerykeion/utilities.py +17 -2
- {kerykeion-4.2.0.dist-info → kerykeion-4.2.2.dist-info}/METADATA +1 -1
- {kerykeion-4.2.0.dist-info → kerykeion-4.2.2.dist-info}/RECORD +11 -11
- {kerykeion-4.2.0.dist-info → kerykeion-4.2.2.dist-info}/LICENSE +0 -0
- {kerykeion-4.2.0.dist-info → kerykeion-4.2.2.dist-info}/WHEEL +0 -0
- {kerykeion-4.2.0.dist-info → kerykeion-4.2.2.dist-info}/entry_points.txt +0 -0
kerykeion/aspects/__init__.py
CHANGED
|
@@ -163,23 +163,4 @@ def planet_id_decoder(planets_settings: dict, name: str):
|
|
|
163
163
|
for planet in planets_settings:
|
|
164
164
|
if planet["name"] == str_name:
|
|
165
165
|
result = planet["id"]
|
|
166
|
-
return result
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
def filter_by_settings(planets_settings: dict, init_point_list: list):
|
|
170
|
-
"""
|
|
171
|
-
Creates a list of all the desired
|
|
172
|
-
points filtering by the settings.
|
|
173
|
-
"""
|
|
174
|
-
|
|
175
|
-
set_points_name = []
|
|
176
|
-
for p in planets_settings:
|
|
177
|
-
if p["is_active"]:
|
|
178
|
-
set_points_name.append(p["name"])
|
|
179
|
-
|
|
180
|
-
point_list = []
|
|
181
|
-
for l in init_point_list:
|
|
182
|
-
if l["name"] in set_points_name:
|
|
183
|
-
point_list.append(l)
|
|
184
|
-
|
|
185
|
-
return point_list
|
|
166
|
+
return result
|
|
@@ -9,11 +9,18 @@ from logging import getLogger, basicConfig
|
|
|
9
9
|
from typing import Union
|
|
10
10
|
from kerykeion.settings.kerykeion_settings import get_settings
|
|
11
11
|
from dataclasses import dataclass
|
|
12
|
-
from kerykeion.aspects.aspects_utils import
|
|
12
|
+
from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points
|
|
13
|
+
from kerykeion.utilities import get_active_points_list
|
|
13
14
|
|
|
14
15
|
logger = getLogger(__name__)
|
|
15
16
|
basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level="INFO")
|
|
16
17
|
|
|
18
|
+
AXES_LIST = [
|
|
19
|
+
"First_House",
|
|
20
|
+
"Tenth_House",
|
|
21
|
+
"Seventh_House",
|
|
22
|
+
"Fourth_House",
|
|
23
|
+
]
|
|
17
24
|
|
|
18
25
|
@dataclass
|
|
19
26
|
class NatalAspects:
|
|
@@ -27,13 +34,11 @@ class NatalAspects:
|
|
|
27
34
|
_relevant_aspects: Union[list, None] = None
|
|
28
35
|
|
|
29
36
|
def __post_init__(self):
|
|
30
|
-
settings = get_settings(self.new_settings_file)
|
|
37
|
+
self.settings = get_settings(self.new_settings_file)
|
|
31
38
|
|
|
32
|
-
self.
|
|
33
|
-
|
|
34
|
-
self.
|
|
35
|
-
self.aspects_settings = settings["aspects"]
|
|
36
|
-
self.axes_orbit_settings = settings["general_settings"]["axes_orbit"]
|
|
39
|
+
self.celestial_points = self.settings["celestial_points"]
|
|
40
|
+
self.aspects_settings = self.settings["aspects"]
|
|
41
|
+
self.axes_orbit_settings = self.settings["general_settings"]["axes_orbit"]
|
|
37
42
|
|
|
38
43
|
@property
|
|
39
44
|
def all_aspects(self):
|
|
@@ -46,33 +51,36 @@ class NatalAspects:
|
|
|
46
51
|
if self._all_aspects is not None:
|
|
47
52
|
return self._all_aspects
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
active_points_list = get_active_points_list(self.user, self.settings)
|
|
50
55
|
|
|
51
56
|
self.all_aspects_list = []
|
|
52
57
|
|
|
53
|
-
for first in range(len(
|
|
58
|
+
for first in range(len(active_points_list)):
|
|
54
59
|
# Generates the aspects list without repetitions
|
|
55
|
-
for second in range(first + 1, len(
|
|
60
|
+
for second in range(first + 1, len(active_points_list)):
|
|
56
61
|
verdict, name, orbit, aspect_degrees, color, aid, diff = get_aspect_from_two_points(
|
|
57
|
-
self.aspects_settings,
|
|
62
|
+
self.aspects_settings, active_points_list[first]["abs_pos"], active_points_list[second]["abs_pos"]
|
|
58
63
|
)
|
|
59
64
|
|
|
60
65
|
if verdict == True:
|
|
61
66
|
d_asp = {
|
|
62
|
-
"p1_name":
|
|
63
|
-
"p1_abs_pos":
|
|
64
|
-
"p2_name":
|
|
65
|
-
"p2_abs_pos":
|
|
67
|
+
"p1_name": active_points_list[first]["name"],
|
|
68
|
+
"p1_abs_pos": active_points_list[first]["abs_pos"],
|
|
69
|
+
"p2_name": active_points_list[second]["name"],
|
|
70
|
+
"p2_abs_pos": active_points_list[second]["abs_pos"],
|
|
66
71
|
"aspect": name,
|
|
67
72
|
"orbit": orbit,
|
|
68
73
|
"aspect_degrees": aspect_degrees,
|
|
69
74
|
"color": color,
|
|
70
75
|
"aid": aid,
|
|
71
76
|
"diff": diff,
|
|
72
|
-
"p1": planet_id_decoder(
|
|
77
|
+
"p1": planet_id_decoder(
|
|
78
|
+
self.celestial_points,
|
|
79
|
+
active_points_list[first]["name"]
|
|
80
|
+
),
|
|
73
81
|
"p2": planet_id_decoder(
|
|
74
|
-
self.
|
|
75
|
-
|
|
82
|
+
self.celestial_points,
|
|
83
|
+
active_points_list[second]["name"],
|
|
76
84
|
),
|
|
77
85
|
}
|
|
78
86
|
|
|
@@ -101,12 +109,7 @@ class NatalAspects:
|
|
|
101
109
|
if self.aspects_settings[a["aid"]]["is_active"] == True:
|
|
102
110
|
aspects_filtered.append(a)
|
|
103
111
|
|
|
104
|
-
axes_list =
|
|
105
|
-
"First_House",
|
|
106
|
-
"Tenth_House",
|
|
107
|
-
"Seventh_House",
|
|
108
|
-
"Fourth_House",
|
|
109
|
-
]
|
|
112
|
+
axes_list = AXES_LIST
|
|
110
113
|
counter = 0
|
|
111
114
|
|
|
112
115
|
aspects_list_subtract = []
|
|
@@ -9,7 +9,8 @@ from typing import Union
|
|
|
9
9
|
|
|
10
10
|
from kerykeion.aspects.natal_aspects import NatalAspects
|
|
11
11
|
from kerykeion.settings.kerykeion_settings import get_settings
|
|
12
|
-
from kerykeion.aspects.aspects_utils import
|
|
12
|
+
from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points
|
|
13
|
+
from kerykeion.utilities import get_active_points_list
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
class SynastryAspects(NatalAspects):
|
|
@@ -23,22 +24,24 @@ class SynastryAspects(NatalAspects):
|
|
|
23
24
|
kr_object_two: AstrologicalSubject,
|
|
24
25
|
new_settings_file: Union[Path, None] = None,
|
|
25
26
|
):
|
|
27
|
+
# Subjects
|
|
26
28
|
self.first_user = kr_object_one
|
|
27
29
|
self.second_user = kr_object_two
|
|
28
|
-
|
|
30
|
+
|
|
31
|
+
# Settings
|
|
29
32
|
self.new_settings_file = new_settings_file
|
|
33
|
+
self.settings = get_settings(self.new_settings_file)
|
|
34
|
+
|
|
35
|
+
self.celestial_points = self.settings["celestial_points"]
|
|
36
|
+
self.aspects_settings = self.settings["aspects"]
|
|
37
|
+
self.axes_orbit_settings = self.settings["general_settings"]["axes_orbit"]
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
self.second_init_point_list = self.second_user.planets_list + self.second_user.houses_list
|
|
33
|
-
|
|
39
|
+
# Private variables of the aspects
|
|
34
40
|
self._all_aspects: Union[list, None] = None
|
|
35
41
|
self._relevant_aspects: Union[list, None] = None
|
|
36
42
|
|
|
37
|
-
settings = get_settings(self.new_settings_file)
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
self.aspects_settings = settings["aspects"]
|
|
41
|
-
self.axes_orbit_settings = settings["general_settings"]["axes_orbit"]
|
|
44
|
+
|
|
42
45
|
|
|
43
46
|
@property
|
|
44
47
|
def all_aspects(self):
|
|
@@ -50,36 +53,39 @@ class SynastryAspects(NatalAspects):
|
|
|
50
53
|
|
|
51
54
|
if self._all_aspects is not None:
|
|
52
55
|
return self._all_aspects
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
|
|
57
|
+
# Celestial Points Lists
|
|
58
|
+
first_active_points_list = get_active_points_list(self.first_user, self.settings)
|
|
59
|
+
second_active_points_list = get_active_points_list(self.second_user, self.settings)
|
|
57
60
|
|
|
58
61
|
self.all_aspects_list = []
|
|
59
62
|
|
|
60
|
-
for first in range(len(
|
|
63
|
+
for first in range(len(first_active_points_list)):
|
|
61
64
|
# Generates the aspects list whitout repetitions
|
|
62
|
-
for second in range(len(
|
|
65
|
+
for second in range(len(second_active_points_list)):
|
|
63
66
|
verdict, name, orbit, aspect_degrees, color, aid, diff = get_aspect_from_two_points(
|
|
64
|
-
self.aspects_settings,
|
|
67
|
+
self.aspects_settings, first_active_points_list[first]["abs_pos"], second_active_points_list[second]["abs_pos"]
|
|
65
68
|
)
|
|
66
69
|
|
|
67
70
|
if verdict == True:
|
|
68
71
|
d_asp = {
|
|
69
|
-
"p1_name":
|
|
70
|
-
"p1_abs_pos":
|
|
71
|
-
"p2_name":
|
|
72
|
-
"p2_abs_pos":
|
|
72
|
+
"p1_name": first_active_points_list[first]["name"],
|
|
73
|
+
"p1_abs_pos": first_active_points_list[first]["abs_pos"],
|
|
74
|
+
"p2_name": second_active_points_list[second]["name"],
|
|
75
|
+
"p2_abs_pos": second_active_points_list[second]["abs_pos"],
|
|
73
76
|
"aspect": name,
|
|
74
77
|
"orbit": orbit,
|
|
75
78
|
"aspect_degrees": aspect_degrees,
|
|
76
79
|
"color": color,
|
|
77
80
|
"aid": aid,
|
|
78
81
|
"diff": diff,
|
|
79
|
-
"p1": planet_id_decoder(
|
|
82
|
+
"p1": planet_id_decoder(
|
|
83
|
+
self.settings.celestial_points,
|
|
84
|
+
first_active_points_list[first]["name"]
|
|
85
|
+
),
|
|
80
86
|
"p2": planet_id_decoder(
|
|
81
|
-
self.
|
|
82
|
-
|
|
87
|
+
self.settings.celestial_points,
|
|
88
|
+
second_active_points_list[second]["name"],
|
|
83
89
|
),
|
|
84
90
|
}
|
|
85
91
|
|
|
@@ -166,7 +166,7 @@ class KerykeionChartSVG:
|
|
|
166
166
|
self.home_countrycode = self.user.nation
|
|
167
167
|
self.home_timezonestr = self.user.tz_str
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
logger.info(f"{self.user.name} birth location: {self.home_location}, {self.home_geolat}, {self.home_geolon}")
|
|
170
170
|
|
|
171
171
|
# default location
|
|
172
172
|
self.location = self.home_location
|
|
@@ -238,8 +238,7 @@ class KerykeionChartSVG:
|
|
|
238
238
|
Sets the output direcotry and returns it's path.
|
|
239
239
|
"""
|
|
240
240
|
self.output_directory = dir_path
|
|
241
|
-
|
|
242
|
-
return print(dir_string)
|
|
241
|
+
logger.info(f"Output direcotry set to: {self.output_directory}")
|
|
243
242
|
|
|
244
243
|
def parse_json_settings(self, settings_file):
|
|
245
244
|
"""
|
|
@@ -507,7 +506,7 @@ class KerykeionChartSVG:
|
|
|
507
506
|
"""
|
|
508
507
|
|
|
509
508
|
# element: get extra points if planet is in own zodiac sign.
|
|
510
|
-
related_zodiac_signs = self.
|
|
509
|
+
related_zodiac_signs = self.available_planets_setting[i]["related_zodiac_signs"]
|
|
511
510
|
cz = self.points_sign[i]
|
|
512
511
|
extra_points = 0
|
|
513
512
|
if related_zodiac_signs != []:
|
|
@@ -517,23 +516,23 @@ class KerykeionChartSVG:
|
|
|
517
516
|
|
|
518
517
|
ele = self.zodiac[self.points_sign[i]]["element"]
|
|
519
518
|
if ele == "fire":
|
|
520
|
-
self.fire = self.fire + self.
|
|
519
|
+
self.fire = self.fire + self.available_planets_setting[i]["element_points"] + extra_points
|
|
521
520
|
|
|
522
521
|
elif ele == "earth":
|
|
523
|
-
self.earth = self.earth + self.
|
|
522
|
+
self.earth = self.earth + self.available_planets_setting[i]["element_points"] + extra_points
|
|
524
523
|
|
|
525
524
|
elif ele == "air":
|
|
526
|
-
self.air = self.air + self.
|
|
525
|
+
self.air = self.air + self.available_planets_setting[i]["element_points"] + extra_points
|
|
527
526
|
|
|
528
527
|
elif ele == "water":
|
|
529
|
-
self.water = self.water + self.
|
|
528
|
+
self.water = self.water + self.available_planets_setting[i]["element_points"] + extra_points
|
|
530
529
|
|
|
531
530
|
def _make_planets(self, r):
|
|
532
531
|
planets_degut = {}
|
|
533
|
-
diff = range(len(self.
|
|
532
|
+
diff = range(len(self.available_planets_setting))
|
|
534
533
|
|
|
535
534
|
for i in range(len(self.available_planets_setting)):
|
|
536
|
-
if self.
|
|
535
|
+
if self.available_planets_setting[i]["is_active"] == 1:
|
|
537
536
|
# list of planets sorted by degree
|
|
538
537
|
logger.debug(f"planet: {i}, degree: {self.points_deg_ut[i]}")
|
|
539
538
|
planets_degut[self.points_deg_ut[i]] = i
|
|
@@ -567,24 +566,24 @@ class KerykeionChartSVG:
|
|
|
567
566
|
diffb = degreeDiff(next, self.points_deg_ut[i])
|
|
568
567
|
planets_by_pos[e] = [i, diffa, diffb]
|
|
569
568
|
|
|
570
|
-
logger.debug(f'{self.
|
|
569
|
+
logger.debug(f'{self.available_planets_setting[i]["label"]}, {diffa}, {diffb}')
|
|
571
570
|
|
|
572
571
|
if diffb < planet_drange:
|
|
573
572
|
if group_open:
|
|
574
|
-
groups[-1].append([e, diffa, diffb, self.
|
|
573
|
+
groups[-1].append([e, diffa, diffb, self.available_planets_setting[planets_degut[keys[e]]]["label"]])
|
|
575
574
|
else:
|
|
576
575
|
group_open = True
|
|
577
576
|
groups.append([])
|
|
578
|
-
groups[-1].append([e, diffa, diffb, self.
|
|
577
|
+
groups[-1].append([e, diffa, diffb, self.available_planets_setting[planets_degut[keys[e]]]["label"]])
|
|
579
578
|
else:
|
|
580
579
|
if group_open:
|
|
581
|
-
groups[-1].append([e, diffa, diffb, self.
|
|
580
|
+
groups[-1].append([e, diffa, diffb, self.available_planets_setting[planets_degut[keys[e]]]["label"]])
|
|
582
581
|
group_open = False
|
|
583
582
|
|
|
584
583
|
def zero(x):
|
|
585
584
|
return 0
|
|
586
585
|
|
|
587
|
-
planets_delta = list(map(zero, range(len(self.
|
|
586
|
+
planets_delta = list(map(zero, range(len(self.available_planets_setting))))
|
|
588
587
|
|
|
589
588
|
# print groups
|
|
590
589
|
# print planets_by_pos
|
|
@@ -696,7 +695,7 @@ class KerykeionChartSVG:
|
|
|
696
695
|
y1 = sliceToY(0, (r - self.c3), trueoffset) + self.c3
|
|
697
696
|
x2 = sliceToX(0, (r - rplanet - 30), trueoffset) + rplanet + 30
|
|
698
697
|
y2 = sliceToY(0, (r - rplanet - 30), trueoffset) + rplanet + 30
|
|
699
|
-
color = self.
|
|
698
|
+
color = self.available_planets_setting[i]["color"]
|
|
700
699
|
output += (
|
|
701
700
|
'<line x1="%s" y1="%s" x2="%s" y2="%s" style="stroke-width:1px;stroke:%s;stroke-opacity:.3;"/>\n'
|
|
702
701
|
% (x1, y1, x2, y2, color)
|
|
@@ -714,7 +713,7 @@ class KerykeionChartSVG:
|
|
|
714
713
|
else:
|
|
715
714
|
scale = 1
|
|
716
715
|
# output planet
|
|
717
|
-
output += f'<g transform="translate(-{12 * scale},-{12 * scale})"><g transform="scale({scale})"><use x="{planet_x * (1/scale)}" y="{planet_y * (1/scale)}" xlink:href="#{self.
|
|
716
|
+
output += f'<g transform="translate(-{12 * scale},-{12 * scale})"><g transform="scale({scale})"><use x="{planet_x * (1/scale)}" y="{planet_y * (1/scale)}" xlink:href="#{self.available_planets_setting[i]["name"]}" /></g></g>'
|
|
718
717
|
|
|
719
718
|
# make transit degut and display planets
|
|
720
719
|
if self.chart_type == "Transit" or self.chart_type == "Synastry":
|
|
@@ -726,7 +725,7 @@ class KerykeionChartSVG:
|
|
|
726
725
|
list_range = len(self.available_planets_setting)
|
|
727
726
|
for i in range(list_range):
|
|
728
727
|
group_offset[i] = 0
|
|
729
|
-
if self.
|
|
728
|
+
if self.available_planets_setting[i]["is_active"] == 1:
|
|
730
729
|
t_planets_degut[self.t_points_deg_ut[i]] = i
|
|
731
730
|
t_keys = list(t_planets_degut.keys())
|
|
732
731
|
t_keys.sort()
|
|
@@ -787,14 +786,14 @@ class KerykeionChartSVG:
|
|
|
787
786
|
t_offset = t_offset - 360
|
|
788
787
|
planet_x = sliceToX(0, (r - rplanet), t_offset) + rplanet
|
|
789
788
|
planet_y = sliceToY(0, (r - rplanet), t_offset) + rplanet
|
|
790
|
-
output += f'<g transform="translate(-6,-6)"><g transform="scale(0.5)"><use x="{planet_x*2}" y="{planet_y*2}" xlink:href="#{self.
|
|
789
|
+
output += f'<g transform="translate(-6,-6)"><g transform="scale(0.5)"><use x="{planet_x*2}" y="{planet_y*2}" xlink:href="#{self.available_planets_setting[i]["name"]}" /></g></g>'
|
|
791
790
|
|
|
792
791
|
# transit planet line
|
|
793
792
|
x1 = sliceToX(0, r + 3, t_offset) - 3
|
|
794
793
|
y1 = sliceToY(0, r + 3, t_offset) - 3
|
|
795
794
|
x2 = sliceToX(0, r - 3, t_offset) + 3
|
|
796
795
|
y2 = sliceToY(0, r - 3, t_offset) + 3
|
|
797
|
-
output += f'<line x1="{str(x1)}" y1="{str(y1)}" x2="{str(x2)}" y2="{str(y2)}" style="stroke: {self.
|
|
796
|
+
output += f'<line x1="{str(x1)}" y1="{str(y1)}" x2="{str(x2)}" y2="{str(y2)}" style="stroke: {self.available_planets_setting[i]["color"]}; stroke-width: 1px; stroke-opacity:.8;"/>'
|
|
798
797
|
|
|
799
798
|
# transit planet degree text
|
|
800
799
|
rotate = self.user.houses_degree_ut[0] - self.t_points_deg_ut[i]
|
|
@@ -818,7 +817,7 @@ class KerykeionChartSVG:
|
|
|
818
817
|
degree = int(t_offset)
|
|
819
818
|
output += f'<g transform="translate({deg_x},{deg_y})">'
|
|
820
819
|
output += f'<text transform="rotate({rotate})" text-anchor="{textanchor}'
|
|
821
|
-
output += f'" style="fill: {self.
|
|
820
|
+
output += f'" style="fill: {self.available_planets_setting[i]["color"]}; font-size: 10px;">{self._dec2deg(self.t_points_deg[i], type="1")}'
|
|
822
821
|
output += "</text></g>"
|
|
823
822
|
|
|
824
823
|
# check transit
|
|
@@ -833,7 +832,7 @@ class KerykeionChartSVG:
|
|
|
833
832
|
x2 = sliceToX(0, (r - (dropin - 3)), offset) + (dropin - 3)
|
|
834
833
|
y2 = sliceToY(0, (r - (dropin - 3)), offset) + (dropin - 3)
|
|
835
834
|
|
|
836
|
-
output += f'<line x1="{x1}" y1="{y1}" x2="{x2}" y2="{y2}" style="stroke: {self.
|
|
835
|
+
output += f'<line x1="{x1}" y1="{y1}" x2="{x2}" y2="{y2}" style="stroke: {self.available_planets_setting[i]["color"]}; stroke-width: 2px; stroke-opacity:.6;"/>'
|
|
837
836
|
|
|
838
837
|
# check transit
|
|
839
838
|
if self.chart_type == "Transit" or self.chart_type == "Synastry":
|
|
@@ -845,7 +844,7 @@ class KerykeionChartSVG:
|
|
|
845
844
|
y1 = sliceToY(0, r - dropin, offset) + dropin
|
|
846
845
|
x2 = sliceToX(0, (r - (dropin - 3)), offset) + (dropin - 3)
|
|
847
846
|
y2 = sliceToY(0, (r - (dropin - 3)), offset) + (dropin - 3)
|
|
848
|
-
output += f'<line x1="{x1}" y1="{y1}" x2="{x2}" y2="{y2}" style="stroke: {self.
|
|
847
|
+
output += f'<line x1="{x1}" y1="{y1}" x2="{x2}" y2="{y2}" style="stroke: {self.available_planets_setting[i]["color"]}; stroke-width: 2px; stroke-opacity:.6;"/>'
|
|
849
848
|
|
|
850
849
|
return output
|
|
851
850
|
|
|
@@ -872,14 +871,14 @@ class KerykeionChartSVG:
|
|
|
872
871
|
tr[i] = {}
|
|
873
872
|
conj[i] = {}
|
|
874
873
|
# skip some points
|
|
875
|
-
n = self.
|
|
874
|
+
n = self.available_planets_setting[i]["name"]
|
|
876
875
|
if n == "earth" or n == "True_Node" or n == "osc. apogee" or n == "intp. apogee" or n == "intp. perigee":
|
|
877
876
|
continue
|
|
878
877
|
if n == "Dsc" or n == "Ic":
|
|
879
878
|
continue
|
|
880
879
|
for j in range(len(self.available_planets_setting)):
|
|
881
880
|
# skip some points
|
|
882
|
-
n = self.
|
|
881
|
+
n = self.available_planets_setting[j]["name"]
|
|
883
882
|
if n == "earth" or n == "True_Node" or n == "osc. apogee" or n == "intp. apogee" or n == "intp. perigee":
|
|
884
883
|
continue
|
|
885
884
|
if n == "Dsc" or n == "Ic":
|
|
@@ -934,10 +933,10 @@ class KerykeionChartSVG:
|
|
|
934
933
|
if k in sq[a] and l in sq[a]:
|
|
935
934
|
logger.debug(f"Got tsquare {a} {k} {l}")
|
|
936
935
|
if k > l:
|
|
937
|
-
tsquare[f"{a},{l},{k}"] = f"{self.
|
|
936
|
+
tsquare[f"{a},{l},{k}"] = f"{self.available_planets_setting[a]['label']} => {self.available_planets_setting[l]['label']}, {self.available_planets_setting[k]['label']}"
|
|
938
937
|
|
|
939
938
|
else:
|
|
940
|
-
tsquare[f"{a},{k},{l}"] = f"{self.
|
|
939
|
+
tsquare[f"{a},{k},{l}"] = f"{self.available_planets_setting[a]['label']} => {self.available_planets_setting[k]['label']}, {self.available_planets_setting[l]['label']}"
|
|
941
940
|
|
|
942
941
|
stellium = {}
|
|
943
942
|
# check for 4 continuous conjunctions
|
|
@@ -966,10 +965,10 @@ class KerykeionChartSVG:
|
|
|
966
965
|
l = [k, n, p, r]
|
|
967
966
|
l.sort()
|
|
968
967
|
stellium["%s %s %s %s" % (l[0], l[1], l[2], l[3])] = "%s %s %s %s" % (
|
|
969
|
-
self.
|
|
970
|
-
self.
|
|
971
|
-
self.
|
|
972
|
-
self.
|
|
968
|
+
self.available_planets_setting[l[0]]["label"],
|
|
969
|
+
self.available_planets_setting[l[1]]["label"],
|
|
970
|
+
self.available_planets_setting[l[2]]["label"],
|
|
971
|
+
self.available_planets_setting[l[3]]["label"],
|
|
973
972
|
)
|
|
974
973
|
# print yots
|
|
975
974
|
out = '<g transform="translate(-30,380)">'
|
|
@@ -980,15 +979,15 @@ class KerykeionChartSVG:
|
|
|
980
979
|
|
|
981
980
|
# first planet symbol
|
|
982
981
|
out += f'<g transform="translate(20,{y})">'
|
|
983
|
-
out += f'<use transform="scale(0.4)" x="0" y="-20" xlink:href="#{self.
|
|
982
|
+
out += f'<use transform="scale(0.4)" x="0" y="-20" xlink:href="#{self.available_planets_setting[yot[k][0]]["name"]}" /></g>'
|
|
984
983
|
|
|
985
984
|
# second planet symbol
|
|
986
985
|
out += f'<g transform="translate(30,{y})">'
|
|
987
|
-
out += f'<use transform="scale(0.4)" x="0" y="-20" xlink:href="#{self.
|
|
986
|
+
out += f'<use transform="scale(0.4)" x="0" y="-20" xlink:href="#{self.available_planets_setting[yot[k][1]]["name"]}" /></g>'
|
|
988
987
|
|
|
989
988
|
# third planet symbol
|
|
990
989
|
out += f'<g transform="translate(40,{y})">'
|
|
991
|
-
out += f'<use transform="scale(0.4)" x="0" y="-20" xlink:href="#{self.
|
|
990
|
+
out += f'<use transform="scale(0.4)" x="0" y="-20" xlink:href="#{self.available_planets_setting[yot[k][2]]["name"]}" /></g>'
|
|
992
991
|
|
|
993
992
|
y = y + 14
|
|
994
993
|
# finalize
|
|
@@ -1016,14 +1015,14 @@ class KerykeionChartSVG:
|
|
|
1016
1015
|
xindent = 380
|
|
1017
1016
|
yindent = 468
|
|
1018
1017
|
box = 14
|
|
1019
|
-
revr = list(range(len(self.
|
|
1018
|
+
revr = list(range(len(self.available_planets_setting)))
|
|
1020
1019
|
revr.reverse()
|
|
1021
1020
|
counter = 0
|
|
1022
1021
|
for a in revr:
|
|
1023
1022
|
counter += 1
|
|
1024
|
-
if self.
|
|
1023
|
+
if self.available_planets_setting[a]["is_active"] == 1:
|
|
1025
1024
|
out += f'<rect x="{xindent}" y="{yindent}" width="{box}" height="{box}" style="{style}"/>'
|
|
1026
|
-
out += f'<use transform="scale(0.4)" x="{(xindent+2)*2.5}" y="{(yindent+1)*2.5}" xlink:href="#{self.
|
|
1025
|
+
out += f'<use transform="scale(0.4)" x="{(xindent+2)*2.5}" y="{(yindent+1)*2.5}" xlink:href="#{self.available_planets_setting[a]["name"]}" />'
|
|
1027
1026
|
|
|
1028
1027
|
xindent = xindent + box
|
|
1029
1028
|
yindent = yindent - box
|
|
@@ -1032,7 +1031,7 @@ class KerykeionChartSVG:
|
|
|
1032
1031
|
xorb = xindent
|
|
1033
1032
|
yorb = yindent + box
|
|
1034
1033
|
for b in revr2:
|
|
1035
|
-
if self.
|
|
1034
|
+
if self.available_planets_setting[b]["is_active"] == 1:
|
|
1036
1035
|
out += f'<rect x="{xorb}" y="{yorb}" width="{box}" height="{box}" style="{style}"/>'
|
|
1037
1036
|
|
|
1038
1037
|
xorb = xorb + box
|
|
@@ -1092,17 +1091,15 @@ class KerykeionChartSVG:
|
|
|
1092
1091
|
line = 0
|
|
1093
1092
|
|
|
1094
1093
|
out += f'<g transform="translate({nl},{line})">'
|
|
1094
|
+
|
|
1095
1095
|
# first planet symbol
|
|
1096
|
-
|
|
1097
|
-
# TODO: (next((item for item in self.planets_settings if item["id"] == self.aspects_list[i]["p1"]))) It preventes the use ot numeric ID, but it is not working.
|
|
1098
1096
|
out += f'<use transform="scale(0.4)" x="0" y="3" xlink:href="#{self.planets_settings[self.aspects_list[i]["p1"]]["name"]}" />'
|
|
1099
1097
|
|
|
1100
1098
|
# aspect symbol
|
|
1101
1099
|
out += f'<use x="15" y="0" xlink:href="#orb{self.aspects_settings[self.aspects_list[i]["aid"]]["degree"]}" />'
|
|
1100
|
+
|
|
1102
1101
|
# second planet symbol
|
|
1103
1102
|
out += '<g transform="translate(30,0)">'
|
|
1104
|
-
|
|
1105
|
-
# TODO: (next((item for item in self.planets_settings if item["id"] == self.aspects_list[i]["p3"])))
|
|
1106
1103
|
out += '<use transform="scale(0.4)" x="0" y="3" xlink:href="#%s" />' % (self.planets_settings[self.aspects_list[i]["p2"]]["name"])
|
|
1107
1104
|
|
|
1108
1105
|
out += "</g>"
|
|
@@ -1149,30 +1146,29 @@ class KerykeionChartSVG:
|
|
|
1149
1146
|
li = 10
|
|
1150
1147
|
offset = -120
|
|
1151
1148
|
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
out += f'<g transform="translate({offset},{li})">'
|
|
1149
|
+
# start of line
|
|
1150
|
+
out += f'<g transform="translate({offset},{li})">'
|
|
1155
1151
|
|
|
1156
|
-
|
|
1157
|
-
|
|
1152
|
+
# planet text
|
|
1153
|
+
out += f'<text text-anchor="end" style="fill:{self.chart_colors_settings["paper_0"]}; font-size: 10px;">{self.language_settings["celestial_points"][self.available_planets_setting[i]["label"]]}</text>'
|
|
1158
1154
|
|
|
1159
|
-
|
|
1160
|
-
|
|
1155
|
+
# planet symbol
|
|
1156
|
+
out += f'<g transform="translate(5,-8)"><use transform="scale(0.4)" xlink:href="#{self.available_planets_setting[i]["name"]}" /></g>'
|
|
1161
1157
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1158
|
+
# planet degree
|
|
1159
|
+
out += f'<text text-anchor="start" x="19" style="fill:{self.chart_colors_settings["paper_0"]}; font-size: 10px;">{self._dec2deg(self.points_deg[i])}</text>'
|
|
1164
1160
|
|
|
1165
|
-
|
|
1166
|
-
|
|
1161
|
+
# zodiac
|
|
1162
|
+
out += f'<g transform="translate(60,-8)"><use transform="scale(0.3)" xlink:href="#{self.zodiac[self.points_sign[i]]["name"]}" /></g>'
|
|
1167
1163
|
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1164
|
+
# planet retrograde
|
|
1165
|
+
if self.points_retrograde[i]:
|
|
1166
|
+
out += '<g transform="translate(74,-6)"><use transform="scale(.5)" xlink:href="#retrograde" /></g>'
|
|
1171
1167
|
|
|
1172
|
-
|
|
1173
|
-
|
|
1168
|
+
# end of line
|
|
1169
|
+
out += end_of_line
|
|
1174
1170
|
|
|
1175
|
-
|
|
1171
|
+
li = li + offset_between_lines
|
|
1176
1172
|
|
|
1177
1173
|
if self.chart_type == "Transit" or self.chart_type == "Synastry":
|
|
1178
1174
|
if self.chart_type == "Transit":
|
|
@@ -1192,14 +1188,14 @@ class KerykeionChartSVG:
|
|
|
1192
1188
|
t_li = 10
|
|
1193
1189
|
t_offset = -120
|
|
1194
1190
|
|
|
1195
|
-
if self.
|
|
1191
|
+
if self.available_planets_setting[i]["is_active"] == 1:
|
|
1196
1192
|
# start of line
|
|
1197
1193
|
out += f'<g transform="translate({t_offset},{t_li})">'
|
|
1198
1194
|
|
|
1199
1195
|
# planet text
|
|
1200
|
-
out += f'<text text-anchor="end" style="fill:{self.chart_colors_settings["paper_0"]}; font-size: 10px;">{self.language_settings["celestial_points"][self.
|
|
1196
|
+
out += f'<text text-anchor="end" style="fill:{self.chart_colors_settings["paper_0"]}; font-size: 10px;">{self.language_settings["celestial_points"][self.available_planets_setting[i]["label"]]}</text>'
|
|
1201
1197
|
# planet symbol
|
|
1202
|
-
out += f'<g transform="translate(5,-8)"><use transform="scale(0.4)" xlink:href="#{self.
|
|
1198
|
+
out += f'<g transform="translate(5,-8)"><use transform="scale(0.4)" xlink:href="#{self.available_planets_setting[i]["name"]}" /></g>'
|
|
1203
1199
|
# planet degree
|
|
1204
1200
|
out += f'<text text-anchor="start" x="19" style="fill:{self.chart_colors_settings["paper_0"]}; font-size: 10px;">{self._dec2deg(self.t_points_deg[i])}</text>'
|
|
1205
1201
|
# zodiac
|
|
@@ -1483,7 +1479,7 @@ class KerykeionChartSVG:
|
|
|
1483
1479
|
self._createTemplateDictionary()
|
|
1484
1480
|
return template.replace('"', "'")
|
|
1485
1481
|
|
|
1486
|
-
def makeSVG(self):
|
|
1482
|
+
def makeSVG(self) -> None:
|
|
1487
1483
|
"""Prints out the SVG file in the specifide folder"""
|
|
1488
1484
|
|
|
1489
1485
|
if not (self.template):
|
|
@@ -1494,7 +1490,7 @@ class KerykeionChartSVG:
|
|
|
1494
1490
|
with open(self.chartname, "w", encoding="utf-8", errors="ignore") as output_file:
|
|
1495
1491
|
output_file.write(self.template)
|
|
1496
1492
|
|
|
1497
|
-
|
|
1493
|
+
logger.info(f"SVG Generated Correctly in: {self.chartname}")
|
|
1498
1494
|
|
|
1499
1495
|
|
|
1500
1496
|
if __name__ == "__main__":
|
kerykeion/utilities.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
from kerykeion.kr_types import KerykeionPointModel, KerykeionException
|
|
2
|
-
from pathlib import Path
|
|
1
|
+
from kerykeion.kr_types import KerykeionPointModel, KerykeionException, KerykeionSettingsModel, AstrologicalSubjectModel
|
|
3
2
|
from typing import Union, Literal
|
|
4
3
|
from logging import getLogger
|
|
5
4
|
|
|
@@ -206,3 +205,19 @@ def calculate_position(
|
|
|
206
205
|
|
|
207
206
|
return KerykeionPointModel(**dictionary)
|
|
208
207
|
|
|
208
|
+
def get_active_points_list(subject: AstrologicalSubjectModel, settings: Union[KerykeionSettingsModel, dict]) -> list:
|
|
209
|
+
"""
|
|
210
|
+
Given an astrological subject and the settings, return a list of the active points.
|
|
211
|
+
Args:
|
|
212
|
+
subject (AstrologicalSubject): The astrological subject to get the active points from.
|
|
213
|
+
settings (Union[KerykeionSettingsModel, dict]): Settings model o dictionary.
|
|
214
|
+
|
|
215
|
+
Returns:
|
|
216
|
+
list: List of the active points.
|
|
217
|
+
"""
|
|
218
|
+
point_list = []
|
|
219
|
+
for planet in settings["celestial_points"]:
|
|
220
|
+
if planet["is_active"] == True:
|
|
221
|
+
point_list.append(subject[planet["name"].lower()])
|
|
222
|
+
|
|
223
|
+
return point_list
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
|
|
2
2
|
kerykeion/__init__.py,sha256=UpftP5JxYSfeRAAmXbRas1XGw4V6dNA-FllcFbKlCbo,3874
|
|
3
|
-
kerykeion/aspects/__init__.py,sha256=
|
|
4
|
-
kerykeion/aspects/aspects_utils.py,sha256=
|
|
5
|
-
kerykeion/aspects/natal_aspects.py,sha256=
|
|
6
|
-
kerykeion/aspects/synastry_aspects.py,sha256=
|
|
3
|
+
kerykeion/aspects/__init__.py,sha256=8uOTYtcMwyDBbDjIoz8wvWtdcgdU-86yQeM3EVLwnIA,293
|
|
4
|
+
kerykeion/aspects/aspects_utils.py,sha256=0jNSXp_sQ3zPpL4uM0iFRixA9q-4m0KZdQ6BhuIyegE,5077
|
|
5
|
+
kerykeion/aspects/natal_aspects.py,sha256=OcdmvrwuvP26eruGHASKHxj2n8L7VwxvMPnrr55Zffg,5020
|
|
6
|
+
kerykeion/aspects/synastry_aspects.py,sha256=MU_UYrFZsSya6TapISi9y-9xxDFfZ3yTj1xsfJs2MJI,3909
|
|
7
7
|
kerykeion/astrological_subject.py,sha256=whHWS0MUQorKlAVNbvfiaxFrzMeVAASMLESDFfm454I,23853
|
|
8
8
|
kerykeion/charts/__init__.py,sha256=3WzR2n9dr6MDzjTbEQOYpXSFlhfMfga5YWNsPawdbRw,127
|
|
9
9
|
kerykeion/charts/charts_utils.py,sha256=qQMXu5XZCCjvyqL62fzh4JnKLzd_G6u9pcMk6f1DpIc,3197
|
|
10
|
-
kerykeion/charts/kerykeion_chart_svg.py,sha256=
|
|
10
|
+
kerykeion/charts/kerykeion_chart_svg.py,sha256=EMkJBjG1p7pMwlqAapPeg6VMkxjRufX65pu7NPLZw8E,65399
|
|
11
11
|
kerykeion/charts/templates/chart.xml,sha256=ZrkqJV3Du8vG1w8kVkM1wI-IiZNVDLDuS6dRtPz7wVo,69874
|
|
12
12
|
kerykeion/fetch_geonames.py,sha256=6tgjrwBMyjbA6YNZ4rcESyYSn0FDyi1xL2gkFuy9o6k,4774
|
|
13
13
|
kerykeion/kr_types/__init__.py,sha256=Zua2Kz_g6jphfUmtzSk3oDxFfHOrqeGjSoomVAtaqIg,199
|
|
@@ -23,9 +23,9 @@ kerykeion/settings/kerykeion_settings.py,sha256=_EO6izQRXaKvTBx0B_YhuhQcCHV7jpvb
|
|
|
23
23
|
kerykeion/settings/kr.config.json,sha256=1Yhv9RGHom5U9e-JZZRWVfT2Ubllz2WrckdwadDWfyg,12282
|
|
24
24
|
kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
|
|
25
25
|
kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
|
|
26
|
-
kerykeion/utilities.py,sha256=
|
|
27
|
-
kerykeion-4.2.
|
|
28
|
-
kerykeion-4.2.
|
|
29
|
-
kerykeion-4.2.
|
|
30
|
-
kerykeion-4.2.
|
|
31
|
-
kerykeion-4.2.
|
|
26
|
+
kerykeion/utilities.py,sha256=JDTBKKoxPxC1NmDOew_5GLZAoEm46TX7YQyJw728VkQ,6392
|
|
27
|
+
kerykeion-4.2.2.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
|
|
28
|
+
kerykeion-4.2.2.dist-info/METADATA,sha256=NbyCS9jwyPzPa3UF3tUctPsHU8Kq-cJP1GyteKYMo2M,9409
|
|
29
|
+
kerykeion-4.2.2.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
30
|
+
kerykeion-4.2.2.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
|
|
31
|
+
kerykeion-4.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|