Contact me to be added to this repository. Push the creations you make for D&D, and they will be displayed in a nice website. See the website for how to contribute.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
377 B

  1. import glob
  2. def get_items():
  3. items_dir = "../Items/*"
  4. items_list = []
  5. for fname in glob.glob(items_dir):
  6. print(fname)
  7. f = open(fname,'r')
  8. lines = f.read().split('\n')
  9. header = lines[0]
  10. tail = '\n'.join(lines[2:])
  11. items_list.append((header,tail))
  12. items_list.sort(key=lambda pair: pair[0])
  13. return items_list