Feature Request: Read text file as a string
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
#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?
- Lenguaje dominante
- C
- Estrellas
- 106
- Forks
- 5
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de libvips/nip4
-
Build RPM package errorAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Duplicated cell issue. (on hold)Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
Todos los issues de libvips/nip4
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Make the HTTP server's keep-alive and headers timeouts configurablePosiblemente ocupada @mattgodbolt la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
compiler-explorer/compiler-explorer#9902 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
timescale/pg_vectorsearch#446 ·
Los mantenedores suelen responder en 1 día
-
[BUG] msetcfg accepts unsupported mcfg encodingsPosiblemente ocupada @BinaryBardY la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
OpenXiangShan/NEMU#1319 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día