Giter Club home page Giter Club logo

Comments (9)

awecx avatar awecx commented on July 17, 2024 1

Je ferai plus un truc :

{
  "software": "potodo",
  "version": "0.4.0",
  "directories": [
     {
      "path": ".",
      "completion": 86.7,
      "files": {
        "glossay.po": {
          "translated": 2,
          "untranslated": 3,
          "completion": 66.0,
          "fuzzies": null
        }
      }
     },
     {
      "path": "library",
      ...
      }
  ]
}

pour itérer plus facilement (et avoir un schema qui ne dépende pas de la structure du dossier à analyser).

from potodo.

JulienPalard avatar JulienPalard commented on July 17, 2024 1

Je pense que @awecx a raison. Le - c'est surtout pratique quand le comportement par défaut c'est d'écrire dans un fichier, donc peut être typiquement du binaire. Là c'est du texte on peut envoyer sur stdout par défaut, et utiliser une redirection shell pour écrire dans un fichier, en effet.

from potodo.

Seluj78 avatar Seluj78 commented on July 17, 2024

Idées en vrac:

-j --json overwrites the normal output and outputs to json either IN STDOUT or in file given on the CLI

This will use another function to process the .po files and format that into a dict.

output json example:

{
  "software": "potodo",
  "version": "0.4.0",
  "directories": {
    ".": {
      "completion": 86.7,
      "files": {
        "glossay.po": {
          "translated": 2,
          "untranslated": 3,
          "completion": 66.0,
          "fuzzies": null
        }
      }
    },
    "library": {...}
  }
}

from potodo.

Seluj78 avatar Seluj78 commented on July 17, 2024

Ca me va très bien ! 👌

from potodo.

awecx avatar awecx commented on July 17, 2024

Et donc osef de --count quand --json est activée ?
On met le pourcentage ET le nombre.

from potodo.

Seluj78 avatar Seluj78 commented on July 17, 2024

Et donc osef de --count quand --json est activée ?

Ouais clairement

On met le pourcentage ET le nombre.

En vrai on peux mette beaucoup de choses mais je pense

  • nb pas traduit
  • nb traduit
  • nb fuzzies
  • percent per file
  • percent per folder

ca devrait suffire

from potodo.

JulienPalard avatar JulienPalard commented on July 17, 2024

--json - pour stdout, --json FILE pour écrire dans le fichier FILE ?

from potodo.

awecx avatar awecx commented on July 17, 2024

--json - pour stdout, --json FILE pour écrire dans le fichier FILE ?

Ou bien --json pour stdout et --json > FILE pour écrire dans le fichier FILE ? :-)
C'est pas pour troller mais ça amène de l'intelligence (ouvrir le fichier toussa) là où ça devrait être la responsabilité de l'appelant ?

from potodo.

Seluj78 avatar Seluj78 commented on July 17, 2024

Les deux me vont 👌

from potodo.

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.