@@ -20,8 +20,7 @@ Before, ensure that you have:
20
20
* Archiver that can extract ` .7z ` files. Possible candidate is [ 7z] ( https://www.7-zip.org/ ) .
21
21
22
22
23
- Download database dump
24
- ======================
23
+ ### Download database dump
25
24
26
25
Choose and download the [ database dump] ( https://archive.org/download/stackexchange ) that you are going to convert.
27
26
@@ -36,21 +35,20 @@ Choose and download the [database dump](https://archive.org/download/stackexchan
36
35
* [ stackoverflow.com-Users.7z] ( https://archive.org/download/stackexchange/stackoverflow.com-Users.7z ) ( ~ ** 650M** compressed / ** 4.0G** uncompressed / ** 13M** rows)
37
36
* [ stackoverflow.com-Votes.7z] ( https://archive.org/download/stackexchange/stackoverflow.com-Votes.7z ) ( ~ ** 1.0G** compressed / ** 20G** uncompressed / ** 200M** rows)
38
37
39
- Extract
40
- =======
38
+ ### Extract
41
39
42
40
Extract archive(s) content file(s) to the directory from where you will convert files using ` 7z ` or another archiver.
43
41
44
- Example with with [ academia.stackexchange.com.7z] ( https://archive.org/download/stackexchange/academia.stackexchange.com.7z ) dump:
42
+ Example with [ academia.stackexchange.com.7z] ( https://archive.org/download/stackexchange/academia.stackexchange.com.7z ) dump:
45
43
``` shell
46
44
$ mkdir xml csv
47
45
$ 7z e academia.stackexchange.com.7z -oxml
48
46
$ ls xml/
49
47
Badges.xml Comments.xml PostHistory.xml PostLinks.xml Posts.xml Tags.xml Users.xml Votes.xml
50
48
```
51
49
52
- Building of stackexchange-xml-to-csv
53
- ====================================
50
+ ### Building of stackexchange-xml-to-csv
51
+
54
52
55
53
Clone & build ` stackexchange-xml-to-csv ` converter:
56
54
@@ -60,14 +58,14 @@ $ cd stackexchange-xml-to-csv/
60
58
$ go build
61
59
```
62
60
63
- XML to CSV converting
64
- =====================
61
+ ### XML to CSV converting
62
+
65
63
66
64
Now you have ` stackexchange-xml-to-csv ` executable file. Let’s convert XML files:
67
65
```
68
66
./stackexchange-xml-to-csv -—source-path=../xml --store-to-dir=../csv
69
67
```
70
- ### List of possible flags:
68
+ #### List of possible flags:
71
69
72
70
* ` source-path ` (** Required** ) Absolute or relative path to the directory with an XML file(s) or to the separate XML file.
73
71
* ` store-to-dir ` (** Optional** ) Absolute or relative path to the directory where to store result CSV files.
@@ -78,7 +76,7 @@ RDBMS schema examples
78
76
=====================
79
77
Here you can find examples of the schema for the different databases:
80
78
81
- * [ PostgreSQL] ( ./example /postgresql_ddl.sql )
79
+ * [ PostgreSQL] ( ./schema_example /postgresql_ddl.sql )
82
80
83
81
License
84
82
=======
0 commit comments