Skip to content

Commit

Permalink
optimize svg; update README and demo images
Browse files Browse the repository at this point in the history
  • Loading branch information
hoishing committed Nov 19, 2024
1 parent bef5b34 commit 3b95316
Show file tree
Hide file tree
Showing 63 changed files with 171 additions and 169 deletions.
40 changes: 13 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@

<img src="https://bit.ly/3ZygoNw" width=600/>

[Swiss Ephemeris]: https://www.astro.com/swisseph/swephinfo_e.htm
[GeoNames]: https://www.geonames.org

## Quick Start

- installation
Expand All @@ -66,16 +63,16 @@ mimi = Data(
Chart(mimi, width=600).svg

# create transit data object
current = Data(
name = "Current",
city = "Taipei",
dt = datetime.now()
transit = Data(
name="Transit",
city="Taipei",
dt="2024-01-01 13:30",
)

# create a transit chart
transit_chart = Chart(
data1=mimi,
data2=current,
data2=transit,
width=600
)

Expand Down Expand Up @@ -138,19 +135,7 @@ aspect.orb # 3.3424
- statistics of Data object in tabular form

```python
from natal import Data, Stats

mimi = Data(
name = "MiMi",
city = "Taipei",
dt = "1980-04-20 14:30"
)

transit = Data(
name = "Transit",
city = "Taipei",
dt = "2024-10-10 12:00"
)
from natal import Stats

stats = Stats(data1=mimi, data2=transit)

Expand Down Expand Up @@ -364,27 +349,28 @@ data = Data(

read the [docs] for complete references

[docs]: https://hoishing.github.io/natal

## Tech Stack

- [tagit]: SVG / HTML generation and manipulation
- [pyswisseph]: astrological data - Swiss Ephemeris
- [mkdocs-material]: docs site generation
- [weasyprint]: PDF generation (refer its docs for installing OS dependencies)
- [weasyprint]: PDF generation (refer weasyprint docs for installing OS dependencies)

[black-badge]: https://img.shields.io/badge/formatter-Black-black
[black-url]: https://github.com/psf/black
[ci-badge]: https://github.com/hoishing/natal/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/hoishing/natal/actions/workflows/ci.yml
[demo_report_light.pdf]: https://github.com/hoishing/natal/blob/main/demo_report_light.pdf
[demo_report_mono.pdf]: https://github.com/hoishing/natal/blob/main/demo_report_mono.pdf
[demo.ipynb]: https://github.com/hoishing/natal/blob/main/demo.ipynb
[docs]: https://hoishing.github.io/natal
[GeoNames]: https://www.geonames.org
[MIT-badge]: https://img.shields.io/github/license/hoishing/natal
[MIT-url]: https://opensource.org/licenses/MIT
[mkdocs-material]: https://github.com/squidfunk/mkdocs-material
[tagit]: https://github.com/hoishing/tagit
[pypi-badge]: https://img.shields.io/pypi/v/natal
[pypi-url]: https://pypi.org/project/natal
[pyswisseph]: https://github.com/astrorigin/pyswisseph
[demo_report_light.pdf]: https://github.com/hoishing/natal/blob/main/demo_report_light.pdf
[demo_report_mono.pdf]: https://github.com/hoishing/natal/blob/main/demo_report_mono.pdf
[Swiss Ephemeris]: https://www.astro.com/swisseph/swephinfo_e.htm
[tagit]: https://github.com/hoishing/tagit
[weasyprint]: https://weasyprint.org
110 changes: 57 additions & 53 deletions demo.ipynb

Large diffs are not rendered by default.

Binary file modified docs/assets/chart_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/chart_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/chart_mono.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/composite_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions natal/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,10 @@ def hemisphere(self) -> StatData:
title = f"Hemispheres ({self.data1.name})"
grid = [("hemisphere", "sum", "bodies")]
data = self.quadrant.grid[1:]

def formatter(a: int, b: int) -> str:
return (data[a][2] + ", " + data[b][2]).strip(" ,")

left = ("←", data[0][1] + data[3][1], formatter(0, 3))
right = ("→", data[1][1] + data[2][1], formatter(1, 2))
top = ("↑", data[2][1] + data[3][1], formatter(2, 3))
Expand Down
2 changes: 1 addition & 1 deletion natal/svg_paths/air.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion natal/svg_paths/aquarius.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion natal/svg_paths/aries.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions natal/svg_paths/asc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions natal/svg_paths/asc_node.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion natal/svg_paths/cancer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion natal/svg_paths/capricorn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3b95316

Please sign in to comment.