Skip to content

takanory/sphinx-nekochan

Repository files navigation

sphinx-nekochan

PyPI Python versions GitHub Actions Documentation status PyPI - Download License

A Sphinx extension for adding the Nekochan(cat) emoji to documents.

See the sphinx-nekochan documantation for more details.

Installation

You can install sphinx-nekochan with pip:

pip install sphinx-nekochan

Enable extension

In your conf.py configuration file, add sphinx_nekochan to your extensions list:

extensions = [
    ...
    "sphinx_nekochan",
    ...
]

Use nekochan role or directive

When you use the nekochan roll or directive, you will see any nekochan emoji.

  • markdown
Welcome to nekochan emoji {nekochan}`banzai` world!!

* Enjoy nekochan emoji {nekochan}`choo-choo-train`
* I love {nekochan}`beer`

```{nekochan} melty
```
  • reStructuredText
Welcome to nekochan emoji :nekochan:`banzai` world!!

* Enjoy nekochan emoji :nekochan:`choo-choo-train`
* I love :nekochan:`beer`

.. nekochan:: melty

nekochan emoji with text

Customize emoji height and alt text

You can specify height and alt text with a semicolon(;) after the name of the nekochan role.

  • markdown
* Big bear nekochan {nekochan}`kuma-nya;2em`
* Huge hot-sprint nekochan {nekochan}`hot-spring;128px`
* Customize alt text for emoji {nekochan}`gohan-taberu;3em;Nekochan eating rice ball`


```{nekochan} lgtm
:alt: Looks Good To Me
:height: 3em
```
  • reStructuredText
* Big bear nekochan :nekochan:`kuma-nya;2em`
* Huge hot-sprint nekochan :nekochan:`hot-spring;128px`
* Customize alt text for emoji :nekochan:`gohan-taberu;3em;Nekochan eating rice ball`


.. nekochan:: lgtm
   :alt: Looks Good To Me
   :height: 3em

customize emoji height and alt text

Transform emoji

Also, you can specify transform option with a semicolon(;) after the alt text of the nekochan role.

  • markdown
* Skip {nekochan}`skip-nya;2em` rotated 90 degrees clockwise {nekochan}`skip-nya;2em;;rotate-90`
* Flip the left and right side of the {nekochan}`yoshi;2em` Yoshi emoji {nekochan}`yoshi;2em;;flip-horizontal`

```{nekochan} snake
:transform: flip-vertical
:height: 2em
```
  • reStructuredText
* Skip :nekochan:`skip-nya;2em` rotated 90 degrees clockwise :nekochan:`skip-nya;2em;;rotate-90`
* Flip the left and right side of the :nekochan:`yoshi;2em` Yoshi emoji :nekochan:`yoshi;2em;;flip-horizontal`

.. nekochan:: snake
   :transform: flip-vertical
   :height: 2em

Transform emoji

License

About

A Sphinx extension for adding the "Nekochan(cat) emoji" to documents

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published