From c375ea4d2bedb176d16cc1602f94cba8c9bb1e5c Mon Sep 17 00:00:00 2001 From: Horhik Date: Sun, 24 Jan 2021 18:23:53 +0200 Subject: [PATCH] update article --- .../PyAutoGUI for simplifying anki routine.md | 14 ++-- public/categories/index.html | 78 ++----------------- public/categories/index.xml | 11 +-- public/categories/page/1/index.html | 2 +- public/css/basic.css | 23 ++++++ public/index.html | 66 ++-------------- public/index.xml | 11 +-- public/page/1/index.html | 2 +- public/posts/index.html | 25 ++++++ public/posts/index.xml | 1 + public/posts/page/1/index.html | 1 + .../index.html | 76 ++++++++++++++++++ public/posts/second-test-post/index.html | 25 ++++++ public/sitemap.xml | 18 +---- public/tags/index.html | 78 ++----------------- public/tags/index.xml | 11 +-- public/tags/page/1/index.html | 2 +- ...s_48b060fe05b0a273d182ef83c0605941.content | 1 - ...scss_48b060fe05b0a273d182ef83c0605941.json | 1 - 19 files changed, 179 insertions(+), 267 deletions(-) create mode 100644 public/posts/index.html create mode 100644 public/posts/index.xml create mode 100644 public/posts/page/1/index.html create mode 100644 public/posts/pyautogui-for-simplifying-anki-routine/index.html create mode 100644 public/posts/second-test-post/index.html delete mode 100644 resources/_gen/assets/scss/css/basic.scss_48b060fe05b0a273d182ef83c0605941.content delete mode 100644 resources/_gen/assets/scss/css/basic.scss_48b060fe05b0a273d182ef83c0605941.json diff --git a/content/posts/PyAutoGUI for simplifying anki routine.md b/content/posts/PyAutoGUI for simplifying anki routine.md index 5d5bec8..91e85c1 100644 --- a/content/posts/PyAutoGUI for simplifying anki routine.md +++ b/content/posts/PyAutoGUI for simplifying anki routine.md @@ -7,8 +7,7 @@ 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. - +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 @@ -19,10 +18,9 @@ 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**. +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 @@ -47,6 +45,6 @@ while(True): 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` +`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/public/categories/index.html b/public/categories/index.html index 325e6b8..8058673 100644 --- a/public/categories/index.html +++ b/public/categories/index.html @@ -1,93 +1,25 @@ - - - - - - - Categories - - - - - - - - - - - - -
-

Categories

1 of 0
- - + \ No newline at end of file diff --git a/public/categories/index.xml b/public/categories/index.xml index d1dc774..fd0e799 100644 --- a/public/categories/index.xml +++ b/public/categories/index.xml @@ -1,10 +1 @@ - - - - Categories on Horhik.xyz - http://new.horhik.xyz/categories/ - Recent content in Categories on Horhik.xyz - Hugo -- gohugo.io - en-us - - +Categories on Horhik.xyzhttps://site.horhik.xyz/categories/Recent content in Categories on Horhik.xyzHugo -- gohugo.ioen-us \ No newline at end of file diff --git a/public/categories/page/1/index.html b/public/categories/page/1/index.html index f5c9413..21f5a06 100644 --- a/public/categories/page/1/index.html +++ b/public/categories/page/1/index.html @@ -1 +1 @@ -http://new.horhik.xyz/categories/ \ No newline at end of file +https://site.horhik.xyz/categories/ \ No newline at end of file diff --git a/public/css/basic.css b/public/css/basic.css index e0464b6..025dd38 100644 --- a/public/css/basic.css +++ b/public/css/basic.css @@ -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/public/index.html b/public/index.html index ee27b0b..3a90ec9 100644 --- a/public/index.html +++ b/public/index.html @@ -1,81 +1,25 @@ - - - - - - - - Horhik.xyz - - - - - - - - - - - - -
-
- - + \ No newline at end of file diff --git a/public/index.xml b/public/index.xml index ee8b180..3074636 100644 --- a/public/index.xml +++ b/public/index.xml @@ -1,10 +1 @@ - - - - Horhik.xyz - http://new.horhik.xyz/ - Recent content on Horhik.xyz - Hugo -- gohugo.io - en-us - - +Horhik.xyzhttps://site.horhik.xyz/Recent content on Horhik.xyzHugo -- gohugo.ioen-usThu, 21 Jan 2021 10:26:19 +0300PyAutoGUI for simplifying anki routinehttps://site.horhik.xyz/posts/pyautogui-for-simplifying-anki-routine/Thu, 21 Jan 2021 10:26:19 +0300https://site.horhik.xyz/posts/pyautogui-for-simplifying-anki-routine/I had been adding some cards to Anki. It was lowercase word and word with stress in russian.Second Test Posthttps://site.horhik.xyz/posts/second-test-post/Sun, 03 Jan 2021 01:24:34 +0200https://site.horhik.xyz/posts/second-test-post/heeeya \ No newline at end of file diff --git a/public/page/1/index.html b/public/page/1/index.html index 36a6440..bf3fe6f 100644 --- a/public/page/1/index.html +++ b/public/page/1/index.html @@ -1 +1 @@ -http://new.horhik.xyz/ \ No newline at end of file +https://site.horhik.xyz/ \ No newline at end of file diff --git a/public/posts/index.html b/public/posts/index.html new file mode 100644 index 0000000..97d1dec --- /dev/null +++ b/public/posts/index.html @@ -0,0 +1,25 @@ +Posts
O. George’s site

Posts

1 of 1
\ No newline at end of file diff --git a/public/posts/index.xml b/public/posts/index.xml new file mode 100644 index 0000000..26ec7e3 --- /dev/null +++ b/public/posts/index.xml @@ -0,0 +1 @@ +Posts on Horhik.xyzhttps://site.horhik.xyz/posts/Recent content in Posts on Horhik.xyzHugo -- gohugo.ioen-usThu, 21 Jan 2021 10:26:19 +0300PyAutoGUI for simplifying anki routinehttps://site.horhik.xyz/posts/pyautogui-for-simplifying-anki-routine/Thu, 21 Jan 2021 10:26:19 +0300https://site.horhik.xyz/posts/pyautogui-for-simplifying-anki-routine/I had been adding some cards to Anki. It was lowercase word and word with stress in russian.Second Test Posthttps://site.horhik.xyz/posts/second-test-post/Sun, 03 Jan 2021 01:24:34 +0200https://site.horhik.xyz/posts/second-test-post/heeeya \ No newline at end of file diff --git a/public/posts/page/1/index.html b/public/posts/page/1/index.html new file mode 100644 index 0000000..94e8b17 --- /dev/null +++ b/public/posts/page/1/index.html @@ -0,0 +1 @@ +https://site.horhik.xyz/posts/ \ No newline at end of file diff --git a/public/posts/pyautogui-for-simplifying-anki-routine/index.html b/public/posts/pyautogui-for-simplifying-anki-routine/index.html new file mode 100644 index 0000000..7e375de --- /dev/null +++ b/public/posts/pyautogui-for-simplifying-anki-routine/index.html @@ -0,0 +1,76 @@ +PyAutoGUI for simplifying anki routine
O. George’s site

PyAutoGUI for simplifying anki routine

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

1
+2
+3
+4
+5
+
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 Anki.

I split my window by Anki “add card” window and Emacs. As i use evil mode in Emacs, script looks like that:

 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+
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

\ No newline at end of file diff --git a/public/posts/second-test-post/index.html b/public/posts/second-test-post/index.html new file mode 100644 index 0000000..c64a0a9 --- /dev/null +++ b/public/posts/second-test-post/index.html @@ -0,0 +1,25 @@ +Second Test Post
O. George’s site

Second Test Post

heeeya

\ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml index c1f5dbe..ec7994e 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -1,17 +1 @@ - - - - - http://new.horhik.xyz/categories/ - - - - http://new.horhik.xyz/ - - - - http://new.horhik.xyz/tags/ - - - +https://site.horhik.xyz/2021-01-21T10:26:19+03:00https://site.horhik.xyz/posts/2021-01-21T10:26:19+03:00https://site.horhik.xyz/posts/pyautogui-for-simplifying-anki-routine/2021-01-21T10:26:19+03:00https://site.horhik.xyz/posts/second-test-post/2021-01-03T01:24:34+02:00https://site.horhik.xyz/categories/https://site.horhik.xyz/tags/ \ No newline at end of file diff --git a/public/tags/index.html b/public/tags/index.html index b672ffc..bc04000 100644 --- a/public/tags/index.html +++ b/public/tags/index.html @@ -1,93 +1,25 @@ - - - - - - - Tags - - - - - - - - - - - - -
-

Tags

