aboutcode-org / aboutcode-org/scancode-toolkit

stream JSON lines output

Abierto
#3,619 2 comentarios 0 reacciones 0 asignados Ver en GitHub
new feature
Lenguaje dominante
Python
Estrellas
2.6k
Forks
791
Merge medio
1 d 12 h
PR fusionados (30 d)
5

Descripción

## Short Description

The current JSON lines feature doesn't write information to a file (or stdout) until scancode has completely finished. It might be useful to start writing results earlier. This should be possible (except for the aggregated information in `license_detections`) as all files are scanned independently (I suppose).

## Possible Labels

- new feature

## Select Category

- [X] Enhancement
- [ ] Add License/Copyright
- [ ] Scan Feature
- [ ] Packaging
- [ ] Documentation
- [ ] Expand Support
- [ ] Other

## **Describe the Update**

I want a JSON lines feature that starts writing results to output earlier. As every file is scanned independently this should be possible. The `license_detections` aggregated information could be written last as an "end of stream" token.

## **How This Feature will help you/your organization**

I want to be able to track progress. Also, I might want to pipe output to another program that processes scancode information without me having to wait until scancode has completely finished. This feature might also help reducing memory usage of scancode, because as soon as the data is written it can be discarded (apart from information for `license_detections`).

## **Possible Solution/Implementation Details**

Line 1: start of stream/`headers`
Line 2-n: scan results for each file
Line n+1: end of stream/`license_detections`

## **Example/Links if Any**

## **Can you help with this Feature**

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.