Sending data to Quarto via runCommand()

Q1. In you original test TBX, the ‘note’ you were exporting didn’t export any data because:

  • $HTMLDon’tExport was true (non-default). This tell Tinderbox to ignore processing the note when it is part of an export call (whole document or only selected item(s)).

  • your document had no export template. so, even having fixed the last point (i.e. $HTMLDon’tExport is now true), the note exports nothing its template—or lack of a template—defines not exportable data.

So, what sort of template does your document need? Not a normal HTML export template as you just want only the $Text in plain text from. In other words, the text as you see it in text with no further processing. There are two ways to specify that in export code:
^text(plain)^
^value($Text)^
In my template I use the last of the two, but either is OK. You will also see from the edited TBX I posted that the template I added, called ‘just-text’, that the only content of the template (i.e. the template note’s $Text) is:
^value($Text)^
When applied to a note and the note is exported, Tinderbox simply takes the contents of $Text, without additional processing and saves it as a file using the desired file name and extension—in this case ‘note.qmd’.

So that is what ^value($Text)^ does … the ‘how?’.

Now we know (see above) the point in the template, we simply make a new template in your TBX’s /Templates container. Here is the such a template shown in my earlier demo:

Now you have the template, it is available for use as a template. How to apply it. You can set it via action code:

// using only template name
$HTMLExportTemplate = "just-text";
// or
// using only template path
$HTMLExportTemplate = "/Templates/just-text";

As long as the template’s $Name is unique in the TBX, using just the template $Name is OK, otherwise use its full $Path.

Easier, at least until you are more practised with export is to set the export template via the Export Inspector using the pop-up illustrated below:

Q2. Using the template

I’m not sure if I fully understand, but I think your question is “how do I apply this new template to other notes being the test note above?”.

OK, a template is a note used to tell Tinderbox how to format the data exported from a note. Rather in the same way a prototype can configure one note or many notes, a template can be used for export by one note or by many notes. In the latter case all notes using the same template are precessed the same way, but using different data (from the note being processed for export). Thus in aTbRef >95% of the 2,000+ HTML pages are created via a single template being used by different notes.

Put simply export is a case of: source note data (the ingredients) + template (the recipe) → exported note

Where the note and the template live in the document are not an issue. Any note you wish to export must be allowed to export (see Q1 above) and have a template assigned. So, as you add new notes that will export to QMD files, give each one the correct template.

Tip: if you will have many such QMD notes, consider using a prototype for all such files. Then set the desired QMD export template in the prototype as this will set it automatically for any note using the prototype. Once set up, having the correct export template is one less thing to forget when making a QMD note.

Summary. Here, we’ve moved away from Quarto issue to basic export issues. Given the questions asked here, I would commend reading up on formatted (i.e. ‘HTML’ ) export. The problems raised come not from the Quarto problem but simply from not understanding how export works. I don’t mean that in a disrespectful manner, but simply that taking a little time to understand the general functioning of export will mean you will already know the answers to these questions when they arise. :slight_smile:

I hope this helps.

2 Likes

Dear Dr.Mark Anderson,
You truly deserve to be called a gentleman.
I am grateful to you for all the details you have given me.

As you pointed out, my knowledge is broken here and there.
I spent the afternoon trying to make up for my lack of knowledge.
The goal of what I want to do is a little bit more clear,
and there are so many things that I don’t know about this and that.
Really ashamed of myself.
I promise to study again with a serious mind.
In closing, I would like to thank you in advance,again.
Yours faithfully, WAKAMATSU
P.S.
Could you give me a little more time to learn?

1 Like

Thanks for those kind words. Please, do not be harsh on yourself: as I said, I wasn’t being judgemental, as much of knowledge is only of relevance when we find we need it and don’t have it!! At the same time, we can’t learn everything. I was—hopefully—politely trying to explain that your work had got to the point that understanding how export works would be a help (i.e. time not wasted). but that nuance perhaps did not travel, and if so, my apologies. :slight_smile:

