From 49854de2507da9191a6a6aaebd15c4e78d8ace9b Mon Sep 17 00:00:00 2001 From: Castro0o Date: Sun, 18 Mar 2018 12:24:09 +0100 Subject: [PATCH] work page generation using: work-YYYY-template.html; Year parameter removed --- 2015-template.html | 122 ------------------ mmdc_modules.py | 2 - mmdc_wiki2web.py | 79 ++++++------ web/2015.html | 2 +- web/2016.html | 2 +- web/index_edited.html | 96 -------------- work-2015-template.html | 76 +++++++++++ 2016-template.html => work-2016-template.html | 4 +- 2017-template.html => work-2017-template.html | 4 +- 9 files changed, 121 insertions(+), 266 deletions(-) delete mode 100644 2015-template.html delete mode 100644 web/index_edited.html create mode 100644 work-2015-template.html rename 2016-template.html => work-2016-template.html (91%) rename 2017-template.html => work-2017-template.html (91%) diff --git a/2015-template.html b/2015-template.html deleted file mode 100644 index 94c2724..0000000 --- a/2015-template.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Master Media Design & Communication - - - - - - - - -
-
-
-
-
-
- - -

Master Media Design & Communication

-

Graduation Show 2015: Tempted by Tomorrow

- -

Tempted by Tomorrow, is the title that has been chosen, after some debate, by the artists and designers in this year’s PZI Master Media Design and Communication graduation show. In an era where the death of the Future—that brave utopian concept that motivated a good deal of cultural activity across different strata of culture throughout the twentieth century and beyond—has been widely discussed, it is hard not to read the title ironically.

-

But in the works in this show, that irony is tempered by a muted, but definite, optimism. The range of works in this year’s PZI MMDC are extremely diverse in terms of their formal approaches and aesthetic pre-occupations, yet when one engages with and reflects on each individual work there is a common strand running through the show: a sense that it is still possible to ‘make things better’; however carefully the concepts ‘make’, ‘things’ and above all ‘better’ might need to be interrogated.

-

Each project reflects a unique research trajectory over two years, with each artist employing both studio-based practice and sustained critical reflection to create the artworks and research projects you will find in this show: works ranging from 3d-printed modular camera design and associated workshops; through to a union designed to give a voice to those who undertake the new forms of ‘immaterial labour’ that abound in our culture; to a series of photographic works that seek to extend the notion of gesture in image to include strategies of image search and recombination. Other works in the show loop together languages taken from a range of discourses including pop culture, social media, iconography, sound design, interface design, library studies performance, and archival research. It is this looping together of disparate technologies and codes that forms the common pre-occupations of the research undertaken within the department.

-

As a department we are enormously proud of the research work of our graduating students. It has been a privilege to travel alongside their very various paths of enquiry. I would like to thank our guest curators Jon Thomson and Alison Craighead, and our regular curator Willie Stehouwer for the contributions they have made to this show.

- - -

Preview Party: Tempted by Tomorrow (Nervous About Tonight)

- -

An evening of performances, presentations and installations. Take the opportunity to have a drink, discuss the presented - projects and choose the winner of the ‘Thesis – Karaoke’, the ultimate research based pop-jukebox.

- -
-
-
- - - - - - -
-
-

Master Media Design & Communication

-
- -
-
-
-
-
-
- - - -

The Piet Zwart Institute houses the international Master programmes of the Willem de Kooning Academy at Hogeschool Rotterdam. Since 1999 it has been dedicated to promoting study and research in the fields of art, design and art education.

-

http://www.pzwart.nl/

