Compare commits

...

31 Commits

Author SHA1 Message Date
151318165b added fediverse creator tag
All checks were successful
Build / build (push) Successful in 13m30s
2024-12-25 20:36:51 +09:00
48ef973c54 node version specify
All checks were successful
Build / build (push) Successful in 7m42s
2024-12-12 18:55:01 +09:00
92386202db replaced button to internal link 2024-12-12 16:06:18 +09:00
246b58e7c4 readme update 2024-12-12 16:01:01 +09:00
820cea9bbf added node version 2024-12-12 16:00:57 +09:00
d09cbf8ad6 added micromorph setup
All checks were successful
Build / build (push) Successful in 9m46s
2024-12-12 15:50:44 +09:00
29c26d771a merge
All checks were successful
Build / build (push) Successful in 7m55s
2024-12-12 15:41:03 +09:00
8ee23d17b0 updated to hugo modules theme version
All checks were successful
Build / build (push) Successful in 9m28s
2024-12-12 02:29:35 +09:00
a55ec54e8e english
All checks were successful
Build / build (push) Successful in 7m34s
2024-04-15 13:23:03 +09:00
0969b9b225 updated theme 2024-04-15 13:23:03 +09:00
af03bf8fa1 updated theme 2024-04-15 12:05:05 +09:00
34652408a0 fixed english 2024-04-15 12:05:05 +09:00
8856df75df added week 1
All checks were successful
Build / build (push) Successful in 8m15s
2024-04-15 11:57:38 +09:00
152d13bb76 added week 1 2024-04-15 11:54:32 +09:00
e443f24f3c fixed english
All checks were successful
Build / build (push) Successful in 8m4s
2024-03-07 15:48:30 +09:00
f0d101dc1d added book
All checks were successful
Build / build (push) Successful in 7m46s
2024-02-26 22:23:31 +09:00
e12b63a238 added bigakko slides
All checks were successful
Build / build (push) Successful in 7m53s
2024-02-26 19:36:25 +09:00
eafe6966e4 Merge branch 'master' of github.com:tomoyanonymous/teach-matsuuratomoya-com
All checks were successful
Build / build (push) Successful in 6m54s
2024-02-06 12:36:07 +09:00
1f48f1bb15 updated theme 2024-02-06 12:34:47 +09:00
843a90a0cd added code example 2023-12-14 17:04:31 +09:00
f290b18722 added code-design 2023-12-14 16:29:48 +09:00
b186d07973 added class 10 2023-12-14 16:09:21 +09:00
13238c826d fixed example 2023-12-04 15:40:02 +09:00
a9dc6549b1 add code example 2023-12-04 15:37:01 +09:00
7c6297bac9 added simple translation program 2023-12-04 15:10:47 +09:00
4b35e15829 added contents 2023-12-04 15:10:33 +09:00
0aaa206e6a vault backup: 2023-12-04 12:47:02 2023-12-04 12:47:02 +09:00
1e9f849d1e updated bytebeat articles 2023-10-29 17:48:33 +09:00
00a2ca1913 add obsidian gitignore 2023-10-29 17:42:20 +09:00
d5545e29aa typo 2023-10-27 19:19:21 +09:00
716df973e0 add MAP2 bytebeat 2023-10-27 19:16:00 +09:00
186 changed files with 2725 additions and 90 deletions

View File

@@ -12,20 +12,27 @@ jobs:
- run: git config --global core.quotepath false
- name: Install apt packages
run: apt update && apt install -y rsync
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 23
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0
- uses: https://github.com/actions/setup-go@v4
with:
go-version: '^1.20'
go-version: '^1.23'
- name: Setup Hugo
uses: https://github.com/peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true
- name: Setup Hugo modules
run: hugo mod get -u
- name: Setup Hugo npm modules
run: hugo mod npm pack
- run: npm install
- name: Run Hugo
run: hugo --minify
run: hugo --gc --minify
# - name: upload artifacs
# uses: https://github.com/actions/upload-artifact@v3
# with:

4
.gitignore vendored
View File

@@ -1,3 +1,5 @@
resources
public/
.DS_Store
.DS_Store
content/.obsidian
node_modules

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "themes/book"]
path = themes/book
url = https://github.com/tomoyanonymous/hugo-book.git

View File

@@ -21,6 +21,22 @@ https://matsuuratomoya.com
# 使い方のメモ
[hugo-book](https://github.com/alex-shpak/hugo-book)をベースに、いくつか手を加えている。
[hugo-micromorph](https://github.com/tomoyanonymous/hugo-micromorph)で読み込み速度をめっちゃ早くしている。
## インストール & ビルド
HugoとNode.jsを入れる。
```sh
git clone gitea:tomoyanoynmous/teach-matsuuratomoya-com.git # giteaは~/.sshの中で設定すること
hugo mod get -u
hugo mod npm pack
npm install
hugo server
```
## 新しい授業資料更新のファイル作成コマンド
```sh
@@ -29,10 +45,11 @@ hugo new --kind class content/docs/2023/code-design/10
## カスタムショートコード
テーマのショートコードも使える。
テーマのショートコードも使える。 https://github.com/alex-shpak/hugo-book#shortcodes
https://github.com/alex-shpak/hugo-book#shortcodes 
CallOutは[hugo-admonition](https://github.com/KKKZOZ/hugo-admonitions)が使える。
FontAwesomeのIconも使える。 https://github.com/hugomods/icons/vendors/font-awesome
### `embed_pdf` PDFの埋め込み

18
assets/_custom.scss Normal file
View File

@@ -0,0 +1,18 @@
body {
//mod by tomoya
font-family: "Helvetica Neue",
Arial,
"Hiragino Sans",
"Hiragino Kaku Gothic ProN",
Meiryo,
sans-serif;
font-feature-settings: "palt" 1;
word-break: auto-phrase;
}
code {
font-family: monospace;
}
.book-brand .book-icon{
filter:none;
}

View File

@@ -1,6 +1,6 @@
---
title: 2020年度
weight: 4
weight: -1
bookFlatSection: true
---

View File

@@ -29,4 +29,4 @@ weight: 1
{{< button href="20200430_sounddesign1.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -27,4 +27,4 @@ weight: 10
{{< button href="20200718_sounddesign10.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -14,4 +14,4 @@ weight: 11
{{< button href="20200721_sounddesign11.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,4 +12,4 @@ weight: 12
{{< button href="20200728_sounddesign12.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -11,4 +11,4 @@ weight: 13
{{< button href="20200729_sounddesign13.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,4 +12,4 @@ weight: 14
{{< button href="20200804_sounddesign14.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,4 +12,4 @@ weight: 15
{{< button href="20200806_sounddesign15.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -37,4 +37,4 @@ weight: 2
{{< button href="20200507_sounddesign2.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -30,7 +30,7 @@ weight: 3
{{< button href="20200514_sounddesign3.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}
## 非圧縮サンプル音声(ファイル名はスライド参照)

View File

@@ -13,4 +13,4 @@ weight: 4
{{< button href="20200625_sounddesign4.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,4 +12,4 @@ weight: 5
{{< button href="20200702_sounddesign5.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,4 +12,4 @@ weight: 6
{{< button href="20200708_sounddesign6.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,4 +12,4 @@ weight: 7
{{< button href="20200711_sounddesign7.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,4 +12,4 @@ weight: 8
{{< button href="20200714_sounddesign8.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,4 +12,4 @@ weight: 9
{{< button href="20200716_sounddesign9.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -1,6 +1,6 @@
---
title: 2021年度
weight: 3
weight: -2
bookFlatSection: true
---

View File

@@ -13,5 +13,5 @@ weight: 1
{{< button href="20210415_sounddesign1.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,7 +12,7 @@ weight: 10
{{< button href="20210610_sounddesign10.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}
{{< button href="./20210610_missingfun.pd">}}ミッシングファンダメンタル サンプルパッチ{{< /button >}}

View File

@@ -12,6 +12,6 @@ weight: 11
{{< button href="20210617_sounddesign11.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}
{{< button href="./20210617_stereopan_eqpower.pd">}}ステレオ等価パワーパンナー サンプルパッチ{{< /button >}}

View File

@@ -12,5 +12,5 @@ weight: 12
{{< button href="20210624_sounddesign12.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,5 +12,5 @@ weight: 13
{{< button href="20210701_sounddesign13.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -1,6 +1,6 @@
---
title: 第14週
date: 2021-0708
date: 2021-07-08
weight: 14
---
@@ -12,7 +12,7 @@ weight: 14
{{< button href="20210708_sounddesign14.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}
## 最終課題 サンプルパッチ

View File

@@ -13,5 +13,5 @@ weight: 2
{{< button href="20210422_sounddesign2.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -13,5 +13,5 @@ weight: 3
{{< button href="20210506_sounddesign3.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,5 +12,5 @@ weight: 4
{{< button href="20210508_sounddesign4.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,5 +12,5 @@ weight: 5
{{< button href="20210513_sounddesign5.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,5 +12,5 @@ weight: 6
{{< button href="20210520_sounddesign6.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,5 +12,5 @@ weight: 7
{{< button href="20210527_sounddesign7.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,5 +12,5 @@ weight: 8
{{< button href="20210603_sounddesign8.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}

View File

@@ -12,7 +12,7 @@ weight: 9
{{< button href="20210605_sounddesign9.pdf">}}スライドPDF{{< /button >}}
{{< button href="./slides">}}スライドHTML{{< /button >}}
{{< button relref="./slides">}}スライドHTML{{< /button >}}
## クリティカル・リスニング サンプル音源

View File

@@ -1,6 +1,6 @@
---
title: 2022年度
weight: 2
weight: -3
bookFlatSection: true
---

View File

@@ -1,6 +1,6 @@
---
title: 2023
weight: 1
weight: -4
bookFlatSection: true
---

View File

@@ -1,6 +1,6 @@
---
title: 2023年度
weight: 1
weight: -5
bookFlatSection: true
---
@@ -17,6 +17,9 @@ bookFlatSection: true
講師:松浦知也
# 2023年 東京藝術大学 芸術情報センター開設科目 「メディア特論」(通年 水曜6限隔週(ゲスト講義のため資料なし)
# [2023年 福岡女学院大学 「サウンド・デザイン」(夏季集中講義)](fukujo-sounddesign)

View File

@@ -10,5 +10,5 @@ weight: 1
{{< button href="2023-code-and-design-1.pdf">}}SlidesPDF{{< /button >}}
{{< button href="./slides">}}SlidesHTML{{< /button >}}
{{< button relref="./slides">}}SlidesHTML{{< /button >}}

View File

@@ -0,0 +1,13 @@
---
title: Week 11
date: 2023-06-23
weight: 11
params:
pdf_path: 2023-code-and-design-11.pdf
---
# 2023 Tokyo University of the Arts Art media Center「Code and Design」 Week 11
## Slide
{{< embed_pdf >}}

View File

@@ -0,0 +1,13 @@
---
title: 第11週
date: 2023-06-23
weight: 11
params:
pdf_path: 2023-code-and-design-11.pdf
---
# 2023年 東京藝術大学 芸術情報センター開設科目 「コードとデザイン」 第11回
## スライド
{{< embed_pdf >}}

View File

@@ -0,0 +1,13 @@
---
title: Week 11
date: 2023-06-23
weight: 11
params:
pdf_path: 2023-code-and-design-11.pdf
---
# 2023 Tokyo University of the Arts Art media Center「Code and Design」 Week 11
## Slide
{{< embed_pdf >}}

View File

@@ -0,0 +1,61 @@
---
title: 第13週
date: 2023-06-23
weight: 13
---
# 2023年 東京藝術大学 芸術情報センター開設科目 「コードとデザイン」 第13回
## スライド
(スライド行方不明・・・多分この日はスライドなかったと思います)
## 銅箔テープで作る平面コイルのSVGを出力するProcessingスケッチ
```java
import processing.svg.*;
void setup(){
noLoop();
size(800,800);
stroke(0);
background(255);
beginRecord(SVG, "spiral.svg");
}
float diameter = 800;
void draw(){
float angle = 0;
float r = 1;
float r_step =0.4;
float angle_step = 0.1;
translate(width/2,height/2);
float x_tmp = 0;
float y_tmp = 0;
while(r < width/2-10){
r += r_step;
angle += angle_step;
float x = r*sin(angle);
float y = r*cos(angle);
line(x_tmp,y_tmp,x,y);
x_tmp = x;
y_tmp = y;
}
r+=9;
while(r > 0){
r -= r_step;
angle -= angle_step;
float x = r*sin(angle);
float y = r*cos(angle);
line(x_tmp,y_tmp,x,y);
x_tmp = x;
y_tmp = y;
}
endRecord();
}
```

View File

@@ -0,0 +1,43 @@
import processing.svg.*;
void setup(){
noLoop();
size(800,800);
stroke(0);
background(255);
beginRecord(SVG, "spiral.svg");
}
float diameter = 800;
void draw(){
float angle = 0;
float r = 1;
float r_step =0.4;
float angle_step = 0.1;
translate(width/2,height/2);
float x_tmp = 0;
float y_tmp = 0;
while(r < width/2-10){
r += r_step;
angle += angle_step;
float x = r*sin(angle);
float y = r*cos(angle);
line(x_tmp,y_tmp,x,y);
x_tmp = x;
y_tmp = y;
}
r+=9;
while(r > 0){
r -= r_step;
angle -= angle_step;
float x = r*sin(angle);
float y = r*cos(angle);
line(x_tmp,y_tmp,x,y);
x_tmp = x;
y_tmp = y;
}
endRecord();
}

View File

@@ -10,5 +10,5 @@ weight: 2
{{< button href="2023-code-and-design-2.pdf">}}SlidesPDF{{< /button >}}
{{< button href="./slides">}}SlidesHTML{{< /button >}}
{{< button relref="./slides">}}SlidesHTML{{< /button >}}

View File

@@ -10,5 +10,5 @@ weight: 3
{{< button href="2023-code-and-design-3.pdf">}}SlidesPDF{{< /button >}}
{{< button href="./slides">}}SlidesHTML{{< /button >}}
{{< button relref="./slides">}}SlidesHTML{{< /button >}}

View File

@@ -10,5 +10,5 @@ weight: 4
{{< button href="2023-code-and-design-4.pdf">}}SlidesPDF{{< /button >}}
{{< button href="./slides">}}SlidesHTML{{< /button >}}
{{< button relref="./slides">}}SlidesHTML{{< /button >}}

View File

@@ -10,5 +10,5 @@ weight: 5
{{< button href="2023-code-and-design-5.pdf">}}SlidesPDF{{< /button >}}
{{< button href="./slides">}}SlidesHTML{{< /button >}}
{{< button relref="./slides">}}SlidesHTML{{< /button >}}

View File

@@ -10,5 +10,5 @@ weight: 6
{{< button href="2023-code-and-design-6.pdf">}}SlidesPDF{{< /button >}}
{{< button href="./slides">}}SlidesHTML{{< /button >}}
{{< button relref="./slides">}}SlidesHTML{{< /button >}}

View File

@@ -10,7 +10,7 @@ weight: 7
{{< button href="2023-code-and-design-7.pdf">}}SlidesPDF{{< /button >}}
{{< button href="./slides">}}SlidesHTML{{< /button >}}
{{< button relref="./slides">}}SlidesHTML{{< /button >}}
## Python Scripts for Mouse Automation

View File

@@ -10,7 +10,7 @@ weight: 7
{{< button href="2023-code-and-design-7.pdf">}}SlidesPDF{{< /button >}}
{{< button href="./slides">}}SlidesHTML{{< /button >}}
{{< button relref="./slides">}}SlidesHTML{{< /button >}}
## Python Scripts for Mouse Automation

View File

@@ -10,7 +10,7 @@ weight: 9
{{< button href="2023-code-and-design-9.pdf">}}SlidesPDF{{< /button >}}
{{< button href="./slides">}}SlidesHTML{{< /button >}}
{{< button relref="./slides">}}SlidesHTML{{< /button >}}
## Arduino Example

View File

@@ -2,6 +2,8 @@
title: 第9週
date: 2023-06-09
weight: 9
params:
pdf_path: 2023-code-and-design-9.pdf
---
# 2023年 東京藝術大学 芸術情報センター開設科目 「コードとデザイン」 第9回

View File

@@ -43,10 +43,10 @@ bookCollapseSection: true
7. [(5/26) 入力を考える(不条理なマウスを作る)](./7)
8. [(6/2) 入力を考える2 - ProcessingとArduinoの連携、オブジェクト指向プログラミング一人用PONG](./8)
9. [(6/9) 出力を考える - Arduinoでの音声プログラミング](./9)
10. (6/16) Cartesian Robotとデジタルファブリケーション (3DプリンターとGコードハック)
11. (6/23) 制作①相談
12. (6/30) 制作②作業
13. (7/7) 制作③ 内容に応じた補足授業
10. (6/16) 制作①相談1
11. [(6/23) デジタルファブリケーション:入力機器(可変抵抗)を作る](./11)
12. (6/30) 制作②相談2
13. [(7/7) デジタルファブリケーション:出力機器(スピーカー)を作る](./13)
14. (7/14) 課題発表展示
15. (7/21) 展示撤収・発表ふりかえりとまとめ

View File

@@ -0,0 +1,15 @@
---
title: Week 1
date: 2023-10-06
weight: 1
draft: false
params:
pdf_path: 2023-media-art-programming2-1.pdf
---
# 2023 Media Art Programming #1
## Slides
{{< embed_pdf >}}

View File

@@ -0,0 +1,14 @@
---
title: 第1週
date: 2023-10-06
weight: 1
draft: false
params:
pdf_path: 2023-media-art-programming2-1.pdf
---
# 2023年 メディアアート・プログラミング 第1回
## スライド
{{< embed_pdf >}}

View File

@@ -0,0 +1,12 @@
const puppeteer = require('puppeteer');
const main = async () => {
let browser = await puppeteer.launch({ headless: false });
let page = await browser.newPage();
await page.goto('https://www.youtube.com/');
await page.screenshot({ path: "./ss.png", fullPage: true });
await page.close();
await browser.close();
};
main();

View File

@@ -0,0 +1,11 @@
const puppeteer = require('puppeteer');
const main = async () =>
puppeteer.launch({ headless: false })
.then(browser => browser.newPage()
.then(page => page.goto('https://www.youtube.com/')
.then(_response => page.screenshot({ path: "./ss.png" })
.then(_ => page.close()
.then(_ => browser.close())))));
main();

View File

@@ -0,0 +1,21 @@
const puppeteer = require('puppeteer');
const take_screen_shot = async (browser, url, index) => {
let page = await browser.newPage();
let path = `${index}.png`;
await page.goto(url);
await page.screenshot({ path: path });
await page.close();
}
const main = async () => {
let browser = await puppeteer.launch({ headless: false ,args: ["--window-size=1920,1080"],timeout:0});
const urllist = ["https://www.youtube.com",
"https://www.google.com",
"https://www.geidai.ac.jp",
"https://yahoo.co.jp"]
await Promise.all(urllist.map((url, index) => take_screen_shot(browser, url, index)));
await browser.close();
}
main();

View File

@@ -0,0 +1,13 @@
const puppeteer = require('puppeteer');
const autoScroll = require("./autoscroll.js").autoScroll;
const main = async () => {
let browser = await puppeteer.launch({ headless: false });
let page = await browser.newPage();
await page.goto('https://www.youtube.com/');
await autoScroll(page,10);
await page.screenshot({ path: "ss_full.png", fullPage: true })
await page.close();
await browser.close();
}
main();

View File

@@ -0,0 +1,19 @@
const puppeteer = require('puppeteer');
const autoScroll = require("./autoscroll.js").autoScroll;
const main = async () => {
let browser = await puppeteer.launch({ headless: false });
let page = await browser.newPage();
await page.goto('https://www.youtube.com/');
for (let i = 0; i < 1000; i++) {
const urllist = await page.$$eval("a#thumbnail", elems => elems.map(elem => elem.href));
const url = urllist[3];
console.log(url)
await page.goto(url);
await autoScroll(page, 10);
await page.screenshot({ path: `${i}.png`, fullPage: true });
}
await page.close();
await browser.close();
}
main();

View File

@@ -0,0 +1,15 @@
---
title: Week 10
date: 2023-12-08
weight: 10
draft: false
params:
pdf_path: 2023-media-art-programming2-10.pdf
---
# 2023 Media Art Programming #10
## Slides
{{< embed_pdf >}}

View File

@@ -0,0 +1,30 @@
---
title: 第10週
date: 2023-12-08
weight: 10
draft: false
params:
pdf_path: 2023-media-art-programming2-10.pdf
---
# 2023年 メディアアート・プログラミング 第10回
## スライド
{{< embed_pdf >}}
## puppeteerのコードサンプル
`autoscroll.js``4_auto_scroll.js`でライブラリとして使用するだけなので、内容を理解しなくても大丈夫です。
{{< preview_code href="1_launch.js" type= "js">}}
{{< preview_code href="2_async_intro.js" type= "js">}}
{{< preview_code href="3_map_async.js" type= "js">}}
{{< preview_code href="4_auto_scroll.js" type= "js">}}
{{< preview_code href="5_youtube_hopper.js" type= "js">}}
{{< preview_code href="autoscroll.js" type= "js">}}

View File

@@ -0,0 +1,18 @@
async function autoScroll(page, maxScrolls) {
await page.evaluate(async maxScrolls => {
await new Promise((then) => {
let distance = 1000;
let scrolls = 0;
let timer = setInterval(() => {
window.scrollBy(0, distance);
scrolls += 1;
if (scrolls >= maxScrolls) {
clearInterval(timer);
then();
}
}, 100);
});
}, maxScrolls);
}
exports.autoScroll = autoScroll;

View File

@@ -0,0 +1,15 @@
{
"name": "20231201-scraping_test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"jsdom": "^23.0.1",
"puppeteer": "^21.6.0",
}
}

View File

@@ -0,0 +1,15 @@
---
title: Week 2
date: 2023-10-13
weight: 2
draft: false
params:
pdf_path: 2023-media-art-programming2-2.pdf
---
# 2023 Media Art Programming #2
## Slides
{{< embed_pdf >}}

View File

@@ -0,0 +1,14 @@
---
title: 第2週
date: 2023-10-13
weight: 2
draft: false
params:
pdf_path: 2023-media-art-programming2-2.pdf
---
# 2023年 メディアアート・プログラミング 第2回
## スライド
{{< embed_pdf >}}

View File

@@ -0,0 +1,18 @@
---
title: Week 3
date: 2023-10-20
weight: 3
params:
pdf_path: 2023-media-art-programming2-3.pdf
draft: false
---
# 2023 メディアアート・プログラミング Week 3
## Slides
{{< embed_pdf >}}
{{< button href=.Page.Params.pdf_path >}}SlidesPDF{{< /button >}}
{{< button href="slides">}}SlidesHTML{{< /button >}}

View File

@@ -0,0 +1,18 @@
---
title: 第3週
date: 2023-10-20
weight: 3
draft: false
params:
pdf_path: 2023-media-art-programming2-3.pdf
---
# 2023年 メディアアート・プログラミング 第3回
## スライド
{{< embed_pdf >}}
{{< button href=.Page.Params.pdf_path >}}スライドPDF{{< /button >}}
{{< button href="slides">}}スライドHTML{{< /button >}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Some files were not shown because too many files have changed in this diff Show More