Giter VIP home page Giter VIP logo

extracteur-lpp's Introduction

extracteur-lpp [FR]

Cet outil est capable de lire les données depuis le fichier NX téléchargeable sur le site de la sécurité sociale (fichier tarifaire total LPPTOT703)

Utilisation

Lancez d'abord le script

php bin/download-file
php bin/parse --input=LPPTOT<n>

si tout s'est bien passé, un fichier devrait être créé dans ./tmp/BasicSQLWriter.sql

Créer un fichier JSON

php bin/parse --input=LPPTOT754 --writer=YonisSavary\\ExtracteurLPP\\Adapters\\JSONWriter\\JSONWriter

Utilisation en code

$writer = new JSONWriter($outDirectory);
$reader = FileReader::readNXFile($sourceFile, $writer);

$outputFile = $writer->getPath();

Schema / Contribuer

Le projet contient un convertisseur SQL basique, qui permet de convertir les codes, les prix ainsi que les (In)compatibilités.

Celui-ci se trouve dans /Adapters/BasicSQLWriter, il n'est pas parfait, mais contient l'essentiel pour vos productions.

Créer un convertisseur

Si vous souhaitez ajouter un convertisseur, celui-ci devrat implémenter Interfaces\DataAdapterInterface, cette interface contient

public function __construct(string $outPath);
public function write(array $object, string $class);

Cette méthode prend un objet (qui est récupéré depuis un enregistrement du fichier NX, et la classe type associée à l'objet (\Source\Types\CodeDescription par exemple))

Exemple: pour un objet associé à la classe CodeEnd, $object sera un tableau associatif contenant ces clés :

  • Type d'enregistrement
  • Séquence
  • Rubrique
  • Nombre d'enregistrements
  • Inutilisé

Vous pouvez ensuite utiliser votre convertisseur avec le paramètre writer

php bin/parse --writer=SQL\\Basic\\BasicSQLWriter

extracteur-lpp's People

Contributors

yonis-savary avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.