VIEWVIEWVIEW commited on
Commit
7f1d3bf
·
verified ·
1 Parent(s): 175e983

Update README: initial crawl + weekly delta DB policy

Browse files
Files changed (1) hide show
  1. README.md +99 -92
README.md CHANGED
@@ -1,92 +1,99 @@
1
- ---
2
- pretty_name: pr0gramm user comments
3
- license: other
4
- language:
5
- - de
6
- - en
7
- task_categories:
8
- - other
9
- ---
10
-
11
- # pr0gramm-usercomments
12
-
13
- This dataset contains a SQLite export of pr0gramm item metadata and comments.
14
-
15
- Main file:
16
-
17
- - `pr0gramm.sqlite3`
18
-
19
- ## Coverage
20
-
21
- The current snapshot is fully crawled up to item `6986879`.
22
-
23
- - Highest `items.item_id`: `6986879` (`created_at`: `2026-04-17 19:17:36 UTC`)
24
- - Highest `comments.item_id`: `6986879`
25
-
26
- ## Tables
27
-
28
- The database contains:
29
-
30
- - `comments`
31
- - `items`
32
-
33
- ### comments schema
34
-
35
- - `comment_id` INTEGER PRIMARY KEY
36
- - `item_id` INTEGER NOT NULL
37
- - `parent_comment_id` INTEGER
38
- - `comment_time` INTEGER
39
- - `score` INTEGER
40
- - `upvotes` INTEGER
41
- - `downvotes` INTEGER
42
- - `user_name` TEXT
43
- - `user_id` INTEGER
44
- - `user_profile_url` TEXT
45
- - `body` TEXT
46
- - `raw_json` TEXT NOT NULL
47
-
48
- ### items schema
49
-
50
- - `item_id` INTEGER PRIMARY KEY
51
- - `promoted` INTEGER
52
- - `flags` INTEGER
53
- - `created_at` INTEGER
54
- - `user_name` TEXT
55
- - `source_feed` TEXT NOT NULL
56
- - `raw_json` TEXT NOT NULL
57
-
58
- ## Example rows
59
-
60
- Example row from `comments`:
61
-
62
- ```sql
63
- comment_id: 83842203
64
- item_id: 480055
65
- parent_comment_id: 0
66
- comment_time: 1776609541
67
- score: 1
68
- upvotes: 1
69
- downvotes: 0
70
- user_name: "1111111101"
71
- user_id: NULL
72
- user_profile_url: "https://pr0gramm.com/user/1111111101"
73
- body: "Damals war OC noch gut"
74
- raw_json (truncated): {"id":83842203,"parent":0,"content":"Damals war OC noch gut","created":1776609541,"up":1,"down":0,"confidence":0.206543,"name":"1111111101","mark":10}
75
- ```
76
-
77
- Example row from `items`:
78
-
79
- ```sql
80
- item_id: 6986879
81
- promoted: 0
82
- flags: 1
83
- created_at: 1776453456
84
- user_name: "Ometen"
85
- source_feed: "new"
86
- raw_json (truncated): {"id":6986879,"promoted":0,"userId":132720,"up":1,"down":0,"created":1776453456,"image":"2026/04/17/8804ec2d7b3e5297-h264-ultra_hd.mp4","thumb":"2026/04/17/8804ec2d7b3e5297.jpg",...}
87
- ```
88
-
89
- ## Notes
90
-
91
- - Timestamps are stored as Unix seconds.
92
- - `raw_json` contains API payload snapshots and may include fields not normalized into separate columns.
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: pr0gramm user comments
3
+ license: other
4
+ language:
5
+ - de
6
+ - en
7
+ task_categories:
8
+ - other
9
+ ---
10
+
11
+ # pr0gramm-usercomments
12
+
13
+ This dataset contains SQLite exports of pr0gramm item metadata and comments.
14
+
15
+ ## Initial Crawl
16
+
17
+ The initial full snapshot is:
18
+
19
+ - `pr0gramm.sqlite3`
20
+
21
+ Initial full-crawl coverage:
22
+
23
+ - Highest `items.item_id`: `6986879` (`created_at`: `2026-04-17 19:17:36 UTC`)
24
+ - Highest `comments.item_id`: `6986879`
25
+
26
+ ## Weekly Delta DBs
27
+
28
+ Incremental updates are published as additional SQLite files in the dataset root.
29
+
30
+ Filename pattern:
31
+
32
+ - `pr0_delta_YYYY-Www_ids_<upper>_<lower>.sqlite3`
33
+
34
+ Meaning:
35
+
36
+ - `<upper>` = highest crawled item id in that delta
37
+ - `<lower>` = lowest crawled item id in that delta
38
+ - IDs in a delta are crawled descending from `<upper>` to `<lower>`
39
+
40
+ Delta crawl policy:
41
+
42
+ - Weekly incremental crawl
43
+ - Only IDs newer than the previous `last_known_id`
44
+ - 14-day maturity delay before crawling (to capture most comments)
45
+ - No revisit of older IDs in weekly mode
46
+
47
+ Delta schema normalization:
48
+
49
+ - Delta DBs are normalized to match the vacuumed base schema exactly.
50
+ - Only tables: `items`, `comments`
51
+ - No crawler-internal tables (for example `crawl_state`, `item_detail_failures`)
52
+
53
+ ## Merge Strategy
54
+
55
+ To merge a delta into the base DB:
56
+
57
+ 1. Attach delta DB to a local copy of `pr0gramm.sqlite3`
58
+ 2. Upsert/insert by primary keys:
59
+ - `items.item_id`
60
+ - `comments.comment_id`
61
+
62
+ Because IDs are monotonic and deltas are non-overlapping ranges, merge operations are straightforward and deterministic.
63
+
64
+ ## Tables
65
+
66
+ The vacuumed schema is:
67
+
68
+ - `comments`
69
+ - `items`
70
+
71
+ ### comments schema
72
+
73
+ - `comment_id` INTEGER PRIMARY KEY
74
+ - `item_id` INTEGER NOT NULL
75
+ - `parent_comment_id` INTEGER
76
+ - `comment_time` INTEGER
77
+ - `score` INTEGER
78
+ - `upvotes` INTEGER
79
+ - `downvotes` INTEGER
80
+ - `user_name` TEXT
81
+ - `user_id` INTEGER
82
+ - `user_profile_url` TEXT
83
+ - `body` TEXT
84
+ - `raw_json` TEXT NOT NULL
85
+
86
+ ### items schema
87
+
88
+ - `item_id` INTEGER PRIMARY KEY
89
+ - `promoted` INTEGER
90
+ - `flags` INTEGER
91
+ - `created_at` INTEGER
92
+ - `user_name` TEXT
93
+ - `source_feed` TEXT NOT NULL
94
+ - `raw_json` TEXT NOT NULL
95
+
96
+ ## Notes
97
+
98
+ - Timestamps are stored as Unix seconds.
99
+ - `raw_json` contains API payload snapshots and may include fields not normalized into separate columns.