- 註冊時間
- 2006-12-4
- 最後登錄
- 2024-2-15
- 在線時間
- 4738 小時
- 閱讀權限
- 90
- 積分
- 211783
- 帖子
- 5782
- 精華
- 0
- UID
- 1538
|
自從沒有用台版PE2之後,便一直用VIM。
原因無它,可以自己定義按鍵的功能而己,
雖然非常強大但太難懂總是只會基本幾招而己,
昨天被G家逼到了,
以前相簿是picasa,相片網址還算不太長(兩行以內),
後來硬推G-Photo但相片網址他爸的老婆的又臭又長,
我都從picasaweb.google.com進去看相簿會被轉到g-photo的某頁,
雖然不能新增但一樣可以看到全部的相片,相片網址一樣是短的。
每次寫記錄時用g-photo上傳,在picasaweb轉址裡一張張按右鍵複製圖片網址,
直到昨天,轉址後的網頁被改了,沒有右鍵可以按????
觀看網頁原始內容,原來是進化了,
本來一張張的相片會自動縮放成視窗的大小,
現在為了增加zoom in/out的功能,
全部變成程式碼產生整本相簿資料的內容。
只好去g-ghoto抓裹腳布相片網址,
想說長的長唄沒辦法忍耐忍耐唄~
又沒想到記錄裡有這裹腳布相片網址竟然被面冊退文(無法發文或回覆)
只好重新來研究新的網頁到底怎麼回事,
一個個按右鍵在新分頁開啟聯結後,
再偷偷加上=w9999-h9999-no 看看有沒有用,
果然之前網址的內容還是藏在網頁內,
只是要怎麼抽出來用而已,
兩天後(又煩網友又到處po文/爬文)
找到解決的辦法了。
將picasaweb轉址後相簿的原始碼貼到vim內
利用正規表示式和vim強大的指令,
一個按鍵搞定所有的整本相片,
意然比以前更輕鬆(不必再一張張按右鍵)
1.刪除相片短網址以外的所有文字
v/https.*\d,false]/d
2.網址前面加上むimg] (discuz圖片格式開始)
%s/^.*https/\むimg\]https/g
3.網址後面加上む\img] (discuz圖片格式結束)並指定圖片大小
:%s/",.*$/=w1680-h1050-no \む\/img\]/g
最後將上面三行指令map到單一按鍵收工。
結果類似如下,加上說明記錄輕鬆就完工了。
むimg]https://lh3.googleusercontent.com/3UnC1b8LyhxFndtbcHgxhIsvZ5RpJn-yNu6TqwlzmVwlYRYdTqr-kgBFSXruU7Jhs4T3b4wOyl4H9xs=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/Q3ppF6h1zuYb9x-6ZNTXRTP9sRwATR2rH-f2WPKoaE_XTAPNHNagk9LGwPPfcg_b3sGU2IMsQTs67l8=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/T1Z8EhgSirFYJTn3AAVwgyen7wRGPSUVUGDhUDJFR91hMrc7WLkpAewUbGDhlnGCtDHYgil_XolJOrE=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/eNnKJWWJAQ_Z3aFBj6l6soF3Dc80WhdfUZqBKwlMbuq-HipY9UsNu7erFj9FNOXi9DHNIiHHXd8c0Mc=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/IY0Gn0mmVvaUNoIoY8iC45C7dgAInkgM3Qz0HbsjFL0Igkfdlm_WNWmKchxp4QbNFutdr9smSNvEhDw=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/WturXv_NFIeh9i9sjv0dhGgTEjIMS7VJ415osQF99eJ8CoUkveuoPdXofEeRF8AIBMTaww_Sdk1m2jw=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/0-6AWohEkOQ8Fof1-YAsbpfRX2MfDctm2c3wcNrhQnNfL8dkJlC70OhzU96Ztg17FKjDAlQ82IqFbWM=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/nsM3m8gT6aaCWEBSJ2tuj8kMxHhwTwDsoI_ppyWupv-zSv3Z-BRLO0QpzqG0nEYOszIQGuNMZRIPQCY=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/HZCbs1xzAmhLwwOXhf2NpwpXVmoyT1ejnvHFBkQe2tuOA1Q1cKlQp5mkQQEPWvkgaFXv0twJY8IvTF0=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/v1PjNM1D_m_M4Hnjtb8CEg6BFlynMqzFSqBwWe2d0PpQsES3cbCQ9XDbUDG8Atd-5u58HZj_Yr1Vi6w=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/_YCzqUxl7ecTcUg2Jaqb-E4SfwJW4OAFpAdfo-bOuLym5DLGOffVFsm_5mhNtmhqir7WdeF8dG5UD80=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/fgT9v413UhA4P2Yd4vaFdNHAT5BhS1Vcr9xNqbTVanilxVQqcB8DIZsjJvFntjKTnfMC_xpMY6ntOMA=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/SoI9rqq0WcsywZBItONtIMqfuYYL8qfqfHmbafXTXYPUFzdNjO-6b0sWYPK6a3Aw6eqST-iiUii9v0o=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/TKes2U5Ee_PvIfNQCKeXf8CSCcqXfUgf1e5RRL7tP-21YjNmShQkUb7UXjEs6Zf9Bui0Mt6FyovXnFE=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/UJ57anKd_wEAANvWhGVx3mWA6OmiqD6EOhZiIs77fc9goCQwl78QSX7LvmLXI6h9vchSRLHvjrDB2vc=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/LwDQfF2jnn1-TjsuooUh4HRMwp2n8lCTJKH-Pgl-d7i1d7xvefeicmkV7vIV6eT8faF4E6OxKZvJC90=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/1pjbdpxQc-Wl2RHbebk7A6H5uNKd6ftE3C2-5DVVgWlmd1qRzoLeIZ0IULXqy5jMID9Oj6PTMSs_iUg=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/e9UHQ_vyoiNiWTa5X_XatLPEEhKczQ-QidjqAnu_35pc0JtIZx9X8mCGu__Dfryo6Pfhh0rtqXZUiWk=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/zPF1gtLukN23rM7pUn-SgicV15uB0JMnhEOhX87ancj5bkp6sQ07K4PaaMZ2KVJhkykwPdT-wVpd0ow=w1680-h1050-no む/img]
むimg]https://lh3.googleusercontent.com/DANWnasEzwKNoAbcmN8wd0wC6xBkkf6FtB3KHRaRYLcZlIrBd3pU85zkX25Kc8yxugihS4oChE3of-c=w1680-h1050-no む/img]
分享給有在用vim和抓g家舊相片網址者。
(看不懂也不用問我,全部是股溝來的)
|
-
5
查看全部評分
-
|
|
|
|
|