mirror of
https://github.com/SouthFox-D/SouthFox-D.github.io.git
synced 2025-01-18 06:46:20 +01:00
[fix] remove backup img when condition
This commit is contained in:
parent
d92e52b792
commit
0a6d22a121
1 changed files with 3 additions and 4 deletions
3
utils.hy
3
utils.hy
|
@ -98,10 +98,9 @@
|
||||||
(when (in "ipfs" img-url)
|
(when (in "ipfs" img-url)
|
||||||
(now-img-list.append (. (img_url.split "/") [-1])))))))
|
(now-img-list.append (. (img_url.split "/") [-1])))))))
|
||||||
(setv download-need-img (list (. (set now-img-list) (difference (set (:img img-json))))))
|
(setv download-need-img (list (. (set now-img-list) (difference (set (:img img-json))))))
|
||||||
(when download-need-img
|
|
||||||
(with [f (open "newimg/imgList.json" "w" :encoding "utf-8")]
|
(with [f (open "newimg/imgList.json" "w" :encoding "utf-8")]
|
||||||
(json.dump {"img" (sorted now-img-list)} f))
|
(json.dump {"img" (sorted now-img-list)} f))
|
||||||
(download-ipfs-img download-need-img)))
|
(download-ipfs-img download-need-img))
|
||||||
|
|
||||||
(setv parser (argparse.ArgumentParser))
|
(setv parser (argparse.ArgumentParser))
|
||||||
(parser.add_argument "-d" :dest "deploy" :action "store_true")
|
(parser.add_argument "-d" :dest "deploy" :action "store_true")
|
||||||
|
|
Loading…
Reference in a new issue