Update README: initial crawl + weekly delta DB policy
Browse files
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
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
- Highest `items.item_id`: `6986879` (`created_at`: `2026-04-17 19:17:36 UTC`)
|
| 24 |
-
- Highest `comments.item_id`: `6986879`
|
| 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 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
-
|
| 92 |
-
- `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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.
|