Skip to content

Commit a4ffcc3

Browse files
committed
add publish workflow
1 parent a40af53 commit a4ffcc3

5 files changed

Lines changed: 653 additions & 455 deletions

File tree

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
jobs:
2+
pypi-publish:
3+
name: Upload release to PyPI
4+
runs-on: ubuntu-latest
5+
environment:
6+
name: pypi
7+
url: https://pypi.org/p/javdb
8+
permissions:
9+
id-token: write
10+
steps:
11+
- uses: actions/setup-python@v5
12+
with:
13+
python-version: '3.13'
14+
cache: 'pip'
15+
16+
- name: Install build dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install build
20+
21+
- name: Build distribution
22+
run: python -m build
23+
24+
- name: Upload dist files to GitHub Release
25+
uses: softprops/action-gh-release@v2
26+
with:
27+
files: |
28+
dist/*.tar.gz
29+
dist/*.whl
30+
31+
- name: Publish package distributions to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1

README.md

Lines changed: 28 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Python API wrapper for javdatabase.com. Search movies, extract metadata, and dow
55
## Installation
66

77
```bash
8-
pip install requests beautifulsoup4
8+
pip install .
99
```
1010

1111
## Usage
@@ -15,118 +15,74 @@ pip install requests beautifulsoup4
1515
Search for a movie by ID or title and interactively select from results:
1616

1717
```bash
18-
python ./main.py
19-
python ./main.py --query SONE-763
18+
javdb
19+
javdb --query SONE-763
2020
```
2121

22-
### Search with Download
22+
### Search with NFO Output
2323

24-
Search and download preview images to `dvd_id/preview/`:
24+
Search and save metadata to a Kodi-compatible NFO file:
2525

2626
```bash
27-
python ./main.py --query SONE-763 --download
27+
javdb --query SONE-763 --output SONE-763.nfo
2828
```
2929

3030
### Search with JSON Output
3131

32-
Search and save metadata to a file:
32+
Search and save metadata as JSON:
3333

3434
```bash
35-
python ./main.py --query SONE-763 --output metadata.json
35+
javdb --query SONE-763 --json --output metadata.json
3636
```
3737

3838
### Direct Link
3939

4040
Skip the search and go directly to a movie page:
4141

4242
```bash
43-
python ./main.py --link https://www.javdatabase.com/movies/sone-763/
43+
javdb --link https://www.javdatabase.com/movies/sone-763/
4444
```
4545

4646
### Direct Link with Download
4747

4848
Download preview images directly from a movie URL:
4949

5050
```bash
51-
python ./main.py --link https://www.javdatabase.com/movies/sone-763/ --download
51+
javdb --link https://www.javdatabase.com/movies/sone-763/ --download
5252
```
5353

5454
### All Options Combined
5555

5656
Search, save metadata, and download images:
5757

5858
```bash
59-
python ./main.py --query SONE-763 --output metadata.json --download
59+
javdb --query SONE-763 --output SONE-763.nfo --download
6060
```
6161

6262
## Options
6363

6464
- `--query, -q`: Search query (e.g., video ID or title)
6565
- `--link, -l`: Direct URL to movie page (skips search)
66-
- `--output, -o`: Output file path (saves metadata as JSON)
67-
- `--download, -d`: Download preview images to `dvd_id/preview/`
68-
69-
## Output
70-
71-
When you search for a movie, metadata is extracted and displayed as JSON:
72-
73-
```json
74-
{
75-
"link": "https://www.javdatabase.com/movies/sone-763/",
76-
"title": "SONE-763 - A quiet and intelligent beauty is trained to be a real dick - Ayaka Kawakita",
77-
"jav_series": null,
78-
"dvd_id": "SONE-763",
79-
"content_id": "sone00763",
80-
"release_date": "2025-06-20",
81-
"runtime": "160 min.",
82-
"studio": "S1 NO.1 STYLE",
83-
"director": "Hironori Takase",
84-
"genres": [
85-
"4K",
86-
"Cowgirl",
87-
"Dirty Talk",
88-
"Drama",
89-
"Exclusive Distribution",
90-
"Featured Actress",
91-
"Hi-Def",
92-
"Slut",
93-
"Various Worker"
94-
],
95-
"actresses": [
96-
"Saika Kawakita"
97-
],
98-
"preview_images": [
99-
"https://pics.dmm.co.jp/digital/video/sone00763/sone00763jp-1.jpg",
100-
"https://pics.dmm.co.jp/digital/video/sone00763/sone00763jp-2.jpg",
101-
"https://pics.dmm.co.jp/digital/video/sone00763/sone00763jp-3.jpg",
102-
"https://pics.dmm.co.jp/digital/video/sone00763/sone00763jp-4.jpg",
103-
"https://pics.dmm.co.jp/digital/video/sone00763/sone00763jp-5.jpg",
104-
"https://pics.dmm.co.jp/digital/video/sone00763/sone00763jp-6.jpg",
105-
"https://pics.dmm.co.jp/digital/video/sone00763/sone00763jp-7.jpg",
106-
"https://pics.dmm.co.jp/digital/video/sone00763/sone00763jp-8.jpg",
107-
"https://pics.dmm.co.jp/digital/video/sone00763/sone00763jp-9.jpg",
108-
"https://pics.dmm.co.jp/digital/video/sone00763/sone00763jp-10.jpg"
109-
]
110-
}
111-
```
112-
113-
When `--download` is used, a JSON copy is automatically saved to `dvd_id/content_id.json`.
66+
- `--output, -o`: Output file path (NFO/XML by default, or JSON when `--json` is used)
67+
- `--download, -d`: Download poster and preview images to `dvd_id/preview/` and write NFO there
68+
- `--json`: Output metadata as JSON instead of NFO/XML
11469

11570
## Extracted Metadata
11671

117-
The tool extracts the following information:
118-
119-
- **Title**: Full movie title
120-
- **JAV Series**: Series name (if applicable)
121-
- **DVD ID**: Product ID (e.g., SONE-763)
122-
- **Content ID**: Content identifier (e.g., sone00763)
123-
- **Release Date**: Release date
124-
- **Runtime**: Duration in minutes
125-
- **Studio**: Production studio
126-
- **Director**: Director (if available)
127-
- **Genres**: List of genre tags
128-
- **Actresses**: List of actresses/idols
129-
- **Preview Images**: URLs to preview images for download
72+
The tool scrapes javdatabase.com and writes a Kodi-style `movie.nfo` XML with:
73+
74+
- **Title**
75+
- **Series** (when available)
76+
- **DVD ID** and **Content ID**
77+
- **Release Date** and **Runtime**
78+
- **Studio** and **Director**
79+
- **Genres** and **Actresses/Idols**
80+
- Optional poster and fanart references when `--download` is used
81+
82+
When `--json` is used, the same metadata is returned as a JSON object with
83+
keys such as `title`, `jav_series`, `dvd_id`, `content_id`, `release_date`,
84+
`runtime`, `studio`, `director`, `genres`, `actresses`, `preview_images`,
85+
and `poster`.
13086

13187
## License
13288

0 commit comments

Comments
 (0)