Browse Source

attempts to fix bugs

master
Cristina Cochior 6 years ago
parent
commit
ebdbcddc53
  1. BIN
      .DS_Store
  2. BIN
      __pycache__/contextualise.cpython-37.pyc
  3. 4845
      allhtml.txt
  4. 42870
      allhtml_proto.txt
  5. 6
      generate_links.py
  6. 37
      linelist.py
  7. 1
      mostcommon.txt
  8. 20
      putallhtmltexttogether.py
  9. BIN
      static/.DS_Store
  10. BIN
      static/files/.DS_Store
  11. 13
      static/files/00/00.json
  12. BIN
      static/files/00/Participants.html
  13. BIN
      static/files/00/PushingScores.html
  14. BIN
      static/files/00/events.html
  15. BIN
      static/files/01/.DS_Store
  16. 11
      static/files/01/01.json
  17. BIN
      static/files/01/01.metadata.html
  18. BIN
      static/files/01/Photo/TGC1club-web-06 februari 2015-02.jpg
  19. BIN
      static/files/02/.DS_Store
  20. 16
      static/files/02/02.json
  21. BIN
      static/files/02/02.metadata.html
  22. BIN
      static/files/02/Photo/.DS_Store
  23. BIN
      static/files/02/Photo/Scan Manual BACK 300dpi.jpg
  24. BIN
      static/files/02/Photo/Scan Manual FRONT 300dpi.jpg
  25. BIN
      static/files/02/Photo/TGC3 top.jpg
  26. BIN
      static/files/02/Photo/TGC3.jpg
  27. BIN
      static/files/02/Photo/TGC3achterkant.jpg
  28. BIN
      static/files/02/Photo/TGC3voorkant.jpg
  29. BIN
      static/files/03/.DS_Store
  30. 11
      static/files/03/03.json
  31. BIN
      static/files/03/03.metadata.html
  32. BIN
      static/files/03/Photo/Kris princ2-s-2000px-72dpi-79 02 juli 2015.jpg
  33. 5
      static/files/04/04.blurb.txt
  34. 1
      static/files/04/04.motivation.txt
  35. 1
      static/files/04/04.practice.txt
  36. BIN
      static/files/05/.DS_Store
  37. 16
      static/files/05/05.json
  38. BIN
      static/files/05/05.metadata.html
  39. BIN
      static/files/05/Photo/ArtBookFairBrussel-Vaast Colson-6d-20160909-57-20.jpg
  40. BIN
      static/files/05/Photo/DOB079-Vaast-Colson-1600px-web-160913-10.jpg
  41. BIN
      static/files/05/Photo/DOB079-Vaast-Colson-1600px-web-160913-11.jpg
  42. BIN
      static/files/05/Photo/DOB079-Vaast-Colson-spread-1600px-web-160913-1.jpg
  43. BIN
      static/files/05/Photo/VaastColson.jpg
  44. BIN
      static/files/05/Sound/DOB079_VaastColson_CarlsonInvents.mp3
  45. BIN
      static/files/17/.DS_Store
  46. BIN
      static/files/17/17.blurb.html
  47. 12
      static/files/17/17.json
  48. BIN
      static/files/17/Photo/brecht-event1.jpg
  49. BIN
      static/files/17/Photo/svc-1966-brecht's sundown event-i.jpg
  50. BIN
      static/files/17/Video/Drip Music - George Brecht (Fluxus)-UT5lgaE-qZY.mkv
  51. 2
      templates/home.html
  52. 4
      templates/layout.html
  53. 12
      textedit.py
  54. 2
      wordlist.json
  55. 1
      wordlist_proto.json
  56. 37
      wordlist_v3.json
  57. 7
      wordsearch.py

BIN
.DS_Store

Binary file not shown.

BIN
__pycache__/contextualise.cpython-37.pyc

Binary file not shown.

4845
allhtml.txt

File diff suppressed because it is too large

42870
allhtml_proto.txt

File diff suppressed because one or more lines are too long

6
generate_links.py

