File size: 1,542 Bytes
e7cee37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# VLC Downloader

Vietnamese Legal Corpus Downloader - Downloads laws and codes from thuvienphapluat.vn

## Setup

```bash
cd ~/Downloads/vlc-2026/scripts
uv venv
source .venv/bin/activate
uv pip install -e .
```

## Usage

### Download laws from database to markdown files

```bash
# Basic download (metadata only)
uv run python downloader.py download

# With full content from web
uv run python downloader.py download --fetch-content

# With custom delay and limit
uv run python downloader.py download --fetch-content --delay 2.0 --limit 10
```

### Show statistics

```bash
uv run python downloader.py stats
```

### List downloaded files

```bash
uv run python downloader.py list-files
```

## Output Structure

```
vlc-2026/
├── data/
│   ├── codes/
│   │   └── 2015/
│   │       ├── bo-luat-dan-su.md
│   │       ├── bo-luat-hinh-su.md
│   │       └── ...
│   └── laws/
│       ├── 2022/
│       ├── 2023/
│       ├── 2024/
│       └── 2025/
├── scripts/
│   ├── pyproject.toml
│   ├── downloader.py
│   └── README.md
├── vietnam_laws.sqlite
└── REFERENCES.md
```

## Markdown Front Matter

Each file includes YAML front matter:

```yaml
---
title: Luật Bảo vệ dữ liệu cá nhân
title_en: Personal Data Protection Law
type: law
year: 2025
document_number: 91/2025/QH15
effective_date: 2026-01-01
status: Active
url: https://thuvienphapluat.vn/...
downloaded_at: 2026-01-24T10:30:00
---
```