From a6f65166c383bf7515615b20f11e025ba29fb054 Mon Sep 17 00:00:00 2001 From: Castro0o Date: Mon, 30 May 2016 12:57:23 +0200 Subject: [PATCH] changes for 2016 --- 2016-template.html | 76 +++++++++++++++++++++++++ index-template-2016.html | 116 +++++++++++++++++++++++++++++++++++++++ mmdc_wiki2web.py | 22 +++++--- 3 files changed, 207 insertions(+), 7 deletions(-) create mode 100644 2016-template.html create mode 100644 index-template-2016.html diff --git a/2016-template.html b/2016-template.html new file mode 100644 index 0000000..8b803b8 --- /dev/null +++ b/2016-template.html @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + +
+ + +
+
+
+ + + +

+ +
+
+ + + +
+ +
+ + + +
+
+ + + + + + + + diff --git a/index-template-2016.html b/index-template-2016.html new file mode 100644 index 0000000..a67c7d9 --- /dev/null +++ b/index-template-2016.html @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + Master Media Design & Communication + + + + + + + + +
+
+
+
+
+
+ + +

Master Media Design & Communication

+

The Master in Media Design & Communication is an intensive project-based research degree exploring the possibilities released by the friction between media and their related practices. The course does not believe in old media and new media, nor in the pattern of media extinctions that punctuate traditional media histories. Rather students exploit the resonances and gaps between photography, cinema, animation, software and computational culture. In publishing and documenting, students are expected to critically engage with the platforms and networks in which their work operate or are distributed.

+ +

Graduation Show 2016: Fuzzy Login

+

17 - 25 June Rotterdam

+ + +
+
+
+ + + + + + +
+
+

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_wiki2web.py b/mmdc_wiki2web.py index 11bb9b3..9ae7c65 100755 --- a/mmdc_wiki2web.py +++ b/mmdc_wiki2web.py @@ -13,17 +13,24 @@ 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=[["2015", "Graduation_work"]], action="append", help="category to query, use -c foo -c bar to intersect multiple categories") +p.add_argument("--category", "-c", nargs="*", default=[["2016", "Graduation_work"]], action="append", help="category to query, use -c foo -c 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[0]: + if '20' in i: + year = i + +print year + + ###### # DEFS: create_page create_index ###### def create_page(memberpages, mode): - page_template = open("page-template.html", "r") + page_template = open("{}-template.html".format(year), "r") indexdict = {} #parent dict: contains articledict instances for member in memberpages: print member @@ -87,7 +94,7 @@ def create_page(memberpages, mode): # save work page creator = articledict['Creator'].encode('ascii', 'ignore') creator = creator.replace(' ','_') - work_filename = 'web/works/{}-{}.html'.format(articledict['Date'], creator) + work_filename = 'web/works/{}-{}.html'.format(year, creator) write_html_file(page_tree, work_filename) articledict['Path'] = work_filename[4:] indexdict[articledict['Title']] = articledict @@ -95,22 +102,23 @@ def create_page(memberpages, mode): def create_index(indexdict): - index_template = open("2015-template.html", "r") + index_template = open("index-template-{}.html".format(year), "r") index_tree = html5lib.parse(index_template, namespaceHTMLElements=False) index_container = index_tree.find(".//div[@class='isotope']") #maybe id is imp keys = indexdict.keys() shuffle(keys) - for key in keys: + + for key in keys: index_addwork( parent=index_container, workid=key, href=indexdict[key]['Path'], title=indexdict[key]['Title'],#.decode('utf-8'), creator=indexdict[key]['Creator'], - date=indexdict[key]['Date'], + date=indexdict[key]['Date'], thumbnail=(indexdict[key]['Thumbnail']).replace('http', 'https') ) print '----', indexdict[key]['Title'],indexdict[key]['Path'] - write_html_file(index_tree, 'web/2015.html') + write_html_file(index_tree, 'web/{}.html'.format(year)) #####