kerykeion 5.0.0a1__py3-none-any.whl → 5.0.0a2__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/__init__.py +1 -2
- kerykeion/charts/charts_utils.py +119 -87
- kerykeion/charts/kerykeion_chart_svg.py +61 -25
- kerykeion/charts/templates/chart.xml +13 -6
- kerykeion/kr_types/chart_types.py +4 -2
- kerykeion/{relationship_score/relationship_score_factory.py → relationship_score_factory.py} +3 -3
- {kerykeion-5.0.0a1.dist-info → kerykeion-5.0.0a2.dist-info}/METADATA +117 -105
- {kerykeion-5.0.0a1.dist-info → kerykeion-5.0.0a2.dist-info}/RECORD +11 -13
- kerykeion/relationship_score/__init__.py +0 -2
- kerykeion/relationship_score/relationship_score.py +0 -175
- {kerykeion-5.0.0a1.dist-info → kerykeion-5.0.0a2.dist-info}/LICENSE +0 -0
- {kerykeion-5.0.0a1.dist-info → kerykeion-5.0.0a2.dist-info}/WHEEL +0 -0
- {kerykeion-5.0.0a1.dist-info → kerykeion-5.0.0a2.dist-info}/entry_points.txt +0 -0
kerykeion/__init__.py
CHANGED
|
@@ -16,8 +16,7 @@ from .house_comparison.house_comparison_factory import HouseComparisonFactory
|
|
|
16
16
|
from .house_comparison.house_comparison_models import HouseComparisonModel
|
|
17
17
|
from .kr_types import *
|
|
18
18
|
from .planetary_return_factory import PlanetaryReturnFactory, PlanetReturnModel
|
|
19
|
-
from .
|
|
20
|
-
from .relationship_score.relationship_score_factory import RelationshipScoreFactory
|
|
19
|
+
from .relationship_score_factory import RelationshipScoreFactory
|
|
21
20
|
from .report import Report
|
|
22
21
|
from .settings import KerykeionSettingsModel, get_settings
|
|
23
22
|
from .transits_time_range import TransitsTimeRangeFactory
|
kerykeion/charts/charts_utils.py
CHANGED
|
@@ -5,10 +5,9 @@ from kerykeion.kr_types.kr_literals import AstrologicalPoint
|
|
|
5
5
|
from typing import Union, Literal, TYPE_CHECKING
|
|
6
6
|
from kerykeion.kr_types.kr_models import AspectModel, KerykeionPointModel, CompositeSubjectModel, PlanetReturnModel, AstrologicalSubjectModel
|
|
7
7
|
from kerykeion.kr_types.settings_models import KerykeionLanguageCelestialPointModel, KerykeionSettingsCelestialPointModel
|
|
8
|
+
from kerykeion.house_comparison import HouseComparisonModel
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
if TYPE_CHECKING:
|
|
11
|
-
from kerykeion import HouseComparisonModel
|
|
12
11
|
|
|
13
12
|
def get_decoded_kerykeion_celestial_point_name(input_planet_name: str, celestial_point_language: KerykeionLanguageCelestialPointModel) -> str:
|
|
14
13
|
"""
|
|
@@ -806,31 +805,27 @@ def calculate_moon_phase_chart_params(
|
|
|
806
805
|
}
|
|
807
806
|
|
|
808
807
|
|
|
809
|
-
def
|
|
808
|
+
def draw_main_house_grid(
|
|
810
809
|
main_subject_houses_list: list[KerykeionPointModel],
|
|
811
|
-
chart_type: ChartType,
|
|
812
|
-
secondary_subject_houses_list: Union[list[KerykeionPointModel], None] = None,
|
|
813
|
-
text_color: str = "#000000",
|
|
814
810
|
house_cusp_generale_name_label: str = "Cusp",
|
|
811
|
+
text_color: str = "#000000",
|
|
812
|
+
x_position: int = 720,
|
|
813
|
+
y_position: int = 30,
|
|
815
814
|
) -> str:
|
|
816
815
|
"""
|
|
817
|
-
Generate SVG code for a grid of astrological houses.
|
|
816
|
+
Generate SVG code for a grid of astrological houses for the main subject.
|
|
818
817
|
|
|
819
818
|
Parameters:
|
|
820
|
-
-
|
|
821
|
-
-
|
|
822
|
-
-
|
|
823
|
-
-
|
|
824
|
-
-
|
|
819
|
+
- main_subject_houses_list (list[KerykeionPointModel]): List of houses for the main subject.
|
|
820
|
+
- house_cusp_generale_name_label (str): Label for the house cusp. Defaults to "Cusp".
|
|
821
|
+
- text_color (str): Color of the text. Defaults to "#000000".
|
|
822
|
+
- x_position (int): X position for the grid. Defaults to 720.
|
|
823
|
+
- y_position (int): Y position for the grid. Defaults to 30.
|
|
825
824
|
|
|
826
825
|
Returns:
|
|
827
826
|
- str: The SVG code for the grid of houses.
|
|
828
827
|
"""
|
|
829
|
-
|
|
830
|
-
if chart_type in ["Synastry", "Transit", "Return"] and secondary_subject_houses_list is None:
|
|
831
|
-
raise KerykeionException("secondary_houses is None")
|
|
832
|
-
|
|
833
|
-
svg_output = '<g transform="translate(700,0)">'
|
|
828
|
+
svg_output = f'<g transform="translate({x_position},{y_position})">'
|
|
834
829
|
|
|
835
830
|
line_increment = 10
|
|
836
831
|
for i, house in enumerate(main_subject_houses_list):
|
|
@@ -845,40 +840,57 @@ def draw_house_grid(
|
|
|
845
840
|
line_increment += 14
|
|
846
841
|
|
|
847
842
|
svg_output += "</g>"
|
|
843
|
+
return svg_output
|
|
848
844
|
|
|
849
|
-
if chart_type == "Synastry" or chart_type == "Return":
|
|
850
|
-
svg_output += '<!-- Synastry Houses -->'
|
|
851
|
-
svg_output += '<g transform="translate(950, 0)">'
|
|
852
|
-
line_increment = 10
|
|
853
|
-
|
|
854
|
-
for i, house in enumerate(secondary_subject_houses_list): # type: ignore
|
|
855
|
-
cusp_number = f"  {i + 1}" if i < 9 else str(i + 1)
|
|
856
|
-
svg_output += (
|
|
857
|
-
f'<g transform="translate(0,{line_increment})">'
|
|
858
|
-
f'<text text-anchor="end" x="40" style="fill:{text_color}; font-size: 10px;">{house_cusp_generale_name_label} {cusp_number}:</text>'
|
|
859
|
-
f'<g transform="translate(40,-8)"><use transform="scale(0.3)" xlink:href="#{house["sign"]}" /></g>'
|
|
860
|
-
f'<text x="53" style="fill:{text_color}; font-size: 10px;"> {convert_decimal_to_degree_string(house["position"])}</text>'
|
|
861
|
-
f'</g>'
|
|
862
|
-
)
|
|
863
|
-
line_increment += 14
|
|
864
845
|
|
|
865
|
-
|
|
846
|
+
def draw_secondary_house_grid(
|
|
847
|
+
secondary_subject_houses_list: list[KerykeionPointModel],
|
|
848
|
+
house_cusp_generale_name_label: str = "Cusp",
|
|
849
|
+
text_color: str = "#000000",
|
|
850
|
+
x_position: int = 970,
|
|
851
|
+
y_position: int = 30,
|
|
852
|
+
) -> str:
|
|
853
|
+
"""
|
|
854
|
+
Generate SVG code for a grid of astrological houses for the secondary subject.
|
|
855
|
+
|
|
856
|
+
Parameters:
|
|
857
|
+
- secondary_subject_houses_list (list[KerykeionPointModel]): List of houses for the secondary subject.
|
|
858
|
+
- house_cusp_generale_name_label (str): Label for the house cusp. Defaults to "Cusp".
|
|
859
|
+
- text_color (str): Color of the text. Defaults to "#000000".
|
|
860
|
+
- x_position (int): X position for the grid. Defaults to 970.
|
|
861
|
+
- y_position (int): Y position for the grid. Defaults to 30.
|
|
862
|
+
|
|
863
|
+
Returns:
|
|
864
|
+
- str: The SVG code for the grid of houses.
|
|
865
|
+
"""
|
|
866
|
+
svg_output = f'<g transform="translate({x_position},{y_position})">'
|
|
867
|
+
|
|
868
|
+
line_increment = 10
|
|
869
|
+
for i, house in enumerate(secondary_subject_houses_list):
|
|
870
|
+
cusp_number = f"  {i + 1}" if i < 9 else str(i + 1)
|
|
871
|
+
svg_output += (
|
|
872
|
+
f'<g transform="translate(0,{line_increment})">'
|
|
873
|
+
f'<text text-anchor="end" x="40" style="fill:{text_color}; font-size: 10px;">{house_cusp_generale_name_label} {cusp_number}:</text>'
|
|
874
|
+
f'<g transform="translate(40,-8)"><use transform="scale(0.3)" xlink:href="#{house["sign"]}" /></g>'
|
|
875
|
+
f'<text x="53" style="fill:{text_color}; font-size: 10px;"> {convert_decimal_to_degree_string(house["position"])}</text>'
|
|
876
|
+
f'</g>'
|
|
877
|
+
)
|
|
878
|
+
line_increment += 14
|
|
866
879
|
|
|
880
|
+
svg_output += "</g>"
|
|
867
881
|
return svg_output
|
|
868
882
|
|
|
869
883
|
|
|
870
|
-
def
|
|
884
|
+
def draw_main_planet_grid(
|
|
871
885
|
planets_and_houses_grid_title: str,
|
|
872
886
|
subject_name: str,
|
|
873
887
|
available_kerykeion_celestial_points: list[KerykeionPointModel],
|
|
874
888
|
chart_type: ChartType,
|
|
875
889
|
celestial_point_language: KerykeionLanguageCelestialPointModel,
|
|
876
|
-
second_subject_name: Union[str, None] = None,
|
|
877
|
-
second_subject_available_kerykeion_celestial_points: Union[list[KerykeionPointModel], None] = None,
|
|
878
890
|
text_color: str = "#000000",
|
|
879
891
|
) -> str:
|
|
880
892
|
"""
|
|
881
|
-
Draws the planet grid for the
|
|
893
|
+
Draws the planet grid for the main subject.
|
|
882
894
|
|
|
883
895
|
Args:
|
|
884
896
|
planets_and_houses_grid_title (str): Title of the grid.
|
|
@@ -886,37 +898,36 @@ def draw_planet_grid(
|
|
|
886
898
|
available_kerykeion_celestial_points (list[KerykeionPointModel]): List of celestial points for the subject.
|
|
887
899
|
chart_type (ChartType): Type of the chart.
|
|
888
900
|
celestial_point_language (KerykeionLanguageCelestialPointModel): Language model for celestial points.
|
|
889
|
-
second_subject_name (str, optional): Name of the second subject. Defaults to None.
|
|
890
|
-
second_subject_available_kerykeion_celestial_points (list[KerykeionPointModel], optional): List of celestial points for the second subject. Defaults to None.
|
|
891
901
|
text_color (str, optional): Color of the text. Defaults to "#000000".
|
|
892
902
|
|
|
893
903
|
Returns:
|
|
894
|
-
str: The SVG output for the planet grid.
|
|
904
|
+
str: The SVG output for the main planet grid.
|
|
895
905
|
"""
|
|
896
906
|
line_height = 10
|
|
897
907
|
offset = 0
|
|
898
908
|
offset_between_lines = 14
|
|
909
|
+
svg_output = ""
|
|
899
910
|
|
|
900
911
|
if chart_type == "Synastry":
|
|
901
|
-
svg_output
|
|
902
|
-
f'<g transform="translate(
|
|
912
|
+
svg_output += (
|
|
913
|
+
f'<g transform="translate(620, 15)">' # Added the 620,30 offset (adjusted for -15)
|
|
903
914
|
f'<text style="fill:{text_color}; font-size: 14px;">{planets_and_houses_grid_title} {subject_name}</text>'
|
|
904
915
|
f'</g>'
|
|
905
916
|
)
|
|
906
917
|
elif chart_type == "Transit":
|
|
907
|
-
svg_output
|
|
908
|
-
f'<g transform="translate(
|
|
918
|
+
svg_output += (
|
|
919
|
+
f'<g transform="translate(620, 15)">' # Added the 620,30 offset (adjusted for -15)
|
|
909
920
|
f'<text style="fill:{text_color}; font-size: 14px;">{planets_and_houses_grid_title} {subject_name}</text>'
|
|
910
921
|
f'</g>'
|
|
911
922
|
)
|
|
912
923
|
elif chart_type == "Return":
|
|
913
|
-
svg_output
|
|
914
|
-
f'<g transform="translate(
|
|
924
|
+
svg_output += (
|
|
925
|
+
f'<g transform="translate(620, 15)">' # Added the 620,30 offset (adjusted for -15)
|
|
915
926
|
f'<text style="fill:{text_color}; font-size: 14px;">{planets_and_houses_grid_title} {subject_name}</text>'
|
|
916
927
|
f'</g>'
|
|
917
928
|
)
|
|
918
929
|
else:
|
|
919
|
-
svg_output
|
|
930
|
+
svg_output += ""
|
|
920
931
|
|
|
921
932
|
end_of_line = "</g>"
|
|
922
933
|
|
|
@@ -927,7 +938,7 @@ def draw_planet_grid(
|
|
|
927
938
|
|
|
928
939
|
decoded_name = get_decoded_kerykeion_celestial_point_name(planet["name"], celestial_point_language)
|
|
929
940
|
svg_output += (
|
|
930
|
-
f'<g transform="translate({offset},{line_height})">'
|
|
941
|
+
f'<g transform="translate({620 + offset},{30 + line_height})">' # Added the 620,30 offset
|
|
931
942
|
f'<text text-anchor="end" style="fill:{text_color}; font-size: 10px;">{decoded_name}</text>'
|
|
932
943
|
f'<g transform="translate(5,-8)"><use transform="scale(0.4)" xlink:href="#{planet["name"]}" /></g>'
|
|
933
944
|
f'<text text-anchor="start" x="19" style="fill:{text_color}; font-size: 10px;">{convert_decimal_to_degree_string(planet["position"])}</text>'
|
|
@@ -940,50 +951,70 @@ def draw_planet_grid(
|
|
|
940
951
|
svg_output += end_of_line
|
|
941
952
|
line_height += offset_between_lines
|
|
942
953
|
|
|
943
|
-
|
|
944
|
-
if second_subject_available_kerykeion_celestial_points is None:
|
|
945
|
-
raise KerykeionException("second_subject_available_kerykeion_celestial_points is None")
|
|
954
|
+
return svg_output
|
|
946
955
|
|
|
947
|
-
if chart_type == "Transit":
|
|
948
|
-
svg_output += (
|
|
949
|
-
f'<g transform="translate(200, -15)">'
|
|
950
|
-
f'<text style="fill:{text_color}; font-size: 14px;">{second_subject_name}</text>'
|
|
951
|
-
)
|
|
952
|
-
elif chart_type == "Return":
|
|
953
|
-
svg_output += (
|
|
954
|
-
f'<g transform="translate(250, -15)">'
|
|
955
|
-
f'<text style="fill:{text_color}; font-size: 14px;">{planets_and_houses_grid_title} {second_subject_name}</text>'
|
|
956
|
-
)
|
|
957
|
-
else:
|
|
958
|
-
svg_output += (
|
|
959
|
-
f'<g transform="translate(250, -15)">'
|
|
960
|
-
f'<text style="fill:{text_color}; font-size: 14px;">{planets_and_houses_grid_title} {second_subject_name}</text>'
|
|
961
|
-
)
|
|
962
956
|
|
|
963
|
-
|
|
957
|
+
def draw_secondary_planet_grid(
|
|
958
|
+
planets_and_houses_grid_title: str,
|
|
959
|
+
second_subject_name: str,
|
|
960
|
+
second_subject_available_kerykeion_celestial_points: list[KerykeionPointModel],
|
|
961
|
+
chart_type: ChartType,
|
|
962
|
+
celestial_point_language: KerykeionLanguageCelestialPointModel,
|
|
963
|
+
text_color: str = "#000000",
|
|
964
|
+
) -> str:
|
|
965
|
+
"""
|
|
966
|
+
Draws the planet grid for the secondary subject in Transit, Synastry, or Return charts.
|
|
964
967
|
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
for
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
f'<text text-anchor="start" x="19" style="fill:{text_color}; font-size: 10px;">{convert_decimal_to_degree_string(t_planet["position"])}</text>'
|
|
979
|
-
f'<g transform="translate(60,-8)"><use transform="scale(0.3)" xlink:href="#{t_planet["sign"]}" /></g>'
|
|
980
|
-
)
|
|
968
|
+
Args:
|
|
969
|
+
planets_and_houses_grid_title (str): Title of the grid.
|
|
970
|
+
second_subject_name (str): Name of the second subject.
|
|
971
|
+
second_subject_available_kerykeion_celestial_points (list[KerykeionPointModel]): List of celestial points for the second subject.
|
|
972
|
+
chart_type (ChartType): Type of the chart.
|
|
973
|
+
celestial_point_language (KerykeionLanguageCelestialPointModel): Language model for celestial points.
|
|
974
|
+
text_color (str, optional): Color of the text. Defaults to "#000000".
|
|
975
|
+
|
|
976
|
+
Returns:
|
|
977
|
+
str: The SVG output for the secondary planet grid.
|
|
978
|
+
"""
|
|
979
|
+
svg_output = ""
|
|
980
|
+
end_of_line = "</g>"
|
|
981
981
|
|
|
982
|
-
|
|
983
|
-
|
|
982
|
+
if chart_type == "Transit":
|
|
983
|
+
svg_output += (
|
|
984
|
+
f'<g transform="translate(820, 15)">' # 620+200, 30-15
|
|
985
|
+
f'<text style="fill:{text_color}; font-size: 14px;">{second_subject_name}</text>'
|
|
986
|
+
)
|
|
987
|
+
elif chart_type == "Return":
|
|
988
|
+
svg_output += (
|
|
989
|
+
f'<g transform="translate(870, 15)">' # 620+250, 30-15
|
|
990
|
+
f'<text style="fill:{text_color}; font-size: 14px;">{planets_and_houses_grid_title} {second_subject_name}</text>'
|
|
991
|
+
)
|
|
992
|
+
else:
|
|
993
|
+
svg_output += (
|
|
994
|
+
f'<g transform="translate(870, 15)">' # 620+250, 30-15
|
|
995
|
+
f'<text style="fill:{text_color}; font-size: 14px;">{planets_and_houses_grid_title} {second_subject_name}</text>'
|
|
996
|
+
)
|
|
984
997
|
|
|
985
|
-
|
|
986
|
-
|
|
998
|
+
svg_output += end_of_line
|
|
999
|
+
|
|
1000
|
+
line_height = 10
|
|
1001
|
+
offset = 250
|
|
1002
|
+
|
|
1003
|
+
for i, t_planet in enumerate(second_subject_available_kerykeion_celestial_points):
|
|
1004
|
+
second_decoded_name = get_decoded_kerykeion_celestial_point_name(t_planet["name"], celestial_point_language)
|
|
1005
|
+
svg_output += (
|
|
1006
|
+
f'<g transform="translate({620 + offset},{30 + line_height})">' # Added the 620,30 offset
|
|
1007
|
+
f'<text text-anchor="end" style="fill:{text_color}; font-size: 10px;">{second_decoded_name}</text>'
|
|
1008
|
+
f'<g transform="translate(5,-8)"><use transform="scale(0.4)" xlink:href="#{t_planet["name"]}" /></g>'
|
|
1009
|
+
f'<text text-anchor="start" x="19" style="fill:{text_color}; font-size: 10px;">{convert_decimal_to_degree_string(t_planet["position"])}</text>'
|
|
1010
|
+
f'<g transform="translate(60,-8)"><use transform="scale(0.3)" xlink:href="#{t_planet["sign"]}" /></g>'
|
|
1011
|
+
)
|
|
1012
|
+
|
|
1013
|
+
if t_planet["retrograde"]:
|
|
1014
|
+
svg_output += '<g transform="translate(74,-6)"><use transform="scale(.5)" xlink:href="#retrograde" /></g>'
|
|
1015
|
+
|
|
1016
|
+
svg_output += end_of_line
|
|
1017
|
+
line_height += 14 # Using fixed offset_between_lines value
|
|
987
1018
|
|
|
988
1019
|
return svg_output
|
|
989
1020
|
|
|
@@ -1538,3 +1569,4 @@ def calculate_synastry_quality_points(
|
|
|
1538
1569
|
combined_totals[quality] = (combined_totals[quality] / total_points) * 100.0
|
|
1539
1570
|
|
|
1540
1571
|
return combined_totals
|
|
1572
|
+
|
|
@@ -52,8 +52,10 @@ from kerykeion.charts.charts_utils import (
|
|
|
52
52
|
draw_transit_aspect_grid,
|
|
53
53
|
draw_single_house_comparison_grid,
|
|
54
54
|
makeLunarPhase,
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
draw_main_house_grid,
|
|
56
|
+
draw_secondary_house_grid,
|
|
57
|
+
draw_main_planet_grid,
|
|
58
|
+
draw_secondary_planet_grid,
|
|
57
59
|
format_location_string,
|
|
58
60
|
format_datetime_with_timezone,
|
|
59
61
|
calculate_element_points,
|
|
@@ -836,12 +838,12 @@ class KerykeionChartSVG:
|
|
|
836
838
|
template_dict["makeLunarPhase"] = makeLunarPhase(self.first_obj.lunar_phase["degrees_between_s_m"], self.geolat)
|
|
837
839
|
|
|
838
840
|
# Houses and planet drawing
|
|
839
|
-
template_dict["
|
|
841
|
+
template_dict["makeMainHousesGrid"] = draw_main_house_grid(
|
|
840
842
|
main_subject_houses_list=first_subject_houses_list,
|
|
841
|
-
chart_type=self.chart_type,
|
|
842
843
|
text_color=self.chart_colors_settings["paper_0"],
|
|
843
844
|
house_cusp_generale_name_label=self.language_settings["cusp"],
|
|
844
845
|
)
|
|
846
|
+
template_dict["makeSecondaryHousesGrid"] = ""
|
|
845
847
|
|
|
846
848
|
template_dict["makeHouses"] = draw_houses_cusps_and_text_number(
|
|
847
849
|
r=self.main_radius,
|
|
@@ -866,7 +868,7 @@ class KerykeionChartSVG:
|
|
|
866
868
|
main_subject_seventh_house_degree_ut=self.first_obj.seventh_house.abs_pos,
|
|
867
869
|
)
|
|
868
870
|
|
|
869
|
-
template_dict["
|
|
871
|
+
template_dict["makeMainPlanetGrid"] = draw_main_planet_grid(
|
|
870
872
|
planets_and_houses_grid_title=self.language_settings["planets_and_house"],
|
|
871
873
|
subject_name=self.first_obj.name,
|
|
872
874
|
available_kerykeion_celestial_points=self.available_kerykeion_celestial_points,
|
|
@@ -874,6 +876,7 @@ class KerykeionChartSVG:
|
|
|
874
876
|
text_color=self.chart_colors_settings["paper_0"],
|
|
875
877
|
celestial_point_language=self.language_settings["celestial_points"],
|
|
876
878
|
)
|
|
879
|
+
template_dict["makeSecondaryPlanetGrid"] = ""
|
|
877
880
|
template_dict["makeHouseComparisonGrid"] = ""
|
|
878
881
|
|
|
879
882
|
elif self.chart_type == "Composite":
|
|
@@ -971,12 +974,12 @@ class KerykeionChartSVG:
|
|
|
971
974
|
template_dict["makeLunarPhase"] = makeLunarPhase(self.first_obj.lunar_phase["degrees_between_s_m"], self.geolat)
|
|
972
975
|
|
|
973
976
|
# Houses and planet drawing
|
|
974
|
-
template_dict["
|
|
977
|
+
template_dict["makeMainHousesGrid"] = draw_main_house_grid(
|
|
975
978
|
main_subject_houses_list=first_subject_houses_list,
|
|
976
|
-
chart_type=self.chart_type,
|
|
977
979
|
text_color=self.chart_colors_settings["paper_0"],
|
|
978
980
|
house_cusp_generale_name_label=self.language_settings["cusp"],
|
|
979
981
|
)
|
|
982
|
+
template_dict["makeSecondaryHousesGrid"] = ""
|
|
980
983
|
|
|
981
984
|
template_dict["makeHouses"] = draw_houses_cusps_and_text_number(
|
|
982
985
|
r=self.main_radius,
|
|
@@ -1003,7 +1006,7 @@ class KerykeionChartSVG:
|
|
|
1003
1006
|
|
|
1004
1007
|
subject_name = f"{self.first_obj.first_subject.name} {self.language_settings['and_word']} {self.first_obj.second_subject.name}" # type: ignore
|
|
1005
1008
|
|
|
1006
|
-
template_dict["
|
|
1009
|
+
template_dict["makeMainPlanetGrid"] = draw_main_planet_grid(
|
|
1007
1010
|
planets_and_houses_grid_title=self.language_settings["planets_and_house"],
|
|
1008
1011
|
subject_name=subject_name,
|
|
1009
1012
|
available_kerykeion_celestial_points=self.available_kerykeion_celestial_points,
|
|
@@ -1011,6 +1014,7 @@ class KerykeionChartSVG:
|
|
|
1011
1014
|
text_color=self.chart_colors_settings["paper_0"],
|
|
1012
1015
|
celestial_point_language=self.language_settings["celestial_points"],
|
|
1013
1016
|
)
|
|
1017
|
+
template_dict["makeSecondaryPlanetGrid"] = ""
|
|
1014
1018
|
template_dict["makeHouseComparisonGrid"] = ""
|
|
1015
1019
|
|
|
1016
1020
|
elif self.chart_type == "Transit":
|
|
@@ -1112,13 +1116,17 @@ class KerykeionChartSVG:
|
|
|
1112
1116
|
template_dict["makeLunarPhase"] = makeLunarPhase(self.first_obj.lunar_phase["degrees_between_s_m"], self.geolat)
|
|
1113
1117
|
|
|
1114
1118
|
# Houses and planet drawing
|
|
1115
|
-
template_dict["
|
|
1119
|
+
template_dict["makeMainHousesGrid"] = draw_main_house_grid(
|
|
1116
1120
|
main_subject_houses_list=first_subject_houses_list,
|
|
1117
|
-
secondary_subject_houses_list=second_subject_houses_list,
|
|
1118
|
-
chart_type=self.chart_type,
|
|
1119
1121
|
text_color=self.chart_colors_settings["paper_0"],
|
|
1120
1122
|
house_cusp_generale_name_label=self.language_settings["cusp"],
|
|
1121
1123
|
)
|
|
1124
|
+
# template_dict["makeSecondaryHousesGrid"] = draw_secondary_house_grid(
|
|
1125
|
+
# secondary_subject_houses_list=second_subject_houses_list,
|
|
1126
|
+
# text_color=self.chart_colors_settings["paper_0"],
|
|
1127
|
+
# house_cusp_generale_name_label=self.language_settings["cusp"],
|
|
1128
|
+
# )
|
|
1129
|
+
template_dict["makeSecondaryHousesGrid"] = ""
|
|
1122
1130
|
|
|
1123
1131
|
template_dict["makeHouses"] = draw_houses_cusps_and_text_number(
|
|
1124
1132
|
r=self.main_radius,
|
|
@@ -1146,19 +1154,25 @@ class KerykeionChartSVG:
|
|
|
1146
1154
|
third_circle_radius=self.third_circle_radius,
|
|
1147
1155
|
)
|
|
1148
1156
|
|
|
1149
|
-
# Planet
|
|
1150
|
-
|
|
1157
|
+
# Planet grids
|
|
1151
1158
|
first_return_grid_title = f"{self.first_obj.name} ({self.language_settings.get('inner_wheel', 'Inner Wheel')})"
|
|
1152
1159
|
second_return_grid_title = f"{self.language_settings.get('Transit', 'Transit')} ({self.language_settings.get('outer_wheel', 'Outer Wheel')})"
|
|
1153
|
-
template_dict["
|
|
1160
|
+
template_dict["makeMainPlanetGrid"] = draw_main_planet_grid(
|
|
1154
1161
|
planets_and_houses_grid_title="",
|
|
1155
1162
|
subject_name=first_return_grid_title,
|
|
1156
1163
|
available_kerykeion_celestial_points=self.available_kerykeion_celestial_points,
|
|
1157
1164
|
chart_type=self.chart_type,
|
|
1158
1165
|
text_color=self.chart_colors_settings["paper_0"],
|
|
1159
1166
|
celestial_point_language=self.language_settings["celestial_points"],
|
|
1167
|
+
)
|
|
1168
|
+
|
|
1169
|
+
template_dict["makeSecondaryPlanetGrid"] = draw_secondary_planet_grid(
|
|
1170
|
+
planets_and_houses_grid_title="",
|
|
1160
1171
|
second_subject_name=second_return_grid_title,
|
|
1161
1172
|
second_subject_available_kerykeion_celestial_points=self.t_available_kerykeion_celestial_points,
|
|
1173
|
+
chart_type=self.chart_type,
|
|
1174
|
+
text_color=self.chart_colors_settings["paper_0"],
|
|
1175
|
+
celestial_point_language=self.language_settings["celestial_points"],
|
|
1162
1176
|
)
|
|
1163
1177
|
|
|
1164
1178
|
# House comparison grid
|
|
@@ -1254,7 +1268,8 @@ class KerykeionChartSVG:
|
|
|
1254
1268
|
zodiac_info = f"{self.language_settings.get('ayanamsa', 'Ayanamsa')}: {mode_name}"
|
|
1255
1269
|
|
|
1256
1270
|
template_dict["bottom_left_0"] = ""
|
|
1257
|
-
|
|
1271
|
+
# FIXME!
|
|
1272
|
+
template_dict["bottom_left_1"] = "" # f"Compatibility Score: {16}/44" # type: ignore
|
|
1258
1273
|
template_dict["bottom_left_2"] = zodiac_info
|
|
1259
1274
|
template_dict["bottom_left_3"] = f"{self.language_settings.get('houses_system_' + self.first_obj.houses_system_identifier, self.first_obj.houses_system_name)} {self.language_settings.get('houses', 'Houses')}"
|
|
1260
1275
|
template_dict["bottom_left_4"] = f'{self.language_settings.get("perspective_type", "Perspective")}: {self.language_settings.get(self.first_obj.perspective_type.lower().replace(" ", "_"), self.first_obj.perspective_type)}'
|
|
@@ -1263,10 +1278,14 @@ class KerykeionChartSVG:
|
|
|
1263
1278
|
template_dict["makeLunarPhase"] = ""
|
|
1264
1279
|
|
|
1265
1280
|
# Houses and planet drawing
|
|
1266
|
-
template_dict["
|
|
1281
|
+
template_dict["makeMainHousesGrid"] = draw_main_house_grid(
|
|
1267
1282
|
main_subject_houses_list=first_subject_houses_list,
|
|
1283
|
+
text_color=self.chart_colors_settings["paper_0"],
|
|
1284
|
+
house_cusp_generale_name_label=self.language_settings["cusp"],
|
|
1285
|
+
)
|
|
1286
|
+
|
|
1287
|
+
template_dict["makeSecondaryHousesGrid"] = draw_secondary_house_grid(
|
|
1268
1288
|
secondary_subject_houses_list=second_subject_houses_list,
|
|
1269
|
-
chart_type=self.chart_type,
|
|
1270
1289
|
text_color=self.chart_colors_settings["paper_0"],
|
|
1271
1290
|
house_cusp_generale_name_label=self.language_settings["cusp"],
|
|
1272
1291
|
)
|
|
@@ -1298,15 +1317,21 @@ class KerykeionChartSVG:
|
|
|
1298
1317
|
)
|
|
1299
1318
|
|
|
1300
1319
|
# Planet grid
|
|
1301
|
-
template_dict["
|
|
1320
|
+
template_dict["makeMainPlanetGrid"] = draw_main_planet_grid(
|
|
1302
1321
|
planets_and_houses_grid_title="",
|
|
1303
1322
|
subject_name=f"{self.first_obj.name} ({self.language_settings.get('inner_wheel', 'Inner Wheel')})",
|
|
1304
1323
|
available_kerykeion_celestial_points=self.available_kerykeion_celestial_points,
|
|
1305
1324
|
chart_type=self.chart_type,
|
|
1306
1325
|
text_color=self.chart_colors_settings["paper_0"],
|
|
1307
1326
|
celestial_point_language=self.language_settings["celestial_points"],
|
|
1327
|
+
)
|
|
1328
|
+
template_dict["makeSecondaryPlanetGrid"] = draw_secondary_planet_grid(
|
|
1329
|
+
planets_and_houses_grid_title="",
|
|
1308
1330
|
second_subject_name= f"{self.second_obj.name} ({self.language_settings.get('outer_wheel', 'Outer Wheel')})", # type: ignore
|
|
1309
1331
|
second_subject_available_kerykeion_celestial_points=self.t_available_kerykeion_celestial_points,
|
|
1332
|
+
chart_type=self.chart_type,
|
|
1333
|
+
text_color=self.chart_colors_settings["paper_0"],
|
|
1334
|
+
celestial_point_language=self.language_settings["celestial_points"],
|
|
1310
1335
|
)
|
|
1311
1336
|
template_dict["makeHouseComparisonGrid"] = ""
|
|
1312
1337
|
|
|
@@ -1404,10 +1429,14 @@ class KerykeionChartSVG:
|
|
|
1404
1429
|
template_dict["makeLunarPhase"] = makeLunarPhase(self.first_obj.lunar_phase["degrees_between_s_m"], self.geolat)
|
|
1405
1430
|
|
|
1406
1431
|
# Houses and planet drawing
|
|
1407
|
-
template_dict["
|
|
1432
|
+
template_dict["makeMainHousesGrid"] = draw_main_house_grid(
|
|
1408
1433
|
main_subject_houses_list=first_subject_houses_list,
|
|
1434
|
+
text_color=self.chart_colors_settings["paper_0"],
|
|
1435
|
+
house_cusp_generale_name_label=self.language_settings["cusp"],
|
|
1436
|
+
)
|
|
1437
|
+
|
|
1438
|
+
template_dict["makeSecondaryHousesGrid"] = draw_secondary_house_grid(
|
|
1409
1439
|
secondary_subject_houses_list=second_subject_houses_list,
|
|
1410
|
-
chart_type=self.chart_type,
|
|
1411
1440
|
text_color=self.chart_colors_settings["paper_0"],
|
|
1412
1441
|
house_cusp_generale_name_label=self.language_settings["cusp"],
|
|
1413
1442
|
)
|
|
@@ -1445,15 +1474,21 @@ class KerykeionChartSVG:
|
|
|
1445
1474
|
else:
|
|
1446
1475
|
first_return_grid_title = f"{self.first_obj.name} ({self.language_settings.get('inner_wheel', 'Inner Wheel')})"
|
|
1447
1476
|
second_return_grid_title = f"{self.language_settings.get("lunar_return", "Lunar Return")} ({self.language_settings.get("outer_wheel", "Outer Wheel")})"
|
|
1448
|
-
template_dict["
|
|
1477
|
+
template_dict["makeMainPlanetGrid"] = draw_main_planet_grid(
|
|
1449
1478
|
planets_and_houses_grid_title="",
|
|
1450
1479
|
subject_name=first_return_grid_title,
|
|
1451
1480
|
available_kerykeion_celestial_points=self.available_kerykeion_celestial_points,
|
|
1452
1481
|
chart_type=self.chart_type,
|
|
1453
1482
|
text_color=self.chart_colors_settings["paper_0"],
|
|
1454
1483
|
celestial_point_language=self.language_settings["celestial_points"],
|
|
1484
|
+
)
|
|
1485
|
+
template_dict["makeSecondaryPlanetGrid"] = draw_secondary_planet_grid(
|
|
1486
|
+
planets_and_houses_grid_title="",
|
|
1455
1487
|
second_subject_name=second_return_grid_title,
|
|
1456
1488
|
second_subject_available_kerykeion_celestial_points=self.t_available_kerykeion_celestial_points,
|
|
1489
|
+
chart_type=self.chart_type,
|
|
1490
|
+
text_color=self.chart_colors_settings["paper_0"],
|
|
1491
|
+
celestial_point_language=self.language_settings["celestial_points"]
|
|
1457
1492
|
)
|
|
1458
1493
|
|
|
1459
1494
|
house_comparison_factory = HouseComparisonFactory(
|
|
@@ -1525,7 +1560,7 @@ class KerykeionChartSVG:
|
|
|
1525
1560
|
|
|
1526
1561
|
template_dict["top_left_0"] = f'{self.language_settings["info"]}:'
|
|
1527
1562
|
template_dict["top_left_1"] = format_datetime_with_timezone(self.first_obj.iso_formatted_local_datetime) # type: ignore
|
|
1528
|
-
template_dict["top_left_2"] =
|
|
1563
|
+
template_dict["top_left_2"] = f"{self.first_obj.city}, {self.first_obj.nation}"
|
|
1529
1564
|
template_dict["top_left_3"] = f"{self.language_settings['latitude']}: {latitude_string}"
|
|
1530
1565
|
template_dict["top_left_4"] = f"{self.language_settings['longitude']}: {longitude_string}"
|
|
1531
1566
|
|
|
@@ -1552,12 +1587,12 @@ class KerykeionChartSVG:
|
|
|
1552
1587
|
template_dict["makeLunarPhase"] = makeLunarPhase(self.first_obj.lunar_phase["degrees_between_s_m"], self.geolat)
|
|
1553
1588
|
|
|
1554
1589
|
# Houses and planet drawing
|
|
1555
|
-
template_dict["
|
|
1590
|
+
template_dict["makeMainHousesGrid"] = draw_main_house_grid(
|
|
1556
1591
|
main_subject_houses_list=first_subject_houses_list,
|
|
1557
|
-
chart_type=self.chart_type,
|
|
1558
1592
|
text_color=self.chart_colors_settings["paper_0"],
|
|
1559
1593
|
house_cusp_generale_name_label=self.language_settings["cusp"],
|
|
1560
1594
|
)
|
|
1595
|
+
template_dict["makeSecondaryHousesGrid"] = ""
|
|
1561
1596
|
|
|
1562
1597
|
template_dict["makeHouses"] = draw_houses_cusps_and_text_number(
|
|
1563
1598
|
r=self.main_radius,
|
|
@@ -1582,7 +1617,7 @@ class KerykeionChartSVG:
|
|
|
1582
1617
|
main_subject_seventh_house_degree_ut=self.first_obj.seventh_house.abs_pos,
|
|
1583
1618
|
)
|
|
1584
1619
|
|
|
1585
|
-
template_dict["
|
|
1620
|
+
template_dict["makeMainPlanetGrid"] = draw_main_planet_grid(
|
|
1586
1621
|
planets_and_houses_grid_title=self.language_settings["planets_and_house"],
|
|
1587
1622
|
subject_name=self.first_obj.name,
|
|
1588
1623
|
available_kerykeion_celestial_points=self.available_kerykeion_celestial_points,
|
|
@@ -1590,6 +1625,7 @@ class KerykeionChartSVG:
|
|
|
1590
1625
|
text_color=self.chart_colors_settings["paper_0"],
|
|
1591
1626
|
celestial_point_language=self.language_settings["celestial_points"],
|
|
1592
1627
|
)
|
|
1628
|
+
template_dict["makeSecondaryPlanetGrid"] = ""
|
|
1593
1629
|
template_dict["makeHouseComparisonGrid"] = ""
|
|
1594
1630
|
|
|
1595
1631
|
return ChartTemplateDictionary(**template_dict)
|
|
@@ -110,14 +110,21 @@ OpenAstro.org -->
|
|
|
110
110
|
|
|
111
111
|
<!-- Houses_And_Planets_Grid -->
|
|
112
112
|
<g kr:node="Houses_And_Planets_Grid">
|
|
113
|
-
<!--
|
|
114
|
-
<g kr:node="
|
|
115
|
-
$
|
|
113
|
+
<!-- Main Subject Grid -->
|
|
114
|
+
<g kr:node="Main_Planet_Grid">
|
|
115
|
+
$makeMainPlanetGrid
|
|
116
116
|
</g>
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
<g kr:node="Secondary_Houses_Grid">
|
|
119
|
+
$makeSecondaryHousesGrid
|
|
120
|
+
</g>
|
|
121
|
+
|
|
122
|
+
<g kr:node="Secondary_Planet_Grid">
|
|
123
|
+
$makeSecondaryPlanetGrid
|
|
124
|
+
</g>
|
|
125
|
+
|
|
126
|
+
<g kr:node="Main_Houses_Grid">
|
|
127
|
+
$makeMainHousesGrid
|
|
121
128
|
</g>
|
|
122
129
|
|
|
123
130
|
<!-- House Comparison Grid -->
|
|
@@ -82,8 +82,10 @@ class ChartTemplateDictionary(TypedDict):
|
|
|
82
82
|
makeZodiac: str
|
|
83
83
|
makeHouses: str
|
|
84
84
|
makePlanets: str
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
makeMainPlanetGrid: str
|
|
86
|
+
makeSecondaryPlanetGrid: str
|
|
87
|
+
makeMainHousesGrid: str
|
|
88
|
+
makeSecondaryHousesGrid: str
|
|
87
89
|
|
|
88
90
|
color_style_tag: str
|
|
89
91
|
|
kerykeion/{relationship_score/relationship_score_factory.py → relationship_score_factory.py}
RENAMED
|
@@ -218,10 +218,10 @@ if __name__ == "__main__":
|
|
|
218
218
|
|
|
219
219
|
setup_logging(level="critical")
|
|
220
220
|
|
|
221
|
-
|
|
222
|
-
yoko = AstrologicalSubjectFactory.from_birth_data("
|
|
221
|
+
john = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
|
|
222
|
+
yoko = AstrologicalSubjectFactory.from_birth_data("Yoko Ono", 1933, 2, 18, 18, 30, "Tokyo", "JP")
|
|
223
223
|
|
|
224
|
-
factory = RelationshipScoreFactory(
|
|
224
|
+
factory = RelationshipScoreFactory(john, yoko)
|
|
225
225
|
score = factory.get_relationship_score()
|
|
226
226
|
print(score)
|
|
227
227
|
|