Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidbonachera/ediparser
A simple positional EDI parser for Symfony 📑
https://github.com/davidbonachera/ediparser
edi parser php positional symfony-bundle
Last synced: 2 months ago
JSON representation
A simple positional EDI parser for Symfony 📑
- Host: GitHub
- URL: https://github.com/davidbonachera/ediparser
- Owner: davidbonachera
- License: apache-2.0
- Created: 2017-03-16T01:27:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-09T08:33:11.000Z (over 4 years ago)
- Last Synced: 2024-10-10T13:03:50.717Z (2 months ago)
- Topics: edi, parser, php, positional, symfony-bundle
- Language: PHP
- Homepage:
- Size: 72.3 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Edi Parser Bundle
================[![Codacy Badge](https://api.codacy.com/project/badge/Grade/89292c47711045f88c2399f4499be3b6)](https://www.codacy.com/app/david.bonachera/EdiParser?utm_source=github.com&utm_medium=referral&utm_content=davidbonachera/EdiParser&utm_campaign=badger) [![Code Climate](https://codeclimate.com/github/codeclimate/codeclimate/badges/gpa.svg)](https://codeclimate.com/github/davidbonachera/EdiParser)
A simple positional edi parser to transform a string to a key-value array based on a template
## Installation
Installation using composer is really easy: this command will add `"boda/edi-parser"` to your composer.json
and will download the bundle:composer require boda/edi-parser
Enable the bundle in your kernel:
```php
array:5 [â–¼ // Header
"IDENTIFIER" => "00"
"DOT" => "."
"NUMBER" => "00"
"TEST" => " "
"HEADER" => "HEADER"
]
"body" => array:2 [â–¼ // Body
1 => array:2 [â–¼ // Group 1
0 => array:5 [â–¼ // Group 1 header
"IDENTIFIER" => "41"
"DOT" => "."
"NUMBER" => "00"
"TEST" => " "
"CONTENT" => "CONTENT1"
]
1 => array:7 [â–¼ // Group 1 line
"IDENTIFIER" => "41"
"DOT" => "."
"NUMBER" => "20"
"TEST" => " "
"CONTENT" => "CONTENT2"
"SPACE" => " "
"SUBLINE" => "subline"
]
]
2 => array:1 [â–¼ // Group 2
0 => array:5 [...] // Group 2 header
]
]
"footer" => array:5 [â–¼ // Footer
"IDENTIFIER" => "99"
"DOT" => "."
"NUMBER" => "00"
"TEST" => " "
"CONTENT" => "FOOTER"
]
]
```## To-Do
Well, a lot of stuff to improve I guess, let's do a list- [ ] Customize with configuration (with or without header/footer, nested level)
- [ ] Do some proper error handling for missing arguments
- [ ] Define different model for differents EDI.