File size: 2,039 Bytes
0d25dbe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # PhoneWatchUI: Google Play
## Layout
```text
google_play/
├── dataset/
│ ├── apps.jsonl
│ ├── images.jsonl
│ └── images/<app_folder>/<position>.<extension>
└── script/
├── app_collect.py
├── watch_app_filter.py
├── image_download.py
├── device_filter.py
└── requirements.txt
```
## Fields
`apps.jsonl` contains `app_id`, `store`, `title`, `description`, `source_url`, and store-specific `metadata`.
`images.jsonl` contains gallery-position identity, dimensions, source URL, SHA-256, relative `image_path`, and device labels. Paths are relative to the directory containing `images.jsonl`; unavailable files have null paths.
`device` is provisionally `watch` for square images, `phone` for non-squares with long/short ratio ≥ 1.5, and `other` otherwise or without dimensions. `device_label_source` records the aspect-ratio method and threshold. See [all field definitions](../../README.md#fields).
## Usage
Use Python 3.10+ and run from `google_play/`. Create `package_ids.txt` with one package ID per line, and choose a fresh output directory:
```sh
python3 -m pip install -r script/requirements.txt
python3 script/app_collect.py --ids package_ids.txt --output fresh/candidates.jsonl
python3 script/watch_app_filter.py --input fresh/candidates.jsonl --output fresh/dataset/apps.jsonl
python3 script/image_download.py --apps fresh/dataset/apps.jsonl --output fresh/dataset
python3 script/device_filter.py --input fresh/dataset/images.jsonl --output fresh/dataset/images.jsonl --phone-ratio 1.5
```
The first three scripts collect app metadata, select watch-related apps, and download images. `image_download.py` produces intermediate records without `device` or `device_label_source`; `device_filter.py` adds them and keeps every record by default.
To export one device subset, add `--device watch` (or `phone`/`other`) and use a different output path, such as `fresh/dataset/watch-images.jsonl`. Use `--help` on each script for options.
|