Something I’ve taken away from this thread is that the community would benefit from some better explanations for where we are exporting non-HTML data (and have no interest in the HTML-export derivation of the same).

Historically, Tinderbox exported to text (for non techie people) and HTML for those embracing the new medium. In the 20+ years since, “HTML Export” is now termed “Export” or “Formatted export” but is, unintentionally, sightly a case of HTML export minus the HTML. Fine for us who know the back-story. Less useful if you just need to generate some YAML or JSON … or a QMD file.

I’m coming to see we need some description/demos of exporting to neither ‘text’ nor ‘HTML’ but rather explicit exporting plain text with automation (e.g. insertion of attribute values in the output). It’s not that it can’t be done, but currently the explanation tends to take a detour though turning off HTML-adding features, and that is confusing/irrelevant in context. I don’t see that as a failure of the app (that has to support many different types of use) but more in terms of missing usage descriptions better matching contemporary use.

Good luck with the Quarto data export … which is where this all started. :slight_smile:

2 Likes

Dear Dr.Mark Anderson,
I got it.
Write to the newly added template name “multi-text”
^value($Text)^
^children(^value($Text)^)^
In this way, additional child notes test1 & test2 & yaml children were placed in note.
The export is created to pdf without problems, and from Safari it is “viewer.html” where I was able to check the preview in.
Thank you very much.
I apologize for the delay in reporting.
Yours, WAKAMATSU
P.S.
For export when 3 children are placed in the same column as note.
Not yet successful.

Yes, in the layout below, your template above will export the text of B, C and D as part of A, but the text of Y and Z are not exported. Why? Because A’s children only export their own text. If you want X and Y included, i.e. all descendants of A use this template code:

^value($Text)^
^children(/Templates/multi-text)^

An alternative is:

^value($Text)^
^descendants(^value($Text)^)^

In both cases, (exportable) notes are exported and added to the main output as read in $OutlineOrder order.

Also, in the above case, if you will export the whole document and not A as a single note export, you likely want to set A’s $HTMLExportChildren to true or set it in A’s Export Inspector:

I assume we are talking about notes P, Q and R in the example below which assume :

If you want to export P, Q and R as separate notes, use the your existing ‘just-text’ template. If you want P, Q and R in the same exported note, which is the parent/first note. The answer to the last depending on which source note will export. Do you want A to also contain (the $Text of) P, Q, R? It’s isn’t clear. An annotated screen grab, like above might help us through issues of translations.

Tip: with export, it a very good idea, to structure your outline as used in export. Otherwise you end up in unnecessarily complex export code. Put another way, if your outline doesn’t reflect the export structure, _does it need to be that way? This tip is informed by lessons learned (mistakes made@) planning complex export in the past

To if, for example, you want the contents of P exported by A, make P a child of A in the outline. Trust me: it will make your work easier.

