From 0d094f9f3a6a63c7f48fc8e2864926e3d7d32c30 Mon Sep 17 00:00:00 2001 From: jaanbaaz Date: Mon, 5 Aug 2024 13:32:59 +0530 Subject: [PATCH 1/4] markdown issue fixed --- requirements.txt | 3 ++- v2_app.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 98244a7..0d2fe44 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ python-dotenv==1.0.1 supabase==2.4.5 gunicorn==22.0.0 flasgger==0.9.7.1 -markdown2==2.4.13 +markdown2==2.5.0 +markdown==3.4.1 requests==2.32.2 flask-cors==4.0.1 \ No newline at end of file diff --git a/v2_app.py b/v2_app.py index cd337b2..1cf98f0 100644 --- a/v2_app.py +++ b/v2_app.py @@ -1,6 +1,7 @@ import traceback,re from flask import Blueprint, jsonify, request import markdown2 +import markdown from utils import require_secret_key from db import SupabaseInterface from utils import determine_week @@ -51,7 +52,7 @@ def get_issues_by_owner_id_v2(owner, issue): if val['body_text']: if ("Weekly Goals" in val['body_text'] and not w_goal_url): w_goal_url = val['body_text'] - plain_text_body = markdown2.markdown(val['body_text']) + plain_text_body = markdown.markdown(val['body_text']) tasks = re.findall(r'\[(x| )\]', plain_text_body) total_tasks = len(tasks) completed_tasks = tasks.count('x') From 36adc2454e32bcad73740930fb5846222a61751e Mon Sep 17 00:00:00 2001 From: jaanbaaz Date: Tue, 6 Aug 2024 13:25:06 +0530 Subject: [PATCH 2/4] markdown issue fixed --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0d2fe44..34241d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,6 @@ python-dotenv==1.0.1 supabase==2.4.5 gunicorn==22.0.0 flasgger==0.9.7.1 -markdown2==2.5.0 markdown==3.4.1 requests==2.32.2 flask-cors==4.0.1 \ No newline at end of file From 01106293e40d2c286f483cc728a295becf94ed42 Mon Sep 17 00:00:00 2001 From: jaanbaaz Date: Wed, 7 Aug 2024 14:10:03 +0530 Subject: [PATCH 3/4] markdown2 not found issue fix --- utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils.py b/utils.py index 37c1e54..082102c 100644 --- a/utils.py +++ b/utils.py @@ -1,4 +1,4 @@ -import requests,re,markdown2,os +import requests,re,markdown,os from collections import defaultdict from datetime import datetime, timedelta from dateutil import parser @@ -115,7 +115,7 @@ def find_week_data(issue_details): for week in weekly_updates: - plain_text_body = markdown2.markdown(week['val']['body']) + plain_text_body = markdown.markdown(week['val']['body']) tasks = re.findall(r'\[(x| )\]', plain_text_body) total_tasks = len(tasks) @@ -154,7 +154,7 @@ def find_week_avg(url): if "Weekly Goals" in item['body']: w_goal_url = item['body'] - plain_text_body = markdown2.markdown(issue_details[0]['body']) + plain_text_body = markdown.markdown(issue_details[0]['body']) tasks = re.findall(r'\[(x| )\]', plain_text_body) total_tasks = len(tasks) From 4ce9ea68b5c105d943dad9680569b82b04a93ea6 Mon Sep 17 00:00:00 2001 From: jaanbaaz Date: Wed, 7 Aug 2024 15:34:41 +0530 Subject: [PATCH 4/4] markdown2 not found issue fix --- app.py | 2 +- v2_app.py | 3 +-- v2_utils.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 54565fc..07b82bf 100644 --- a/app.py +++ b/app.py @@ -260,7 +260,7 @@ def get_issues_by_owner_id(owner, issue): if val['body_text']: if "Weekly Goals" in val['body_text'] and not w_goal_url: w_goal_url = val['body_text'] - plain_text_body = markdown2.markdown(val['body_text']) + plain_text_body = markdown.markdown(val['body_text']) tasks = re.findall(r'\[(x| )\]', plain_text_body) total_tasks = len(tasks) diff --git a/v2_app.py b/v2_app.py index 1cf98f0..6d0d3c0 100644 --- a/v2_app.py +++ b/v2_app.py @@ -1,6 +1,5 @@ import traceback,re from flask import Blueprint, jsonify, request -import markdown2 import markdown from utils import require_secret_key from db import SupabaseInterface @@ -60,7 +59,7 @@ def get_issues_by_owner_id_v2(owner, issue): if ("Weekly Learnings" in val['body_text'] and not w_learn_url): w_learn_url = val['body_text'] - plain_text_wurl = markdown2.markdown(val['body_text']) + plain_text_wurl = markdown.markdown(val['body_text']) # mentors = mentors_data['mentors'] diff --git a/v2_utils.py b/v2_utils.py index 5a34a64..fa73eaf 100644 --- a/v2_utils.py +++ b/v2_utils.py @@ -1,4 +1,4 @@ -import logging,re,markdown2 +import logging,re,markdown # Func to create name and link for all mentors and contributors def define_link_data(usernames):