kerykeion 4.7.0__py3-none-any.whl → 4.8.0__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.

@@ -170,7 +170,7 @@ class AstrologicalSubject:
170
170
 
171
171
  # This message is set to encourage the user to set a custom geonames username
172
172
  if geonames_username is None and online:
173
- logging.info(
173
+ logging.warning(
174
174
  "\n"
175
175
  "********" +
176
176
  "\n" +
@@ -191,19 +191,19 @@ class AstrologicalSubject:
191
191
 
192
192
  if not self.city:
193
193
  self.city = "London"
194
- logging.warning("No city specified, using London as default")
194
+ logging.info("No city specified, using London as default")
195
195
 
196
196
  if not self.nation:
197
197
  self.nation = "GB"
198
- logging.warning("No nation specified, using GB as default")
198
+ logging.info("No nation specified, using GB as default")
199
199
 
200
200
  if not self.lat:
201
201
  self.lat = 51.5074
202
- logging.warning("No latitude specified, using London as default")
202
+ logging.info("No latitude specified, using London as default")
203
203
 
204
204
  if not self.lng:
205
205
  self.lng = 0
206
- logging.warning("No longitude specified, using London as default")
206
+ logging.info("No longitude specified, using London as default")
207
207
 
208
208
  if (not self.online) and (not tz_str):
209
209
  raise KerykeionException(
@@ -28,10 +28,12 @@ from kerykeion.charts.charts_utils import (
28
28
  draw_transit_ring
29
29
  )
30
30
  from pathlib import Path
31
+ from scour.scour import scourString
31
32
  from string import Template
32
33
  from typing import Union, List
33
34
 
34
35
 
36
+
35
37
  class KerykeionChartSVG:
36
38
  """
37
39
  Creates the instance that can generate the chart with the
@@ -250,8 +252,7 @@ class KerykeionChartSVG:
250
252
  {"name": "pisces", "element": "water"},
251
253
  )
252
254
 
253
- # Immediately generate template.
254
- self.template = self.makeTemplate()
255
+ self.template = None
255
256
 
256
257
  def set_output_directory(self, dir_path: Path) -> None:
257
258
  """
@@ -1379,7 +1380,7 @@ class KerykeionChartSVG:
1379
1380
 
1380
1381
  return td
1381
1382
 
1382
- def makeTemplate(self):
1383
+ def makeTemplate(self, minify: bool = False) -> str:
1383
1384
  """Creates the template for the SVG file"""
1384
1385
  td = self._createTemplateDictionary()
1385
1386
 
@@ -1392,13 +1393,20 @@ class KerykeionChartSVG:
1392
1393
  logging.debug(f"Template dictionary keys: {td.keys()}")
1393
1394
 
1394
1395
  self._createTemplateDictionary()
1395
- return template.replace('"', "'")
1396
1396
 
1397
- def makeSVG(self) -> None:
1397
+ if minify:
1398
+ template = scourString(template).replace('"', "'").replace("\n", "").replace("\t","").replace(" ", "").replace(" ", "")
1399
+
1400
+ else:
1401
+ template = template.replace('"', "'")
1402
+
1403
+ return template
1404
+
1405
+ def makeSVG(self, minify: bool = False):
1398
1406
  """Prints out the SVG file in the specifide folder"""
1399
1407
 
1400
1408
  if not (self.template):
1401
- self.template = self.makeTemplate()
1409
+ self.template = self.makeTemplate(minify)
1402
1410
 
1403
1411
  self.chartname = self.output_directory / f"{self.user.name}{self.chart_type}Chart.svg"
1404
1412
 
@@ -1425,8 +1433,9 @@ if __name__ == "__main__":
1425
1433
 
1426
1434
  # Synastry Chart
1427
1435
  synastry_chart = KerykeionChartSVG(first, "Synastry", second)
1428
- synastry_chart.makeSVG()
1436
+ synastry_chart.makeSVG(minify=True)
1429
1437
 
1430
1438
  # Transits Chart
1431
1439
  transits_chart = KerykeionChartSVG(first, "Transit", second)
1432
- transits_chart.makeSVG()
1440
+ transits_chart.makeSVG(minify=True)
1441
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.7.0
3
+ Version: 4.8.0
4
4
  Summary: A python library for astrology.
5
5
  Home-page: https://github.com/g-battaglia/kerykeion
6
6
  License: AGPL-3.0
@@ -30,6 +30,7 @@ Requires-Dist: pyswisseph (>=2.10.3.1,<3.0.0.0)
30
30
  Requires-Dist: pytz (>=2022.7,<2023.0)
31
31
  Requires-Dist: requests (>=2.28.1,<3.0.0)
32
32
  Requires-Dist: requests-cache (>=0.9.7,<0.10.0)
33
+ Requires-Dist: scour (>=0.38.2,<0.39.0)
33
34
  Requires-Dist: terminaltables (>=3.1.10,<4.0.0)
34
35
  Project-URL: Repository, https://github.com/g-battaglia/kerykeion
35
36
  Description-Content-Type: text/markdown
@@ -4,10 +4,10 @@ kerykeion/aspects/__init__.py,sha256=9FlDVI1ndCJga0-chNIhcLitjU_x3kbtAFfFqVp2ejc
4
4
  kerykeion/aspects/aspects_utils.py,sha256=Rdo3ITDSU80n6U7aazpzzK4ruv7Iui2PaI3zMGqu1NQ,5832
5
5
  kerykeion/aspects/natal_aspects.py,sha256=m3_v1dM6YXvENZ6iN_EJkikKxySZBeR5QKhGsaChERk,4507
6
6
  kerykeion/aspects/synastry_aspects.py,sha256=uwg7Lc7wKnpxW9ydOdBHqx9cvO_t0ydGfIGluBIDD7c,3993
7
- kerykeion/astrological_subject.py,sha256=9vLsYZYfAfkR5EJO_EkbkhXa4i788Yv1lCESaQrt5kU,22965
7
+ kerykeion/astrological_subject.py,sha256=Z9QUNqX6mrOm4ihxmhH0hiMv6ilp_-0HCQ4u_feE73g,22956
8
8
  kerykeion/charts/__init__.py,sha256=Juxkduy2TaagWblh_7CE8Acrg3dHL27-WEddJhau_eQ,127
9
9
  kerykeion/charts/charts_utils.py,sha256=E5qrvA7uaSxKL0PrcRtWhDP581itIm3kAebsxYVa4hE,13214
10
- kerykeion/charts/kerykeion_chart_svg.py,sha256=IjR5E2LsKjWjfLeMcjR3UIutixASPcZbs0Ljl3HDSZg,60991
10
+ kerykeion/charts/kerykeion_chart_svg.py,sha256=LRbBIi_9LmR5mc_HnpPERkY2Y5Hh_3ESYAKQiPUpJmE,61248
11
11
  kerykeion/charts/templates/chart.xml,sha256=7gkzNRQmkOn9hCAOiPbQwd9e8x9shFtF3uEZo5tp8P0,70156
12
12
  kerykeion/enums.py,sha256=Ben9GLYkPucpYY2ZDpURzUbNCc9jzK2MuaffkgiXFdQ,965
13
13
  kerykeion/fetch_geonames.py,sha256=fWuhgP_hZTPzDuodu7hvSznzGCWj3IC3vHAX32zPRw8,4444
@@ -25,8 +25,8 @@ kerykeion/settings/kr.config.json,sha256=1Yhv9RGHom5U9e-JZZRWVfT2Ubllz2WrckdwadD
25
25
  kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
26
26
  kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
27
27
  kerykeion/utilities.py,sha256=ncoXHvzXhNjhdm-uU6hMirVo287laq2GAJElNE6cBZM,10822
28
- kerykeion-4.7.0.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
29
- kerykeion-4.7.0.dist-info/METADATA,sha256=zb-U4K0Na0Gu84TVzUa2mcgksnvSCXFQjLBQ1gbKPRc,10311
30
- kerykeion-4.7.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
31
- kerykeion-4.7.0.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
32
- kerykeion-4.7.0.dist-info/RECORD,,
28
+ kerykeion-4.8.0.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
29
+ kerykeion-4.8.0.dist-info/METADATA,sha256=4cArhIX7dOeWXU9sip94ZTepsR7He665hYd8qA41ixQ,10351
30
+ kerykeion-4.8.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
31
+ kerykeion-4.8.0.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
32
+ kerykeion-4.8.0.dist-info/RECORD,,