1 of 0
- - + \ No newline at end of file diff --git a/public/tags/index.xml b/public/tags/index.xml index 823572f..64e97b4 100644 --- a/public/tags/index.xml +++ b/public/tags/index.xml @@ -1,10 +1 @@ - - - - Tags on Horhik.xyz - http://new.horhik.xyz/tags/ - Recent content in Tags on Horhik.xyz - Hugo -- gohugo.io - en-us - - +Tags on Horhik.xyzhttps://site.horhik.xyz/tags/Recent content in Tags on Horhik.xyzHugo -- gohugo.ioen-us \ No newline at end of file diff --git a/public/tags/page/1/index.html b/public/tags/page/1/index.html index 4aed81e..34bef6d 100644 --- a/public/tags/page/1/index.html +++ b/public/tags/page/1/index.html @@ -1 +1 @@ -http://new.horhik.xyz/tags/ \ No newline at end of file +https://site.horhik.xyz/tags/ \ No newline at end of file diff --git a/resources/_gen/assets/scss/css/basic.scss_48b060fe05b0a273d182ef83c0605941.content b/resources/_gen/assets/scss/css/basic.scss_48b060fe05b0a273d182ef83c0605941.content deleted file mode 100644 index 37a84ab..0000000 --- a/resources/_gen/assets/scss/css/basic.scss_48b060fe05b0a273d182ef83c0605941.content +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";:root{--background: #282A36 ;--comment: #6272A4 ;--selection: #44475A ;--foreground: #F8F8F2 ;--cyan: #8BE9FD ;--orange: #FFB86C;--green: #50FA7B ;--pink: #FF79C6 ;--purple: #BD93F9 ;--red: #FF5555 ;--yellow: #F1FA8C}@font-face{font-family:mononoki;src:url(../fonts/mononoki-Regular.eot);src:url(../fonts/mononoki-Regular.eot)format("embedded-opentype"),url(../fonts/mononoki-Regular.ttf)format("truetype"),url(../fonts/mononoki-Regular.woff2)format("woff2"),url(../fonts/mononoki-Regular.woff)format("woff")}@font-face{font-family:mononoki bold;src:url(../fonts/mononoki-Bold.eot);src:url(../fonts/mononoki-Bold.eot)format("embedded-opentype"),url(../fonts/mononoki-Bold.ttf)format("truetype"),url(../fonts/mononoki-Bold.woff2)format("woff2"),url(../fonts/mononoki-Bold.woff)format("woff")}@font-face{font-family:mononoki;src:url(../fonts/mononoki-Regular.eot);src:url(../fonts/mononoki-Regular.eot)format("embedded-opentype"),url(../fonts/mononoki-Regular.ttf)format("truetype"),url(../fonts/mononoki-Regular.woff2)format("woff2"),url(../fonts/mononoki-Regular.woff)format("woff")}body{margin:0;padding:0;background-color:var(--background);color:var(--foreground);font-family:ubuntu,sans-serif;max-width:1000px;margin:0 auto;box-shadow:0 -30px 20px rgba(0,0,0,.5);border-bottom-left-radius:5px;border-bottom-right-radius:5px;padding:10px 0}a,.link{transition:.3s;color:var(--cyan);text-decoration:none}a:hover,a:focus,.link:hover,.link:focus{color:var(--pink)}@media(min-width:1000px){box-shadow: 4px 4px 32px rgba(0,0,0,0.34); } .h1 { font-family: 'Mononoki Bold','Fira Code SemiBold'; font-size: 2em; } .logo--wrapper { display: grid; font-family: mononoki,'Fira Code',monospace,ubuntu; } .logo-quote { text-align: center; color: var(--foreground); margin: 10px auto 28px; max-width: 300px; } .logo { margin: 0 auto; margin-top: 30px; display: flex; flex-direction: column; align-items: center; align-content: center; font-family: mononoki,'Fira Code',monospace,ubuntu; } .toilet-logo { color: var(--orange); font-size: 0.9em; line-height: 1.115em; margin: 0; font-family: mononoki,'Fira Code',monospace,ubuntu; } .page-list { list-style: none; display: flex; justify-content: space-between; width: 300px; margin: 0 auto; font-family: mononoki; padding: 0; } .page-link { font-size: 0.4em; line-height: 1.115em; width: 100px; transition: 0.3s; } .page-link a { color: var(--green); text-decoration: none; display: block; } .page-link a:hover,.page-link a:focus { color: var(--pink); } .recent { margin: 0 auto; } .recent-header { text-align: center; } .recent-list { list-style: none; margin: 0; padding: 0; } .recent-block { text-decoration: none; font-family: mononoki,monospace; font-size: 1.3em; box-shadow: 4px 4px 32px rgba(0,0,0,0.34); background: var(--background); border-radius: 10px; word-break: break-word; display: block; align-items: center; align-content: center; margin: 20px 0; padding: 10px 20px; width: max-content; max-width: 80vw; color: var(--cyan); transition: 0.2s; } .recent-block--left { border-bottom-left-radius: 0; border-top-left-radius: 0; margin-right: auto; } .recent-block--left::before { content: '📜'; margin: 5px; display: flex; align-items: center; align-content: center; } .recent-block--left:hover,.recent-block--left:focus { padding-left: 40px; } .recent-block--left:active { padding-left: 0; } .recent-block--right { border-bottom-right-radius: 0; border-top-right-radius: 0; margin-left: auto; } .recent-block--right::after { content: url("../../../src/svg/github-icon.svg"); margin: 5px; display: flex; align-items: center; align-content: center; } .recent-block--right:hover,.recent-block--right:focus { padding-right: 40px; } .recent-block--right:active { padding-right: 0; } .recent-block__time { float: right; font-size: 12px; color: var(--purple); } .contacts { list-style: none; padding: 0; display: flex; justify-content: space-around; flex-wrap: wrap; margin: 0 auto; } .contact-link { text-decoration: none; font-size: 0.3em; color: var(--cyan); line-height: 0.8em; margin: 10px 15px; display: block; } .copyright { font-family: "Mononoki",monospace; margin-left: 20px; } .portfolio { list-style: none; padding: 20px; display: flex; flex-direction: column; align-content: center; align-items: center; justify-content: center; } .project { display: flex; flex-direction: column; padding: 26px; box-shadow: 4px 4px 32px rgba(0,0,0,0.34); border-radius: 10px; background: var(--background); font-family: "Mononoki",monospace; text-align: center; margin: 20px 0; max-width: 70vw; transition: 0.3s; } .project:hover,.project:focus { box-shadow: 4px 4px 18px rgba(0,0,0,0.5); } .project-name { color: var(--green); margin: 0; } .project-name a { color: var(--green); text-decoration: none; } .project-gallery { list-style: none; padding: 0; } .project-links { padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: space-around; } .project-link { margin-right: 10px; display: flex; align-items: center; align-content: center; vertical-align: center; } .project-link::before { margin-right: 10px; } .project-link--github::before { content: url("../../svg/github-icon.svg"); } .project-link--iphone::before { content: url("../../svg/appstore.svg"); } .project-link--android::before { content: url("../../svg/googleplay.svg"); } .project-link--app-page::before { content: url("../../svg/app-page.svg"); } .project-link__logo { margin-right: 10px; width: 30px; } .blog-posts { list-style: none; padding: 0; font-family: 'Cuprum',sans-serif; transition: 0.5s; } .blog-posts__item { font-family: 'Cuprum',sans-serif; color: var(--foreground); } .blog-posts__item::before,.blog-posts__item::after { content: '' !important; } .blog-posts__item--right p { text-align: right; } .blog-posts__item--right ul { flex-direction: row-reverse; } .blog-posts__item--left { text-align: left; } .nothing { font-family: 'Mononoki Bold',monospace; text-align: center; } .blog-post__header { color: var(--green); } .blog-post__header a { color: var(--green); } .blog-info__list { list-style: none; padding: 0; display: flex; } .blog-info__item { margin-right: 20px; color: var(--orange); display: flex; align-items: center; } .blog-info__item--created::before { content: url("../../svg/watch.svg"); margin-right: 10px; } .blog-info__item--reading-time::before { content: url("../../svg/stopwatch.svg"); margin-right: 10px; }} \ No newline at end of file diff --git a/resources/_gen/assets/scss/css/basic.scss_48b060fe05b0a273d182ef83c0605941.json b/resources/_gen/assets/scss/css/basic.scss_48b060fe05b0a273d182ef83c0605941.json deleted file mode 100644 index e3539dd..0000000 --- a/resources/_gen/assets/scss/css/basic.scss_48b060fe05b0a273d182ef83c0605941.json +++ /dev/null @@ -1 +0,0 @@ -{"Target":"css/basic.min.1c7d0df3f4d862d66ca5b3d7d7f36b014bcff9f92ca85b340ba9b72a51495819.css","MediaType":"text/css","Data":{"Integrity":"sha256-HH0N8/TYYtZspbPX1/NrAUvP+fksqFs0C6m3KlFJWBk="}} \ No newline at end of file