2020年8月10日 星期一

快速產生 Rclone 複製 google drive 資料夾指令

 最近開始使用傳說中無限容量的google 共用雲端硬碟,搭配上AutoRclone,近乎完美,唯一缺點是rclone的指令好煩阿,每次都要在那邊剪剪貼貼,才能產出一組能用的指令,煩~~~

於是有了以下的產生器,請把以下指令貼在chrome的書籤內容上,用chrome打開要複製的google drive資料夾,再點一下這個書籤就會產生出所需的指令囉

P.S 指令內容請依照自身需求修改,XXXXXXXX改為目的資料夾ID

let a="python3 rclone_sa_magic.py -s ";
let b=location.href.split("/");
b=b[b.length-1];
let c=" -d ";
let d='XXXXXXXXXXXXXXXXXXXXX';
let e=' -dp "';
let f='/'+document.getElementsByClassName('h-R-w-d-ff')[0].textContent+'" -b 1 -e 600';
let g=a+b+c+d+e+f;
console.log(g);
prompt('copy to cmd',g)

懶人版:

javascript:(function()%7Blet%20a%3D%22python3%20rclone_sa_magic.py%20-s%20%22%2Cb%3Dlocation.href.split(%22%2F%22)%3Bb%3Db%5Bb.length-1%5D%3Blet%20c%3D%22%20-d%20%22%2Cd%3D%22XXXXXXXXXXXXXXXX%22%2Ce%3D'%20-dp%20%22'%2Cf%3D%22%2F%22%2Bdocument.getElementsByClassName(%22h-R-w-d-ff%22)%5B0%5D.textContent%2B'%22%20-b%201%20-e%20600'%2Cg%3Da%2Bb%2Bc%2Bd%2Be%2Bf%3Bconsole.log(g)%2Cprompt(%22copy%20to%20cmd%22%2Cg)%7D)()




沒有留言:

張貼留言