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
// Custom convert function for nodebb import plugin | |
content = content && encoding.convert(content, 'utf8', 'ISO-8859-2'); | |
content = content && content.toString('utf8'); | |
// This depends on changes implemented in https://github.com/ahwayakchih/nodebb-plugin-import/tree/feat-pass-type-and-id-to-custom-js | |
// It also assumes that HTML-to-Markdown conversion will be enabled too | |
// This is quite slow. Regexes probably could be optimized a bit, but it's a one-time-use-and-forget operation, so not much point i guess | |
if (type == 'post') { | |
content = content && content | |
.replace(/<!--quoteo\(post=(\d+)[^)]+name=([^):]+)[\w\W]+?<a\s+href="([^"]+)"[\w\W]+?<!--quotec-->([\w\W]+?)<!--QuoteEnd-->[\w\W]+?<!--QuoteEEnd-->/g, (m, pid, name, link, text) => { |
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
#!/bin/sh | |
# Simple script that mounts specified BFS disk image file to temporary directory, | |
# copies specified file there, unmounts the image and removes temporary directory. | |
# Usage: cp2bfs my-file-to-copy my-test-disk.bfs | |
MOUNTDIR= | |
FROM=$1 | |
BFSFILE=$2 |
OlderNewer