123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import view
- # this tells view all settings including the folder structure of your project
- # On Windows, if you copy paths from the file explorer, make sure the string below is always of the form r"......"
- ymlfile = r""
- # please enter the paths of tapestry configuration files in ABSOLUTE form.
- # On Windows, if you copy paths from the file explorer, make sure the string below is always of the form r"......"
- tapestry_config_files = [
- "",
- ""
- ]
- # define a function that takes a row of the measurement list and returns a string. This string will be placed
- # below the overview
- def text_below(row):
- # Example 1: the label below each overview will just be the odor
- return row['Odour']
- # Example 2: the label below each overview will be the odor and concentration separated by an underscore ("_")
- # return f"{row['Odour']}_{row['OConc']}"
- # define a function that takes a row of the measurement list and returns a string. This string will be placed
- # next to the overview on the top right.
- def text_right_top(row):
- pass
- # define a function that takes a row of the measurement list and creates the string to be placed below the overview
- def text_right_bottom(row):
- pass
- if __name__ == '__main__':
- for tapestry_config_file in tapestry_config_files:
- # When text_right_bottom_func and text_right_top_func are specified to be None, the upper and lower limits
- # of the data shown in an overview will be printed to its right top and right bottom side
- # To customize the strings printed there, please define the functions 'text_right_top' and
- # 'text_right_bottom above and pass them appropriately below, in the place on 'None'.
- html_out_file, view_obj = view.create_tapestry(init_yml_flags_file=ymlfile,
- tapestry_config_file=tapestry_config_file,
- text_below_func=text_below,
- text_right_top_func=None,
- text_right_bottom_func=None)
- # backup this script and the yml file used next to the created tapestries
- view_obj.backup_script_flags_configs_for_tapestries(files=[__file__, ymlfile, tapestry_config_file])
|