Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
choco list --localonlyから一括処理用のXMLファイルを作る
import sys
print("""<?xml version="1.0" encoding="utf-8"?>
for line in sys.stdin:
l = line.strip().split(" ")
if l[1] != "packages":
print(f' <package id="{l[0]}" version="{l[1]}" />')
Copy link

TakamiChie commented Jun 13, 2021

ファイルをパスの通ったフォルダに置き、choco list --localonly | > PC.configのような感じで呼び出すと良い。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment