Closed SilverRainZ closed 2 years ago
I am working on this and will file a PR soon. hope it can be merged eventually.
谢谢~
哎哟 how much have you done so far? I started moving some things around already .. basically we first need to make sure it can be imported and doesn't try to do things with sys.argv when __name__
is not "__main__"
I just make it work in an ugly way, it is quite complex so I indented all functions one level except help and IO.
You are the one most familiar with this program, if you already started, I am so glad to see that, you can do it better than me. I just 乐享其成 :D
Just indenting all functions might not work so well: some things needed to be declared global
so they could be read by other functions later on. Try now (see test.py). But I'm not sure if it's ready for PyPI .. I expect they have stricter style requirements (haven't checked)
It works well. Thank you very much~
PyPI is not necessary, I can include this as a git submodule.
Hi @ssb22, the module name contains a dash so we can't use the import statement directly, any idea to improve this?
Please just use jianpuly = __import__("jianpu-ly")
for now. I know having a hyphen in it is not ideal, but I'm not sure I can change that now without breaking everybody's scripts, except perhaps by adding a second file as a wapper, but then it will no longer be all in one file for those who just wget
it.
Ok, it is ok, I renamed it by using s symlink: https://github.com/sphinx-notes/lilypond/tree/jianpu/sphinxnotes/lilypond
好主意☺
Since there is no other problem, I close this issue.
Thank you very much :D
Finally, we can write Jian Pu in Sphinx: https://sphinx.silverrainz.me/lilypond/#jianpu-numbered-musical-notation :D
Hi, I am the author of sphinxnotes-lilypond, an extension for embedding LilyPond score into Sphinx documentation. I want to add Jian Pu support (https://github.com/sphinx-notes/lilypond/issues/17) for it.
It seems that this project is a CLI tool for now. It would be better to make this project importable, so other project (like sphinxnotes-lilypond) can use it.
Thank you~