1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
for j in range(0, 4870):
file = files[j]
file = file.rstrip('.html')
file = file.rstrip('.md')
year = file.split('-')[0]
month = file.split('-')[1]
date= file.split('-')[2][0:2]
fdate=year+'-'+month+'-'+date
print(j,year,file)
c = month.replace('01', 'January')
c = c.replace('06','June' )
c = c.replace('03','March' )
c = c.replace('05','May' )
c = c.replace('11','November' )
c = c.replace('09','September')
c = c.replace('04','April' )
c = c.replace('08','August' )
c = c.replace('12','December' )
c = c.replace('02','February' )
c = c.replace('07', 'July')
c = c.replace('10','October')
c = month.replace('01', 'January')
c = c.replace('06','June' )
c = c.replace('03','March' )
c = c.replace('05','May' )
c = c.replace('11','November' )
c = c.replace('09','September')
c = c.replace('04','April' )
c = c.replace('08','August' )
c = c.replace('12','December' )
c = c.replace('02','February' )
c = c.replace('07', 'July')
c = c.replace('10','October')
imonth = month
if month == '10':
print(month)
else:
month = month.replace('0', '')
print(month)
idate=date
if date[0] == '0':
date = date.replace('0', '')
title = 'Intelligence History on ' + c + ' ' + date
a ="---\n"
a=''.join([a, ("title: %s\n" %file)])
a=''.join([a,("date: %s\n" %fdate )])
a=''.join([a,("author: CIA \n")])
a = ''.join([a, ("authorLink: \"/authors/cia\"\n")])
a=''.join([a,("timestamp: \n")])
a=''.join([a,("- %s\n" %year)])
a=''.join([a,("- %s-%s\n" % (year,imonth ))])
a=''.join([a,("multitype: \n")])
a=''.join([a,("- cia\n")])
a=''.join([a,("tags: \n")])
a=''.join([a,("- dailybrief\n")])
a=''.join([a,("featuredImagePreview: \'/agency/CIA.png\'\n")])
a=''.join([a,("---\n\n\n")])
a = ''.join([a, ("Presidential Daily Brief On %s %s %s\n\n" % (year, c, date))])
a=''.join([a,("此情报简报于%s年%s月%s日被递交给时任美国总统\n\n" %(year,month,date))])
a=''.join([a,("<!--more-->\n\n")])
|