MCPcopy Index your code
hub / github.com/jackzhenguo/python-small-examples / batchCreate

Function batchCreate

md/batch.py:29–47  ·  view source on GitHub ↗
(ps='.md',start=100,n=100,path='.',year=2020,month=2,day=1)

Source from the content-addressed store, hash-verified

27
28
29def batchCreate(ps='.md',start=100,n=100,path='.',year=2020,month=2,day=1):
30
31 for i,day in zip(range(start,start+n),\
32 getEverydaySince(year,month,day,n) \
33 ):
34 with open(path+'/'+str(i)+ps,'w') as fw:
35
36 fw.write("""
37```markdown
38@author jackzhenguo
39@desc
40@tag
41@version
42@date {}
43```
44 """.format(datetime.strftime(day,'%Y/%m/%d'))\
45 )
46 print(day)
47 print('done')

Callers

nothing calls this directly

Calls 1

getEverydaySinceFunction · 0.85

Tested by

no test coverage detected