meanwhile i was writing you a reply to your comment i encouter the solution.
your solution arise the same problem i would need to run the program manually and after use templater to replace it what i want it’s that templater run the python script and take the output inside obsidian yesterday i come up with the idea, if i use a javascript to do that run a command in terminal using chatgpt and a little google i came up with the following program
const { execSync } = require('child_process');
function ejecutarComando(comando) {
try {
const output = execSync(comando, { encoding: 'utf-8', shell: true });
return output.trim(); // Elimina cualquier espacio en blanco adicional alrededor del resultado
} catch (error) {
// Manejo de errores si el comando falla
console.error('Error al ejecutar el comando:', error.message);
return ''; // Devuelve una cadena vacĂa en caso de error
}
}
module.exports = ejecutarComando;
im scared to move anything inside this code i dont know what does each part

this program run any command in terminal as long as we pass it as a string for example
<%tp.user.command(“pwd”)%>
but if you run the command pwd to see where you are executing commands in my case in Ubuntu its Home dir
so if i move for example hello.py to $HOME dir i can run the command
<%tp.user.command(“python3 hello.py”)%>
it will give me the output from
print("Hello World!")
the reason to do this was to make a time id for zettelkasten with this program
<%tp.user.command(“python3 time_base36.py”)%>
import calendar
import datetime
date = datetime.datetime.utcnow()
utc_time = calendar.timegm(date.utctimetuple())
conversion_table = {0: '0', 1: '1', 2: '2', 3: '3',
4: '4', 5: '5', 6: '6', 7: '7',
8: '8', 9: '9', 10: 'A', 11: 'B',
12: 'C', 13: 'D', 14: 'E', 15: 'F',
16:'G', 17:'H', 18:'I', 19:'J', 20:'K',
21:'L', 22:'M', 23:'N', 24:'O', 25:'P',
26:'Q', 27:'R', 28:'S', 29:'T', 30:'U',
31:'V', 32:'W', 33:'X', 34:'Y', 35:'Z'}
def decimalToHexadecimal(decimal):
if(decimal <= 0):
return ''
remainder = decimal % 36
return decimalToHexadecimal(decimal//36) + conversion_table[remainder]
print(decimalToHexadecimal(utc_time))
the expected output will be something like RX05WR this is the unix time in base 36 whose use all English alphabetical and numbers in this form its a more reduced id compared with the unique id 29062023010456
now if you want a specific folder where are store your python scripts at least for me i want no matter what i want they are the in the same folder so i store it in my vault so if you want execute your scripts need specify the folder
you need replace it with your path where you are gonna store your Scripts
const = directorio ='/home/path/vault'
const { execSync } = require('child_process');
function ejecutarComando(comando) {
try {
const directorio = '/home/user/Documents/Obsidian/user/Attachments/Public/Scripts/';
const output = execSync(`cd ${directorio} && `+comando, { encoding: 'utf-8', shell: true });
return output.trim(); // Elimina cualquier espacio en blanco adicional alrededor del resultado
} catch (error) {
// Manejo de errores si el comando falla
console.error('Error al ejecutar el comando:', error.message);
return ''; // Devuelve una cadena vacĂa en caso de error
}
}
module.exports = ejecutarComando;
If you need it for windows just ask it to chatgpt i use it to do this javascript i dont know anything about it
i almost sure there is a way to do it universal with powershell
as you read it my main language is Spanish so sorry for grammar mistakes