Feature Request: Read text file as a string
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start by reading _list.def:338 and _convert.def:362 and :377, which the issue identifies as existing expression language functions. Check how those functions are exposed and how file paths are handled; the issue does not name a file-loading entry point or test. Done means adding a way to read a text file as a string or lines, with a clear decision about whether text belongs in nip4's expression language.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
#enhancement
Issue
I am currently working on a colour calibration workflow and currently there is no native way to import and parse a CGATS/OQM reference lab files.
There is vips_csvload, however one can only skip a fixed number of lines, split on a delimiter (e.g. a whitespace), and convert cells to a float.
Context
When importing CGATS.17 file format, there is a large variation across files and the order of the columns. Some files contain online LAB values, others contain spectra values, and so on. They have some labels BEGIN_DATA_FORMAT, END_DATA_FORMAT, BEGIN_DATA, BEGIN_DATA.
As an example, I created a workspace to read a specific CGATS.17 formatted file, then I swapped the file with another file with 3 extra header lines which shifted my $skip count, and vips_csvload didn't error, it just silently read numbers from the wrong row. How common are such differences across CGATS.17? Very common, there is unfortunately no standardisation, out of 13 files I checked, all columns were in different orders and different header sizes.
Feature Request
Therefore in order to create a simple text parser within nip4, it would be great to have a way to convert a text file into a string, e.g. read_file : Pathname -> [char] or read_lines : Pathname -> [[char]]
I have checked the source code (_list.def:338, _convert.def:362/:377) and nip already has functions like split, parse_int, parse_float etc, so the request would be to create this file conversion rather than build a parsing framework from scratch.
Is nip4's expression language meant to stay numeric/image-only, or would it be possible to include text too?
- Lingua principale
- C
- Stelle
- 106
- Fork
- 5
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di libvips/nip4
-
Build RPM package errorAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
Tutte le issue di libvips/nip4
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Make the HTTP server's keep-alive and headers timeouts configurableForse già presa @mattgodbolt l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
compiler-explorer/compiler-explorer#9902 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
timescale/pg_vectorsearch#446 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] msetcfg accepts unsupported mcfg encodingsForse già presa @BinaryBardY l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
OpenXiangShan/NEMU#1319 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno