Compare commits

..

No commits in common. "60516347b06d58bbd7348e9bbbcedc0b50df7f31" and "b5fdef082766e5ac26659567008162e6b53ba104" have entirely different histories.

14 changed files with 99 additions and 111 deletions

12
.deprecated/README.md Normal file
View File

@ -0,0 +1,12 @@
## Deploy
Ой, это ебаный костыль :)
```sh
deploy.py
```
Python скрипт, который запускает Hugo, создаёт архив, загружает его на сервер,
и дёргает на сервере PHP скрипт, который распаковывает `.zip` архив.
**NOTE:** Потом нужно перенести все картинки в `/static/images/` и загружать их отдельно.

48
.deprecated/deploy.py Executable file
View File

@ -0,0 +1,48 @@
#!/usr/bin/env python3
import os
import sys
import shutil
import uuid
import ftplib
import urllib.request
HOST = 'blog.iiiypuk.me'
USER = 'alpopov94_blog-iiiypuk-me'
PASSWORD = sys.argv[1]
def make_zip_www():
archive_name = str(uuid.uuid4()).replace('-', '')
shutil.make_archive(archive_name, 'zip', './public')
return '{0}.zip'.format(archive_name)
def upload_by_ftps(archive):
ftp = ftplib.FTP_TLS(host=HOST, user=USER, passwd=PASSWORD)
# ftp.delete('posts')
if ftp.pwd() == '/':
with open(archive, 'rb') as f:
ftp.storbinary('STOR {0}'.format(archive), f)
os.remove(archive)
with open('unpack.php', 'rb') as f:
ftp.storbinary('STOR unpack.php', f)
def get_unpack(archive):
f = urllib.request.urlopen('https://blog.iiiypuk.me/unpack.php?f={0}'.format(archive))
f.read()
ftp = ftplib.FTP_TLS(host=HOST, user=USER, passwd=PASSWORD)
ftp.delete('unpack.php')
if __name__ == '__main__':
os.system('rm -rf ./public/ &> /dev/null') # FIXIT
os.system('hugo &> /dev/null')
archive = make_zip_www() # ..
upload_by_ftps(archive) # ..
get_unpack(archive) # ..

11
.deprecated/unpack.php Normal file
View File

@ -0,0 +1,11 @@
<?php
$zipFile = $_GET['f'];
$zip = new ZipArchive;
if ($zip->open($zipFile) === TRUE) {
$zip->extractTo('.');
$zip->close();
unlink(zipFile);
}
?>

3
.gitignore vendored
View File

@ -1,8 +1,5 @@
static/content/ static/content/
public/ public/
public.tar.xz public.tar.xz
# Executable
hugo
hugo.exe hugo.exe
.hugo_build.lock .hugo_build.lock

0
.gitmodules vendored Normal file
View File

View File

