mirror of
https://github.com/ISEAL-Community/iseal-core.git
synced 2024-11-22 06:45:02 +01:00
util/generate-hugo-content.py: read schema from CSV
Read the schema fields from CSV instead of Excel now that there is a copy here in the repository.
This commit is contained in:
parent
2074dfe8ce
commit
0265e97a2b
@ -177,7 +177,7 @@ parser.add_argument(
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-i",
|
"-i",
|
||||||
"--input-file",
|
"--input-file",
|
||||||
help="Path to schema fields file (idss_schema_fields.xlsx).",
|
help="Path to schema fields file (schema-fields.csv).",
|
||||||
required=True,
|
required=True,
|
||||||
type=argparse.FileType("r"),
|
type=argparse.FileType("r"),
|
||||||
)
|
)
|
||||||
@ -198,7 +198,7 @@ os.makedirs("site/content/terms", mode=0o755, exist_ok=True)
|
|||||||
if args.debug:
|
if args.debug:
|
||||||
print(f"Opening {args.input_file.name}")
|
print(f"Opening {args.input_file.name}")
|
||||||
|
|
||||||
df = pd.read_excel(args.input_file.name)
|
df = pd.read_csv(args.input_file.name)
|
||||||
# Added inplace=True
|
# Added inplace=True
|
||||||
df.dropna(how="all", axis=1, inplace=True)
|
df.dropna(how="all", axis=1, inplace=True)
|
||||||
df.fillna("", inplace=True)
|
df.fillna("", inplace=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user