dwm-app/utils/utils.py

16 lines
450 B
Python
Raw Permalink Normal View History

from flask import current_app as app
2024-02-28 20:52:15 +00:00
import csv, os
def get_js_files():
js_folder = os.path.join(app.static_folder, "js")
js_files = [f for f in os.listdir(js_folder) if f.endswith(".js")]
return js_files
2024-02-28 20:52:15 +00:00
def read_skills_csv(file_path):
2024-02-14 20:55:41 +00:00
data = []
with open(file_path, 'r', newline='', encoding='utf-8') as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
data.append(row)
return data