|Subject:||Re: frescobaldi destination temp folder|
|Date:||Sun, 22 Apr 2018 09:13:42 +0200|
Yes, without looking again in the source code I assume that $FILE_NAME accesses the corresponding property of the text editor. And that only has a file name when the document is actually a file on disk. The temporary file name used for compiling unsaved scores is generated in a totally different location (of the Frescobaldi code).
Am 21.04.2018 um 14:54 schrieb Gianmaria Lari:
On 21 April 2018 at 09:44, Gianmaria Lari <address@hidden> wrote:
On 21 April 2018 at 08:39, Urs Liska <address@hidden> wrote:
Am 20.04.2018 um 23:06 schrieb Gianmaria Lari:
When I want to try a lilypond snippet using Frescobaldi, I normally create a new file and I compile it without save it explicitly. Frescobaldi saves it for me in a temporary folder (in my Frescobaldi settings I have "Save the document if possibile" checked).
For example if I do it now, in the lilypond log window I read:
Starting lilypond-windows.exe 2.19.81 [Untitled (4)]... Processing `C:/Users/GIANMA~1/AppData/Loc
al/Temp/frescobaldi-n5pqsywf/t' Parsing... Interpreting music... Preprocessing graphical objects... Interpreting music... mp0fvvk0ae/document.ly
So the termporary path where it is saving my lilypond source is
I'm writing a small program that make some processing on the lilypond source file and the pdf/png file and I would need this path information.Does Frescobaldi writes this path in any (log) file? Alternatively, is there any way to make Frescobaldi/lilypond writing the compile result in a file as well as in the lilypond log window?
I'm not sure what you want to achieve here.
It might be possible to access the information you are looking from through a Frescobaldi Snippet (which may be written in Python), but could you state more explicitly what your "small program" should be doing with your unsaved LilyPond code?
(Just to be precise the code *is saved*; Frescobaldi do this automatically when I compile the code. The problem is only to know where it is saved.)
The goal of my small application is save the snippet and the generated score. When I press a shortcut key, the snippet source file and the png (or pdf) is put online etc. etc.
I can, of course, compile and manually copy and past the path I see in the lilypond log window, but I would like to make this programmatically.
Please let me know if I have been clear.Thank you Urs, g.
after your message I found in the Frescobaldi documentation the variable $FILE_NAME. This can be used in a snippet to get the full name (including path) of the file. Unfortunately it returns the document file name only if you previously explicitly saved the file. Uhm.... I think I will try something different.
Thank you anyway!g.
I don't have the time to really think this through this weekend.
But I still don't fully understand why you don't want to save the score to an explicit file. I assume that at one point, e.g. when you deploy files to a web server you will have to use some fixed files and filenames, don't you?
Given what I see so far I would do the following:
- Save the LilyPond code to some explicit file
- Have a Frescobaldi snippet with keyboard shortcut that will trigger some external script and pass that script the file name.
- This external script can do everything you need with the LilyPond code.
Is that suggestion of any help?
|[Prev in Thread]||Current Thread||[Next in Thread]|