Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ authored May 27, 2023
1 parent e88cf9d commit 33e4cd1
Show file tree
Hide file tree
Showing 35 changed files with 746 additions and 520 deletions.
25 changes: 25 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"template": "https://github.com/sphinx-notes/template",
"commit": "202f9756fdd661ab195d20bb6926a9481ee1d78a",
"checkout": null,
"context": {
"cookiecutter": {
"namespace": "sphinxnotes",
"name": "lilypond",
"full_name": "sphinxnotes-lilypond",
"author": "Shengyu Zhang",
"description": "Sphinx extension for embedding LilyPond scores",
"version": "1.6.0",
"github_owner": "sphinx-notes",
"github_repo": "lilypond",
"pypi_name": "sphinxnotes-lilypond",
"pypi_owner": "SilverRainZ",
"dependencies": [
"Sphinx >= 4"
],
"additional_docs": [],
"_template": "https://github.com/sphinx-notes/template"
}
},
"directory": null
}
41 changes: 24 additions & 17 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
name: Pages
name: Deploy Sphinx documentation to Pages

# Runs on pushes targeting the default branch
on:
push:
branches:
- master
branches: [master]

# Cancel any in-progress job or run
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
pages:
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Setup locale
run: |
- run: |
sudo locale-gen en_US.UTF-8
sudo update-locale
- name: Install dependencies
run: |
sudo apt-get update;
sudo apt-get install lilypond timidity imagemagick fonts-noto-cjk
- name: Checkout
uses: actions/checkout@master
- uses: actions/checkout@master
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
fetch-depth: 0
submodules: true # for jianpu-ly
- name: Build and Commit
uses: sphinx-notes/pages@v2
- name: Push changes
uses: ad-m/github-push-action@master
- id: deployment
uses: sphinx-notes/pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
checkout: false
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,8 @@ dmypy.json
# Pyre type checker
.pyre/

# Sphinx build dir
_build/
# Poetry
poetry.lock

# Sphinx
docs/_build/
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2020, Sphinx Notes
Copyright (c) 2023, Shengyu Zhang
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -26,4 +26,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13 changes: 10 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
include README.rst
# This file is generated from sphinx-notes/template.
# You need to consider modifying the TEMPLATE or modifying THIS FILE.

include LICENSE
recursive-include doc *
prune doc/_build
include README.rst

recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]

recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
34 changes: 22 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
LANG=en_US.UTF-8
# This file is generated from sphinx-notes/template.
# You need to consider modifying the TEMPLATE or modifying THIS FILE.

LANG = en_US.UTF-8

MAKE = make
PY = python3
Expand All @@ -8,20 +11,27 @@ RM = rm -rf
docs:
$(MAKE) -C docs/

