Skip to content

Commit b28672e

Browse files
committed
Document the SQLite output option
1 parent 57df479 commit b28672e

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ Options:
1818
--domain [required]
1919
--ns [required]
2020
--host [required] [default: "http://rest.wikimedia.org"]
21-
-d, --saveDir [default: no saving]
21+
-d, --saveDir Directory to store a dump in (named by domain) [default: no saving]
22+
--db, --dataBase SQLite database name [default: no saving]
2223
```
2324

25+
### Filesystem output
26+
2427
With `--saveDir` as specified in the example above, a directory structure like
2528
this will be created:
2629

@@ -38,3 +41,24 @@ The directory names for articles are percent-encoded using JavaScript's
3841
updated articles are downloaded. Outdated revisions are deleted. These
3942
incremental dumps speed up the process significantly, and reduce the load on
4043
the servers.
44+
45+
### SQLite database output
46+
47+
With `--dataBase` set to `someSQLiteDB.db`, a database will be created /
48+
updated. The schema currently looks like this:
49+
50+
```sql
51+
REATE TABLE data(
52+
title TEXT,
53+
revision INTEGER,
54+
body BLOB,
55+
bigendian_v1_uuid text,
56+
page_id INTEGER,
57+
namespace INTEGER,
58+
timestamp TEXT,
59+
comment TEXT,
60+
user_name TEXT,
61+
user_id INTEGER,
62+
PRIMARY KEY(title ASC, revision DESC)
63+
);
64+
```

0 commit comments

Comments
 (0)