@ -2,7 +2,7 @@ import sys, os
import json import json
import re import re
with open('wordlist.json', 'r', encoding='utf-8') as f: with open('wordlist.json', 'r') as f:
wordlist_dict = json.load(f) wordlist_dict = json.load(f)
path = "static/files/" path = "static/files/"
@ -10,10 +10,10 @@ for path, subdirs, files in os.walk(path):
for name in files: for name in files:
if name.endswith('html'): if name.endswith('html'):
file = os.path.join(path, name) file = os.path.join(path, name)
with open(file, 'r+', encoding='ISO-8859-1') as f: with open(file, 'r+') as f:
textfile = f.read() textfile = f.read()
for word in wordlist_dict: for word in wordlist_dict:
word = re.escape(word) # word = re.escape(word)
textfile = re.sub(r"(?<!<)(?<!</)(?<!ge\?)\b(%s)\b" %word, r"<a href='/diverge?search=\1'>\1</a>", textfile) textfile = re.sub(r"(?<!<)(?<!</)(?<!ge\?)\b(%s)\b" %word, r"<a href='/diverge?search=\1'>\1</a>", textfile)
f.truncate(0) f.truncate(0)
f.write(textfile) f.write(textfile)

37
linelist.py

@ -1,37 +0,0 @@
[
"item" : "17",
"sentences" : [
"George Brecht (August 27, 1926 – December 5, 2008), born George Ellis MacDiarmid, was an American conceptual artist and avant-garde composer, as well as a professional chemist who worked as a consultant for companies including Pfizer, Johnson & Johnson, and Mobil Oil.",
"He was a key member of, and influence on, Fluxus, the international group of avant-garde artists centred on George Maciunas, having been involved with the group from the first performances in Wiesbaden 1962 until Maciunas' death in 1978.",
"One of the originators of 'participatory' art, in which the artwork can only be experienced by the active involvement of the viewer, he is most famous for his Event Scores such as Drip Music 1962, and is widely seen as an important precursor to conceptual art."
"He described his own art as a way of 'ensuring that the details of everyday life, the random constellations of objects that surround us, stop going unnoticed.'",
"Steve Joy took me to meet George Brecht in his studio when I was in residence at St Michael's in Manhattan (c.1962). ",
"We became friends and GB mailed instruction cards to me.",
"I brought Steve Joy to St Vincent College when I returned to the monastery from Paris in 1963. GB agreed to provide instructions for an event at St Vincent."
"For his 'Vehicle Sundown Event', GB published a set of about 50 cards to be given to participants who participated in the event with their vehicles.",
"Each card held an instruction to be performed with a vehicle.",
"Drivers were instructed to assemble at sundown in a parking lot and randomly park their vehicles.",
"Then each driver, with a shuffled deck of instructions, would begin performing at the sound of a signal.",
"Participants performed about 50 events such as 'turn on lights', 'start engine', 'stop engine', 'open window'.",
"This work was performed at St Vincent College under the direction of Stephen Joy with Roman Verostko assisting. c. 1963 ( I can confirm that Fr Melvin Ruprecht participated.",
"I believe it was before I went to Washington as NCE editor, rv0"
],
"item" : "00",
"sentences" : []
]

1
mostcommon.txt

@ -1 +0,0 @@
[('The', 201), ('sound', 134), ('I', 128), ('music', 124), ('work', 74), ('project', 70), ('new', 68), ('record', 67), ('performance', 60), ('This', 59), ('It', 58), ('In', 56), ('graphic', 54), ('also', 52), ('notation', 48), ('art', 48), ("'", 47), ('time', 47), ('DE', 44), ('scores', 44), ('works', 43), ('one', 43), ('event', 42), ('made', 42), ('PLAYER', 41), ('live', 41), ("'s", 41), ('He', 41), ('score', 39), ('artist', 39), (';', 37), ('records', 37), ('Rotterdam', 35), ('Pushing', 35), ('first', 35), ('A', 34), ('For', 33), ('like', 33), ('used', 33), ('artists', 32), ('part', 32), ('would', 32), ('idea', 30), ('use', 30), ('MIDI', 30), ('Scores', 29), ('piece', 29), ('really', 29), ('&', 28), ('analog', 28)]

20
putallhtmltexttogether.py

