diff --git a/README.md b/README.md index 9565bdb..b1ccb5e 100644 --- a/README.md +++ b/README.md @@ -44,25 +44,25 @@ The format of this YAML file is as follows: ```yml columns: - - column_name: Manufacturer + - name: Manufacturer part_attributes: - Manufacturer - MANUFACTURER - - column_name: Part Number + - name: Part Number part_attributes: - PART - MANUFACTURER \# - _part_id - - column_name: Designator + - name: Designator part_attributes: Designator - - column_name: Description + - name: Description part_attributes: - PART DESCRIPTION - _description ``` First, you have the key `columns:` which is mapped to a list. Each element of -the list has two key/value pairs. The first is `column_name`, which is used to +the list has two key/value pairs. The first is `name`, which is used to as the name of the column. Next, you have `part_attributes`. This can either be just a string (like in the case of the `Designator` column) or a list of strings (like in the other cases.) @@ -79,15 +79,15 @@ An example for OrCad `columns.yml` file content is: ```yml columns: - - column_name: Part Number + - name: Part Number part_attributes: - Part Number - _name - - column_name: Designator + - name: Designator part_attributes: Part Reference - - column_name: Type + - name: Type part_attributes: Part Type - - column_name: Value + - name: Value part_attributes: Value ``` diff --git a/entrypoint.py b/entrypoint.py index d8c2168..8b3ed25 100755 --- a/entrypoint.py +++ b/entrypoint.py @@ -76,7 +76,7 @@ if __name__ == "__main__": with open(columns_file, "r") as f: columns_data = yaml.safe_load(f.read()) for column_value in columns_data["columns"]: - columns[column_value["column_name"]] = column_value["part_attributes"] + columns[column_value["name"]] = column_value["part_attributes"] except KeyError as e: print(f"Error: columns file {columns_file} does not seem to be in the right format.") print("Please refer to the README for more information.")