2 Star 0 Fork 1

余诗/autorepo-for-baseos

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
extract-iso.py 673 Bytes
一键复制 编辑 原始数据 按行查看 历史
余诗 提交于 2023-12-16 14:56 . modify iso pkglist
import csv
def extract_unique_src(csv_file, output_file):
src_set = set()
with open(csv_file, newline='') as csvfile:
csv_reader = csv.DictReader(csvfile)
for row in csv_reader:
src = row.get('src', '')
if src:
src_set.add(src)
with open(output_file, 'w') as output:
for src in src_set:
output.write(f"{src}\n")
if __name__ == "__main__":
csv_file_path = "openEuler-22.03-LTS-SP2_baseos_bin_2_src.csv"
output_file_path = "iso-pkglist.txt"
extract_unique_src(csv_file_path, output_file_path)
print(f"Unique 'src' values extracted and saved to {output_file_path}")
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yushi-Icy/autorepo-for-baseos.git
[email protected]:yushi-Icy/autorepo-for-baseos.git
yushi-Icy
autorepo-for-baseos
autorepo-for-baseos
master

搜索帮助