Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
network-assets-reptile
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
network-assets-reptile
Commits
18bd560f
Commit
18bd560f
authored
Aug 05, 2023
by
liyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:task.json 新增total字段
parent
af6aac0d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
239 additions
and
1 deletion
+239
-1
output.json
output.json
+238
-0
statistics.py
statistics.py
+1
-1
No files found.
output.json
0 → 100644
View file @
18bd560f
This diff is collapsed.
Click to expand it.
statistics.py
View file @
18bd560f
...
@@ -26,7 +26,7 @@ for root, dirs, files in os.walk(main_directory):
...
@@ -26,7 +26,7 @@ for root, dirs, files in os.walk(main_directory):
# 统计JSON数组的长度,并累加到总长度
# 统计JSON数组的长度,并累加到总长度
array_length
=
len
(
json_data
)
array_length
=
len
(
json_data
)
total_length
+=
array_length
total_length
+=
array_length
print
(
f
"{dis}-条数:{total_length}"
)
# print(f"Found {array_length} entries in {json_file_path}")
# print(f"Found {array_length} entries in {json_file_path}")
except
json
.
JSONDecodeError
:
except
json
.
JSONDecodeError
:
# print(f"Error parsing JSON in {json_file_path}")
# print(f"Error parsing JSON in {json_file_path}")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment