On 4/26/07, Martin Fick <[EMAIL PROTECTED]> wrote: > I have installed and tried out the Cookbook/ChordPro > recipe and was able to hack together a few very simple > fixes to get the "chord graphs (little boxes showing > chord fingerings)" to work. Primarily, I put a Keep() > around the entire output. Secondly I wrapped a <pre> > around the chordblocks themselves so that a block does > not appear all on one line. These are simple fixes, > bu maybe Sproaticus can do a better job of properly > adding these suggestions to his recipe since he is > more familiar with it?
I apologize for not keeping the ChordPro parser up-to-date. Between a new job and new family, I haven't had much time to work on it of late. Unfortunately, that is my excuse from almost exactly one year ago. (see the bottom of http://pmichaud.com/wiki/Cookbook/ChordPro ) Truth be told, since my job is almost exclusively in Python and Javascript, I haven't touched PHP or this recipe in almost a year. If anyone wants to take ownership of this project, they have my full blessing. > Also, I am interested in replacing these text based > chordblocks with graphical ones, does anyone have any > suggestions as to a libre software program that could > help with this? I was looking into using the GD image library, which may or may not be supported on your webhost. (See http://us.php.net/gd for API docs.) The basic idea is this: instead of an ASCII-formatted chord diagram, the ChordPro script provides a URL to a PHP/GD-based script, e.g. chorddiagram.php - a href="/wiki/cookbook/chordpro/chorddiagram.php?chord=G320033" chorddiagram.php will generate the file /wiki/pub/chordpro/G320033.png (if necessary) then either 302 redirect to it or stream it back to the browser. It would also use a user-provided dictionary so that e.g. chorddiagram.php?chord=G will fetch the file G320033.png (or G355433.png if you prefer since it's up to the user.) For extra credit, this custom chord dictionary could be parsed from a wiki page consisting of {define} directives. That's the easy part. The hard part is writing and testing the thing. :-) Jeremy _______________________________________________ pmwiki-devel mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
