Skip to content

Instantly share code, notes, and snippets.

@m2kar
Created November 6, 2019 03:03
Show Gist options
  • Save m2kar/5753bac10bdcf3c56c34b626f0f5c02f to your computer and use it in GitHub Desktop.
Save m2kar/5753bac10bdcf3c56c34b626f0f5c02f to your computer and use it in GitHub Desktop.
合并软著的所有代码
import os,sys
flist=[]
with open("/home/rui/tmp/sflist.txt") as fp:
for l in fp.readlines():
l2=l.strip()
if l2=="#END":
break
flist.append(l2)
with open("/home/rui/tmp/output.txt","w") as fpo:
for f in flist:
fnamep=f[2:]
fpo.write(f"File:{fnamep}\n")
with open(f) as fpp:
fpo.write(fpp.read())
fpo.write("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment