Skip to content

Commit 56264b6

Browse files
authored
Merge pull request #23 from rosuH/radical-geomorphic-atlas-redesign
2 parents cdc863c + 7a2f1c3 commit 56264b6

90 files changed

Lines changed: 13490 additions & 40 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/spider_action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ jobs:
5454
env:
5555
PYTHONUNBUFFERED: "1"
5656

57+
- name: Update atlas route
58+
run: |
59+
make build-atlas-route
60+
make check-atlas-route
61+
pytest tests/test_atlas_data.py -v
62+
5763
- name: Commit and push changes
5864
env:
5965
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ env/
218218
venv/
219219
ENV/
220220
env.bak/
221+
222+
# Local agent workspaces
223+
.worktrees/
224+
.superpowers/
221225
venv.bak/
222226

223227
# Spyder project settings
@@ -261,4 +265,7 @@ poetry.toml
261265
# LSP config files
262266
pyrightconfig.json
263267

264-
# End of https://www.toptal.com/developers/gitignore/api/python,pycharm+all
268+
# End of https://www.toptal.com/developers/gitignore/api/python,pycharm+all
269+
.gstack/
270+
.playwright-mcp/
271+
PRODUCT.md

Makefile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
.PHONY: install lint test run clean
1+
.PHONY: install lint test run preview-atlas build-atlas-route check-atlas-route clean
2+
3+
PYTHON ?= python3
24

35
install:
46
pip install -r requirements.txt
@@ -16,7 +18,16 @@ test:
1618
pytest -v
1719

1820
run:
19-
python spider.py
21+
$(PYTHON) spider.py
22+
23+
preview-atlas:
24+
$(PYTHON) scripts/serve_atlas.py 4173
25+
26+
build-atlas-route:
27+
$(PYTHON) scripts/build_atlas_route.py
28+
29+
check-atlas-route:
30+
$(PYTHON) scripts/build_atlas_route.py --check
2031

2132
clean:
2233
find . -type d -name __pycache__ -exec rm -rf {} +

README.md

Lines changed: 103 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,143 @@
11
# YSL
22

3+
![Yellowstone Sound Library banner](docs/assets/banner.png)
4+
35
[![Spider Data Collection](https://github.com/rosuH/YSL/actions/workflows/spider_action.yml/badge.svg)](https://github.com/rosuH/YSL/actions/workflows/spider_action.yml)
46
[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/)
57
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
68

7-
### 🏞 Yellowstone Sound Library 🎵
9+
YSL collects the public Yellowstone National Park sound library and turns it into a browsable, shareable listening atlas. The repository contains the downloaded audio/image archive, the crawler that keeps it updated, and a static web experience for exploring the sounds as field specimens.
10+
11+
## What Is Included
12+
13+
- `spider.py` downloads and deduplicates Yellowstone Sound Library media.
14+
- Downloaded `.mp3` and `.jpg` files are stored as repository assets.
15+
- `atlas/` contains the static Yellowstone Sound Atlas web experience.
16+
- `atlas/dawn-to-night.json` is the route metadata used by the atlas.
17+
- Tests validate crawler behavior, route metadata, static assets, and the local preview helper.
18+
19+
## Sound Atlas
20+
21+
The atlas is a static listening interface built from this repository's media files.
22+
23+
```bash
24+
python -m http.server 8000
25+
```
26+
27+
Then open <http://localhost:8000/atlas/>.
28+
29+
The browser reads `atlas/dawn-to-night.json`; it does not scan folders at runtime. Public share links use static per-specimen pages so social platforms can read the right preview metadata:
30+
31+
```text
32+
https://ysl.rosuh.me/atlas/share/american-coots/
33+
```
34+
35+
Opening a share page redirects to the matching player state, such as `https://ysl.rosuh.me/atlas/#american-coots`.
36+
37+
## Updating The Archive
38+
39+
The manual **Spider Data Collection** GitHub Action runs the crawler, updates the atlas route, verifies the route, and commits any changed media or metadata.
40+
41+
For local updates:
842

9-
This repository collects the public sound library of Yellowstone National Park. These sounds contain the natural environment and animals.
10-
You can use this audio as BGM for your work 👩‍💻, study 📖 or meditation 🙇‍♂️.
43+
```bash
44+
make run
45+
make build-atlas-route
46+
make check-atlas-route
47+
pytest -v
48+
```
49+
50+
`make build-atlas-route` writes directly to `atlas/dawn-to-night.json`. Existing curated entries are preserved; newly discovered audio files are added with generated theme, time-of-day, zone, credit, image, and field-note metadata.
1151

1252
## Download
1353

14-
Since GitHub has a size limit on uploaded files, the full archive is also available on the [Web Archive](https://archive.org/details/YSL.7z).
15-
Or you can just clone this repository.
54+
GitHub has a size limit on uploaded files, so the full archive is also available on the [Web Archive](https://archive.org/details/YSL.7z). You can also clone this repository directly.
1655

17-
## Inspiration
56+
## Project Layout
1857

19-
[tonyq0802's tweet](https://twitter.com/tonyq0802/status/1084364955506290688)
58+
```text
59+
.
60+
├── atlas/ # Static Yellowstone Sound Atlas
61+
├── docs/assets/ # README and documentation imagery
62+
├── scripts/ # Local preview and atlas route helpers
63+
├── tests/ # Crawler, atlas, and static-site tests
64+
├── spider.py # Yellowstone Sound Library crawler
65+
└── README.md
66+
```
2067

21-
## Credit & Legal Notice
68+
## Credit And Legal Notice
2269

2370
This repository collects public sound libraries from [Yellowstone National Park](https://www.nps.gov/yell/learn/photosmultimedia/soundlibrary.htm).
2471

25-
> Welcome to the Yellowstone sound library, where you can immerse yourself in the aural landscape of America's first national park. The files available here were recorded in the park and are in the public domain. They may be downloaded and used without limitation; however, please credit the "National Park Service" where appropriate.
26-
> [National Park Service](https://www.nps.gov/index.htm)
72+
According to the Yellowstone Sound Library page, the provided audio files were recorded in the park, are in the public domain, and may be downloaded and used without limitation. Please credit the **National Park Service** where appropriate.
2773

28-
### ⚖️ Compliance Statement
74+
### Compliance Statement
2975

30-
**Copyright Status**: According to the [NPS Disclaimer](https://www.nps.gov/aboutus/disclaimer.htm), works created by U.S. federal government employees as part of their official duties are generally in the public domain under 17 U.S.C. §§ 101, 105. The Yellowstone Sound Library explicitly states that its audio files are "in the public domain."
76+
**Copyright Status**: According to the [NPS Disclaimer](https://www.nps.gov/aboutus/disclaimer.htm), works created by U.S. federal government employees as part of their official duties are generally in the public domain under 17 U.S.C. §§ 101, 105. The Yellowstone Sound Library explicitly states that its audio files are in the public domain.
3177

3278
**Web Crawling**: This project uses an automated crawler to download files. The crawler:
33-
- Respects the site's [`robots.txt`](https://www.nps.gov/robots.txt) (the sound library path is **not** disallowed).
79+
80+
- Respects the site's [`robots.txt`](https://www.nps.gov/robots.txt); the sound library path is not disallowed.
3481
- Identifies itself with a descriptive `User-Agent` including this repository's URL.
35-
- Uses a polite request delay (2 seconds by default) to avoid overloading NPS servers.
82+
- Uses a polite request delay, 2 seconds by default, to avoid overloading NPS servers.
3683

37-
**Usage Risk**: While NPS explicitly labels these files as public domain, not all materials on NPS websites are guaranteed to be free of third-party rights. Users are responsible for determining whether their specific use case requires additional permissions. If any file in this repository is found to infringe on third-party rights, please [open an issue](https://github.com/rosuH/YSL/issues) immediately and it will be removed.
84+
**Usage Risk**: While NPS labels these audio files as public domain, not all materials on NPS websites are guaranteed to be free of third-party rights. Users are responsible for determining whether their use case requires additional permissions. If any file in this repository is found to infringe on third-party rights, please [open an issue](https://github.com/rosuH/YSL/issues) and it will be removed.
3885

39-
> *If there is any infringement in this repo, please create an issue immediately and I will deal with it.*
86+
## Inspiration
87+
88+
[tonyq0802's tweet](https://twitter.com/tonyq0802/status/1084364955506290688)
4089

4190
---
4291

43-
# YSL
92+
## 中文说明
93+
94+
YSL 收集 Yellowstone National Park 的公开声音库,并把这些音频和图片整理成一个可以浏览、播放、分享的静态声音图谱。这个仓库既是声音素材归档,也是爬虫和前端展示的完整项目。
95+
96+
### 包含内容
97+
98+
- `spider.py`:下载并去重 Yellowstone Sound Library 素材。
99+
- 仓库内的 `.mp3` / `.jpg`:已采集的声音和图片资源。
100+
- `atlas/`:静态 Yellowstone Sound Atlas 页面。
101+
- `atlas/dawn-to-night.json`:图谱读取的路线元数据。
102+
- `tests/`:爬虫、图谱数据、静态页面和预览服务测试。
103+
104+
### 本地预览
105+
106+
```bash
107+
python -m http.server 8000
108+
```
44109

45-
### 🏞 黄石公园声音库 🎵
110+
然后打开 <http://localhost:8000/atlas/>
46111

47-
这个仓库收集了黄石国家公园的公开声音库。这些声音包含了自然环境、动物产生的声音。
48-
您可以使用它们作为您工作 👩‍💻、学习 📖 或冥想的背景音乐 🙇‍♂️。
112+
网页读取的是 `atlas/dawn-to-night.json`,不会在浏览器里扫描资源目录。公开分享链接使用每个声音条目的静态分享页,这样社交平台可以读取对应的预览信息:
49113

50-
## 下载
114+
```text
115+
https://ysl.rosuh.me/atlas/share/american-coots/
116+
```
51117

52-
因为 GitHub 对上传的文件有大小限制,完整的归档也上传到了 [Web Archive](https://archive.org/details/YSL.7z)
53-
当然,您也可以直接 clone 本项目。
118+
打开分享页后会跳转到对应播放器状态,例如 `https://ysl.rosuh.me/atlas/#american-coots`
54119

55-
## 启发
120+
### 更新资源
56121

57-
[tonyq0802 的此条推特](https://twitter.com/tonyq0802/status/1084364955506290688)
122+
手动触发的 **Spider Data Collection** GitHub Action 会运行爬虫、更新图谱元数据、检查 route,并把新增资源和元数据一起提交。
58123

59-
## 版权声明与法律说明
124+
本地更新可以运行:
60125

61-
本库收集自 [Yellowstone National Park](https://www.nps.gov/yell/learn/photosmultimedia/soundlibrary.htm) 的公开声音库。
126+
```bash
127+
make run
128+
make build-atlas-route
129+
make check-atlas-route
130+
pytest -v
131+
```
62132

63-
> 欢迎来到黄石声音库,在这里您可以沉浸于美国第一个国家公园的听觉景观中。这里提供的文件是在公园内录制的,属于公共领域。它们可以无限制地下载和使用;但请在适当的地方注明 "National Park Service"。
64-
> [National Park Service](https://www.nps.gov/index.htm)
133+
`make build-atlas-route` 会直接写入 `atlas/dawn-to-night.json`。已有人工整理条目会被保留,新发现的音频会自动补上主题、时间、区域、署名、图片和 field note。
65134

66-
### ⚖️ 合规声明
135+
### 下载
67136

68-
**版权状态**:根据 [NPS 免责声明](https://www.nps.gov/aboutus/disclaimer.htm),美国联邦政府雇员在履行公务过程中创作的作品通常属于公共领域(依据 17 U.S.C. §§ 101, 105)。黄石声音库也明确声明其音频文件 "属于公共领域"
137+
因为 GitHub 对上传文件大小有限制,完整归档也上传到了 [Web Archive](https://archive.org/details/YSL.7z)。当然,也可以直接 clone 本仓库
69138

70-
**网络爬虫**:本项目使用自动化爬虫下载文件。该爬虫:
71-
- 遵守网站的 [`robots.txt`](https://www.nps.gov/robots.txt)(声音库路径**未被**禁止)。
72-
- 使用包含本仓库 URL 的描述性 `User-Agent`
73-
- 默认使用 2 秒的请求延迟,以避免对 NPS 服务器造成压力。
139+
### 版权与使用说明
74140

75-
**使用风险**:虽然 NPS 明确将这些文件标记为公共领域,但并非 NPS 网站上的所有材料都保证没有第三方权利。用户有责任确定其特定使用场景是否需要额外的许可。如果本仓库中的任何文件被发现侵犯了第三方权利,请立即[提交 issue](https://github.com/rosuH/YSL/issues),我们将立即处理
141+
本仓库素材来自 [Yellowstone National Park](https://www.nps.gov/yell/learn/photosmultimedia/soundlibrary.htm) 的公开声音库。NPS 声音库页面说明这些音频在公园内录制、属于公共领域,可以无限制下载和使用;请在合适的位置注明 **National Park Service**
76142

77-
> *如果此仓库有任何侵权行为,请您立刻发起一条 issue,我将会马上处理。*
143+
爬虫会遵守 `robots.txt`、使用带仓库 URL 的 `User-Agent`,并默认保持 2 秒请求间隔。如果本仓库中的任何文件被发现侵犯第三方权利,请立即[提交 issue](https://github.com/rosuH/YSL/issues),我会处理并移除。

0 commit comments

Comments
 (0)