Skip to content

Latest commit

 

History

History
176 lines (117 loc) · 7.25 KB

README-en_US.md

File metadata and controls

176 lines (117 loc) · 7.25 KB

banner2

A lightweight astrolabe generator of The Purple Star Astrology(Zi Wei Dou Shu).

Maintainability Codecov npm Codecov npm GitHub GitHub code size in bytes npm bundle size FOSSA Status Package Quality


简体中文 🔸 繁體中文 🔸 English


Summary

It's used to obtain the data of The Purple Star Astrology (Zi Wei Dou Shu).

  • Input

    • birthday(support solar date and lunar date)
    • birth time
    • gender
  • Feature list

    • get 12 palaces data of Zi Wei Dou Shu.
    • get Chinese zodiac
    • get sign
    • get birth time by Chinese date
    • get horoscope(decadal, turnly, yearly, monthly, daily, timely)
    • get horoscope stars (dacadal and yearly)
    • check if one palace includes specific stars
    • check if surrounded palaces of specific palace include specific stars
    • check if surrounded palaces of specific palace include specific mutagen
    • check if spedific star is mutaged
    • check if surrounded palaces of specific star include specific mutagen
    • check star brightness
    • get mutagen by heavenly stem
    • get palace by star
    • get surrounded palaces by palace
    • get surrounded palaces by star
    • get opposite palace by star
  • Other

    • multilingual input/output

      you can mix multiple languages when passing parameters and specify output language. we support Simplified Chinese, Traditional Chinese, English, Japanese, Korean and Vietnamese. however, English translation is not stardand. so I just translate them by meaning. if you're good at English and well known about Zi Wei Dou Shu, welcome to PR. any language is welcome.

    • chain invoking

      if you want to check if the surrounded palaces of emperor is focused, you can do it like this:

      import { astro } from 'iztro';
      
      const astrolabe = astro.bySolar('2000-8-16', 2, 'male', true, 'en-US');
      
      astrolabe.star('emperor').surroundedPalaces().haveMutagen('focused');
    • Configuration and plugins

      There are many Ziwei Dou Shu genres, and the mutagens and star brightness of different genres will be slightly different. In order to meet the needs of different genres and function expansion, iztro has added global configuration and third-party plug-in functions in version v2.3.0. For details, see Configuration Document

Quick link

Installation

you can choose any package manager to install iztro.

  • NPM

    npm install iztro -S
    
  • Yarn

    yarn add iztro
    
  • pnpm

    pnpm install iztro -S
    

Simple example

This is a very simple example to show how to use iztro to get the astrolabe data. please visit develop document for details.

  • ES6 Module

    import { astro } from 'iztro';
    
    // get astrolabe data by solar date
    const astrolabe = astro.bySolar('2000-8-16', 2, 'male', true, 'en-US');
    
    // get astrolabe data by lunar date
    const astrolabe = astro.byLunar('2000-7-17', 2, 'male', false, true, 'en-US');
  • CommonJS

    var iztro = require('iztro');
    
    // get astrolabe data by solar date
    var astrolabe = iztro.astro.bySolar('2000-8-16', 2, 'male', true, 'en-US');
    
    // get astrolabe data by lunar date
    var astrolabe = iztro.astro.byLunar('2000-7-17', 2, 'male', false, true, 'en-US');

If you're interested in iztro and wish to join us,it's very welcome. You can contribute by:

  • create an issue here if you have any good ideas or suggestions.
  • report a bug here if you found any bugs.
  • you can also fork this code to your repository and create PRs for your changes.
  • also, you can contribute the localization files. please refer to locales and create the localization files for your lanuage.
  • additionally, buy me a coffee is another great way to support me Static Badge

Summary

You can generate an astrolabe by using the returned data. Of course it's just an example. You can focus on astrolabe design or data analyzation. This program solves the most tedious work for you, so that you can put more energy on the things you need to pay attention to.

image

Star History

Star History Chart

MIT License

Copyright © 2023 All Contributors

FOSSA Status