Dear Dr.Mark Anderson,
How are you doing?
Unfortunately, hot days continue in Japan as well.
I finally started experimenting to make the next step runCommand() .
Call quarto $Text(/log) = runCommand(“/usr/local/bin/quarto preview note.qmd”);
When I run this, “[91mERROR: note.qmd not found” is displayed in the log.
Call quarto 2 $Text(/log 2) = runCommand(“/usr/local/bin/quarto preview note.qmd”,“~/Tinderbox2023/note.qmd”);
And I added the location specification of note.qmd.
For the time being, permission “777” is applied to the “Tinderbox2023” folder itself and its inside.
Occasionally, I don’t see any errors in log 2,
but when I update by appending to the file
I get a permission error like this:
/bin/sh: line 2: /Users/kuni33/Tinderbox2023/note.qmd: Permission denied

It seems that the command in quarto changes the “number” on the
“Preview allocation” site every time.
For this, Users > Library > .chache > quarto > jt >
{“port”: 51389, “secret”: “3a1a41cb-23b9-40b9-9afe-3fb3c858d7cf”}
It seems that it is one of the procedures in compiling the file
based on the allocation number described in
It seems that there is also a reason why Terminal emits an error.
By removing this cache once in Terminal, at last normal
It will run “quarto preview note.qmd”.

This is my question.
Q01 : Will it work if I write permissions to Stamps?
I remember that there was an article about “permission permission” somewhere
It’s yesterday and today, but I haven’t been able to find “that place”.

Q02 : Is there an order of priority for writing in runCommand()?
The location of how to give permissions is “first” or “last”
Where should I write it to make it work properly?

Yours faithfully, WAKAMATSU
P.S
Should the permissions be chmod 755?
I found an explanation in the Command Line in your A Tinderbox Reference File, again.

In short, this is not a Tinderbox problem and trying to solve it from Tinderbox will only make your problem more complicated.

Part of the issue here is we are only seeing part of the problem which it is apparent is part of a larger.

The start of this was calling quarto in your macOS home folder i.e. ~ which is the short form of (for you of path (Macintosh HD) /Users/kuni33).

Stamps are internal to Tinderbox and don’t need nor use Unix permissions. In context, Tinderbox down’t set any permissions on exported files. Th e resulting permissions of such files is a macOS issue and should be fixed there. In other words your problem is less likely Tinderbox than the fact you have not got your macOs shell correctly configured for your needs I fear that’s a different area of expertise and is best investigated in a forum devoted to the macOs shell (or Unix). When you’ve resolved the OS permissions issue when creating files, only then return to testing Tinderbox.

Same as the last question. runCommand() is simply a method to ‘speak’ to the command line. If you need to set permissions on a file you could use runCommand() to pass a suitable chmod command.

Dear Dr.Mark Anderson,
Thank you for your reply.
A001 : As for the access right, I specified the access permission from Mac OS to Tinderbox,
I think that it turned out well without passing chmod from runCommand.

Q02 : If it is necessary to set access permissions to files in runCommand()
How do you write it to work?
(I’ll read up on Command Line a little more carefully.)

Postscript settings in Call quarto for solving problems with Stamps from Tinderbox
Was this written correctly?
[ $Text(/log 2) = runCommand(“/usr/local/bin/quarto preview note.qmd”, “~/Tinderbox2023/note.qmd”); ]

Yours, WAKAMATSU

Dear Mr.Wakamatsu
I would like to write about some of the things I have looked into and tried.

I had the same problem, Perhaps the following is the cause.

The next runCommand (or stamp?) waits until the first runCommand finishes.
I think this in itself is the correct specification (behavior).

❯ quarto preview note.qmd

Starting python3 kernel...Done

Executing 'note.ipynb'

pandoc
  to: latex
  output-file: note.tex
  standalone: true
  pdf-engine: lualatex
    ・・・
Output created: _site/note.pdf

Watching files for changes
Browse at http://localhost:5811/web/viewer.html

The command quarto preview launches a browser that displays the PDF,
It will continue to monitor the target qmd file for changes. (Second line from the bottom)

Therefore, the quarto preview command will not exit even if it is waiting.

If you modify the contents of note.qmd in this state, the PDF will be recreated from note.qmd and automatically displayed in the browser.

The following steps will get you close to what you want to do.

  1. Export note.qmd in Tinderbox.
  2. Run quarto preview note.qmd in a terminal application.
  3. note.pdf appears in the browser. (Leave it unclosed)
  4. Edit in Tinderbox and export note.qmd with overwrite.
  5. Wait a little and you will automatically see the updated note.pdf in your browser (with the same URL).
    Repetition of 4 - 5

(以下の手順を踏むと、やりたいことに近いことができると思います。

  1. Tinderboxでnote.qmdを出力
  2. ターミナルアプリでquarto preview note.qmd を実行する。
  3. ブラウザにnote.pdfが表示される。(閉じずにしておく)
  4. Tinderboxで編集して、note.qmdに上書きでエクスポートする。
  5. 少し待つと自動的にブラウザ(同じURLで)に更新後のnote.pdfが表示される。
    4〜5の繰り返し。)

I hope this information is helpful.

1 Like

Dear Mr.Takeshi Otsuka,
Thank you very much for your advice.
What you wrote in this Q&A session last time.
I am trying Quarto’s behavior on Tinderbox by running it.
I have adopted the procedure from 1 to 5 as it is.
Unfortunately, I am somewhat reluctant to use these features.
If possible, start the terminal directly from Tinderbox.

It is possible to perform a series of tasks
up to compilation and preview execution desirable?

That is because if I use Emacs 28.2,
from the document I am currently using, can call the terminal and
compile and run, and in the browser consistently run up to Preview.
Therefore, the benefits of using Tinderbox are reduced.
If I need to use simple quarto.app, extension in Visual Studio Code
is possible.
To explore the possibilities of Tinderbox,
I am doing trial and error this time.

大塚様
色々とアドバイスを有難うございます。
前回この質疑応答の中で貴君が書き込んでくれました事柄を
実行してTinderboxでのQuartoの振る舞いを試しております。
1〜5迄の手順をそのまま採用させていただいております。
残念ながら、此らの機能を使う事に多少の抵抗を感じています。
出来る事なら直接Tinderboxからターミナルを起動させて
コンパイル&プレビュー実行まで一連の作業が出来ることが
望ましいのですが?

其れというのも、Emacs28.2を使用すれば、今使用中の書類から
terminalを呼び出しコンパイル実行が出来、browserでの
Previewまで一貫して実行できます。
従ってTinderboxをわざわざ使用するメリットが減ってしまいます。
単なるquarto.appを使用するのならVisual Studio Codeでのextensionを
採用、設定すれば可能です。
Tinderboxの可能性を探るために、
今回試行錯誤をしているというわけです。若松久仁光拝
P.S

Scrivenerでquartoが使用できるもの。
参考まで。

1 Like

Great. Certainly, to work with the command line at some point you may need to consider the OS accesses setting in the macOS System Preferences → Security & Privacy → Privacy (sorry I’m still on OS 12 so your UI may look different):

Avoid being too liberal with access. _Start with granting access to just “Files and Folders” and only go to “Full Disk Access” if it is clear you want and need it. Note: my settings (above) for Tinderbox are more liberal than most need, but then I do all sorts of things for testing/consulting that most will never need.

I’ve written it as clearly as I can although I appreciate translation adds to difficulty. By the way, I hope you and others are aware that Google translate is built into every aTbRef page:

So here is the runCommand page in (Google Translate’s) Japanese:

Of course, I’ve no idea of the quality of the translation, but I hope it might help. :slight_smile: I think Google translate offers >110 different language translations.

Your error here is not the runCommand() syntax in terms of number of arguments but the values you are passing in them: :slight_smile:

  • you’ve passed the file argument twice, with is bound to confuse the command line
  • for reasons I don’t understand you either need to use a full path (i.e. not using a ~ shortcut) or use the relative path from ~ as shown in the suggestions below
  • If you want to set the locus of execution, you need to use the 3-argument form.
    So:
$Text(/log 2) = runCommand('/usr/local/bin/quarto preview "Tinderbox2023/note.qmd"');
// note outer *singl* quotes in the above
$Text(/log 2) = runCommand("/usr/local/bin/quarto preview note.qmd", ,"Tinderbox2023");
// or setting the locus of execution - note the empty 2second argument
$Text(/log 2) = runCommand'("/usr/local/bin/quarto preview note.qmd", ,"Tinderbox2023"');

Why it is like that is a mix of how the Unix shell works and action code syntax. The first is best researched in a forum specialising in macOS & shell. as to the action code, please re-read my runCommand() notes.

Actually
†. Grr, except the site map page. I’ll fix that.when I get a moment.

Hah - my error. The site map already has Google Translate, but on that page it is at the top whereas it is at the bottom elsewhere. The control is here on the site map:

Dear Dr.Mark Anderon,
Thank you for your detailed comments that always make me feel cared for.

Since the translation of the Japanese site is not translated properly,
I do not use google translate much.
Because it takes too much time to understand the Japanese that comes out,
I understand the part I want to know using “another translation application”.
Translation does not go out of the scope of translation,
so while repeating various ingenuity, I am trying to understand it
by relying on the training to grasp the “true intention”
as a musician for a long time.
I tried to fix the points you pointed out as follows.

$Text(/log 2) = runCommand(“/usr/local/bin/quarto preview note.qmd”,
2,“/Users/kuni33/Tinderbox2023/note.qmd”);

Even if I click on the modified Call quarto 2,
The error display is no longer displayed from log 2,
Was this written correctly?

Did I understand and insert this number “2” as a “return value”
for reading “note.qmd”?
Is the added number “2” an instruction to wait for 4 seconds?
When using Keyboard Maestro (ver.10.2),
I will insert a waiting time to ensure that the next item is executed.