@ -1,10 +1,4 @@
import sys, os import sys, os
from nltk import word_tokenize
from nltk import everygrams
from nltk import FreqDist
stopws = ['i', 'me', 'my', 'myself', 'we', 'our', 'ours', 'ourselves', 'you', "you're", "you've", "you'll", "you'd", 'your', 'yours', 'yourself', 'yourselves', 'he', 'him', 'his', 'himself', 'she', "she's", 'her', 'hers', 'herself', 'it', "it's", 'its', 'itself', 'they', 'them', 'their', 'theirs', 'themselves', 'what', 'which', 'who', 'whom', 'this', 'that', "that'll", 'these', 'those', 'am', 'is', 'are', 'was', 'were', 'be', 'been', 'being', 'have', 'has', 'had', 'having', 'do', 'does', 'did', 'doing', 'a', 'an', 'the', 'and', 'but', 'if', 'or', 'because', 'as', 'until', 'while', 'of', 'at', 'by', 'for', 'with', 'about', 'against', 'between', 'into', 'through', 'during', 'before', 'after', 'above', 'below', 'to', 'from', 'up', 'down', 'in', 'out', 'on', 'off', 'over', 'under', 'again', 'further', 'then', 'once', 'here', 'there', 'when', 'where', 'why', 'how', 'all', 'any', 'both', 'each', 'few', 'more', 'most', 'other', 'some', 'such', 'no', 'nor', 'not', 'only', 'own', 'same', 'so', 'than', 'too', 'very', 's', 't', 'can', 'will', 'just', 'don', "don't", 'should', "should've", 'now', 'd', 'll', 'm', 'o', 're', 've', 'y', 'ain', 'aren', "aren't", 'couldn', "couldn't", 'didn', "didn't", 'doesn', "doesn't", 'hadn', "hadn't", 'hasn', "hasn't", 'haven', "haven't", 'isn', "isn't", 'ma', 'mightn', "mightn't", 'mustn', "mustn't", 'needn', "needn't", 'shan', "shan't", 'shouldn', "shouldn't", 'wasn', "wasn't", 'weren', "weren't", 'won', "won't", 'wouldn', "wouldn't", ",", ".", "?","!",":","(",")",">","<","@","#","``","/","","''","","-","", "DOCTYPE", "html", "!"]
path = "static/files/" path = "static/files/"
for path, subdirs, files in os.walk(path): for path, subdirs, files in os.walk(path):
@ -12,16 +6,10 @@ for path, subdirs, files in os.walk(path):
if name.endswith('html'): if name.endswith('html'):
file = os.path.join(path, name) file = os.path.join(path, name)
total = open("allhtml.txt", "a") total = open("allhtml.txt", "a")
with open(file, 'r+', encoding='ISO-8859-1') as f: with open(file, 'r') as f:
print(file)
# print(f.readlines())
content = f.read() content = f.read()
print(content)
total.write(content) total.write(content)
total.close() total.close()
with open('allhtml.txt') as f:
content = f.read()
tokens = word_tokenize(content)
tokens = [token for token in tokens if token not in stopws]
freq_file=FreqDist(tokens)
listofwords = open("mostcommon.txt", "w+")
listofwords.write(str(freq_file.most_common(50)))
listofwords.close()

BIN
static/.DS_Store

Binary file not shown.

BIN
static/files/.DS_Store

Binary file not shown.

13
static/files/00/00.json

@ -1,13 +0,0 @@
{
"id": "00",
"name": "Yes",
"email": "sure@whynot.com",
"friend": "Y",
"content": "A sound file.",
"files":[
"files/00/Participants.html",
"files/00/PushingScores.html",
"files/00/events.html"
]
}

BIN
static/files/00/Participants.html

Binary file not shown.

BIN
static/files/00/PushingScores.html

Binary file not shown.

BIN
static/files/00/events.html

Binary file not shown.

BIN
static/files/01/.DS_Store

Binary file not shown.

11
static/files/01/01.json

@ -1,11 +0,0 @@
{
"id": "01",
"name": "Yes",
"email": "sure@whynot.com",
"friend": "Y",
"content": "A sound file.",
"files": [
"files/01/01.metadata.html",
"files/01/Photo/TGC1club-web-06 februari 2015-02.jpg"
]
}

BIN
static/files/01/01.metadata.html

Binary file not shown.

BIN
static/files/01/Photo/TGC1club-web-06 februari 2015-02.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 KiB

BIN
static/files/02/.DS_Store

Binary file not shown.

16
static/files/02/02.json

@ -1,16 +0,0 @@
{
"id": "02",
"name": "Yes",
"email": "sure@whynot.com",
"friend": "Y",
"content": "A sound file.",
"files": [
"files/02/02.metadata.html",
"files/02/Photo/Scan Manual BACK 300dpi.jpg",
"files/02/Photo/Scan Manual FRONT 300dpi.jpg",
"files/02/Photo/TGC3achterkant.jpg",
"files/02/Photo/TGC3.jpg",
"files/02/Photo/TGC3 top.jpg",
"files/02/Photo/TGC3voorkant.jpg"
]
}

BIN
static/files/02/02.metadata.html

