add all previous files
@ -0,0 +1,42 @@
|
|||||||
|
English,Japanese
|
||||||
|
Byte,バイト
|
||||||
|
Computer,コンピューター
|
||||||
|
Arcade,アーケード
|
||||||
|
Internet,インターネット
|
||||||
|
Network,ネットワーク
|
||||||
|
Personal Computer,パソコン
|
||||||
|
Cyberspace,サイバースペース
|
||||||
|
Second Summer Of Love,セカンドサマーオブラブ
|
||||||
|
Centralization,中央集権化
|
||||||
|
Underground Subculture,地下サブカルチャー
|
||||||
|
Counterculture,カウンターカルチャー
|
||||||
|
Data,データ
|
||||||
|
Penpal,ペンパル
|
||||||
|
System,システム
|
||||||
|
Game magazine,ゲーム雑誌
|
||||||
|
Computer magazine,パソコン雑誌
|
||||||
|
Telephone line,電話回線
|
||||||
|
Telephone book,電話帳
|
||||||
|
Den Den Mushi telephone snails,電伝虫
|
||||||
|
California Ideology,カリフォルニアイデオロジー
|
||||||
|
Neuromancer,ニューロマンサー
|
||||||
|
TRON,トロン
|
||||||
|
Whole Earth Catalog,全地球カタログ
|
||||||
|
Hackers,ハッカー
|
||||||
|
Television Game Anthology,
|
||||||
|
Computer communication,通信
|
||||||
|
Eighth Grader Syndrome,中二
|
||||||
|
Trance,鬼畜
|
||||||
|
Host,ホスト
|
||||||
|
Ghost in the Shell,攻殻機動隊
|
||||||
|
Yaruo,やる夫
|
||||||
|
e-zine,
|
||||||
|
server,サーバ
|
||||||
|
mail art,メールアート
|
||||||
|
links,リンク
|
||||||
|
Cyberpunk,サイバーパンク
|
||||||
|
Denpa-kei,電波系
|
||||||
|
Otaku,オタク
|
||||||
|
Kawaii,かわいい
|
||||||
|
Decentralization,地方分権化
|
||||||
|
Distribution,分布
|
|
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"Byte": "バイト",
|
||||||
|
"Computer": "コンピューター",
|
||||||
|
"Arcade": "アーケード",
|
||||||
|
"Internet": "インターネット",
|
||||||
|
"Network": "ネットワーク",
|
||||||
|
"Personal Computer": "パソコン",
|
||||||
|
"Cyberspace": "サイバースペース",
|
||||||
|
"Second Summer Of Love": "セカンドサマーオブラブ",
|
||||||
|
"Centralization": "中央集権化",
|
||||||
|
"Underground Subculture": "地下サブカルチャー",
|
||||||
|
"Counterculture": "カウンターカルチャー",
|
||||||
|
"Data": "データ",
|
||||||
|
"Penpal": "ペンパル",
|
||||||
|
"System": "システム",
|
||||||
|
"Game magazine": "ゲーム雑誌",
|
||||||
|
"Computer magazine": "パソコン雑誌",
|
||||||
|
"Telephone line": "電話回線",
|
||||||
|
"Telephone book": "電話帳",
|
||||||
|
"Den Den Mushi telephone snails": "電伝虫",
|
||||||
|
"California Ideology": "カリフォルニアイデオロジー",
|
||||||
|
"Neuromancer": "ニューロマンサー",
|
||||||
|
"TRON": "トロン",
|
||||||
|
"Whole Earth Catalog": "全地球カタログ",
|
||||||
|
"Hackers": "ハッカー",
|
||||||
|
"Television Game Anthology": "",
|
||||||
|
"Computer communication": "通信",
|
||||||
|
"Eighth Grader Syndrome": "中二",
|
||||||
|
"Trance": "鬼畜",
|
||||||
|
"Host": "ホスト",
|
||||||
|
"Ghost in the Shell": "攻殻機動隊",
|
||||||
|
"Yaruo": "やる夫",
|
||||||
|
"e-zine": "",
|
||||||
|
"server": "サーバ",
|
||||||
|
"mail art": "メールアート",
|
||||||
|
"links": "リンク",
|
||||||
|
"Cyberpunk": "サイバーパンク",
|
||||||
|
"Denpa-kei": "電波系",
|
||||||
|
"Otaku": "オタク",
|
||||||
|
"Kawaii": "かわいい",
|
||||||
|
"Decentralization": "地方分権化",
|
||||||
|
"Distribution": "分布"
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
import csv
|
||||||
|
import json
|
||||||
|
|
||||||
|
# Modified from https://www.geeksforgeeks.org/convert-csv-to-json-using-python/
|
||||||
|
|
||||||
|
# Function to convert a CSV to JSON
|
||||||
|
# Takes the file paths as arguments
|
||||||
|
def make_json(csvFilePath, jsonFilePath):
|
||||||
|
|
||||||
|
# create a dictionary
|
||||||
|
dictionary = {}
|
||||||
|
|
||||||
|
# Open a csv reader called DictReader
|
||||||
|
with open(csvFilePath, encoding='utf-8') as csvf:
|
||||||
|
csvReader = csv.DictReader(csvf)
|
||||||
|
|
||||||
|
# Convert each row into a dictionary
|
||||||
|
# and add it to data
|
||||||
|
for rows in csvReader:
|
||||||
|
# Assuming a column named 'English' to
|
||||||
|
# be the primary key
|
||||||
|
key = rows['English']
|
||||||
|
print("key is {}".format(key))
|
||||||
|
value = rows['Japanese']
|
||||||
|
print("value is {}".format(value))
|
||||||
|
dictionary[key] = value
|
||||||
|
|
||||||
|
# Open a json writer, and use the json.dumps()
|
||||||
|
# function to dump data
|
||||||
|
with open(jsonFilePath, 'w', encoding='utf-8') as jsonf:
|
||||||
|
jsonf.write(json.dumps(dictionary, ensure_ascii=False, indent=4))
|
||||||
|
|
||||||
|
# Driver Code
|
||||||
|
|
||||||
|
# Decide the two file paths according to your
|
||||||
|
# computer system
|
||||||
|
csvFilePath = r'dictionary.csv'
|
||||||
|
jsonFilePath = r'dictionary.json'
|
||||||
|
|
||||||
|
# Call the make_json function
|
||||||
|
make_json(csvFilePath, jsonFilePath)
|
||||||
|
|
||||||
|
|
||||||
|
# interesting project on pokemon csv
|
||||||
|
# https://amiradata.com/parse-and-convert-json-to-csv-python/
|
@ -0,0 +1,20 @@
|
|||||||
|
# computer archaeology jp multimedia playlist and utility
|
||||||
|
|
||||||
|
## multimedia playlist
|
||||||
|
In this playlist, you will find a list of multimedia content to navigate the space of "computer archaeology jp":
|
||||||
|
|
||||||
|
* a handful of songs
|
||||||
|
* an NES long play
|
||||||
|
* a manual manga
|
||||||
|
* an advertisement
|
||||||
|
* an audio book
|
||||||
|
* a book
|
||||||
|
|
||||||
|
## utility
|
||||||
|
Jinja templating engine for a web zine project.
|
||||||
|
|
||||||
|
Usage
|
||||||
|
|
||||||
|
## thank you
|
||||||
|
Supported by the Race x Technology Micro Grant program of the Media Archaeology Lab
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
from flask import Flask
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
HTML_TEMPLATE = """
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>media archaeology jp multimedia playlist</title>
|
||||||
|
<style>
|
||||||
|
img{
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>computer archaeology jp multimedia playlist</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
"""
|
||||||
|
|
||||||
|
@app.route("/")
|
||||||
|
def homepage():
|
||||||
|
return HTML_TEMPLATE
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run(use_reloader=True, debug=True)
|
After Width: | Height: | Size: 149 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 429 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 1.9 MiB |
After Width: | Height: | Size: 816 KiB |
After Width: | Height: | Size: 500 KiB |
After Width: | Height: | Size: 892 KiB |
After Width: | Height: | Size: 490 KiB |
After Width: | Height: | Size: 1.0 MiB |
After Width: | Height: | Size: 186 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 593 KiB |
After Width: | Height: | Size: 510 KiB |
After Width: | Height: | Size: 573 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 101 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 514 KiB |
After Width: | Height: | Size: 583 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 185 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 284 KiB |
After Width: | Height: | Size: 528 KiB |
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 22 KiB |
@ -0,0 +1,18 @@
|
|||||||
|
import json
|
||||||
|
from jinja2 import Environment, FileSystemLoader
|
||||||
|
|
||||||
|
with open("playlist.json","r") as d:
|
||||||
|
playlist = json.load(d)
|
||||||
|
|
||||||
|
fileLoader = FileSystemLoader("templates")
|
||||||
|
env = Environment(loader=fileLoader)
|
||||||
|
|
||||||
|
rendered = env.get_template("playlist.html").render(playlist=playlist,title="Test")
|
||||||
|
|
||||||
|
#print(playlist)
|
||||||
|
|
||||||
|
# write to html
|
||||||
|
fileName = "index.html"
|
||||||
|
|
||||||
|
with open(f"{fileName}","w") as f:
|
||||||
|
f.write(rendered)
|
@ -0,0 +1,26 @@
|
|||||||
|
import csv
|
||||||
|
import json
|
||||||
|
|
||||||
|
def csv_to_json(csvFilePath, jsonFilePath):
|
||||||
|
jsonArray = []
|
||||||
|
|
||||||
|
#read csv file
|
||||||
|
with open(csvFilePath, encoding='utf-8') as csvf:
|
||||||
|
#load csv file data using csv library's dictionary reader
|
||||||
|
csvReader = csv.DictReader(csvf)
|
||||||
|
|
||||||
|
#convert each csv row into python dict
|
||||||
|
for row in csvReader:
|
||||||
|
#add this python dict to json array
|
||||||
|
jsonArray.append(row)
|
||||||
|
|
||||||
|
#convert python jsonArray to JSON String and write to file
|
||||||
|
with open(jsonFilePath, 'w', encoding='utf-8') as jsonf:
|
||||||
|
jsonString = json.dumps(jsonArray, ensure_ascii=False, indent=4)
|
||||||
|
print(jsonString)
|
||||||
|
jsonf.write(jsonString)
|
||||||
|
|
||||||
|
csvFilePath = r'playlist.csv'
|
||||||
|
jsonFilePath = r'playlist.json'
|
||||||
|
|
||||||
|
csv_to_json(csvFilePath, jsonFilePath)
|
|
@ -0,0 +1,52 @@
|
|||||||
|
|
||||||
|
|
||||||
|
img
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** make live selection of random links **/
|
||||||
|
div.container
|
||||||
|
{
|
||||||
|
background-image: url("https://ascii.jp/img/2010/04/22/881674/o/1b4ba90f25fde2b8.jpg");
|
||||||
|
background-repeat: repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
h1.title
|
||||||
|
{
|
||||||
|
font-size: 60px;
|
||||||
|
color: purple;
|
||||||
|
font-family: "Cursive";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
a.archive
|
||||||
|
{
|
||||||
|
color: red;
|
||||||
|
font-size:30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.print
|
||||||
|
{
|
||||||
|
color: yellow;
|
||||||
|
font-size:45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.video
|
||||||
|
{
|
||||||
|
color: blue;
|
||||||
|
font-size:50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.audio
|
||||||
|
{
|
||||||
|
color: violet;
|
||||||
|
font-size:60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title> media archaeology jp multimedia playlist {{ title }}</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="static/style.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<div class ="heading">
|
||||||
|
<h1 class = "title">media archaeology jp multimedia playlist</h1>
|
||||||
|
</div>
|
||||||
|
<div class="gallery">
|
||||||
|
{% for item in playlist %}
|
||||||
|
<a class = "{{item.type}}" href="{{ item.link }}">
|
||||||
|
<img src="img/{{ item.img }}" alt="{{ item.title }}">
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|