-
-
-
- - - - - - - - - - - diff --git a/mmdc_modules.py b/mmdc_modules.py index 20e828c..0692df1 100644 --- a/mmdc_modules.py +++ b/mmdc_modules.py @@ -26,8 +26,6 @@ def mw_cats(site, args): #returns pages member of args(categories) pages = [] last_names = None # cats = site.Categories[args.category]#category, 'Graduation_work'] - years = range(2015, int(args.category[0])+1 ) - print 'years:', years for category in years:#args.category: print 'cat:', category cat = site.Categories[category]#, 'Graduation_work'] diff --git a/mmdc_wiki2web.py b/mmdc_wiki2web.py index 0c9cd2b..8ea4076 100755 --- a/mmdc_wiki2web.py +++ b/mmdc_wiki2web.py @@ -6,6 +6,9 @@ import html5lib, urllib, pprint from mmdc_modules import pandoc2html, parse_work, write_html_file, mw_cats, mw_page_imgsurl, mw_img_url, mw_page_text, mwsite, mw_page_cats, mw_page, remove_cats, find_authors, replace_video, replace_img_a_tag, index_addwork, years from argparse import ArgumentParser from random import shuffle +###### REQUIRES ##### +# * webserver: to server web/ folder +# ### WORKINGS #### # * each year has its own html template in YYYY-template.html # * the --category provides the year. I.e. 2017 @@ -17,9 +20,12 @@ from random import shuffle ### TO DO ###### # # Issues @current commit -# * 2015 template is not present -# * purge year setting -# +# * index pages templates +# * +# +# create_page(memberpages, 'preview') : use work_yyyy_templates rather than args.category ['year'] +# * change index templates +# ######### ##### @@ -28,26 +34,25 @@ from random import shuffle p = ArgumentParser() p.add_argument("--host", default="pzwiki.wdka.nl") p.add_argument("--path", default="/mw-mediadesign/", help="nb: should end with /") -p.add_argument("--category", "-c", nargs="*", default=["2017"], help="category to query, use -c foo bar to intersect multiple categories") +p.add_argument("--category", "-c", nargs="*", help="category to query, use -c foo bar to intersect multiple categories") p.add_argument("--preview", help='Preview page. Will override category querying. Use: --page "Name Of Wiki Page"') args = p.parse_args() print 'args', args -for i in args.category: - if '20' in i: - global year - year = i - print year +# for i in args.category: +# if '20' in i: +# global year +# year = i +# print year ###### -# DEFS: create_page create_index +# DEFS: create_pages create_index ###### -def create_page(memberpages, mode): - page_template = open("./{}-template.html".format(year), "r") # a template for each year +def create_pages(memberpages, mode): indexdict = {} #parent dict: contains articledict instances for member in memberpages: print member @@ -67,6 +72,8 @@ def create_page(memberpages, mode): articledict['Imgs'] = mw_page_imgsurl(site, page, articledict['Thumbnail'] ) #pprint.pprint( articledict) + year = articledict['Date'] + page_template = open("./work-{}-template.html".format(year), "r") # a template for each year page_tree = html5lib.parse(page_template, namespaceHTMLElements=False) page_title = page_tree.find('.//title') page_title.text=articledict['Title']#.decode('utf-8') @@ -175,37 +182,29 @@ def create_index(indexdict, year): # ACTION ##### site = mwsite(args.host, args.path) - -if args.preview is not None: - print "** Page Preview Mode**" - memberpages = [(args.preview).decode('utf-8')] - print 'memberpages:', memberpages - create_page(memberpages, 'preview') - -else: # print "** New Index Mode **" - memberpages=mw_cats(site, args) +memberpages=mw_cats(site, args) # print '\n\nmemberpages:\n\n', memberpages, '\n\n********\n\n' # memberpages include years, from current to 2015 - indexdict = create_page(memberpages, 'index') - # indexdict[u'A Unique Line']['Date'] - - # rather than interveening in the create_index or create_page - # I will place create_index in a loop - # with sublist of idexdict for each year - - indexdict_byyear={year:{} for year in years } - # indexdict_byyear structure: - # {year1:{ work1: {work1 prop:vals}, work2: {...} }, year2:..., year3: } - # {2015: {u'A Unique Line': {'Bio': u'

Jun - 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 ) +indexdict = create_pages(memberpages, 'index') +# indexdict[u'A Unique Line']['Date'] + +# rather than interveening in the create_index or create_pages +# I will place create_index in a loop +# with sublist of idexdict for each year - 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) +indexdict_byyear={year:{} for year in years } +# indexdict_byyear structure: +# {year1:{ work1: {work1 prop:vals}, work2: {...} }, year2:..., year3: } +# {2015: {u'A Unique Line': {'Bio': u'

Jun +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 ) + +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) # print '\n\n******* indexdict ***********\n\n' # pprint.pprint(indexdict) diff --git a/web/2015.html b/web/2015.html index 353a273..3badbdf 100644 --- a/web/2015.html +++ b/web/2015.html @@ -104,7 +104,7 @@

-
+
diff --git a/web/2016.html b/web/2016.html index ac10db6..4e58cae 100644 --- a/web/2016.html +++ b/web/2016.html @@ -104,7 +104,7 @@
-
+
diff --git a/web/index_edited.html b/web/index_edited.html deleted file mode 100644 index 4ba0ea4..0000000 --- a/web/index_edited.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - Media Design & Communication - Piet Zwart Institute - - - - - -
-
-
-
-
-

Media Design & Communication - Piet Zwart Institute

-

Graduation 2012

-
-
-
-
-
- - - -
-
- - -
- - - -
- - - -
-

User:Joak/graduation/catalog1

-

Joseph Knierzinger

-

2015

-
-
-
- - - -
-

User:Max Dovey/maxgradbio

-

Max Dovey

-

2015

-
-
-
- - - -
-

Ahhhh

-

JOK

-

2015

-
-
-
- - - -
-

The Aesthetics of Ethics

-

Ana Luísa Moura

-

2015

-
-
-
- - - -
-

Qq

-

Luther Blisset

-

2015

-
-
-
- - - - - - - - diff --git a/work-2015-template.html b/work-2015-template.html new file mode 100644 index 0000000..9a9fe03 --- /dev/null +++ b/work-2015-template.html @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + +
+ + +
+
+
+ + + +

+ +
+
+ + + +
+ +
+ + + +
+
+ + + + + + + + diff --git a/2016-template.html b/work-2016-template.html similarity index 91% rename from 2016-template.html rename to work-2016-template.html index 8b803b8..9a96b76 100644 --- a/2016-template.html +++ b/work-2016-template.html @@ -17,7 +17,7 @@
-

Fuzzy Logic

+

Fuzzy Logic

@@ -48,7 +48,7 @@
- +

diff --git a/2017-template.html b/work-2017-template.html similarity index 91% rename from 2017-template.html rename to work-2017-template.html index c57c484..1861efd 100644 --- a/2017-template.html +++ b/work-2017-template.html @@ -17,7 +17,7 @@
-

+

@@ -48,7 +48,7 @@