diff options
author | eug-vs <eugene@eug-vs.xyz> | 2021-08-15 13:34:35 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2021-08-15 13:40:00 +0300 |
commit | 0ab4193d1509dd0fcc75932a03870f6a03e6acca (patch) | |
tree | 8f4911c1b78f5ce57638ebcb287757759ce12284 | |
parent | 84dfc818bb613752f17b11e17fd4e19c9dffe65b (diff) | |
download | eug-vs-xyz-0ab4193d1509dd0fcc75932a03870f6a03e6acca.tar.gz |
style: fix indentations and image sizes
-rw-r--r-- | blog/2021-07-15.md | 60 | ||||
-rwxr-xr-x | index.md | 2 | ||||
-rw-r--r-- | public/emoji/imagemagick.png | bin | 369988 -> 107974 bytes | |||
-rw-r--r-- | public/wojak-brainchair.jpg | bin | 77785 -> 0 bytes | |||
-rw-r--r-- | public/wojak-brainchair.png | bin | 0 -> 80111 bytes |
5 files changed, 30 insertions, 32 deletions
diff --git a/blog/2021-07-15.md b/blog/2021-07-15.md index f53009e..45f9f37 100644 --- a/blog/2021-07-15.md +++ b/blog/2021-07-15.md @@ -63,11 +63,11 @@ jobs: The `defaults` part might look scary, but you could just move everything from defaults directly under `upload_stickers` job. Defaults are useful when you have multiple jobs, and I planned to have 2 initially. Let's now move to the `steps`: ```YAML - - checkout +- checkout - - run: - name: Install python dependencies - command: pip3 install . +- run: + name: Install python dependencies + command: pip3 install . ``` Obviously we checkout our code first, and then install all the dependencies for our `Python` script. @@ -87,11 +87,11 @@ orbs: Now back to the steps. Let's install the tool and use it to generate our `config.json`: ```YAML - - envsubst/install +- envsubst/install - - run: - name: Create config.json from template - command: envsubst < config.template.json > config.json +- run: + name: Create config.json from template + command: envsubst < config.template.json > config.json ``` Ok so we can now login into `Matrix`, but what about `Telegram`? The script uses `Telethon` package under the hood which works with a `sticker-import.session` file. This is basically an `SQL` database, and I don't really @@ -100,33 +100,33 @@ Of course, someone could try to decrypt my `Telethon` session since it's now pub Our next steps in config will be to decrypt the session and finally pipe our `telegram-packs.txt` to the script using `xargs`: ```YAML - - run: - name: Decrypt telethon session - command: gpg --batch --passphrase $PASSPHRASE --decrypt sticker-import.session.gpg > sticker-import.session +- run: + name: Decrypt telethon session + command: gpg --batch --passphrase $PASSPHRASE --decrypt sticker-import.session.gpg > sticker-import.session - - run: - name: Reupload and install stickers - command: cat telegram-packs.txt | xargs sticker-import +- run: + name: Reupload and install stickers + command: cat telegram-packs.txt | xargs sticker-import ``` At this point, the stickers are uploaded to the server, but the UI is updated via it's own `.json` file which contains information about uploaded stickers. It's already updated by the script, we just have to push it to our repo. For that I've created a new SSH key and added it to `CircleCI` secrets so that it can push commits to my repository. So the final steps would be: ```YAML - - add_ssh_keys - - - run: - name: Add github to known_hosts - command: | - mkdir -p ~/.ssh - ssh-keyscan github.com >> ~/.ssh/known_hosts - - run: - name: Commit stickerpack JSON's - command: | - git config --global user.email "eug-vs@keemail.me" - git config --global user.name "eug-vs" - git add . - git commit -m "feat: add stickerpacks with CircleCI [ci skip]" - git push -u +- add_ssh_keys + +- run: + name: Add github to known_hosts + command: | + mkdir -p ~/.ssh + ssh-keyscan github.com >> ~/.ssh/known_hosts +- run: + name: Commit stickerpack JSON's + command: | + git config --global user.email "eug-vs@keemail.me" + git config --global user.name "eug-vs" + git add . + git commit -m "feat: add stickerpacks with CircleCI [ci [skip](skip.md)]" + git push -u ``` The `[ci skip]` flag tells Circle to avoid running on this commit, otherwise it would have to run once again since we pushed a new commit with it. @@ -136,6 +136,6 @@ need to check the **new** packs in the `telegram-packs.txt` - the script is actu And that's it! Now every time I add new URLs to the `telegram-packs.txt`, they will automatically appear in my widget within a minute or so. Enjoy your stickers! -![wojak-brain-chair](/public/wojak-brainchair.jpg) +![wojak-brain-chair](/public/wojak-brainchair.png) You can find full version of the config here: https://github.com/eug-vs/stickerpicker/blob/master/.circleci/config.yml @@ -1,8 +1,6 @@ # About me I'm **Eugene** - software developer, enthusiast and a cool guy. Here I share information based on my experience in different topics. I'm interested in tech, math, privacy, linguistics, nutrition, health, psychology and philosophy. -[Visit my blog!](./blog/index.md) - # About this website This website runs on my local *Raspberry Pi* and features secure **HTTPS** connection! It's just a series of interlinked wiki-pages that I write in `Markdown`. Checkout more info on my [recent blog post](/blog/2021-07-02.md)! diff --git a/public/emoji/imagemagick.png b/public/emoji/imagemagick.png Binary files differindex bb81bc0..4b67ed6 100644 --- a/public/emoji/imagemagick.png +++ b/public/emoji/imagemagick.png diff --git a/public/wojak-brainchair.jpg b/public/wojak-brainchair.jpg Binary files differdeleted file mode 100644 index d6b5c3e..0000000 --- a/public/wojak-brainchair.jpg +++ /dev/null diff --git a/public/wojak-brainchair.png b/public/wojak-brainchair.png Binary files differnew file mode 100644 index 0000000..39ffa32 --- /dev/null +++ b/public/wojak-brainchair.png |