diff --git a/assets/css/basic.scss b/assets/css/basic.scss index 5d3fd2a..2a2d3ed 100644 --- a/assets/css/basic.scss +++ b/assets/css/basic.scss @@ -37,6 +37,9 @@ a, .link{ font-size: 2em; } +code{ + font-family: $main-font; +} @import "logo"; @import "elements/page-links"; @@ -44,3 +47,4 @@ a, .link{ @import "elements/contacts"; @import "elements/portfolio-project"; @import "elements/blog-post-preview"; +@import "elements/blog-post"; diff --git a/assets/css/elements/blog-post.scss b/assets/css/elements/blog-post.scss new file mode 100644 index 0000000..dfad5ba --- /dev/null +++ b/assets/css/elements/blog-post.scss @@ -0,0 +1,23 @@ +.blog-header{ + color: $header-color; + font-family: $main-font; + font-size: 2em; + display: inline-flex; + justify-content: center; + text-align:center; + margin: 0 auto; + +} + +.blog-post{ + time{ + font-family: $main-font; + display: flex; + align-content: center; + justify-content: center; + font-size: 0.9em; + } + padding: 0px 30px; + font-size: 22px; + font-family: Ubuntu; +} diff --git a/config.toml b/config.toml index d23b4dc..04dc565 100644 --- a/config.toml +++ b/config.toml @@ -2,3 +2,17 @@ baseURL = "https://site.horhik.xyz/" languageCode = "en-us" title = "Horhik.xyz" summaryLength=10 + +[markup] + [markup.highlight] + anchorLineNos = false + codeFences = true + guessSyntax = true + hl_Lines = "" + lineAnchors = "" + lineNoStart = 1 + lineNos = true + lineNumbersInTable = true + noClasses = true + style = "dracula" + tabWidth = 2 diff --git a/content/posts/PyAutoGUI for simplifying anki routine.md b/content/posts/PyAutoGUI for simplifying anki routine.md new file mode 100644 index 0000000..5d5bec8 --- /dev/null +++ b/content/posts/PyAutoGUI for simplifying anki routine.md @@ -0,0 +1,52 @@ +--- +title: "PyAutoGUI for simplifying anki routine" +date: 2021-01-21T10:26:19+03:00 +--- + + +I had been adding some cards to Anki. +It was lowercase word and word with stress in russian. like *торты тОрты.* + +I'm lazy and i wrote two simple scripts. All what i have to do is input words with stress into a file. + +First script for creating file with list of sequence of word with stress and lowercase word + +```python +import os +f = open("/home/horhik/text.txt", 'r+') +lines = f.readlines() +for ind, line in enumerate(lines): + print(line.lower(), " ", line) +``` + +After, i just pushed output to file and opened it it Emacs. + +Second script automatizing adding cards to A**nki**. + +I split my window by **Anki** "add card" window and **Emacs**. As i use `evil` mode in Emacs, script looks like that: + +```python +import pyautogui + +import os +while(True): + pyautogui.hotkey("winleft", 'j') # toggle window + pyautogui.press(["v", "$", "y"]) # copy string + pyautogui.hotkey("winleft", 'j') # toggle window + pyautogui.hotkey("ctrl", 'v') # past text + pyautogui.press("tab") # next input field + pyautogui.hotkey("winleft", 'j') # toggle window + pyautogui.press(["j","0", "w", "v" , "$", "y", "0", "j", "j" ]) + # move to next line beginning, copy it and go to next occurence + pyautogui.hotkey("winleft", 'j') # toggle window + pyautogui.hotkey("ctrl", 'v') # paste text + pyautogui.press("tab") # ... + pyautogui.press("tab") # ... + pyautogui.press("tab") # ... + pyautogui.press("tab") # ... way to submit button + pyautogui.press("space") # pressing submit button +``` + +`while true` was my mistake. I launched script in terminal, with `sleep` 3 seconds before. +But i couldn't shut script down without any strange effect when i opening not only 2 windows in my Window Manager. +Some strange things happen before I cached terminal and pressed `Ctrl+C` diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d52711e..eb71664 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -12,6 +12,8 @@ {{ with .Site.Params.description }}{{ end }} {{ with .Site.Params.author }}{{ end }} + + {{ with .OutputFormats.Get "RSS" -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 55b7c30..9d40b92 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,8 +1,8 @@ {{ define "main" }}
-
-

{{ .Title }}

- +
+

{{ .Title }}

+
{{ .Content }}
@@ -22,5 +22,4 @@ {{ end }}
-{{ partial "sidebar.html" . }} {{ end }} diff --git a/resources/_gen/assets/scss/css/basic.scss_f300667da4f5b5f84e1a9e0702b2fdde.content b/resources/_gen/assets/scss/css/basic.scss_f300667da4f5b5f84e1a9e0702b2fdde.content index e0464b6..025dd38 100644 --- a/resources/_gen/assets/scss/css/basic.scss_f300667da4f5b5f84e1a9e0702b2fdde.content +++ b/resources/_gen/assets/scss/css/basic.scss_f300667da4f5b5f84e1a9e0702b2fdde.content @@ -54,6 +54,9 @@ a, .link { font-family: 'Mononoki Bold', 'Fira Code SemiBold'; font-size: 2em; } +code { + font-family: "Mononoki", monospace; } + .logo--wrapper { display: grid; font-family: Mononoki, 'Fira Code',monospace, Ubuntu; } @@ -289,3 +292,23 @@ a, .link { .blog-info__item--reading-time::before { content: url("../../svg/stopwatch.svg"); margin-right: 10px; } + +.blog-header { + color: var(--green); + font-family: "Mononoki", monospace; + font-size: 2em; + display: inline-flex; + justify-content: center; + text-align: center; + margin: 0 auto; } + +.blog-post { + padding: 0px 30px; + font-size: 22px; + font-family: Ubuntu; } + .blog-post time { + font-family: "Mononoki", monospace; + display: flex; + align-content: center; + justify-content: center; + font-size: 0.9em; } diff --git a/themes/gruvboxed b/themes/gruvboxed new file mode 160000 index 0000000..f4735db --- /dev/null +++ b/themes/gruvboxed @@ -0,0 +1 @@ +Subproject commit f4735db2aec9803f6b0587d8dd78f44d5acbbd6e