Larson Texts notes. Lots of Pipedrive Template changes. Started my GS Script for Timeline events.
This commit is contained in:
30
Scripts/Todo_reorg/parse_for_gstimeline.py
Normal file
30
Scripts/Todo_reorg/parse_for_gstimeline.py
Normal file
@ -0,0 +1,30 @@
|
||||
import requests
|
||||
import markdown
|
||||
from pathlib import Path
|
||||
import pathlib
|
||||
|
||||
ndir = Path("/Users/normrasmussen/Documents/Work/CustomerNotes/")
|
||||
|
||||
|
||||
def get_files():
|
||||
files = list(ndir.glob("**/*.md"))
|
||||
for company in files:
|
||||
# This Section gets the Company name for the payload.
|
||||
company = str(company)
|
||||
company_file = company.split("/")[-1]
|
||||
company_name = company[:-3]
|
||||
print(company_name)
|
||||
get_data(company_file, company_name)
|
||||
|
||||
|
||||
def get_data(company_file, company_name):
|
||||
company_path = Path(
|
||||
f"/Users/normrasmussen/Documents/Work/CustomerNotes/{company_file}")
|
||||
with company_path.open(mode="r", encoding="utf-8") as md_file:
|
||||
for num, line in enumerate(md_file, 1):
|
||||
if line.startswith("## "):
|
||||
print(f"Line Number is {num} and the line is {line}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
get_files()
|
||||
Reference in New Issue
Block a user