Liuyao

by Kasukabe Tsumugi
5
4
3
2
1
Score: 31/100

Description

Reviews

No reviews yet.

Stats

0
stars
260
downloads
0
forks
142
days
84
days
84
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
1
total issues
1
open issues
0
closed issues
92
commits

Latest Version

3 months ago

Changelog

README file from

Github

Obsidian Liuyao Plugin

This plugin renders six-line divination diagrams in Obsidian from a fenced liuyao code block.

Recent Updates

0.4.1 Released

  • Enhanced copyright watermark with author attribution and year
  • Improved type declarations for better type safety
  • Minor styling improvements to watermark display

0.3.x Released

  • Watermark enhancements for proper attribution

0.2.x Released

  • Color customization for dynamic Yaos

Supported Syntax

The liuyao block can also include a date on the first non-empty line and the hexagram input on the second line:

It will be rendered like

Rules

  • The input must contain exactly 6 digits.
  • Each digit must be one of 0, 1, 2, or 3.
    • 0: old yin, 老阴
    • 1: young yang, 少阳
    • 2: young yin, 少阴
    • 3: old yang, 老阳
  • The first digit is the bottom line, and the sixth digit is the top line.
  • The plugin looks up the matching hexagram metadata from src/core/common.ts.
  • A liuyao block may optionally use the first non-empty line as a date and the second non-empty line as the hexagram input.
  • The hexagram input also supports 6 trigram names, such as 坤坎离离震兑.

The rendered card shows:

  • The six gods on the far left when a valid date is provided
  • The family and hexagram name at the top, such as 乾宫 乾为天
  • The line relation text on the left of each line
  • The 世 or 应 marker on the right when present
  • A copyright watermark at the bottom left: v{VERSION} © {YEAR} Kasukabe Tsumugi. All Rights Reserved.

Watermark

Each rendered divination card includes a copyright watermark in the bottom left corner. The watermark displays:

  • The current plugin version
  • The current year
  • Author attribution: "Kasukabe Tsumugi"

This watermark is styled with the .kasukabe-watermark CSS class and can be customized if needed.

Development

The source entry is src/main.ts, and build artifacts are written to dist/.

  1. Install dependencies: pnpm install
  2. Build the plugin: pnpm build

The build produces:

  • dist/main.js
  • dist/manifest.json
  • dist/styles.css

Copy those three files into your vault at .obsidian/plugins/liuyao/.