On macOS I can use qlmanage to compute thumbnail or preview by using command like: "qlmanage -t/p". I want to know how can I write command line code like it?