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
dbaeumer.vscode-eslint | |
eamodio.gitlens | |
ritwickdey.liveserver | |
azemoh.one-monokai | |
esbenp.prettier-vscode | |
ms-python.python | |
burkeholland.simple-react-snippets | |
vscodevim.vim |
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
9jFjt |
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
{"employees1":[{"firstname":"John","age":30,"mail":"john@gmail.com"},{"firstname":"Jimmy","age":25,"mail":"jimmy@gmail.com"},{"firstname":"Jenny","age":22,"mail":"jenny@gmail.com"},{"firstname":"Jeremy","age":40,"mail":"jeremy@gmail.com"},{"firstname":"Justin","age":32,"mail":"justin@gmail.com"}], | |
"employees2":[{"firstname":"John","age":30,"mail":"john@gmail.com"},{"firstname":"Jimmy","age":25,"mail":"jimmy@gmail.com"},{"firstname":"Jenny","age":22,"mail":"jenny@gmail.com"},{"firstname":"Jeremy","age":40,"mail":"jeremy@gmail.com"},{"firstname":"Justin","age":32,"mail":"justin@gmail.com"}], | |
"employees3":[{"firstname":"John","age":30,"mail":"john@gmail.com"},{"firstname":"Jimmy","age":25,"mail":"jimmy@gmail.com"},{"firstname":"Jenny","age":22,"mail":"jenny@gmail.com"},{"firstname":"Jeremy","age":40,"mail":"jeremy@gmail.com"},{"firstname":"Justin","age":32,"mail":"justin@gmail.com"}], | |
"employees4":[{"firstname":"John","age":30,"mail":"john@gmail.com"},{"firstname":"Jimmy","age":25,"mail":"jimmy@gmail.com"},{" |
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 | |
from lektor.pluginsystem import Plugin | |
class CheckfilePlugin(Plugin): | |
name = 'CheckFile' | |
description = u'Plugin to check if a file is present' | |
def on_setup_env(self, **extra): |
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 | |
dirs = os.listdir(os.getcwd()) | |
all_categories = [] | |
for dir in dirs: | |
if dir == os.path.basename(__file__) or dir == "contents.lr" or dir == "blog-categories": | |
continue |
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 | |
def update_content(file_path, content_list): | |
with open(file_path, 'w') as f: | |
f.writelines(content) | |
dirs = os.listdir(os.getcwd()) | |
print(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
import html2text | |
from bs4 import BeautifulSoup | |
import os | |
from shutil import copy | |
path = os.path.join(os.getcwd(), "_posts") | |
_posts_files_list = os.listdir(path) | |
html_list = [file for file in _posts_files_list if ".html" in file] | |
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
from termcolor import cprint, colored | |
import colorama | |
colorama.init() | |
# red, green, yellow, blue, magenta, cyan, white. | |
# on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, on_white. | |
# bold, dark, underline, blinkbold, dark, underline, blink, reverse, conceale, reverse, concealed |
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 mistune | |
import requests | |
from datetime import datetime | |
from bs4 import BeautifulSoup | |
# import time | |
f = open("<markdown file in the same directory>", "r") # enter the markdown file name | |
markdown_to_html = mistune.markdown(f.read()) |