index creation if not on preview mode

master
Castro0o 6 years ago
parent 2b8202e598
commit e4a86a45c9

1
.gitignore vendored

@ -1,6 +1,7 @@
*~
*.pyc
web/20*.html
web/2016.html
*.json
\#*\#
web/*

@ -178,26 +178,25 @@ def create_index(indexdict, year):
# ACTION
#####
site = mwsite(user_args.host, user_args.path)
# import pdb; pdb.set_trace()
if user_args.preview:
memberpages=[unicode(user_args.preview)]
else:
memberpages=mw_cats(site, user_args)
# print '\n\nmemberpages:\n\n', memberpages, '\n\n********\n\n' # memberpages include years, from current to 2015
indexdict = create_pages(memberpages, 'index')
indexdict_byyear={year:{} for year in years } # index of all page organized according to year
# indexdict_byyear structure:
# {year1:{ work1: {work1 prop:vals}, work2: {...} }, year2:..., year3: }
# {2015: {u'A Unique Line': {'Bio': ...}}}
indexdict = create_pages(memberpages, 'index')
indexdict_byyear={year:{} for year in years } # index of all page organized according to year
# indexdict_byyear structure:
# {year1:{ work1: {work1 prop:vals}, work2: {...} }, year2:..., year3: }
# {2015: {u'A Unique Line': {'Bio': ...}}}
for key in indexdict.keys(): # populate indexdict_byyear with works
for key in indexdict.keys(): # populate indexdict_byyear with works
indexdict_byyear[ int(indexdict[key]['Date'])][key] = indexdict[key]
#print '\n\n******* indexdict_byyear ***********\n\n'
#pprint.pprint( indexdict_byyear )
#print '\n\n******* indexdict_byyear ***********\n\n'
#pprint.pprint( indexdict_byyear )
for year in indexdict_byyear.keys(): # create index page for each year ie 2016.html
for year in indexdict_byyear.keys(): # create index page for each year ie 2016.html
print '\n***** ', year, ' *****\n'
create_index(indexdict_byyear[year], year)

@ -104,7 +104,7 @@
<div class="isotope"> <!-- Maybe sould aslo have have-->
<div class="grid-sizer"></div>
<div class="item" data-creator="Ruben van de Ven" data-date="2016" data-title="Choose how you feel; you have seven options" id="Choose how you feel; you have seven options"><a class="work" href="works/2016-Ruben_van_de_Ven.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/3/37/Choosehowyoufeel1.jpg"></a></div><div class="item" data-creator="Joana Chicau" data-date="2016" data-title="WebPage Act l, ll, lll" id="WebPage Act l, ll, lll"><a class="work" href="works/2016-Joana_Chicau.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/4/4b/JoanaChicau_pic.jpg"></a></div><div class="item" data-creator="Arantxa Gonlag" data-date="2016" data-title="Mama, Tess en ik" id="Mama, Tess en ik"><a class="work" href="works/2016-Arantxa_Gonlag.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/0/0a/Arantxa_voorbeeld.jpg"></a></div><div class="item" data-creator="Julie Boschat Thorez" data-date="2016" data-title="LIAPO" id="LIAPO"><a class="work" href="works/2016-Julie_Boschat_Thorez.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/9/94/Liapo.jpg"></a></div><div class="item" data-creator="Thomas Walskaar" data-date="2016" data-title="My Hard-Drive Died Along With My Heart" id="My Hard-Drive Died Along With My Heart"><a class="work" href="works/2016-Thomas_Walskaar.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/2/23/Myharddrivefront02.jpg"></a></div><div class="item" data-creator="Yuzhen Tang" data-date="2016" data-title="For the Common Good" id="For the Common Good"><a class="work" href="works/2016-Yuzhen_Tang.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/1/18/For_the_common_good_03_Yuzhen.jpg"></a></div><div class="item" data-creator="Benjamin Li" data-date="2016" data-title="In Search of Perfect Orange" id="In Search of Perfect Orange"><a class="work" href="works/2016-Benjamin_Li.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/8/89/Still_video.jpg"></a></div><div class="item" data-creator="Anne Lamb" data-date="2016" data-title="Surrogates" id="Surrogates"><a class="work" href="works/2016-Anne_Lamb.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/4/47/Tumblr_o3y14fvGV11shzr3fo1_1280.jpg"></a></div><div class="item" data-creator="Solange Frankort" data-date="2016" data-title="The Limejuice Mystery" id="The Limejuice Mystery"><a class="work" href="works/2016-Solange_Frankort.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/0/04/LimeJuiceMystery.gif"></a></div><div class="item" data-creator="Cihad Caner" data-date="2016" data-title="Abstract Violence" id="Abstract Violence"><a class="work" href="works/2016-Cihad_Caner.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/2/2e/Rrr.jpg"></a></div><div class="item" data-creator="Manetta Berends" data-date="2016" data-title="I-could-have-written-that" id="I-could-have-written-that"><a class="work" href="works/2016-Manetta_Berends.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/a/a3/I-could-have-written-that_these-are-the-words_mb_300dpi.png"></a></div><div class="item" data-creator="Lucas Battich" data-date="2016" data-title="Progressive movement towards concrete creation" id="Progressive movement towards concrete creation"><a class="work" href="works/2016-Lucas_Battich.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/2/20/Progressive_movement_towards_concrete_creation.jpg"></a></div><div class="item" data-creator="Cristina Lavinia Cochior" data-date="2016" data-title="In The Company Of Bots" id="In The Company Of Bots"><a class="work" href="works/2016-Cristina_Lavinia_Cochior.html"><img class="work" src="https://pzwiki.wdka.nl/mw-mediadesign/images/2/2f/ChenzwBot.png"></a></div></div>
<div class="item" data-creator="Ruben van de Ven" data-date="2016" data-title="Choose how you feel; you have seven options" id="Choose how you feel; you have seven options"><a class="work" href="works/2016-Ruben_van_de_Ven.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/3/37/Choosehowyoufeel1.jpg"></a></div><div class="item" data-creator="Joana Chicau" data-date="2016" data-title="WebPage Act l, ll, lll" id="WebPage Act l, ll, lll"><a class="work" href="works/2016-Joana_Chicau.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/4/4b/JoanaChicau_pic.jpg"></a></div><div class="item" data-creator="Arantxa Gonlag" data-date="2016" data-title="Mama, Tess en ik" id="Mama, Tess en ik"><a class="work" href="works/2016-Arantxa_Gonlag.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/0/0a/Arantxa_voorbeeld.jpg"></a></div><div class="item" data-creator="Julie Boschat Thorez" data-date="2016" data-title="LIAPO" id="LIAPO"><a class="work" href="works/2016-Julie_Boschat_Thorez.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/9/94/Liapo.jpg"></a></div><div class="item" data-creator="Thomas Walskaar" data-date="2016" data-title="My Hard-Drive Died Along With My Heart" id="My Hard-Drive Died Along With My Heart"><a class="work" href="works/2016-Thomas_Walskaar.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/2/23/Myharddrivefront02.jpg"></a></div><div class="item" data-creator="Yuzhen Tang" data-date="2016" data-title="For the Common Good" id="For the Common Good"><a class="work" href="works/2016-Yuzhen_Tang.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/1/18/For_the_common_good_03_Yuzhen.jpg"></a></div><div class="item" data-creator="Benjamin Li" data-date="2016" data-title="In Search of Perfect Orange" id="In Search of Perfect Orange"><a class="work" href="works/2016-Benjamin_Li.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/8/89/Still_video.jpg"></a></div><div class="item" data-creator="Anne Lamb" data-date="2016" data-title="Surrogates" id="Surrogates"><a class="work" href="works/2016-Anne_Lamb.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/4/47/Tumblr_o3y14fvGV11shzr3fo1_1280.jpg"></a></div><div class="item" data-creator="Solange Frankort" data-date="2016" data-title="The Limejuice Mystery" id="The Limejuice Mystery"><a class="work" href="works/2016-Solange_Frankort.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/0/04/LimeJuiceMystery.gif"></a></div><div class="item" data-creator="Cihad Caner" data-date="2016" data-title="Abstract Violence" id="Abstract Violence"><a class="work" href="works/2016-Cihad_Caner.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/2/2e/Rrr.jpg"></a></div><div class="item" data-creator="Manetta Berends" data-date="2016" data-title="I-could-have-written-that" id="I-could-have-written-that"><a class="work" href="works/2016-Manetta_Berends.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/a/a3/I-could-have-written-that_these-are-the-words_mb_300dpi.png"></a></div><div class="item" data-creator="Lucas Battich" data-date="2016" data-title="Progressive movement towards concrete creation" id="Progressive movement towards concrete creation"><a class="work" href="works/2016-Lucas_Battich.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/2/20/Progressive_movement_towards_concrete_creation.jpg"></a></div><div class="item" data-creator="Cristina Lavinia Cochior" data-date="2016" data-title="In The Company Of Bots" id="In The Company Of Bots"><a class="work" href="works/2016-Cristina_Lavinia_Cochior.html"><img class="work" src="http://pzwiki.wdka.nl/mw-mediadesign/images/2/2f/ChenzwBot.png"></a></div></div>
</div>
<div class="sidebarBorderLeft zwartArea" id="section03">
<div class="zwartAreaFull zwartColophon">

Loading…
Cancel
Save