Closed Dekker1 closed 7 years ago
Assuming you're on a devel version you can get that through (car (ly:input-file-line-char-column (*location*)))
If you come up with a pull request (which I'd look forward to) we can see to making it work with 2.18 as well.
Ah, or if you don't mind adding a dependency to the "new" openLilyLib you can use
\include "openlilylib"
\thisFile
(\thisFile
returning a string)
Thanks for the quick response, I'll have a look once I have some free time.
Closed through #146
First off thanks for the great work, this repository has been saving me quite a lot of time.
So my problem: I wanted to use the
gitRevisionNumber
command from thegit-commands
snippets to add a version number to my sheet music. However, I manage various pieces of sheet music in one repository. This means that the revision numbers will be the same for all different pieces of sheet music, which is incorrect, but to be expected, as the git command executed is:git log --oneline | wc -l
. For git however it isn't a problem to make it file specific, we can uselog --oneline -- /path/to/file | wc -l
. I was planning on making a pull request, but I can't seem to find a way in the lilypond documentation to determine the calling file location. Which results in my question: would it be possible to create such agitFileRevision
? Or should I just use a preprocessing script?