Binary file not shown.

BIN
static/files/02/Photo/.DS_Store

Binary file not shown.

BIN
static/files/02/Photo/Scan Manual BACK 300dpi.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

BIN
static/files/02/Photo/Scan Manual FRONT 300dpi.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

BIN
static/files/02/Photo/TGC3 top.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 999 KiB

BIN
static/files/02/Photo/TGC3.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

BIN
static/files/02/Photo/TGC3achterkant.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

BIN
static/files/02/Photo/TGC3voorkant.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

BIN
static/files/03/.DS_Store

Binary file not shown.

11
static/files/03/03.json

@ -1,11 +0,0 @@
{
"id": "03",
"name": "Yes",
"email": "sure@whynot.com",
"friend": "Y",
"content": "A sound file.",
"files": [
"files/03/03.metadata.html",
"files/03/Photo/Kris princ2-s-2000px-72dpi-79 02 juli 2015.jpg"
]
}

BIN
static/files/03/03.metadata.html

Binary file not shown.

BIN
static/files/03/Photo/Kris princ2-s-2000px-72dpi-79 02 juli 2015.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 963 KiB

5
static/files/04/04.blurb.txt

@ -1,5 +0,0 @@
Here is a description of the event / artist / work.
For the event, it can describe what happened, where it happened, when it happened.
For the artist, it can introduce the artist.
For the work, it can describe the content.

1
static/files/04/04.motivation.txt

@ -1 +0,0 @@
Why was the artist / piece / event included in the collection.

1
static/files/04/04.practice.txt

@ -1 +0,0 @@
Here you can go into length about an artists’ practice. For example, interviews, personal statements, reviews etc.

BIN
static/files/05/.DS_Store

Binary file not shown.

16
static/files/05/05.json

@ -1,16 +0,0 @@
{
"id": "05",
"name": "Yes",
"email": "sure@whynot.com",
"friend": "Y",
"content": "A sound file.",
"files": [
"files/05/05.metadata.html",
"files/05/Sound/DOB079_VaastColson_CarlsonInvents.mp3",
"files/05/Photo/DOB079-Vaast-Colson-spread-1600px-web-160913-1.jpg",
"files/05/Photo/DOB079-Vaast-Colson-1600px-web-160913-11.jpg",
"files/05/Photo/ArtBookFairBrussel-Vaast Colson-6d-20160909-57-20.jpg",
"files/05/Photo/DOB079-Vaast-Colson-1600px-web-160913-10.jpg",
"files/05/Photo/VaastColson.jpg"
]
}

BIN
static/files/05/05.metadata.html

Binary file not shown.

BIN
static/files/05/Photo/ArtBookFairBrussel-Vaast Colson-6d-20160909-57-20.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

BIN
static/files/05/Photo/DOB079-Vaast-Colson-1600px-web-160913-10.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 KiB

BIN
static/files/05/Photo/DOB079-Vaast-Colson-1600px-web-160913-11.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 KiB

BIN
static/files/05/Photo/DOB079-Vaast-Colson-spread-1600px-web-160913-1.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 KiB

BIN
static/files/05/Photo/VaastColson.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

BIN
static/files/05/Sound/DOB079_VaastColson_CarlsonInvents.mp3

Binary file not shown.

BIN
static/files/17/.DS_Store

Binary file not shown.

BIN
static/files/17/17.blurb.html

Binary file not shown.

12
static/files/17/17.json

@ -1,12 +0,0 @@
{
"id": "17",
"Who": "George Brecht",
"What": "Works",
"content": "A sound file.",
"files": [
"files/17/17.blurb.html",
"files/17/Photo/brecht-event1.jpg",
"files/17/Photo/svc-1966-brecht's sundown event-i.jpg",
"files/17/Video/Drip Music - George Brecht (Fluxus)-UT5lgaE-qZY.mkv"
]
}

BIN
static/files/17/Photo/brecht-event1.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

BIN
static/files/17/Photo/svc-1966-brecht's sundown event-i.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

BIN
static/files/17/Video/Drip Music - George Brecht (Fluxus)-UT5lgaE-qZY.mkv

Binary file not shown.

2
templates/home.html

@ -14,6 +14,6 @@
{% block index %} {% block index %}
{% for each in index_dict %} {% for each in index_dict %}
{% set address = "/description?id=" + each %} {% set address = "/description?id=" + each %}
<a href={{address}}>{{index_dict[each]}}</a> <a href={{address}}>{{index_dict[each]}}</a> |
{% endfor %} {% endfor %}
{% endblock index %} {% endblock index %}

