Skip to content

Commit 030b057

Browse files
committed
Update help
1 parent ac4fd67 commit 030b057

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,39 @@
22
Convert DBase files to SQLite create table/insert statements
33

44
# Purpose
5-
I was given a bunch of ‘.dbf’ (Dbase III) files with data I needed. As I don’t have any old Dbase SW, I decided to transfer data to SQLite where I can join tables, clean data etc…
5+
I was given a bunch of ‘.dbf’ (Dbase III) files with data I needed. As I don’t have any old Dbase SW, I decided to transfer data to SQLite where I can join tables, clean data etc…
66

77
# Usage
88
1. Clone project
9-
1. Run `node src -f <folder>` and program will translate every `.dbf` file into `CREATE TABLE / INSERT` statements
9+
1. Run `npm install`
10+
1. Run `node index.js -f <folder> -s` and program will translate every `.dbf` file into `CREATE TABLE / INSERT` statements
1011

1112
## Options
1213
* `-f <folder>` source folder (all subfolders will be searched)
1314
* `-s` from every `.dbf` file program will create corresponding `.sql` file
14-
* -c encoding (all available encodings https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings) (if none is given, ‘utf8’ will be used)
15+
* `-c` encoding (if none is given, ‘utf8’ will be used)
1516
* `-e` DBase extension (if none is given, `.dbf` is used)
16-
17+
* `-b` Batch size (number of rows processed in one loop), default = 1000
18+
* `-h` Help
1719

1820
# Dependencies
1921
* ` DBFFile` [https://github.com/paypac/DBFFile] _for reading Dbase files
2022
* ` iconv-lite` [https://www.npmjs.com/package/iconv-lite] _for character encodings_
2123
* ` minimist` [https://github.com/substack/minimist] _for working with commandline arguments_
2224

23-
# Examples
25+
# Examples
2426

25-
```
27+
```js
2628
// help
2729
node src -h
2830

29-
// convert all .dbf files in c:\data folder
30-
// to console
31+
// convert all .dbf files in c:\data folder to console
3132
node src -f c:\data
3233

33-
// convert all .dbf files in c:\data folder
34-
// to corresponding .SQL files
34+
// convert all .dbf files in c:\data folder to corresponding .SQL files
3535
node src -f c:\data -s
3636

37-
// convert all .dbf files in c:\data folder
37+
// convert all .dbf files in c:\data folder
3838
// to corresponding .SQL files
3939
// using windows-1250 code page
4040
node src -f c:\data -s -c win1250

0 commit comments

Comments
 (0)