.PHONY: dist
dist: setup.py
$(RM) dist/ build/ *.egg-info/
$(PY) setup.py sdist bdist_wheel
$(PY) -m twine check dist/*
.PHONY: test
test:
$(PY) -m unittest discover -s tests -v

.PHONY: upload
upload: dist/
$(PY) -m twine upload --repository pypi $<*
.PHONY: dist
dist: pyproject.toml
$(RM) dist/ # clean up old dist
$(PY) -m build

.PHONY: install
install: dist
$(PY) -m pip install --user --no-deps --force-reinstall dist/*.whl

.PHONY: test
test: tests
$(PY) -m unittest discover -s tests -v
.PHONY: upload
upload: dist
$(PY) -m twine upload --repository pypi $</*

.PHONY: test-upload
test-upload: dist
$(PY) -m twine upload --repository testpypi $</*

.PHONY: update-template
update-template:
$(PY) -m cruft update
33 changes: 29 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
=============================
Sphinx extension for LilyPond
=============================
.. This file is generated from sphinx-notes/template.
You need to consider modifying the TEMPLATE or modifying THIS FILE.
Please refer to https://sphinx-notes.github.io/lilypond/ for documentation.
====================
sphinxnotes-lilypond
====================

.. image:: https://img.shields.io/github/actions/workflow/status/sphinx-notes/lilypond/pages.yml
:target: https://sphinx.silverrainz.me/lilypond
:alt: Documentation Status

.. image:: https://img.shields.io/github/license/sphinx-notes/lilypond
:target: https://github.com/sphinx-notes/lilypond/LICENSE
:alt: Open Source License

.. image:: https://img.shields.io/pypi/v/sphinxnotes-lilypond.svg
:target: https://pypi.python.org/pypi/sphinxnotes-lilypond
:alt: PyPI Package

.. image:: https://img.shields.io/pypi/dw/sphinxnotes-lilypond
:target: https://pypi.python.org/pypi/sphinxnotes-lilypond
:alt: PyPI Package Downloads

Sphinx extension for embedding LilyPond scores.

* Documentation: https://sphinx.silverrainz.me/lilypond
* Source: https://github.com/sphinx-notes/lilypond
* Changelog: https://sphinx.silverrainz.me/lilypond/changelog.html
* Tracker: https://github.com/sphinx-notes/lilypond/issues
* Download: https://pypi.org/project/sphinxnotes-lilypond/#files
11 changes: 6 additions & 5 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# This file is generated from sphinx-notes/template.
# You need to consider modifying the TEMPLATE or modifying THIS FILE.

# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python3 -msphinx
SOURCEDIR = .
BUILDDIR = _build

Expand Down
4 changes: 0 additions & 4 deletions docs/README

This file was deleted.

File renamed without changes.
14 changes: 14 additions & 0 deletions docs/_scores/lily-directive-c-major-scale.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. lily::
:noedge:
:nofooter:
:audio:

\score {
<<
\new Staff {
\time 4/4
\tempo 4 = 70
c' d' e' f' g' a' b' c''
}
>>
}
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions docs/_scores/lilyinclude-directive.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. lilyinclude:: /_scores/witch-spring.ly
:nofooter:
:noedge:
:audio:
File renamed without changes.
File renamed without changes.
Empty file added docs/_static/.gitkeep
Empty file.
11 changes: 11 additions & 0 deletions docs/_templates/version.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. list-table::
:align: left

* - :ref:`📅 {{ date }} <any-version.date>`
- :tag:`{{ title }}`


{% for line in content %}
{{ line }}
{% endfor %}

89 changes: 89 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
.. This file is generated from sphinx-notes/template.
You need to consider modifying the TEMPLATE or modifying THIS FILE.
==========
Change Log
==========

.. Example:
1.0.0
=====
.. version:: _
:date: yyyy-mm-dd
Change log here.
Version 1.x
-----------

.. version:: 1.6.0
:date: 2022-10-08

- Fix resolution of SVG output (:pull:`18`)
- Add basic Jianpu (Numbered Musical Notation) support (:issue:`17`)
- Don't panic when running unsupported builders (:issue:`20`)

.. version:: 1.5
:date: 2022-03-13

- Add LaTeX builder suppport (:issue:`11`)

.. version:: 1.4
:date: 2021-12-19

- Note ly files as dependencies, so Sphinx will rebuild document when ly file changes
- Won't crash when score file does not exist
- Left a "system message" paragraphs when score build failed
- Add support for MP3 audio format, FFmpeg_ is required

.. _FFmpeg: https://ffmpeg.org/

Version 1.3
-----------

.. version:: 1.3
:date: 2021-11-07

- Add ``controls`` flag for specifing the position of the control bar

.. version:: 1.2
:date: 2021-09-17

- Simplify argument passing between lilypond binding and sphinx extension
- Add ``loop`` flag for directives
- Add confval ``lilypond_audio_volume``

.. version:: 1.1
:date: 2021-09-12

- Add confval ``lilypond_png_resolution`` for customizing score resolution in PNG format
- Add confval ``lilypond_inline_score_size`` for customizing height of :ref:`inline score <lily-role>`
- Stop using ``<figure>`` as container of block-level score, which is buggy on Safari

.. version:: 1.0
:date: 2021-06-26

- Rebuild env when configuration changed
- Fix wrong license value

Pre-release
-----------

.. version:: 1.0a2
:date: 2020-12-27

- Support multiple pages documents
- Imporve of lilypond outputs cache

.. version:: 1.0a1
:date: 2020-12-26

- Fix invalid insertion of ``\header``
- Set default audio format to wav

.. version:: 1.0a0
:date: 2020-12-06

The alpha version is out, enjoy~
Loading

0 comments on commit 33e4cd1

Please sign in to comment.