4
templates/layout.html

@ -1,9 +1,9 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title><a href="">P.u.s.h.i.n.g.S.c.o.r.e.s</a></title> <title>P.u.s.h.i.n.g.S.c.o.r.e.s</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
</head> </head>
<body> <body>

12
textedit.py

@ -18,7 +18,7 @@ for path, subdirs, files in os.walk(path):
if name.endswith('html'): if name.endswith('html'):
file = os.path.join(path, name) file = os.path.join(path, name)
total = open("allhtml.txt", "a") total = open("allhtml.txt", "a")
with open(file, 'r+', encoding='ISO-8859-1') as f: with open(file, 'r+') as f:
content = f.read() content = f.read()
total.write(content) total.write(content)
total.close() total.close()
@ -47,21 +47,21 @@ sentences_w_word = {}
def analysis(the_word, file_name): def analysis(the_word, file_name):
id = file_name[13:15] id = file_name[13:15]
with open(file_name, 'r+', encoding='ISO-8859-1') as f: with open(file_name, 'r+') as f:
content = f.read() content = f.read()
sent_tokens = sent_tokenize(content) sent_tokens = sent_tokenize(content)
new_sent_tokens = [] new_sent_tokens = []
for sent_token in sent_tokens: for sent_token in sent_tokens:
if the_word in sent_token: if the_word in sent_token:
new_sent_tokens.append({'id': id, 'sentence': sent_token.replace('\n', ' ').strip("'<>()")}) new_sent_tokens.append({'id': id, 'sentence': sent_token.replace('\n', ' ').strip("'<>()“”")})
if the_word in sentences_w_word: # if this is not the first iteration if the_word in sentences_w_word: # if this is not the first iteration
previous_sent_tokens = sentences_w_word[the_word] previous_sent_tokens = sentences_w_word[the_word]
full_sent_tokens = previous_sent_tokens + new_sent_tokens full_sent_tokens = previous_sent_tokens + new_sent_tokens
else: else:
full_sent_tokens = new_sent_tokens full_sent_tokens = new_sent_tokens
sentences_w_word[word] = full_sent_tokens sentences_w_word[the_word] = full_sent_tokens
# maybe ISO-8859-1 instead of utf8??
path = "static/files/" path = "static/files/"
for path, subdirs, files in os.walk(path): for path, subdirs, files in os.walk(path):
@ -71,5 +71,5 @@ for path, subdirs, files in os.walk(path):
for word in keyword_list: for word in keyword_list:
analysis(word, file) analysis(word, file)
with open('wordlist.json', 'w', encoding="utf8") as outfile: with open('wordlist.json', 'w') as outfile:
json.dump(sentences_w_word, outfile, ensure_ascii=False) json.dump(sentences_w_word, outfile, ensure_ascii=False)

2
wordlist.json

File diff suppressed because one or more lines are too long

1
wordlist_proto.json

File diff suppressed because one or more lines are too long

37
wordlist_v3.json

@ -1,37 +0,0 @@
{
"way" : [
{
"id" : "17",
"sentence" : "He described his own art as a way of 'ensuring that the details of everyday life, the random constellations of objects that surround us, stop going unnoticed.'"
},
{
"id" : "17",
"sentence" : "Another sentence like way way this."
},
{
"id" : "00",
"sentence" : "Our ambition, and that of our collaborating partners, is to emancipate graphic notation from the confines of the modernist tradition, in such a way that it may remain an innovative and provocative medium for decades to come."
}
],
"artwork" : [
{
"id" : "17",
"sentence" : "One of the originators of 'participatory' art, in which the artwork can only be experienced by the active involvement of the viewer, he is most famous for his Event Scores such as Drip Music 1962, and is widely seen as an important precursor to conceptual art."
},
{
"id" : "00",
"sentence" : "It unfolds through a nomadic program which includes the creation of newly commissioned artworks and public events that addres scontemporary questions and issues in this particular field."
},
{
"id" : "00",
"sentence" : "The discursive program for 2016–2017 will include lectures, presentations of newly commissioned artworks, concert evenings, and workshops."
}
]
}

7
wordsearch.py

@ -1,7 +0,0 @@
text = open('static/files/17. George Brecht_event scores/17.blurb.txt')
search_words = ['random', 'composer', 'iron', 'car']
for line in text:
if any(word in line for word in search_words):
Loading…
Cancel
Save