Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theopenwebjp/ruby-extractor
Ruby extraction library.
https://github.com/theopenwebjp/ruby-extractor
japanese javascript kana
Last synced: about 1 month ago
JSON representation
Ruby extraction library.
- Host: GitHub
- URL: https://github.com/theopenwebjp/ruby-extractor
- Owner: theopenwebjp
- License: mit
- Created: 2020-10-18T11:48:07.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-23T07:51:57.000Z (over 1 year ago)
- Last Synced: 2024-10-01T16:46:19.106Z (about 2 months ago)
- Topics: japanese, javascript, kana
- Language: JavaScript
- Homepage: https://theopenweb.info/app/ruby-extractor/
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Description
Ruby extraction library.
Extracts information from ruby tags including the Katakana/hiragana AND the linked Japanese character(s).## Usage
```bash
npm install @theopenweb/ruby-extractor
``````js
import {
extractReadableRubyFromPage,
extractRubyFromPage,
extractRubyFromElement,
extractFromRubyElement,
makeRubyDataListReadable
} from './index.js'/*
RubyData: {
str: string;
ruby: string;
}
*//**
* ๐น: ใใ ในใฟใผ
๐ผ: ใใณใใผ
*/
extractReadableRubyFromPage({ lf: '
' }) // 1st arg optional/**
* @return {RubyData[]}
*/
extractRubyFromPage()/**
* @return {RubyData[]}
*/
extractRubyFromElement(element)/**
* @return {RubyData[]}
*/
extractFromRubyElement(rb)/**
* ๐น: ใใ ในใฟใผ
๐ผ: ใใณใใผ
* @param {RubyData[]} rubyDataList
*/
makeRubyDataListReadable(rubyDataList, { lf: '
' }) // 2nd arg optional```
## Test
```bash
npx http-server ./
# http://localhost:8080
```## Localization
- [ๆฅๆฌ่ช](./README_JA.md)