Skip to content

Commit

Permalink
script to use to add a field
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulcollenteur committed Sep 25, 2024
1 parent 90fd55b commit 70aac51
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/rename_field.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import json


def add_entry(file_path):
with open(file_path, "r") as file:
data = json.load(file)

for package in data.values():
package["legacy"] = ""

with open(file_path, "w") as file:
json.dump(data, file, indent=4)


if __name__ == "__main__":
add_entry("list.json")

0 comments on commit 70aac51

Please sign in to comment.