people
This commit is contained in:
parent
9bf0ca4edc
commit
b333377993
1
print/chronoPeople.json
Normal file
1
print/chronoPeople.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -4,13 +4,84 @@ import json
|
|||
import codecs
|
||||
|
||||
def do():
|
||||
data = json.load(open("chronoPrint.json"))
|
||||
data = json.load(open("chronoPeople.json"))
|
||||
people = json.load(open("people.json"))
|
||||
i = 1
|
||||
for d in data:
|
||||
d['serial'] = i
|
||||
i += 1
|
||||
d['bios'] = []
|
||||
for p in d['people']:
|
||||
if people.has_key(p):
|
||||
d['bios'].append(people[p])
|
||||
else:
|
||||
print "Error: %d, %s" % (d['serial'], p,)
|
||||
|
||||
t = Template(open("template.html").read())
|
||||
s = t.render({'files': data})
|
||||
out = codecs.open("out.html", "w", encoding="utf-8")
|
||||
out.write(s)
|
||||
out.close()
|
||||
|
||||
def peoplejson():
|
||||
f = open("people.txt")
|
||||
o = ''
|
||||
for line in f:
|
||||
o = o + line.strip().replace("\n", "") + ",\n"
|
||||
out = open("people.json", "w")
|
||||
d = "{" + o[0:-1] + "}"
|
||||
print d
|
||||
out.write(d)
|
||||
out.close()
|
||||
# out.write(json.dumps(json.loads(d), indent=2))
|
||||
# out.close()
|
||||
|
||||
|
||||
def doPersons():
|
||||
radias = json.load(open("chronoPrint.json"))
|
||||
people = json.load(open("people.json"))
|
||||
for r in radias:
|
||||
r['people'] = []
|
||||
title = r['title']
|
||||
for p in people.keys():
|
||||
if title.find(p) != -1:
|
||||
r['people'].append(p)
|
||||
o = open("chronoRadiaPeople.json", "w")
|
||||
o.write(json.dumps(radias, indent=2))
|
||||
o.close()
|
||||
|
||||
|
||||
def radiaToChrono():
|
||||
radias = json.load(open("radiaPeople.json"))
|
||||
chronos = json.load(open("chronoPrint.json"))
|
||||
x = 0
|
||||
for r in radias:
|
||||
chronos[x]['people'] = radias[x]['people']
|
||||
x += 1
|
||||
print x
|
||||
out = open("chronoPeople.json", "w")
|
||||
out.write(json.dumps(chronos))
|
||||
out.close()
|
||||
|
||||
|
||||
def addIndexes():
|
||||
people = json.load(open("chronoRadiaPeople.json"))
|
||||
x = 0
|
||||
short = []
|
||||
for p in people:
|
||||
index = x
|
||||
p['index'] = x
|
||||
x += 1
|
||||
if len(p['people']) == 0:
|
||||
short.append({
|
||||
'index': index,
|
||||
'title': p['title'],
|
||||
'people': []
|
||||
})
|
||||
out = open("chronoRadiaPeopleIndexed.json", "w")
|
||||
out.write(json.dumps(p, indent=2))
|
||||
out.close()
|
||||
out2 = open("peopleToBeFixed.json", "w")
|
||||
out2.write(json.dumps(short, indent=2))
|
||||
out2.close()
|
||||
|
||||
|
|
362
print/out.html
362
print/out.html
File diff suppressed because it is too large
Load Diff
55
print/people.json
Normal file
55
print/people.json
Normal file
|
@ -0,0 +1,55 @@
|
|||
{"Navika Kumar": " Political and Economy Editor, Times Now",
|
||||
"Rashmi Pratap": "Journalist, Economic Times",
|
||||
"Rahul Joshi": "Executive Editor, Economic Times and Channel Head, ET NOW",
|
||||
"Sridharan Ramakrishnan/R. Sridharan": "Senior Editor (News & Trends), ET NOW",
|
||||
"Jaideep Bose": "Editor-in-Chief, Times of India",
|
||||
"M.K. Venu": "Managing editor, Financial Express",
|
||||
"G. Ganapathy Subramaniam": "National Policy Editor, ET NOW and Assistant Editor, Economic Times",
|
||||
"Shankkar Aiyar": "Managing Editor, India Today",
|
||||
"Senthil Chengalvarayan": "Managing Editor, CNBC TV 18",
|
||||
"Rajdeep Sardesai": "Editor-in-chief, CNN-IBN",
|
||||
"Prabhu Chawla": "Editor-in-chief, The New Indian Express",
|
||||
"Barkha Dutt": "Group Editor, NDTV",
|
||||
"Rakesh Hari Pathak": "Economic Bureau Chief, PTI",
|
||||
"Vir Sanghvi": "Editorial Director, Hindustan Times Group",
|
||||
"Upender": "Unknown?",
|
||||
"Surojit": "Unknown?",
|
||||
"K. Venugopal": "Editor, Hindu Business Line",
|
||||
"Rajathi Ammal": "Karunanidhi's wife",
|
||||
"A. Raja": "Former Telecom Minister, DMK",
|
||||
"Kanimozhi": "Karunanidhi's daughter, DMK",
|
||||
"N.K. Singh": "IAS and MoP, Rajya Sabha",
|
||||
"Sunil Arora": "IAS, Ex-Indian Airlines Chairman",
|
||||
"Rohit Khanna": "Associate Director, Vaishnavi Corporate Communications, (Radia's company)",
|
||||
"Manoj Warrier": "Executive Director, Vaishnavi Corporate Communications, (Radia's company)",
|
||||
"Daljeet": "Employee, Vaishnavi Corporate Communications, (Radia's company)",
|
||||
"Yatish Wahal": "Associate Director, Vaishnavi Advisory Services Pvt.Ltd (Radia's company)",
|
||||
"Srini": "Employee, Neucomm,(Radia's company)",
|
||||
"Vishal Mehta": "CEO, Vaishnavi Corporate Communications, (Radia's company)",
|
||||
"Ratan Tata": "Chairman, Tata Sons, Tata Group",
|
||||
"Srinath Narasimhan": "CEO, Tata Communications",
|
||||
"Mr S. Padmanabhan, Paddy": "Executive Director-Operations, Tata Power",
|
||||
"Noel Tata": "MD, Tata International",
|
||||
"Venkat": "Executive Secretary to Ratan Tata",
|
||||
"Shalini Singh": "Head, Corporate Communications, TATA Power",
|
||||
"Cecilia": "Unknown?",
|
||||
"Mukesh Ambani": "Chairman & MD - Reliance Industries Ltd.",
|
||||
"PMS Prasad": "Executive Director, Reliance Industries Ltd.",
|
||||
"Manoj Modi": "Head of Retail, Reliance Industries Ltd",
|
||||
"K R Raja": "Chief accountant, Reliance Industries Ltd",
|
||||
"Tarun Das": "Former Chief, Confederation of Indian Industry (CII)",
|
||||
"Ranjan Bhattacharya": "Hotelier and Political lobbyist",
|
||||
"Suhel Seth": "Lobbyist, Counselage India, TV personality",
|
||||
"R.K. Chandolia": "Personal secretary to A Raja",
|
||||
"Poongothai Aladi Aruna": "MLA and a minister in Tamil Nadu Government",
|
||||
"Pradip Baijal": "ex-TRAI chairman, partner in Neosis (Radia's company)",
|
||||
"Jehangir Pocha": "Chief Editor and part owner, News X",
|
||||
"Sunil Jain": "Indian Express/Business Standard columnist",
|
||||
"Manish": "Employee, Bangalore office, Vaishnavi Corporate Communications, (Radia's company)",
|
||||
"Harinder Singh": "Chairman and MD of Realistic Realtors",
|
||||
"Sanjay": "Sanjay Chandra of Unitech?",
|
||||
"Dorai": "Employee Vaishnavi Corporate Communications, (Radia's company)?",
|
||||
"Baiju Biju": "Unknown?",
|
||||
"Atul": "Employee Vaishnavi Corporate Communications, (Radia's company)?",
|
||||
"Madhav": "Unknown?"
|
||||
}
|
|
@ -6,7 +6,7 @@
|
|||
<body>
|
||||
{% for f in files %}
|
||||
<div class="fileWrapper">
|
||||
<h3 class="title"><span class="counter">{{ f.serial }}. </span>{{ f.title }}</h3>
|
||||
<h3 class="title"><span class="counter">{{ f.serial }}. </span>{{ f.title }} <span class="people">{% for person in f.bios %} {{ person }} {% endfor %}</span></h3>
|
||||
<div class="datetime">
|
||||
<div class="date">Date: {{ f.dateStr }}</div>
|
||||
<div class="time">Time: {{ f.time }}</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user