This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from datetime import datetime | |
from lib import tag_checker | |
tags = tag_checker() | |
tags.add_tag("question", "<q", "q>") | |
tags.add_tag("remember", "r==", "==r") | |
tags.add_tag("idea", "<i", "i>") | |
dirs = ["/Users/antonmyrberg/extending-markdown-with-python/notes"] | |
for folder in dirs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
╰─$ python step_1.py | |
Lines: # This is the title | |
| |
Lines: | |
| |
Lines: Here is a line | |
| |
Lines: | |
| |
Lines: Markdown actually uses two newline characters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
markdown_fp = open("step_2.md", "r") | |
# Needed for later | |
idea_list = [] | |
idea_counter = 0 | |
start_t = "<i" | |
end_t = "i>" | |
inside_tag = False | |
for line in markdown_fp: | |
start_tag = start_t in line | |
end_tag = end_t in line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File: step_2.py | |
markdown_fp = open("step_2.md", "r") | |
| |
# Needed for later | |
idea_list = [] | |
idea_counter = 0 | |
| |
inside_tag = False | |
for line in markdown_fp: | |
start_tag = "<i" in line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from datetime import datetime | |
from lib import tag_checker | |
tags = tag_checker() | |
tags.add_tag("question", "<q", "q>") | |
tags.add_tag("remember", "r==", "==r") | |
tags.add_tag("idea", "<i", "i>") | |
dirs = ["/Users/antonmyrberg/extending-markdown-with-python/notes"] | |
for folder in dirs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
╰─$ python step_2.py | |
tag_start_index: 4 | |
Line starting from index: A programming tutorial where you just follow along i> | |
| |
Original line: * <i A programming tutorial where you just follow along i> | |
| |
tag_start_index: 2 | |
Line starting from index: | |
| |
Original line: <i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction | |
import type { NextApiRequest, NextApiResponse } from "next"; | |
import type { Email } from 'node-mailjet'; | |
import mailjet from 'node-mailjet'; | |
const mailjetUid = process.env.MAILJET_UID; | |
const mailjetPwd = process.env.MAILJET_PWD; | |
const mailjetConn: Email.Client = mailjet.connect(mailjetUid, mailjetPwd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello |