chore: collect latest dingTalk feishu docs
This commit is contained in:
@@ -16,10 +16,14 @@ def main():
|
||||
for fi in files:
|
||||
fid, name = fi.get("fileId",""), fi.get("name","unknown")
|
||||
if not fid: continue
|
||||
safe_name = os.path.basename(name)
|
||||
ext = os.path.splitext(name)[1].lower()
|
||||
subdir = "html-md" if ext in HTML_MD else "other"
|
||||
out = os.path.join(DOWNLOAD_DIR, subdir)
|
||||
os.makedirs(out, exist_ok=True)
|
||||
if args.incremental and os.path.isfile(os.path.join(out, safe_name)):
|
||||
print(f" SKIP {safe_name}")
|
||||
continue
|
||||
print(f" {name} -> {subdir}/")
|
||||
try:
|
||||
r = subprocess.run([dws,"drive","download","--node",fid,"--output",out],capture_output=True,timeout=120)
|
||||
|
||||
Reference in New Issue
Block a user