Ok, I managed to make the extension work (stupid me, I put two extensions = ).
But now the extension seems to have a problem. It creates the .ly file in /tmp but the .png is not created so the build fails. Please find the log attached. I guess this (from the README in lilypond extension) is optional: Installing ========== - A new config 'pnglily_fontsize', which can be used to set fontsize of 'lily' role and 'lily' directive. :: pnglily_fontsize = ['6', '-3'] The first value is for 'lily' role setting in absolute fontsize. The second value is for 'lily' directive setting in relative fontsize. I wonder: why putting it in Installing section? Maybe is it required? I've tried to put in conf.py: pnglily_fontsize = ['6', '-3'] But I get the same errors. Cheers, Federico Il giorno dom, 25/07/2010 alle 22.36 +0200, Federico Bruni ha scritto: > I've realized that the lilypond.py file found in the mailing list was > not enough. > I've downloaded the complete package of lilypond-1.0 here: > > http://bitbucket.org/birkenfeld/sphinx-contrib/downloads > > I've also changed the path in conf.py: > > > sys.path.append(os.path.abspath('exts/lilypond/sphinxcontrib')) > > extensions = ['lilypond'] > > > > But again lilypond code is not rendered and I get a warning which says: > > (ERROR/3) Unknown directive type "lily" > > I attach the very simple file I'm trying to process. > Maybe there's some synthax error? > > Any hint appreciated. > > Thanks, > Federico > > > > Il giorno dom, 25/07/2010 alle 07.24 -0700, Federico Bruni ha scritto: > > Hi all, > > > > I'm a brand new Sphinx user (really impressed by your software). > > > > I'm planning to write a tutorial about LilyPond (http://lilypond.org/) > > and I've found out that last year a specific extension for LilyPond > > was written: > > > > http://groups.google.com/group/sphinx-dev/browse_thread/thread/e6fb63b23a539714/0dde66d7970d7e5d?lnk=gst&q=lilypond#0dde66d7970d7e5d > > > > I'm trying to use it, but it's not working. > > > > Here's what 've done: > > > > * started a project with sphinx-quickstart > > * added file lilypond.py (taken from thread above) in the subdrectory > > 'lily' in the root dir of my project > > * added these line in conf.py: > > > > sys.path.append(os.path.abspath('lily')) > > > > extensions = ['lilypond'] > > > > Then I add a lilypond snippet in a .rst file: > > > > .. lily:: > > > > \relative c'' { > > c4 a d c > > } > > > > When I compile with 'make html' I get this error: > > > > (ERROR/3) Unknown directive type "lily". > > > > What I'm missing? > > > > Thanks in advance for your help. > > Regards, > > Federico > -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-...@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
# Sphinx version: 1.0 # Docutils version: 0.7 release # Jinja2 version: 2.5 Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0-py2.6.egg/sphinx/cmdline.py", line 173, in main app.build(force_all, filenames) File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0-py2.6.egg/sphinx/application.py", line 207, in build self.builder.build_update() File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0-py2.6.egg/sphinx/builders/__init__.py", line 198, in build_update 'out of date' % len(to_build)) File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0-py2.6.egg/sphinx/builders/__init__.py", line 254, in build self.write(docnames, list(updated_docnames), method) File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0-py2.6.egg/sphinx/builders/__init__.py", line 293, in write self.write_doc(docname, doctree) File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0-py2.6.egg/sphinx/builders/html.py", line 407, in write_doc self.docwriter.write(doctree, destination) File "/usr/local/lib/python2.6/dist-packages/docutils-0.7-py2.6.egg/docutils/writers/__init__.py", line 76, in write self.translate() File "/usr/local/lib/python2.6/dist-packages/Sphinx-1.0-py2.6.egg/sphinx/writers/html.py", line 38, in translate self.document.walkabout(visitor) File "/usr/local/lib/python2.6/dist-packages/docutils-0.7-py2.6.egg/docutils/nodes.py", line 173, in walkabout if child.walkabout(visitor): File "/usr/local/lib/python2.6/dist-packages/docutils-0.7-py2.6.egg/docutils/nodes.py", line 173, in walkabout if child.walkabout(visitor): File "/usr/local/lib/python2.6/dist-packages/docutils-0.7-py2.6.egg/docutils/nodes.py", line 173, in walkabout if child.walkabout(visitor): File "/usr/local/lib/python2.6/dist-packages/docutils-0.7-py2.6.egg/docutils/nodes.py", line 165, in walkabout visitor.dispatch_visit(self) File "/usr/local/lib/python2.6/dist-packages/docutils-0.7-py2.6.egg/docutils/nodes.py", line 1601, in dispatch_visit return method(node) File "/home/fede/public_html/lilypond/exts/lilypond/sphinxcontrib/lilypond.py", line 208, in html_visit_displaylily fname = render_lily(self, music) File "/home/fede/public_html/lilypond/exts/lilypond/sphinxcontrib/lilypond.py", line 154, in render_lily shutil.copyfile(path.join(tempdir, 'music.png'), outfn) File "/usr/lib/python2.6/shutil.py", line 50, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/tmp/tmpRSidJA/music.png'