Coder Social home page Coder Social logo

Comments (4)

bokub avatar bokub commented on June 24, 2024 1

Le format CSV est désormais supporté à partir de la version 2.0.1 🎉

from linky.

wikijm avatar wikijm commented on June 24, 2024

Juste pour info, voilà ce que je fais aujourd'hui avec Powershell :

C:\tools\linky\linky-win.exe daily --start 2020-04-09 --end 2023-03-24 --format json -o C:\tools\linky\result.json
(Get-Content C:\tools\linky\result.json | ConvertFrom-Json).data | ConvertTo-Csv -NoTypeInformation -Delimiter ";" | Out-File C:\tools\linky\result.csv

from linky.

bokub avatar bokub commented on June 24, 2024

Bonjour @wikijm

Ce module n'a pas pour vocation de gérer tous les formats de sortie possible, mais libre à toi de convertir le JSON
automatiquement au format de ton choix !

Je ne suis pas sûr de comprendre tes commandes Powershell, est-ce que ça fonctionne ou pas ?

from linky.

wikijm avatar wikijm commented on June 24, 2024

Bonsoir Boris,

Voici l'explication des commandes :

(Get-Content C:\tools\linky\result.json | ConvertFrom-Json).data

Prend le contenu du fichier 'C:\tools\linky\result.json', puis le converti au format ligne par ligne.
De ce résultat est extraite la partie 'data', et pas les à-côtés.

| ConvertTo-Csv -NoTypeInformation -Delimiter ";" | Out-File C:\tools\linky\result.csv

Ces commandes vont convertir les lignes de données au format CSV (délimiteur de type point-virgule), et enregistrer le résultat dans le fichier C:\tools\linky\result.csv

Le résultat étant exploitable, même avec une très ancienne version de Excel, il est de ce fait exploitable facilement avec une plage braille et/ou n'importe quelle synthèse vocale.

Cela fonctionne, mais cela n'est pas l'idéal car aujourd'hui je dois programmer une tâche planifiée, qui aura pour but de jouer un script Powershell qui :

  1. Exécutera ton application avec certains paramètre
  2. Jouera les commandes Powershell.

Si dans ton application il était possible de changer le format de sortie, la personne pourra simplement l’exécuter, tout en ayant la possibilité de changer les dates de début et de fin.
Cela me semble plus intuitif que de rentrer dans un fichier de script, identifier la ligne comportant les arguments de date, de sauvegarder ledit fichier puis d’exécuter manuellement la tâche planifiée/script.

from linky.

Related Issues (20)

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.