Skip to content

Commit 21276ed

Browse files
committed
docs(README): 更新文档列表生成方式
- 从表格形式改为有序列表形式 - 优化文档编号和描述的显示格式 - 调整生成时间的显示位置
1 parent b593f15 commit 21276ed

File tree

2 files changed

+38
-42
lines changed

2 files changed

+38
-42
lines changed

README.md

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,36 +30,34 @@ Click [this link](https://doc.nucleisys.com/nuclei_studio_supply/) to see online
3030
3131
## Documents
3232

33-
> Generated by `python3 update.py` @ 2025-05-21 16:15:55
34-
35-
| Document | Description |
36-
|:---|:---|
37-
| [1-cannot-setup-guestmemory.md](1-cannot-setup-guestmemory.md) | 因内存不足,导致在Nuclei Studio中启动qemu失败 |
38-
| [2-qemu-glib-gio-unexpectedly.md](2-qemu-glib-gio-unexpectedly.md) | windows 11下使用Nuclei Studio进行qemu调试程序时报错 |
39-
| [3-print_memor_usage_in_ide.md](3-print_memor_usage_in_ide.md) | How to print memory usage in Nuclei Studio |
40-
| [4-use_pre_build_or_post_build.md](4-use_pre_build_or_post_build.md) | 在编译工程时,使用了Pre-build Command/Post-build Command时报错 |
41-
| [5-update_npk_to_support_nucleistudio_202310.md](5-update_npk_to_support_nucleistudio_202310.md) | 升级npk.yml以支持Nuclei Studio 2023.10 |
42-
| [6-gcc13_gen_rvv_instructions_when_rvv_enabled.md](6-gcc13_gen_rvv_instructions_when_rvv_enabled.md) | GCC13 auto generated RVV instructions when RVV enabled |
43-
| [7-update_nucleistudio_202310_to_fixed_version.md](7-update_nucleistudio_202310_to_fixed_version.md) | 更新 Nuclei Studio 2023.10 到最新修正版本 |
44-
| [8-openocd_202310_flashloader_flaws.md](8-openocd_202310_flashloader_flaws.md) | OpenOCD在操作容量大于16M-Byte的nor-flash时的问题 |
45-
| [9-modify_the_cproject_file_to_change_the_project_to_gcc13.md](9-modify_the_cproject_file_to_change_the_project_to_gcc13.md) | 通过修改.cproject文件,升级工程工具链到GCC 13 |
46-
| [10-compiling_projects_with_headless_in_nuclei_studio.md](10-compiling_projects_with_headless_in_nuclei_studio.md) | 在Nuclei Studio下用命令行编译工程 |
47-
| [11-openocd_reported_error_not_known_as_fespi_capable.md](11-openocd_reported_error_not_known_as_fespi_capable.md) | OpenOCD烧写程序时报错Error:Device ID 8xle2g8a6d is not known as FESPI capable |
48-
| [12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE.md](12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE.md) | 关于dhrystone在IDE上跑分和NSDK 0.5.0命令行跑分不一致的问题 |
49-
| [13-error_could_not_find_an_available_hardware_trigger.md](13-error_could_not_find_an_available_hardware_trigger.md) | Error: Couldn't find an available hardware trigger / Error: can't add breakpoint: resource not available |
50-
| [14-cannot_find_-lncrt_balanced_no_such_file_or_directory.md](14-cannot_find_-lncrt_balanced_no_such_file_or_directory.md) | cannot find -lncrt_balanced: No such file or directory |
51-
| [15-unsatisfiedLinkError_of_swt-win32-4965r8_dll_on_windows7.md](15-unsatisfiedLinkError_of_swt-win32-4965r8_dll_on_windows7.md) | UnsatisfiedLinkError of swt-win32-4965r8.dll on Windows 7 |
52-
| [16-incomplete_data_output_when_using_profiling_function.md](16-incomplete_data_output_when_using_profiling_function.md) | 使用 Profiling 功能时可能遇到的一些问题 |
53-
| [17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage.md](17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage.md) | Nuclei Studio使用Profiling功能进行性能调优举例 |
54-
| [18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling.md](18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling.md) | 通过Profiling展示Nuclei Model NICE/VNICE指令加速 |
55-
| [19-rapid_verification_of_NICE_VNICE_acceleration_with_Nuclei_Model_and_NICE_Wizard.md](19-rapid_verification_of_NICE_VNICE_acceleration_with_Nuclei_Model_and_NICE_Wizard.md) | Nuclei Model结合Nice Wizard快速验证NICE/VNICE指令加速 |
56-
| [20-quick_downloads_using_flash_programming.md](20-quick_downloads_using_flash_programming.md) | Flash Programming使用案例 |
57-
| [21-livewatch_for_monitoring_variables.md](21-livewatch_for_monitoring_variables.md) | Live Watch 功能的使用 |
58-
| [22-example_for_adding_new_instructions_in_llvm.md](22-example_for_adding_new_instructions_in_llvm.md) | 在llvm中新增自定义汇编指令教程 |
59-
| [23-nuclei_debug_map_register_analyze.md](23-nuclei_debug_map_register_analyze.md) | 如何使用芯来提供的DebugMap寄存器分析错误现场 |
60-
| [24-example_for_adding_new_instructions_in_binutils.md](24-example_for_adding_new_instructions_in_binutils.md) | 在binutils中新增自定义汇编指令教程 |
61-
| [25-nuclei_cross_trigger_in_openocd.md](25-nuclei_cross_trigger_in_openocd.md) | OpenOCD 中 Nuclei 交叉触发功能使用指南 |
62-
| [26-debugging_support_for_freertos_by_openocd.md](26-debugging_support_for_freertos_by_openocd.md) | OpenOCD对FreeRTOS的调试支持使用指南 |
63-
| [27-debug_with_multiple_ftdi_devices.md](27-debug_with_multiple_ftdi_devices.md) | 如何同时使用多个蜂鸟调试器进行调试 |
64-
| [28-quick_porting_from_evalsoc_to_customsoc_based_on_Nuclei_SDK.md](28-quick_porting_from_evalsoc_to_customsoc_based_on_Nuclei_SDK.md) | Nuclei SDK基于evalsoc快速适配customsoc |
33+
> Generated by `python3 update.py` @ 2025-05-22 18:05:37
34+
35+
- [1. 因内存不足,导致在Nuclei Studio中启动qemu失败](1-cannot-setup-guestmemory.md)
36+
- [2. windows 11下使用Nuclei Studio进行qemu调试程序时报错](2-qemu-glib-gio-unexpectedly.md)
37+
- [3. How to print memory usage in Nuclei Studio](3-print_memor_usage_in_ide.md)
38+
- [4. 在编译工程时,使用了Pre-build Command/Post-build Command时报错](4-use_pre_build_or_post_build.md)
39+
- [5. 升级npk.yml以支持Nuclei Studio 2023.10](5-update_npk_to_support_nucleistudio_202310.md)
40+
- [6. GCC13 auto generated RVV instructions when RVV enabled](6-gcc13_gen_rvv_instructions_when_rvv_enabled.md)
41+
- [7. 更新 Nuclei Studio 2023.10 到最新修正版本](7-update_nucleistudio_202310_to_fixed_version.md)
42+
- [8. OpenOCD在操作容量大于16M-Byte的nor-flash时的问题](8-openocd_202310_flashloader_flaws.md)
43+
- [9. 通过修改.cproject文件,升级工程工具链到GCC 13](9-modify_the_cproject_file_to_change_the_project_to_gcc13.md)
44+
- [10. 在Nuclei Studio下用命令行编译工程](10-compiling_projects_with_headless_in_nuclei_studio.md)
45+
- [11. OpenOCD烧写程序时报错Error:Device ID 8xle2g8a6d is not known as FESPI capable](11-openocd_reported_error_not_known_as_fespi_capable.md)
46+
- [12. 关于dhrystone在IDE上跑分和NSDK 0.5.0命令行跑分不一致的问题](12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE.md)
47+
- [13. Error: Couldn't find an available hardware trigger / Error: can't add breakpoint: resource not available](13-error_could_not_find_an_available_hardware_trigger.md)
48+
- [14. cannot find -lncrt_balanced: No such file or directory](14-cannot_find_-lncrt_balanced_no_such_file_or_directory.md)
49+
- [15. UnsatisfiedLinkError of swt-win32-4965r8.dll on Windows 7](15-unsatisfiedLinkError_of_swt-win32-4965r8_dll_on_windows7.md)
50+
- [16. 使用 Profiling 功能时可能遇到的一些问题](16-incomplete_data_output_when_using_profiling_function.md)
51+
- [17. Nuclei Studio使用Profiling功能进行性能调优举例](17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage.md)
52+
- [18. 通过Profiling展示Nuclei Model NICE/VNICE指令加速](18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling.md)
53+
- [19. Nuclei Model结合Nice Wizard快速验证NICE/VNICE指令加速](19-rapid_verification_of_NICE_VNICE_acceleration_with_Nuclei_Model_and_NICE_Wizard.md)
54+
- [20. Flash Programming使用案例](20-quick_downloads_using_flash_programming.md)
55+
- [21. Live Watch 功能的使用](21-livewatch_for_monitoring_variables.md)
56+
- [22. 在llvm中新增自定义汇编指令教程](22-example_for_adding_new_instructions_in_llvm.md)
57+
- [23. 如何使用芯来提供的DebugMap寄存器分析错误现场](23-nuclei_debug_map_register_analyze.md)
58+
- [24. 在binutils中新增自定义汇编指令教程](24-example_for_adding_new_instructions_in_binutils.md)
59+
- [25. OpenOCD 中 Nuclei 交叉触发功能使用指南](25-nuclei_cross_trigger_in_openocd.md)
60+
- [26. OpenOCD对FreeRTOS的调试支持使用指南](26-debugging_support_for_freertos_by_openocd.md)
61+
- [27. 如何同时使用多个蜂鸟调试器进行调试](27-debug_with_multiple_ftdi_devices.md)
62+
- [28. Nuclei SDK基于evalsoc快速适配customsoc](28-quick_porting_from_evalsoc_to_customsoc_based_on_Nuclei_SDK.md)
6563

update.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ def get_numberic_index(filename):
1212
filenames = [f for f in os.listdir() if f.endswith(".md") and f not in ["README.md", "0-template.md"]]
1313
files = sorted(filenames, key=get_numberic_index)
1414

15-
# Generate markdown table
16-
table = "\n\n"
17-
table += f"> Generated by `python3 update.py` @ {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n"
18-
table += "\n"
19-
table += "| Document | Description |\n"
20-
table += "|:---|:---|\n"
15+
# Generate markdown documents entries
16+
doc_entries = "\n\n"
17+
doc_entries += f"> Generated by `python3 update.py` @ {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n"
18+
doc_entries += "\n"
2119

2220
mkdoc_entries = "\n"
2321

@@ -26,10 +24,10 @@ def get_numberic_index(filename):
2624
with open(file, 'r', encoding="utf-8") as f:
2725
lines = f.readlines()
2826
if lines:
29-
name = file.replace('.md', '')
27+
index = file.replace('.md', '').split('-')[0]
3028
description = lines[0].lstrip('# ').strip()
31-
row = f"| [{file}]({file}) | {description} |\n"
32-
table += row
29+
row = f"- [{index}. {description}]({file})\n"
30+
doc_entries += row
3331

3432
def find_and_replace(fpath, start, end, replace):
3533
if os.path.isfile(fpath) == False:
@@ -51,5 +49,5 @@ def find_and_replace(fpath, start, end, replace):
5149

5250
print(f"Updated in {fpath}")
5351

54-
find_and_replace("README.md", "## Documents", "##", table)
52+
find_and_replace("README.md", "## Documents", "##", doc_entries)
5553
find_and_replace("mkdocs.yml", "README.md", "exclude", mkdoc_entries)

0 commit comments

Comments
 (0)