{"id":13577756,"url":"https://github.com/SylarLong/iztro","last_synced_at":"2025-04-05T15:31:24.511Z","repository":{"id":184240843,"uuid":"671405519","full_name":"SylarLong/iztro","owner":"SylarLong","description":"⭐This is a lightweight kit for generating astrolabes for Zi Wei Dou Shu (The Purple Star Astrology), an ancient Chinese astrology. It allows you to obtain your horoscope and personality analysis. 支持多语言轻量级获取紫微斗数排盘信息的javascript开源库。","archived":false,"fork":false,"pushed_at":"2025-03-31T01:27:00.000Z","size":30278,"stargazers_count":2490,"open_issues_count":9,"forks_count":321,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-04-03T05:05:01.968Z","etag":null,"topics":["astrolabe","astrology","chinese-astrology","horoscope","javascript","natal-chart","npm","typescript","ziweidoushu"],"latest_commit_sha":null,"homepage":"https://iztro.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SylarLong.png","metadata":{"files":{"readme":"README-en_US.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-27T08:41:40.000Z","updated_at":"2025-04-03T02:46:19.000Z","dependencies_parsed_at":"2023-08-29T04:54:59.069Z","dependency_job_id":"89b33189-557f-4785-9113-d5dad44b8ac4","html_url":"https://github.com/SylarLong/iztro","commit_stats":null,"previous_names":["sylarlong/astro","sylarlong/iztro"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SylarLong%2Fiztro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SylarLong%2Fiztro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SylarLong%2Fiztro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SylarLong%2Fiztro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SylarLong","download_url":"https://codeload.github.com/SylarLong/iztro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276096,"owners_count":20912287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astrolabe","astrology","chinese-astrology","horoscope","javascript","natal-chart","npm","typescript","ziweidoushu"],"created_at":"2024-08-01T15:01:24.095Z","updated_at":"2025-04-05T15:31:24.483Z","avatar_url":"https://github.com/SylarLong.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n![banner2](https://github.com/SylarLong/iztro/assets/6510425/e8457a88-e52e-435e-8f93-e3f375486d70)\n\nA lightweight astrolabe generator of The Purple Star Astrology(Zi Wei Dou Shu).\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/b57f0e6e2e8875ce39ae/maintainability)](https://codeclimate.com/github/SylarLong/iztro/maintainability) \n[![Codecov](https://github.com/SylarLong/iztro/actions/workflows/Codecov.yaml/badge.svg)](https://github.com/SylarLong/iztro/actions/workflows/Codecov.yaml) \n[![npm](https://img.shields.io/npm/v/iztro?logo=npm\u0026logoColor=%23CB3837)](https://www.npmjs.com/package/iztro) \n![Codecov](https://img.shields.io/codecov/c/github/SylarLong/iztro?logo=codecov\u0026logoColor=%23F01F7A) \n[![npm](https://img.shields.io/npm/dt/iztro.svg?logo=npm\u0026logoColor=%23CB3837)](https://www.npmjs.com/package/iztro) \n[![GitHub](https://img.shields.io/github/license/sylarlong/iztro)](https://www.npmjs.com/package/iztro) \n[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/SylarLong/iztro)](https://www.npmjs.com/package/iztro) \n[![npm bundle size](https://img.shields.io/bundlephobia/min/iztro)](https://www.npmjs.com/package/iztro) \n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSylarLong%2Fiztro.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FSylarLong%2Fiztro?ref=badge_shield) \n[![Package Quality](https://packagequality.com/shield/iztro.svg)](https://packagequality.com/#?package=iztro) \n[![](https://data.jsdelivr.com/v1/package/npm/iztro/badge)](https://www.jsdelivr.com/package/npm/iztro) \n\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n[简体中文](./README.md) 🔸 [繁體中文](./README-zh_TW.md) 🔸 English\n\n\u003c/div\u003e\n\n---\n\n### Summary\n\nIt's used to obtain the data of `The Purple Star Astrology (Zi Wei Dou Shu)`.\n\n- Input\n\n  - birthday（support solar date and lunar date）\n  - birth time\n  - gender\n\n- Feature list\n\n  - get `12 palaces` data of Zi Wei Dou Shu.\n  - get Chinese `zodiac`\n  - get `sign`\n  - get birth time by Chinese date\n  - get `horoscope`(`decadal`, `turnly`, `yearly`, `monthly`, `daily`, `timely`)\n  - get horoscope `stars` (`dacadal` and `yearly`)\n  - check if one `palace` includes specific `stars`\n  - check if `surrounded palaces` of specific `palace` include specific `stars`\n  - check if `surrounded palaces` of specific `palace` include specific `mutagen`\n  - check if spedific star is `mutaged`\n  - check if `surrounded palaces` of specific `star` include specific `mutagen`\n  - check star `brightness`\n  - get `mutagen` by `heavenly stem`\n  - get `palace` by `star`\n  - get `surrounded palaces` by `palace`\n  - get `surrounded palaces` by `star`\n  - get `opposite` palace by `star`\n\n- Other\n\n  - multilingual input/output\n\n    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.\n\n  - chain invoking\n\n    if you want to check if the `surrounded palaces` of  `emperor` is `focused`, you can do it like this:\n\n    ```ts\n    import { astro } from 'iztro';\n\n    const astrolabe = astro.bySolar('2000-8-16', 2, 'male', true, 'en-US');\n\n    astrolabe.star('emperor').surroundedPalaces().haveMutagen('focused');\n    ```\n\n  - Configuration and plugins\n\n     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](https://ziwei.pro/posts/config-n-plugin.html)\n\n### Quick link\n\n- [Document](https://docs.iztro.com)\n- [Discussions](https://github.com/SylarLong/iztro/discussions)\n- [Issues](https://github.com/SylarLong/iztro/issues)\n\n### Installation\n\nyou can choose any package manager to install `iztro`.\n\n- NPM\n\n  ```\n  npm install iztro -S\n  ```\n\n- Yarn\n\n  ```\n  yarn add iztro\n  ```\n\n- pnpm\n\n  ```\n  pnpm install iztro -S\n  ```\n\n### Simple example\n\nThis is a very simple example to show how to use `iztro` to get the astrolabe data. please visit [develop document](https://docs.iztro.com) for details.\n\n- ES6 Module\n\n  ```ts\n  import { astro } from 'iztro';\n\n  // get astrolabe data by solar date\n  const astrolabe = astro.bySolar('2000-8-16', 2, 'male', true, 'en-US');\n\n  // get astrolabe data by lunar date\n  const astrolabe = astro.byLunar('2000-7-17', 2, 'male', false, true, 'en-US');\n  ```\n\n- CommonJS\n\n  ```ts\n  var iztro = require('iztro');\n\n  // get astrolabe data by solar date\n  var astrolabe = iztro.astro.bySolar('2000-8-16', 2, 'male', true, 'en-US');\n\n  // get astrolabe data by lunar date\n  var astrolabe = iztro.astro.byLunar('2000-7-17', 2, 'male', false, true, 'en-US');\n  ```\n\n### [CONTRIBUTING](https://github.com/SylarLong/iztro/blob/main/CONTRIBUTING.md)\n\nIf you're interested in `iztro` and wish to join us,it's very welcome. You can contribute by:\n\n- create an issue [here](https://github.com/SylarLong/iztro/issues/new?assignees=SylarLong\u0026labels=%E5%8A%9F%E8%83%BD%EF%BD%9Cfeature\u0026projects=\u0026template=new-feature.md\u0026title=%7B%E6%A0%87%E9%A2%98%7D%EF%BD%9C%7Btitle%7D) if you have any good ideas or suggestions.\n- report a bug [here](https://github.com/SylarLong/iztro/issues/new?assignees=SylarLong\u0026labels=%E6%BC%8F%E6%B4%9E%EF%BD%9Cbug\u0026projects=\u0026template=bug-report.md\u0026title=%7Bversion%7D%3A%7Bfunction%7D-) if you found any bugs.\n- you can also `fork` this code to your repository and create PRs for your changes.\n- also, you can contribute the `localization` files. please refer to [locales](https://github.com/SylarLong/iztro/tree/main/src/i18n/locales) and create the localization files for your lanuage.\n- additionally, buy me a coffee is another great way to support me [![Static Badge](https://img.shields.io/badge/PaypalMe-8A2BE2?logo=paypal\u0026link=https%3A%2F%2Fwww.paypal.com%2Fsylarlong)\n  ](https://PayPal.Me/sylarlong)\n\n### Summary\n\nYou 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.\n\n\u003cimg width=\"966\" alt=\"image\" src=\"https://github.com/SylarLong/react-iztro/assets/6510425/f4335997-fdd8-42e2-bb1a-600942f9b0ba\"\u003e\n\n### Star History\n\n\u003ca href=\"https://star-history.com/#sylarlong/iztro\u0026Date\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=sylarlong/iztro\u0026type=Date\u0026theme=dark\" /\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=sylarlong/iztro\u0026type=Date\" /\u003e\n    \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=sylarlong/iztro\u0026type=Date\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n### [LICENSE](https://github.com/SylarLong/iztro/blob/main/LICENSE)\n\nMIT License\n\nCopyright \u0026copy; 2023 All Contributors\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSylarLong%2Fiztro.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FSylarLong%2Fiztro?ref=badge_large)\n","funding_links":["https://img.shields.io/badge/PaypalMe-8A2BE2?logo=paypal\u0026link=https%3A%2F%2Fwww.paypal.com%2Fsylarlong"],"categories":["TypeScript","📦 Others (实用工具、媒体与其它)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSylarLong%2Fiztro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSylarLong%2Fiztro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSylarLong%2Fiztro/lists"}