@ -1 +1 @@
Download [Hugo](https://github.com/gohugoio/hugo/releases/tag/v0.119.0).

View File

@ -1,11 +0,0 @@
#!/bin/sh
IN=./public/
DIR=Sites/iiiypuk.me/www/
./hugo && rsync -avz --delete \
# --exclude 'test' \
# --exclude 'file.txt' \
${IN} kvm5:~/${DIR}
exit 0

12
make.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# remove old generated files
rm ./public*.tar.xz
rm -rf ./public/
# generate new public files
hugo
# make public data archive
#cd ./public/
#tar -cJf "../public.tar.xz" .

View File

@ -1,60 +0,0 @@
#!/usr/bin/env bash
# This script is used to define colors for bash scripts
# Git: https://git.a2s.su/iiiypuk/colors.sh
# Author: Alexander Popov
# License: MIT
# Update: 28 Mar 2024
# Usage:
#
# source colors.sh
# echo -e "This is ${RED}red text${NC}"
# Black and white
export BLACK='\033[0;30m'
export WHITE='\033[0;37m'
export GRAY='\033[0;90m'
export NC='\033[0m' # reset color
# Bold black and white
export BLACK_B='\033[1;30m'
export WHITE_B='\033[1;37m'
export GRAY_B='\033[1;90m'
# Basic colors
export RED='\033[0;31m'
export GREEN='\033[0;32m'
export BLUE='\033[0;34m'
export YELLOW='\033[0;33m'
export MAGENTA='\033[0;35m'
export CYAN='\033[0;36m'
# Bold basic colors
export RED_B='\033[1;31m'
export GREEN_B='\033[1;32m'
export BLUE_B='\033[1;34m'
export YELLOW_B='\033[1;33m'
export MAGENTA_B='\033[1;35m'
export CYAN_B='\033[1;36m'
# Bright colors
export BRIGHT_RED='\033[0;91m'
export BRIGHT_GREEN='\033[0;92m'
export BRIGHT_BLUE='\033[0;94m'
export BRIGHT_YELLOW='\033[0;93m'
export BRIGHT_MAGENTA='\033[0;95m'
export BRIGHT_CYAN='\033[0;96m'
# Bold bright colors
export BRIGHT_RED_B='\033[1;91m'
export BRIGHT_GREEN_B='\033[1;92m'
export BRIGHT_BLUE_B='\033[1;94m'
export BRIGHT_YELLOW_B='\033[1;93m'
export BRIGHT_MAGENTA_B='\033[1;95m'
export BRIGHT_CYAN_B='\033[1;96m'
# Styles
export BOLD='\033[1m'
export UNDERLINE='\033[4m'
export BLINK='\033[5m'

View File

@ -1,15 +0,0 @@
#!/bin/bash
# include colors.sh
SCRIPT=$(readlink -f $0)
SCRIPTPATH=`dirname $SCRIPT`
source $SCRIPTPATH/colors.sh
CDN_PATH=https://cdn.a2s.su/blog/assets/bootstrap/5.3.3
echo -e "${BRIGHT_CYAN}Download ${BRIGHT_CYAN_B}Bootstrap...${NC}"
wget -nv "$CDN_PATH/bootstrap.min.css" -O themes/papercut/static/css/bootstrap.min.css
wget -nv "$CDN_PATH/bootstrap.min.js" -O themes/papercut/static/js/bootstrap.min.js
echo -e "${BRIGHT_GREEN}Complete...${NC}"

View File

@ -1,9 +1,6 @@
/* SITE */ /* SITE */
Last Updated: Thu Mar 28 2024 Last Updated: Tue Sep 03 12:39 AM MSK 2022
Components: Components: Hugo, Bootstrap 5.2.0
Hugo
Bootstrap 5.3.3
Ubuntu font family
/* TEAM */ /* TEAM */
Chef: Alexander Popov Chef: Alexander Popov

View File

@ -5,6 +5,5 @@
<a class="border-bottom border-primary text-decoration-none py-1 mx-1" target="_blank" href="http://a2s.su:8000/">Micro blog</a> <a class="border-bottom border-primary text-decoration-none py-1 mx-1" target="_blank" href="http://a2s.su:8000/">Micro blog</a>
<a class="border-bottom border-primary text-decoration-none py-1 mx-1" target="_blank" href="irc://iiiypuk.me:6667/admin">IRC</a> <a class="border-bottom border-primary text-decoration-none py-1 mx-1" target="_blank" href="irc://iiiypuk.me:6667/admin">IRC</a>
<a class="border-bottom border-primary text-decoration-none py-1 mx-1" target="_blank" href="gemini://a2s.su">Gemini</a> <a class="border-bottom border-primary text-decoration-none py-1 mx-1" target="_blank" href="gemini://a2s.su">Gemini</a>
<a class="border-bottom border-primary text-decoration-none py-1 mx-1" target="_blank" href="https://t.me/db_o_qp">Telegram</a>
</div> </div>
</section> </section>

View File

@ -5,30 +5,28 @@
<span class="fw-bold">📕 Languages & frameworks:</span> <span class="fw-bold">📕 Languages & frameworks:</span>
<span class="border-bottom p-1">Pure C</span>, <span class="border-bottom p-1">Pure C</span>,
<span class="border-bottom p-1">C++</span>,
<span class="border-bottom p-1">Crystal</span>, <span class="border-bottom p-1">Crystal</span>,
<span class="border-bottom p-1">JavaScript</span>, <span class="border-bottom p-1">JavaScript</span>,
<span class="border-bottom p-1">Python</span>, <span class="border-bottom p-1">Python</span>,
<span class="border-bottom p-1">PHP</span>, <span class="border-bottom p-1">PHP</span>,
<span class="border-bottom p-1 text-nowrap">OpenCV 4</span>,
<span class="border-bottom p-1 text-nowrap">SFML</span>,
<span class="border-bottom p-1 text-nowrap">Bootstrap 5</span> <span class="border-bottom p-1 text-nowrap">Bootstrap 5</span>
</p> </p>
<p class="text-center lh-lg"> <p class="text-center lh-lg">
<span class="fw-bold">🧰 Tools:</span> <span class="fw-bold">🧰 Tools:</span>
<span class="border-bottom p-1 text-nowrap">Arch Linux</span>,
<span class="border-bottom p-1">L4T</span>,
<span class="border-bottom p-1">Porteus</span>, <span class="border-bottom p-1">Porteus</span>,
<span class="border-bottom p-1 text-nowrap">Alpine Linux</span>, <span class="border-bottom p-1 text-nowrap">Alpine Linux</span>,
<span class="border-bottom p-1">OpenBSD</span>, <span class="border-bottom p-1">OpenBSD</span>,
<span class="border-bottom p-1 text-nowrap">Arch Linux</span>,
<span class="border-bottom p-1 text-nowrap">Windows 11</span>, <span class="border-bottom p-1 text-nowrap">Windows 11</span>,
<span class="border-bottom p-1 text-nowrap">Sublime Text 4</span>, <span class="border-bottom p-1 text-nowrap">Sublime Text 4</span>,
<span class="border-bottom p-1 text-nowrap">Windows Terminal</span>,
<span class="border-bottom p-1">CorelDRAW</span>, <span class="border-bottom p-1">CorelDRAW</span>,
<span class="border-bottom p-1">GameMaker</span>, <span class="border-bottom p-1">GameMaker</span>,
<span class="border-bottom p-1">EditorConfig</span>, <span class="border-bottom p-1">EditorConfig</span>,
<span class="border-bottom p-1">Gitea</span>, <span class="border-bottom p-1">Gitea</span>,
<span class="border-bottom p-1">Git</span>,
<span class="border-bottom p-1">Tmux</span> <span class="border-bottom p-1">Tmux</span>
</p> </p>

View File

@ -1,7 +1,7 @@
@font-face { @font-face {
font-family: 'Ubuntu Mono'; font-family: 'Ubuntu Mono';
src: url('//cdn.a2s.su/blog/assets/fonts/UbuntuMono-Regular.woff2') format('woff2'), src: url('/fonts/UbuntuMono-Regular.woff2') format('woff2'),
url('//cdn.a2s.su/blog/assets/fonts/UbuntuMono-Regular.woff') format('woff'); url('/fonts/UbuntuMono-Regular.woff') format('woff');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;
@ -9,8 +9,8 @@
@font-face { @font-face {
font-family: 'Ubuntu'; font-family: 'Ubuntu';
src: url('//cdn.a2s.su/blog/assets/fonts/Ubuntu-Bold.woff2') format('woff2'), src: url('/fonts/Ubuntu-Bold.woff2') format('woff2'),
url('//cdn.a2s.su/blog/assets/fonts/Ubuntu-Bold.woff') format('woff'); url('/fonts/Ubuntu-Bold.woff') format('woff');
font-weight: bold; font-weight: bold;
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;
@ -18,8 +18,8 @@
@font-face { @font-face {
font-family: 'Ubuntu'; font-family: 'Ubuntu';
src: url('//cdn.a2s.su/blog/assets/fonts/Ubuntu-BoldItalic.woff2') format('woff2'), src: url('/fonts/Ubuntu-BoldItalic.woff2') format('woff2'),
url('//cdn.a2s.su/blog/assets/fonts/Ubuntu-BoldItalic.woff') format('woff'); url('/fonts/Ubuntu-BoldItalic.woff') format('woff');
font-weight: bold; font-weight: bold;
font-style: italic; font-style: italic;
font-display: swap; font-display: swap;
@ -27,8 +27,8 @@
@font-face { @font-face {
font-family: 'Ubuntu'; font-family: 'Ubuntu';
src: url('//cdn.a2s.su/blog/assets/fonts/Ubuntu-Italic.woff2') format('woff2'), src: url('/fonts/Ubuntu-Italic.woff2') format('woff2'),
url('//cdn.a2s.su/blog/assets/fonts/Ubuntu-Italic.woff') format('woff'); url('/fonts/Ubuntu-Italic.woff') format('woff');
font-weight: normal; font-weight: normal;
font-style: italic; font-style: italic;
font-display: swap; font-display: swap;
@ -36,8 +36,8 @@
@font-face { @font-face {
font-family: 'Ubuntu'; font-family: 'Ubuntu';
src: url('//cdn.a2s.su/blog/assets/fonts/Ubuntu.woff2') format('woff2'), src: url('/fonts/Ubuntu.woff2') format('woff2'),
url('//cdn.a2s.su/blog/assets/fonts/Ubuntu.woff') format('woff'); url('/fonts/Ubuntu.woff') format('woff');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;