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/bash | |
#自动 rclone 到指定网盘 upload 文件夹下同名目录 | |
#用法:rclone.sh <source path> <net disk> <threads> | |
src=$1 | |
src=${src%?} | |
file=`echo $src | awk -F "/" '{print $NF}'` | |
disk=$2 | |
upload="$2:/upload/${file}" | |
threads=$3 |
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
Show hidden characters
{ | |
"folders": [ | |
{ | |
"path": "..\\VSscript" | |
} | |
], | |
"settings": { | |
"files.associations": { | |
"*.vpy": "python" | |
}, |
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 os | |
import sys | |
import chardet | |
def get_encoding(file): | |
with open(file, 'rb') as f: | |
return chardet.detect(f.read())['encoding'] | |