Skip to content

Commit

Permalink
添加README,添加Python脚本,用于删除pds生成的备份问和日志
Browse files Browse the repository at this point in the history
  • Loading branch information
Huffer342-WSH committed Nov 11, 2023
1 parent c80c7c0 commit d561df1
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 多媒体视频处理魔盒

## 概述

### 开发平台

- **EDA**: Pango Design Suite 2022.2-SP1-Lite
- **FPGA型号**: PGL50H-6FBG484

### 工程结构

```
├─application //上位机
├─bitstream files //比特流文件备份
├─doc //文档
├─project //pango工程目录
│ ├─compile
│ ├─constraint_check
│ ├─generate_bitstream //生成的比特流文件
│ ├─ipcore //IP核
│ ├─place_route
│ ├─report_timing
│ ├─Route Constraint Editor
│ └─synthesize
├─sources //源文件
│ ├─constraints //约束
│ ├─designs //可综合源文件
│ │ ├─adjust_color //调整颜色模块
│ │ ├─ddr //ddr模块
│ │ ├─hdmi //HDMI输入输出
│ │ ├─image_filiter //图像滤波
│ │ ├─others //其它
│ │ ├─ov5640 //摄像头配置、输入、混合
│ │ ├─reset //复位
│ │ ├─rotate //图像旋转、缩放、位移
│ │ ├─udp_osd //UDP通信、OSD显示
│ │ └─zoom //图像缩放(二次线性插值)
│ └─simulations //仿真文件
└─utils //辅助工具
```

13 changes: 13 additions & 0 deletions clear_projrct.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,27 @@ def delete_files_in_directory(directory, target_folders):
try:
if os.path.isfile(file_path):
os.unlink(file_path)
print(f"Deleted {file_path}.")
elif os.path.isdir(file_path):
shutil.rmtree(file_path)
print(f"Deleted {file_path}.")
except Exception as e:
print(f"Failed to delete {file_path}. Error: {e}")
def delete_run_log_files(directory="."):
for root, dirs, files in os.walk(directory):
for file_name in files:
if file_name == "run.log":
file_path = os.path.join(root, file_name)
try:
os.remove(file_path)
print(f"Deleted: {file_path}")
except Exception as e:
print(f"Failed to delete {file_path}. Error: {e}")

if __name__ == "__main__":
current_directory = os.getcwd()
target_folders = ["bak", "logbackup"]

delete_files_in_directory(current_directory, target_folders)
delete_run_log_files(current_directory)
print("Deletion completed.")
Empty file removed project/kkk.rcf
Empty file.

0 comments on commit d561df1

Please sign in to comment.