aboutcode-org / aboutcode-org/scancode-toolkit

stream JSON lines output

未關閉
#3,619 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
new feature
主要語言
Python
星號
2.6k
分支
791
平均合併
1 天 12 小時
30 天內合併 PR
5

描述

## 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**

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。