How to combine Shell Commands with Templater or Dataview js scripts

I have been able to write an script in Python that scan and counts the number of keywords and highlights in PDF files. It works great from the command line in Linux. I can call that Python script from within Obsidian using the Shell Commands plugin. There is a nice feature in SC that allows to run the SC script via a markdown link. Exactly like this:

[](obsidian://shell-commands/?vault=VaultData&execute=csbja16la7)

This link calls Python with this SC line:

uv run Extras/python/searchmultipdf.py --scan all  >> python_list.md

uv is a very cool environment manager for Python. python_list.md is the output where I check from Obsidian how the script progresses.

If I place this link in any note I could press the link and voila, the Python script executes.

The end goal of this question is to integrate the results of the Python execution (a CSV file) with Obsidian templater. After I scan the PDFs, I have the CSV file, but now I want to read the CSV file from templater and dataview. But all automatically. I have tested this whole workflow and works but manually.

Any ideas or clues on how to integrate Shell Commands with Templater and Dataview?

Dataview can read csv files directly, so no issue in that department. Will the file change, or is it a one time file read (for any given file), so you should call it from Templater ?

The CSV will change every time that:

  • A new paper (as PDF) is added to the vault
  • An existing paper went through some review and won some highlights (comments)
  • After some PDF changes accumulate, then it is time to run the Python script searchmultipdf.py, which output, a CSV file, will be read by a dataview JS script.

All of this works currently but manually. I am looking to automate all of this with one script; it doesn’t matter if the script is written with Templater, Dataview, or a shell script. The automation should do all this with one click.

I feel I am very close if I learn how to run a markdown link like this [](obsidian://shell-commands/?vault=VaultData&execute=csbja16la7) from Templater or dataviewjs.

URI commands…I looked into this months ago. I don’t remember much.
Obsidian Advanced URI GH page (Issues, Discussions if any) can be of use.
Actually, it may be Obsidian URI Commands that can be used to run URI links as commands.
At a push, Obsidian Typescript methods could be used, if Obsidian API is known by Claude.ai (it looks to me it does know some of it).
But these are just ideas, I know nothing concrete.