This file contains hidden or 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/bash | |
help() { | |
cat <<HELP | |
wallbag2shiori [options] <JSON_FILE> | |
Import wallabag json file into shiori instance. | |
-h Print the help menu | |
-v Enable verbose mode |
This file contains hidden or 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
function flattenArr(input, output){ | |
if(!Array.isArray(input)){ | |
return input; | |
} | |
var a = null; | |
for(var i = 0; i < input.length; i++){ | |
a = flattenArr(input[i], output); | |
if(a){ | |
output.push(a); | |
} |