1
1
2
- # jupitern/FileParser
2
+ # jupitern/file-parser
3
3
#### PHP File Parser.
4
4
5
5
read, filter, parse and format {csv, tsv, dsv, variable-length-delimited} and other txt files
@@ -10,11 +10,11 @@ PHP 5.4 or higher.
10
10
11
11
## Installation
12
12
13
- Include jupitern/FileParser in your project, by adding it to your composer.json file.
13
+ Include jupitern/file-parser in your project, by adding it to your composer.json file.
14
14
``` javascript
15
15
{
16
16
" require" : {
17
- " jupitern/FileParser " : " 1.*"
17
+ " jupitern/file-parser " : " 0. 1.*"
18
18
}
19
19
}
20
20
```
@@ -37,7 +37,7 @@ lets parse the file with:
37
37
- group by type
38
38
39
39
// read a file to array
40
- $objectsArr = \Lib\Parser\Parser ::instance()
40
+ $objectsArr = \Jupitern\FileParser ::instance()
41
41
->setFile("csv.txt", ',')
42
42
->setEncoding('ISO-8859-1', 'UTF-8')
43
43
->toObject(['animal', 'type', 'number'])
@@ -106,7 +106,7 @@ in the same file lets parse with:
106
106
- remove animals with count 0
107
107
- group by type
108
108
109
- $objectsArr = \Lib\Parser\Parser ::instance()
109
+ $objectsArr = \Jupitern\FileParser ::instance()
110
110
->setFile("csv.txt", ',')
111
111
->setEncoding('ISO-8859-1', 'UTF-8')
112
112
->filter(function ($line) {
@@ -177,7 +177,7 @@ lets parse the file doing:
177
177
- format person name capitalize first letters
178
178
- group by wage bellow or above 1000
179
179
180
- $objectsArr = \Lib\Parser\Parser ::instance()
180
+ $objectsArr = \Jupitern\FileParser ::instance()
181
181
->setFile("test.txt")
182
182
->setEncoding('ISO-8859-1', 'UTF-8')
183
183
->each(function ($line){
@@ -252,6 +252,6 @@ Array
252
252
253
253
## License
254
254
255
- jupitern/FileParser is release under the MIT license.
255
+ jupitern/file-parser is release under the MIT license.
256
256
257
257
You are free to use, modify and distribute this software
0 commit comments