If I do not enter any numbers, I will get a comment that
“note.qmd cannot be found”.

With warm regards,WAKAMATSU
[August 26, 2023 19:34:36 JST]

Thanks for the feedback on that. I am not surprised, not least as the content here is technical writing rather than creative prose. Still, it is free!

But that is not what I suggested. Review these:

Did you actually try any of those, as I can’t see any record of it. I would suggest at least trying any or all of the above.

OK, let’s look and your runCommand above which uses the 3-argument method. First argument #1

"/usr/local/bin/quarto preview note.qmd"

This is OK and you’re correctly making sure the path to Quarto is unambiguous. Next the inputs:

2

I’m not sure what you intended here but it’s not a valid quarto input as far as I can tell. Looking at your overall command I think this should be an empty input, i.e. where you have :

,2,

it should be:

,,

Lastly, the directory setting argument. This sets the directory (folder) of exception. In this case, where the script with run. In Terminal terms it is like changing directory (`cd``) to the folder where your qmd file is stored. But instead of that, you have given the path to a file so you should expect the overall command to fail as argument 3 is invalid data.

I don’t understand. I never suggested to add the mystery ‘2’ and so I don’t know why you code to add it.

As I understanding your ‘note.qmd’ file is at shell path /Users/kuni33/Tinderbox2023/note.qmd or ~/Tinderbox2023/note.qmd so your path argument is either /Users/kuni33/Tinderbox2023 or Tinderbox2023, the latter based on the default assumption of ~ as the place for execution of runCommand()-passed commands. As ‘Tinderbox2023’ is an immediate child of ~, no preceding / is needed. also as he argument is to a folder there should be no / at the end either. so we get:

runCommand("/usr/local/bin/quarto preview note.qmd",, "/Users/kuni33/Tinderbox2023")

which should be the same functionally as (my suggestion above) of:

runCommand("/usr/local/bin/quarto preview note.qmd",, "Tinderbox2023")

Try either/both of these last two commands before trying anything else. :slight_smile:

The easiest way to understand the 3-argument runCommand syntax is to imagine opening Terminal at the default home folder (~). Now:

// we change directory to the one wanted:
cd Tinderbox2023
// the current working directory is now ~/Tinderbox2023
// in that new context we run our command
/usr/local/bin/quarto preview note.qmd
// were we using any value for argument #2  that would would arrive via stdin

A suggestion: make the simplest possible Quarto source file that doesn’t use specific python or LaTeX version. Essentially a quarto hello world. Get that working/previewing before adding all the real payload. It will make your testing easier and for others to help test alongside you (without needing all your customisations/add-ons)

Dear Dr.Mark Anderson

Thank you very much for your basic instructions.
Let’s follow your suggestion and use a simple, regular “Hello World!”

My environment is Mac OS11.7.9 Big Sur Mac Mini 2014 (2.6GHz, 8GB memory)
TeXLive2023,
Brew Install(physon@3.9,3.10,3.11; pandoc 3.1.6.1;)

The Tinderbox file name this time is “quarto-test-00.tbx”.
(Only one small file “test 1” is attached.)
The contents of the test file are as follows

ーーー>>beginning of quote(from Main note00 Page)

title: “Quarto via Tinderbox”
format:
html:
code-fold: true


Hello, Quarto

Hello World !

Section

Hello All !

Subsection

Some text.

Subheading

More text.

ーーー>>End of quote(from Main note00 Page)

I followed the execution order of Mr.Takeshi Otsuka’s proposal.
#01 : Tinderbox Export Selected Note
#02 : Terminal > (cd ~/Tinderbox2023) > quarto preview note00.qmd
#03 : (Safari Preview)
#04 : (quarto-test-00.tbx update)
#05 : (Safari Preview)

In between,after your suggested execute ”Call quarto 1” Stamp :
$Text(/log 1) = runCommand(“/usr/local/bin/quarto preview note00.qmd”, “Tinderbox2023”);

I get the following error:

[91mERROR: note00.qmd not found

Error: note00.qmd not found
at Command.fn (file:///Applications/quarto/bin/quarto.js:103602:15)
at async Command.execute (file:///Applications/quarto/bin/quarto.js:8437:13)
at async quarto (file:///Applications/quarto/bin/quarto.js:127545:5)
at async file:///Applications/quarto/bin/quarto.js:127563:9e[39m
/bin/sh: line 2: Tinderbox2023: command not found

When using my “Call quarto 1” Stamp
I do not see anything in log 2, (even a comment about the error).

Isn’t it better to use an absolute path for the file path?
It is a simple file writing setting, but once
#02: “quarto preview note00.qmd” in “Terminal”
Looking at the log when it is executed, “html-math-method: mathjax” is called.
In the text, the setting related to mathematics
is “not described in anything”, but “mathjax” is called
I think it would work better to specify an “absolute path” to go?
What is your judgment?

=========Logo Quote from Terminal
@mac-mini Tinderbox2023
% e[Ke[?2004hquarto preview note0.qmd
e[25DDATETIME=date +%Y_%m_%d_%H%M%S;
LOGFILE=~/TerminalLogs/log_${DATETIME}.log;script
${LOGFILE}e[Ke[Ae[Ae[27Cquarto preview note0.qmde
[Ke[1Be[Ke[1Be[Ke[Ae[Ae[57C0.qmd e[1Ce[1Ce[1Ce[1Ce[1C
e[?2004le[1Be[1mpandoc e[22m

to: html

output-file: note00.html

standalone: true

section-divs: true

html-math-method: mathjax

wrap: none

default-image-extension: png

e[1mmetadatae[22m

document-css: false

link-citations: true

date-format: long

lang: en

title: Quarto via Tinderbox

Output created: note00.html

=======End of Logo Quote from Terminal

Yours faithfully,WAKAMATSU
quarto-test-00.tbx (178.1 KB)
P.S.
PDF is not specified for this export.
P.S.2
Even if I use an absolute path,
I get an error when deleting “2” in Call quarto 2.

1 Like

Most helpful.

Although it doesn’t change the outcome, I must confess to an error (me misreading my documentation s. If the target file is at ~/Tinderbox2023/note00.qmd, the third argument to set the folder of execution is ~/Tinderbox2023 and not Tinderbox2023 as I stated previously.

But…


It turns out the problem here is not Tinderbox or use of runCommand() but how the Quarto app works from the command line.

I made a OS folder at ~/Tinderbox2023 and exported ‘note00.qmd’ to it. If I first run Quarto fromTerminal, I then can’t update the file as the no export occurs.

But if I delete everything and start over, and run this stamp in Tinderbox:

runCommand("/usr/local/bin/quarto preview Tinderbox2023/note.qmd")
// neither app or file paths need quotes as they don't contain spaces

It works and Safari opens the web page. But I can’t then export. Indeed, I can’t then close the TBX. Why? If you run “/usr/local/bin/quarto preview Tinderbox2023/note.qmd” you see that Quarto stays running. This is likely why Tinderbox appears to hang.

Bottom line: runCommand() works, but not for this type of process. If you need to dig deeper, I suggest contacting tinderbox@eastgate.com as this is more an inter-app collaboration issue than something fellow users can fix with a different command line code.

A good learning point for later readers is the simple export in the last TBX posted made it much easier to test the basic Quarto functioning (for those willing to install the app). Quarto seems to export you will be editing the QMD file directly rather than updating by replacing the file itself. That is a limit of Quarto and not Tinderbox. It just took a while to surface that limitation in quarto.

At this point I’m going to step away from this problem as—though I am happy to proved be wrong—I don’t think Quarto can be used to create and update QMDs. Indeed, though (as I’ve just reported above) you can initiate a quarto preview via runCommand() you can’t stop the process. The Quarto CLI doesn’t have a quit comment. In Terminal you have to quit it using Ctrl+C.

We don’t often hit a wall like this, but at least the limitation isn’t in Tinderbox but rather in the app it is trying to control. :slight_smile:

Dear Dr.Mark Anderson,
Thanks again for your consideration of exporting in quarto and Tinderbox.
I am especially interested in exporting using quarto from Tinderbox,
but not that I am sticking to it.
According to the explanation on the site,
quarto is still in an unfinished state.
(Unfortunately, I think there is a mistake in your answer this time.
“Create a folder and export ‘note00.qmd’ there”
“Run this stamp on Tinderbox:”
The file name inside is “note00.qmd” and “zero zero” instead of “note.qmd”
Should it be the name inserted?)
I will imitate your procedure, delete everything once,
and then try to recompile.
This is just a follow-up test.
It is just a matter of checking the behavior.
I was able to Safari Preview from Call quarto only once.
Then I met same problem as you,
The file could not be updated after adding the note00.qmd file.

I would like to thank you for taking the time to confirm various things.
Yours faithfully,WAKAMATSU
P.S
Command “quarto preview note.qmd” from Terminal,
Starting python3 kernel…Done
It took more than 4 seconds to complete this task.

What do you think about the suspension of communication here
for the time being?

1 Like

thanks for your kind feedback.

Yes, I think we have gone as far as we can for now. Sorry we could not resolve this issue

Dear Dr.Mark Anderson,
Thank you very much for your guidance in detail the other day.

How to compile using runCommand ?
Coincidentally, [Call Apple Script from a Stamp] on Tinderbox Forum
[Call Apple Script from a Stamp]
After reading this post,
I learned that this runCommand “Osscript” can be applied to quarto preview.
Thank you Mr.Michael Becker for your article.
I decided to call the simple quarto-compile.scpt below with runCommand.

tell application “Terminal”
activate
set currentTab to do script “cd ~/Tinderbox2023/quartoTest”
do script “quarto preview note.qmd” in currentTab
delay 0.3
end tell

#01: Created Tinderbox file note.qmd

#02: Execute “run quarto” on Stamp

At this time, it is a prerequisite that the terminal is not started.
(Note)
This procedure is different from the method previously proposed by Mr. Takeshi Otsuka.
avoid! “2.Run quarto preview note.qmd in a terminal application.”

#03: A window (separate from the normal window) opens in Terminal and compilation begins.

#04: PDF files are displayed as viewer.html in Browse.

Sincerely,WAKAMATSU
P.S
Everything is working fine.

2 Likes

Wonderful news. Thank you for sharing this.