diff --git a/backup/backup_stills.command b/backup/backup_stills.command deleted file mode 100755 index b6317a2..0000000 --- a/backup/backup_stills.command +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env python3 - -import json -import os -import sys -import unicodedata -import re - -import ox -import ox.api - - -if __name__ == '__main__': - if len(sys.argv) > 1: - target = sys.argv[1] - else: - target = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'Stills') - - if not target.endswith('/'): - target += '/' - - site = 'pandora.cinemusespace.com' - api = ox.api.signin('https://%s/api/' % site) - - keep = [] - r = api.findAnnotations({ - 'query': { - 'conditions': [ - {'key': 'layer', 'operator': '==', 'value': 'stills'} - ] - }, - 'range': [0, 100000], - 'keys': ['id', 'item', 'value', 'in', 'out', 'title', 'director', 'year'] - }) - for i in r['data']['items']: - img = re.compile('').findall(i['value']) - if len(img) != 1: - print(img) - sys.exit(1) - lines = i['value'].strip().split('\n') - if len(lines) > 1: - tags = lines[1:] - else: - tags = [] - - name = i['title'] - if i.get('year'): - name += '_(%s)' % i['year'] - if i.get('director'): - name += '_' + ','.join(i['director']) - if tags: - name += '_' + ','.join(tags) - - pos = float(re.compile('p(.*?).jpg').findall(img[0])[0]) - name += '_%s.jpg' % ox.format_timecode(pos) - url = 'https://%s%s' % (site, img[0]) - path = os.path.join(target, name) - if not os.path.exists(path): - print(url, name) - api.save_url(url, path) - diff --git a/config.jsonc b/config.jsonc index 1c15ae4..7870c43 100644 --- a/config.jsonc +++ b/config.jsonc @@ -42,7 +42,6 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. "canAddItems": {"staff": true, "admin": true}, "canAddDocuments": {"staff": true, "admin": true}, "canDownloadVideo": {"guest": 0, "member": 0, "visitor": 0, "staff": 1, "admin": 2}, - "canDownloadSource": {"member": -1, "staff": 4, "admin": 4}, "canEditAnnotations": {"staff": false, "admin": true}, "canEditDocuments": {"staff": true, "admin": true}, "canEditEntities": {"staff": true, "admin": true}, @@ -215,7 +214,6 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. "type": "string", "columnWidth": 120, //"format": {"type": "date", "args": ["%a, %b %e, %Y"]}, - "filter": true, "sort": true }, { @@ -1207,22 +1205,22 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. the system (from). */ "site": { - "description": "CineMuseSpace: A Cinematic Musée Imaginaire of Spatial Cultural Differences", + "description": "CineUrban: ...", "email": { // E-mail address in contact form (to) "contact": "js2034@cam.ac.uk", - "footer": "-- \npandora.cinemusespace.com", - "prefix": "CineMuseSpace News -", + "footer": "-- \ncineurban.cinemusespace.com", + "prefix": "CineUrban News -", // E-mail address uses by the system (from) - "system": "system@pandora.cinemusespace.com" + "system": "system@urban.cinemusespace.com" }, "https": false, "id": "cms", - "name": "CineMuseSpace", + "name": "CineUrban", // Set to true to allow search engines to index the site "public": false, "sendReferrer": true, - "url": "pandora.cinemusespace.com" + "url": "cineurban.cinemusespace.com" }, /* "sitePages" defines the sections of the main site dialog. If "news" is @@ -1331,19 +1329,11 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. }, "document": "", "documents": {}, - "documentFiltersSize": 176, "documentSize": 256, "documentView": "view", "documentsSelection": {}, "documentsSort": [{"key": "title", "operator": "+"}], "documentsView": "grid", - "documentFilters": [ - {"id": "author", "sort": [{"key": "items", "operator": "-"}]}, - {"id": "place", "sort": [{"key": "items", "operator": "-"}]}, - {"id": "date", "sort": [{"key": "name", "operator": "-"}]}, - {"id": "publisher", "sort": [{"key": "items", "operator": "-"}]}, - {"id": "language", "sort": [{"key": "items", "operator": "-"}]} - ], "edit": "", "edits": {}, "editSelection": [], @@ -1408,7 +1398,6 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. "showCalendarControls": false, "showClips": true, "showDocument": true, - "showDocumentFilters": false, "showFilters": true, "showIconBrowser": false, "showInfo": true, diff --git a/ontology/ontology.py b/ontology/ontology.py index 3e867db..bcd8762 100755 --- a/ontology/ontology.py +++ b/ontology/ontology.py @@ -31,7 +31,7 @@ for string in sorted(strings): parents[parent] = grandparent # sign in -site = 'pandora.cinemusespace.com' +site = 'cineurban.cinemusespace.com' api = ox.api.signin('https://%s/api/' % site) # find keywords, add strings, count items for children and parents diff --git a/ontology/update.py b/ontology/update.py index 911e713..65ce363 100755 --- a/ontology/update.py +++ b/ontology/update.py @@ -78,7 +78,7 @@ if __name__ == '__main__': #print(json.dumps(tree, indent=4, sort_keys=True)) sized_ontology = { "size": len(tree), - "name": "CineMuseSpace", + "name": "CineUrban", "children": [] } for name in tree: diff --git a/ontology/update_keywords.py b/ontology/update_keywords.py index f829b48..956e1dd 100755 --- a/ontology/update_keywords.py +++ b/ontology/update_keywords.py @@ -5,7 +5,7 @@ import json import ox import ox.api -site = 'pandora.cinemusespace.com' +site = 'cineurban.cinemusespace.com' api = ox.api.signin('https://%s/api/' % site) keywords = collections.Counter() diff --git a/static/png/icon.cms.png b/static/png/icon.cms.png index a8e14e7..11e82fc 100644 Binary files a/static/png/icon.cms.png and b/static/png/icon.cms.png differ diff --git a/static/png/logo.cms.png b/static/png/logo.cms.png index d5c2392..e42f04b 100644 Binary files a/static/png/logo.cms.png and b/static/png/logo.cms.png differ diff --git a/tasks.py b/tasks.py index 9ac599a..177397e 100644 --- a/tasks.py +++ b/tasks.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -import os from datetime import datetime, timedelta import subprocess