Download the PHP package whojinn/sapphire without Composer

On this page you can find all versions of the php package whojinn/sapphire. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sapphire

PHP Composer Packagist Version Packagist Downloads Packagist PHP Version Support GitHub

Notice

Due to the ID change, I decided to recreate this repository. This repository will no longer be updated. Please use to this repository instead.

ID変更に伴い、このリポジトリを新しく作り直すことにしました。以後、このリポジトリは更新されません。代わりに、こちらのリポジトリをご利用ください

Sapphire

Parsedownのルビ振り拡張機能をリスペクトして作った、ルビ振り機能を追加するleague/commonmark用Extension

使い方

既にPHP並びにcomposerを使用できる環境にあることを前提とします。

インストール

  1. このリポジトリをクローンする
  2. なにがしかのシェルでcomposer require whojinn/sapphireと入力する
    1. または、composer.jsonに以下の行を追加してcomposer installを実行

ルビの振り方のルール

  1. ルビを振りたい単語の前に「|」、単語の後ろに「《(ルビ文字)》」を入れる
    • 例:シャッター破壊で|Go Ahead《前進だ》!!
      -> シャッター破壊で<ruby>Go Ahead<rt>前進だ</rt></ruby>!!
      -> シャッター破壊でGo Ahead前進だ!!
  2. ただし、文字種の違いでルビを振るべき単語を特定できる場合は「|」を省略できる
    • 例: すなわち、第四極《だいよんきょく》とは力なり
      -> すなわち、<ruby>第四極<rt>だいよんきょく</rt></ruby>とは力なり
      -> すなわち、第四極だいよんきょくとは力なり
  3. ルビの分割数と単語の文字数が一致する場合はルビを半角スペースで分けることで単語ごとにルビを振ることができる
    • 例: 悪七兵衛景清《あく しち びょう え かげ きよ》
      -> <ruby>悪<rt>あく</rt>七<rt>しち</rt>兵<rt>びょう</rt>衛<rt>え</rt>景<rt>かげ</rt>清<rt>きよ</rt></ruby>
      -> あくしちびょうかげきよ
  4. 上記に当てはまらない場合は、単語ごとにルビを振る
    • 例:萌黄《もえぎ》白糸《しらいと》折鶴蘭《おりづるらん》
      -> <ruby>萌黄<rt>もえぎ</rt></ruby><ruby>白糸<rt>しらいと</rt></ruby><ruby>折鶴蘭<rt>おりづるらん</rt></ruby>
      -> 萌黄もえぎ白糸しらいと折鶴蘭おりづるらん

設定

VS Code用スニペット

スニペット設定としてmarkdown.jsonを、スニペット用キーバインドとしてkeybindings.jsonを添付しました。機能は以下の通りです。

ライセンス

Apache License, Version 2.0


All versions of sapphire with dependencies

PHP Build Version
Package Version
Requires league/commonmark Version ^2.2
php Version ^8.0 || ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package whojinn/sapphire contains the following files

Loading the files please wait ....