1. The tool is called HTML Merge Tool (1.0).
  2. Use PyQt5 to merge all HTML files in a selected folder and generate code with Chinese comments line by line.
  3. There are four buttons.
  4. Click the first button to select the input folder. The first button displays the path of the selected input folder.
  5. Click the second button to select the output folder and file name. The second button displays the path of the selected output folder.
  6. Click the third button to select the Excel template file. The third button displays the path of the selected Excel file.
  7. Click the fourth button to start merging.
  8. Click the start merging button to merge the HTML files that need to be merged.
  9. Display a green progress bar.
  10. Add the font "Microsoft YaHei" with a font size of 30 to the first line of the merged HTML file. The first line should read "Code Comparison Report".
  11. Use UTF-8 encoding for the new HTML file.
  12. If the files to be merged are larger than 25MB, the merged file should be renamed according to the merging rules and output as an HTML file. If the HTML files to be merged are less than 20MB, the maximum merged HTML file size should be 20MB. If it exceeds 20MB, it should be automatically split (the tolerance range for the merged HTML file is between 20MB and 25MB), and the split HTML files should be automatically renamed.
  13. Use the divide-and-conquer algorithm for merging.
  14. Use regular expressions to insert a pink number before the coitmm id in the merged HTML file, regardless of whether a large file is merged or not. Extract this number to column A of the imported Excel template file, starting from A2.
  15. Use regular expressions to extract the coitmm id in the merged HTML file to column B of the Excel file, starting from B2.
  16. Use regular expressions to extract the coitmm message in the merged HTML file to column C of the Excel file, starting from C2.
  17. Use regular expressions to extract the author in the merged HTML file to column D of the Excel file, starting from D2.
  18. Use the coitmm to get the name of the merged HTML file and extract it to column E of the Excel file, starting from E2.
  19. Store the above data (number, coitmm id, coitmm message, author, merged HTML file name) in an array for subsequent operations.
  20. Display a message box after the HTML files are merged.
  21. Use multithreading to improve execution efficiency.
  22. Beautify the interface
1 工具名称为 html合并工具102 pyqt5拼接选择文件夹内的所有HTML文件生成代码 使用中文逐行注释3 四个个按钮 4 点击第一个按钮选择输入文件夹后 第一个按钮信息显示为选择的输入文件夹的路径5 点击第二个按钮 选择输出文件夹及文件名后 第二个按钮信息显示为选择的输出文件的路径6 点击第三个按钮 选择Excel模板文件后 第三个按钮信息显示为选择的输出文件的路径7 第四个按钮 开始合并

原文地址: https://www.cveoy.top/t/topic/fJry 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录