我想在 XML 文件从位置 A 复制到 B 时为其添加时间戳。
const fs = require('fs');
// destination.txt will be created or overwritten by default.
fs.copyFile('\\\\IP\\FOLDER\\FILE.xml', 'c:\\FOLDER\\FILE.xml', (err) => {
if (err) throw err;
console.log('OK! Copy FILE.xml');
});
Run Code Online (Sandbox Code Playgroud)
副本有效,但我不知道如何添加时间戳。
我正在研究流静音检测。它正在 ffmpeg 中执行以下命令:
ffmpeg -i http://mystream.com/stream -af silencedetect=n=-50dB:d=0.5 -f null - 2> log.txt
Run Code Online (Sandbox Code Playgroud)
我想获得日志文件的 json 输出。“ffprobe”中有一个 json 选项,但silencedetect=n=-50dB:d=0.5不起作用。
帮助!
干杯!
我在 NodeJS 中制作了一个具有多种条件的脚本。我想使用 NodeJS 服务器将 console.log 导出/打印到网页。
function myfunction() {
app('Some text', 'ALERT!', function(err, remaining) {
if (err) throw err;
console.log('Some text.');
Run Code Online (Sandbox Code Playgroud)
这可能吗?我到处找。
非常感谢!