""" Created By: Jap-Slappa Date: 15th/Aug/2026 * Mod 01 Joplin Template Class v1.0 Purpose: - Convert windows folder + File paths into URL paths for use in Joplin """ # Tell Python to look in your C-Drive helper folder (Or the folder on your Laptop) # Better to have my Helper Modules on the PC using them. (But using them from my NAS might work?) # Use raw strings (r"...") to handle Windows backslashes properly import sys sys.path.append(r"C:\My_Python_Helper_Modules") from pathlib import Path # from urllib.parse import quote # from yt_dlp import YoutubeDL # import PySimpleGUI as sg # import pyperclip # import time import Error_Handling # import Get_Date_and_Time__v1 as Get_Date_and_Time APP_DIR:Path[str] = Path(__file__).resolve().parent class Share_Text: cls_OG_WinPath = '' cls_converted_WinPath = '' cls_complete_Joplin_Path = '' cls_docker_app_name = '' # URL Paths cls_GitHub_URL = '' cls_Home_Page_URL = '' cls_Docs_URL = '' # WinPaths Paths cls_folder_path = '' cls_MD_File_path = '' cls_Compose_File_path = '' # Youtube Tutorial Video #1 URL cls_YT_Tut_Vid_01 = '' cls_YT_Tut_Vid_02 = '' cls_YT_Tut_Vid_Search = '' # Web Search URLs cls_SearXNG_Search = '' cls_Google_Search = '' # ? ==== End Of Class ==== def func_Joplin_Template_Txt(): Joplin_Template_Txt = f''' ## {Share_Text.cls_docker_app_name} - GitHub >[GitHub URL]({Share_Text.cls_GitHub_URL}) *** ## {Share_Text.cls_docker_app_name} - Home Page >[Home Page URL]({Share_Text.cls_Home_Page_URL}) *** ## {Share_Text.cls_docker_app_name}: Docs >[Docs Page URL]({Share_Text.cls_Docs_URL}) *** ## {Share_Text.cls_docker_app_name}: Folder >{Share_Text.cls_folder_path} *** ## Compose File Details: MD File >{Share_Text.cls_MD_File_path} *** ## My {Share_Text.cls_docker_app_name} URLs >[TS-vpn URL (NOT SSL)](http://100.98.17.37:3080/) >[DS918 Server URL (NOT SSL)](http://192.168.68.112:3080/) *** # My Basic {Share_Text.cls_docker_app_name} Compose - This is from my Portainer Stack ```yaml services: {Share_Text.cls_docker_app_name}: ``` *** ## Video Tutorial #1: YouTube >{Share_Text.cls_YT_Tut_Vid_01} *** ## Video Tutorial #2: YouTube >{Share_Text.cls_YT_Tut_Vid_02} *** ## Video Tutorials #3: YouTube Search >{Share_Text.cls_YT_Tut_Vid_Search} *** ## Video Tutorials #3: SearXNG Search >{Share_Text.cls_SearXNG_Search} *** ## Video Tutorials #3: Google Search >{Share_Text.cls_Google_Search} *** ''' return Joplin_Template_Txt # ? ==== End Of Function ==== def write_Template_2_File() ->None: """ Writes the completed Joplin Template text into a file --- - The file name will be from my Class... `cls_docker_app_name` """ # Get the completed Template Joplin_Template = func_Joplin_Template_Txt() file_name = f'Joplin Note Template - {Share_Text.cls_docker_app_name}.md' Template_Files_Folder = 'Joplin_Template_Files' # Build the PathLib Abs Path for the Folder + file path Abs_file_path = APP_DIR / Template_Files_Folder / file_name # Write to + Save the file with open(Abs_file_path, 'w') as docker_file: docker_file.write(Joplin_Template) # ? ==== End Of Function ====