Concatenating file names with parameters
- Vorherrschende Sprache
- JavaScript
- Sterne
- 17
- Forks
- 10
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
@kevva Nice library, thank you.
Trying to run jpegmini with it. The syntax I need:
```
jpegmini -f=input_file -o=outputfile
```
I tried:
- `['-f', execBuffer.input, '-o', execBuffer.output]`
- `['-f=', execBuffer.input, '-o=', execBuffer.output]`
- `['-f="', execBuffer.input, '" -o="', execBuffer.output, '"']`
- `['"-f=', execBuffer.input, '" "-o=', execBuffer.output, '"']`
None of the above works with jpegmini.
Given that execBuffer.input and execBuffer.output are Symbols, I can't just use `args: ['-f=' + execBuffer.input, '-o=' + execBuffer.output]`
How about adding `execBuffer.inputFile()` and `execBuffer.outputFile()` that would return strings (e.g. using random uuid) that would later be replaced with actual filenames in all parameters?
Or maybe you have some better idea how to address it... I can do PR.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start by reading the execBuffer API around the input and output symbols and how arguments are passed to jpegmini. Verify the proposed filename substitution behavior against the shown -f=input_file and -o=outputfile syntax; done means parameterized input and output filenames work without manual string concatenation.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- backend
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100