Skip to content

Commit

Permalink
Docs y versión
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoefe committed Oct 18, 2016
1 parent 7043262 commit 9e5b70e
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 1 deletion.
63 changes: 63 additions & 0 deletions LEEME.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,69 @@ también disponible en:
$ npm install -g txt-to-sql
```

<!--lang:es-->

## Uso (línea de comandos)

<!--lang:en--]
## Usage (command-line)
[!--lang:*-->

<!--lang:es-->

```sh
# Generar file.yaml lo detectado
$ txt-to-sql --prepare file.txt

# Procesar file.txt
$ txt-to-sql file.txt

# Procesar file.txt con streams
$ txt-to-sql --fast file.txt

# Exportar defaults a la carpeta actual
$ txt-to-sql --export-default
```

<!--lang:en--]
```sh
# Generate file.yaml with detected options
$ txt-to-sql --prepare file.txt
# Process file.txt
$ txt-to-sql file.txt
# Process file.txt using streams
$ txt-to-sql --fast file.txt
# Exportr defaults to working directory
$ txt-to-sql --export-default
```
[!--lang:es-->

## Uso (código)

<!--lang:en--]
## Usage (code)
[!--lang:*-->

```js
var txtToSql = require('txt-to-sql');
var fs = require('fs-promise');

txtToSql.generateScripts('./path/to/file.txt').then(function(generated){
return fs.writeFile("file.sql", generated.rawSql);
}).then(function() {
console.log("Done!");
});

```

<!--lang:es-->
## Licencia
Expand Down
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,40 @@ $ npm install -g txt-to-sql
```


## Usage (command-line)



```sh
# Generate file.yaml with detected options
$ txt-to-sql --prepare file.txt

# Process file.txt
$ txt-to-sql file.txt

# Process file.txt using streams
$ txt-to-sql --fast file.txt

# Exportr defaults to working directory
$ txt-to-sql --export-default
```


## Usage (code)


```js
var txtToSql = require('txt-to-sql');
var fs = require('fs-promise');

txtToSql.generateScripts('./path/to/file.txt').then(function(generated){
return fs.writeFile("file.sql", generated.rawSql);
}).then(function() {
console.log("Done!");
});

```

## License

[MIT](LICENSE)
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"name": "txt-to-sql",
"description": "Tools for convert text data to SQL sentences",
"version": "0.0.11",
"version": "0.0.12",
"author": "Codenautas <codenautas@googlegroups.com>",
"repository": "codenautas/txt-to-sql",
"contributors": [{
"name": "Emilio Platzer", "email": "emilioplatzer@gmail.com"
},{
"name": "Diego Florio", "email": "diegoefe@gmail.com"
}],
"license": "MIT",
"main": "lib/txt-to-sql.js",
"bin": {
Expand Down

0 comments on commit 9e5b70e

Please sign in to comment.