This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/** | |
* @example node ts-merge.js ./videos output_folder | |
*/ | |
const { execSync } = require("child_process"); | |
const { readdirSync, writeFileSync, existsSync, mkdirSync } = require("fs"); | |
const { join } = require("path"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qbittorrentAPI from "qbittorrent-api-v2" | |
async function pauseUnregisteredTorrents() { | |
const qbittorrent = await qbittorrentAPI.connect( | |
CONFIG.WebUIAddress, | |
CONFIG.Login, | |
CONFIG.Password | |
); | |
const torrents = await qbittorrent.torrents(); | |
const unregistered = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// some safe html text parsed from a markdown file | |
// e.g. your awesome novel | |
let html = ` | |
<h1>hhh1</h1> | |
<h2 class="title">hhh2<p>ppp</p></h2> | |
<h3>hhh3</h3> | |
<h4>hhh4</h4> | |
<h5>hhh5</h5> | |
` |