2023-12-30
This commit is contained in:
parent
f38d94624f
commit
db23690a88
16 changed files with 64 additions and 55 deletions
|
@ -2,6 +2,9 @@
|
|||
|
||||
<pre>
|
||||
<a href='.'>.</a>
|
||||
├─ <a href='archive'>archive</a>
|
||||
│ ├─ <a href='archive/README.md'>README.md</a>
|
||||
│ └─ <a href='archive/round-robin.md'>round-robin.md</a>
|
||||
├─ <a href='bash_scripts'>bash_scripts</a>
|
||||
│ ├─ <a href='bash_scripts/README.en.md'>README.en.md</a>
|
||||
│ ├─ <a href='bash_scripts/README.md'>README.md</a>
|
||||
|
@ -15,14 +18,11 @@
|
|||
│ ├─ <a href='bash_scripts/repo_gitlab.tmpl.sh'>repo_gitlab.tmpl.sh</a>
|
||||
│ ├─ <a href='bash_scripts/repo_local.tmpl.sh'>repo_local.tmpl.sh</a>
|
||||
│ └─ <a href='bash_scripts/repo_orchestrate.sh'>repo_orchestrate.sh</a>
|
||||
├─ <a href='draft'>draft</a>
|
||||
│ ├─ <a href='draft/README.md'>README.md</a>
|
||||
│ └─ <a href='draft/round-robin.md'>round-robin.md</a>
|
||||
├─ <a href='pictures'>pictures</a>
|
||||
│ ├─ <a href='pictures/README.md'>README.md</a>
|
||||
│ ├─ <a href='pictures/archive.jpg'>archive.jpg</a>
|
||||
│ ├─ <a href='pictures/bash_scripts.jpg'>bash_scripts.jpg</a>
|
||||
│ ├─ <a href='pictures/color-tomato-theme.jpg'>color-tomato-theme.jpg</a>
|
||||
│ ├─ <a href='pictures/draft.jpg'>draft.jpg</a>
|
||||
│ ├─ <a href='pictures/older-tomato-theme.jpg'>older-tomato-theme.jpg</a>
|
||||
│ ├─ <a href='pictures/pictures.jpg'>pictures.jpg</a>
|
||||
│ ├─ <a href='pictures/pomodoro.jpg'>pomodoro.jpg</a>
|
||||
|
|
|
@ -31,8 +31,8 @@ AngularJS and Material, this was the design of the previous version of my blog,
|
|||
default design theme on GitHub Pages. Both tomatoes supplement each other and are similar to each other,
|
||||
so they can be used together on the same site.
|
||||
|
||||
- [Color tomato](https://hub.mos.ru/golovin/color-tomato-theme/blob/master/README.en.md) — color selection during the build.
|
||||
- [Older tomato](https://hub.mos.ru/golovin/older-tomato-theme/blob/master/README.en.md) — lightweight decoration theme.
|
||||
- [Color tomato](https://git.org.ru/golovin/color-tomato-theme/src/branch/master/README.en.md) — color selection during the build.
|
||||
- [Older tomato](https://git.org.ru/golovin/older-tomato-theme/src/branch/master/README.en.md) — lightweight decoration theme.
|
||||
|
||||
### Process
|
||||
|
||||
|
@ -40,8 +40,8 @@ The creative process began in 2016, but even earlier I wrote some things for mys
|
|||
creativity occurs, when there is no work. Mature thoughts become separate projects, and immature ones
|
||||
go as parts of this project. Over time, there are more parts, so automation comes in handy here too.
|
||||
|
||||
- [Incomplete publications](archive/README.md) — archive without translation.
|
||||
- [Process management](bash_scripts/README.en.md) — scripts Bash.
|
||||
- [Incomplete publications](draft/README.md) — draft without translation.
|
||||
- [Avatars for repositories](pictures/README.md) — pictures.
|
||||
|
||||
### Build
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
внешний вид напоминает тему оформления по умолчанию на GitHub Pages. Оба помидора дополняют друг
|
||||
друга и похожи друг на друга, поэтому их можно использовать вместе на одном сайте.
|
||||
|
||||
- [Цветной помидор](https://hub.mos.ru/golovin/color-tomato-theme/blob/master/README.md) — выбор цвета во время сборки.
|
||||
- [Старый помидор](https://hub.mos.ru/golovin/older-tomato-theme/blob/master/README.md) — легковесная тема оформления.
|
||||
- [Цветной помидор](https://git.org.ru/golovin/color-tomato-theme/src/branch/master/README.md) — выбор цвета во время сборки.
|
||||
- [Старый помидор](https://git.org.ru/golovin/older-tomato-theme/src/branch/master/README.md) — легковесная тема оформления.
|
||||
|
||||
### Процесс
|
||||
|
||||
|
@ -39,8 +39,8 @@
|
|||
наступает, когда работы нет. Созревшие мысли становятся отдельными проектами, а несозревшие идут как части
|
||||
этого проекта. Со временем частей становится больше, поэтому автоматизация пригождается и здесь тоже.
|
||||
|
||||
- [Незавершённые публикации](archive/README.md) — архив.
|
||||
- [Управление процессами](bash_scripts/README.md) — скрипты Bash.
|
||||
- [Незавершённые публикации](draft/README.md) — черновик.
|
||||
- [Аватарки для репозиториев](pictures/README.md) — картинки.
|
||||
|
||||
### Сборка
|
||||
|
|
2
WIKI.md
2
WIKI.md
|
@ -23,7 +23,7 @@
|
|||
- [Поворот матрицы на 90 градусов](https://pomodoro3.mircloud.ru/ru/2021/12/12/matrix-rotation-90-degrees.html) — 12.12.2021.
|
||||
- [Оптимизация умножения матриц](https://pomodoro3.mircloud.ru/ru/2021/12/09/optimizing-matrix-multiplication.html) — 09.12.2021.
|
||||
4. Практическая философия, поэзия и юмор.
|
||||
- [Абстрактная модель работы мечты](https://pomodoro4.mircloud.ru/ru/2023/12/31/dream-job-abstract-model.html) — 31.12.2023.
|
||||
- [Алгоритм поиска работы мечты](https://pomodoro4.mircloud.ru/ru/2023/12/31/dream-job-searching-algorithm.html) — 31.12.2023.
|
||||
- [Поэзия начала 20 века](https://pomodoro4.mircloud.ru/ru/2022/01/07/poetry-early-20th-century.html) — 07.01.2022.
|
||||
- [История про лес, название утеряно](https://pomodoro4.mircloud.ru/ru/2022/01/05/forest-story-title-lost.html) — 05.01.2022.
|
||||
5. Рисуем картинки текстом.
|
||||
|
|
|
@ -25,13 +25,13 @@ of the repositories remain with the user. The directory structure for
|
|||
|
||||
<pre>
|
||||
.
|
||||
├─ <a href='https://hub.mos.ru/golovin/color-tomato-theme/blob/master/DIRECTORY_TREE.md'>color-tomato-theme</a>
|
||||
├─ <a href='https://hub.mos.ru/golovin/older-tomato-theme/blob/master/DIRECTORY_TREE.md'>older-tomato-theme</a>
|
||||
├─ <a href='https://hub.mos.ru/golovin/pomodoro/blob/master/DIRECTORY_TREE.md'>pomodoro</a>
|
||||
├─ <a href='https://hub.mos.ru/pomodoro/1/blob/master/DIRECTORY_TREE.md'>pomodoro1</a>
|
||||
├─ <a href='https://hub.mos.ru/pomodoro/2/blob/master/DIRECTORY_TREE.md'>pomodoro2</a>
|
||||
├─ <a href='https://hub.mos.ru/pomodoro/3/blob/master/DIRECTORY_TREE.md'>pomodoro3</a>
|
||||
├─ <a href='https://hub.mos.ru/pomodoro/4/blob/master/DIRECTORY_TREE.md'>pomodoro4</a>
|
||||
├─ <a href='https://hub.mos.ru/pomodoro/5/blob/master/DIRECTORY_TREE.md'>pomodoro5</a>
|
||||
└─ <a href='https://hub.mos.ru/pomodoro/6/blob/master/DIRECTORY_TREE.md'>pomodoro6</a>
|
||||
├─ <a href='https://git.org.ru/golovin/color-tomato-theme/src/branch/master/DIRECTORY_TREE.md'>color-tomato-theme</a>
|
||||
├─ <a href='https://git.org.ru/golovin/older-tomato-theme/src/branch/master/DIRECTORY_TREE.md'>older-tomato-theme</a>
|
||||
├─ <a href='https://git.org.ru/golovin/pomodoro/src/branch/master/DIRECTORY_TREE.md'>pomodoro</a>
|
||||
├─ <a href='https://git.org.ru/pomodoro/1/src/branch/master/DIRECTORY_TREE.md'>pomodoro1</a>
|
||||
├─ <a href='https://git.org.ru/pomodoro/2/src/branch/master/DIRECTORY_TREE.md'>pomodoro2</a>
|
||||
├─ <a href='https://git.org.ru/pomodoro/3/src/branch/master/DIRECTORY_TREE.md'>pomodoro3</a>
|
||||
├─ <a href='https://git.org.ru/pomodoro/4/src/branch/master/DIRECTORY_TREE.md'>pomodoro4</a>
|
||||
├─ <a href='https://git.org.ru/pomodoro/5/src/branch/master/DIRECTORY_TREE.md'>pomodoro5</a>
|
||||
└─ <a href='https://git.org.ru/pomodoro/6/src/branch/master/DIRECTORY_TREE.md'>pomodoro6</a>
|
||||
</pre>
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
|
||||
<pre>
|
||||
.
|
||||
├─ <a href='https://hub.mos.ru/golovin/color-tomato-theme/blob/master/DIRECTORY_TREE.md'>color-tomato-theme</a>
|
||||
├─ <a href='https://hub.mos.ru/golovin/older-tomato-theme/blob/master/DIRECTORY_TREE.md'>older-tomato-theme</a>
|
||||
├─ <a href='https://hub.mos.ru/golovin/pomodoro/blob/master/DIRECTORY_TREE.md'>pomodoro</a>
|
||||
├─ <a href='https://hub.mos.ru/pomodoro/1/blob/master/DIRECTORY_TREE.md'>pomodoro1</a>
|
||||
├─ <a href='https://hub.mos.ru/pomodoro/2/blob/master/DIRECTORY_TREE.md'>pomodoro2</a>
|
||||
├─ <a href='https://hub.mos.ru/pomodoro/3/blob/master/DIRECTORY_TREE.md'>pomodoro3</a>
|
||||
├─ <a href='https://hub.mos.ru/pomodoro/4/blob/master/DIRECTORY_TREE.md'>pomodoro4</a>
|
||||
├─ <a href='https://hub.mos.ru/pomodoro/5/blob/master/DIRECTORY_TREE.md'>pomodoro5</a>
|
||||
└─ <a href='https://hub.mos.ru/pomodoro/6/blob/master/DIRECTORY_TREE.md'>pomodoro6</a>
|
||||
├─ <a href='https://git.org.ru/golovin/color-tomato-theme/src/branch/master/DIRECTORY_TREE.md'>color-tomato-theme</a>
|
||||
├─ <a href='https://git.org.ru/golovin/older-tomato-theme/src/branch/master/DIRECTORY_TREE.md'>older-tomato-theme</a>
|
||||
├─ <a href='https://git.org.ru/golovin/pomodoro/src/branch/master/DIRECTORY_TREE.md'>pomodoro</a>
|
||||
├─ <a href='https://git.org.ru/pomodoro/1/src/branch/master/DIRECTORY_TREE.md'>pomodoro1</a>
|
||||
├─ <a href='https://git.org.ru/pomodoro/2/src/branch/master/DIRECTORY_TREE.md'>pomodoro2</a>
|
||||
├─ <a href='https://git.org.ru/pomodoro/3/src/branch/master/DIRECTORY_TREE.md'>pomodoro3</a>
|
||||
├─ <a href='https://git.org.ru/pomodoro/4/src/branch/master/DIRECTORY_TREE.md'>pomodoro4</a>
|
||||
├─ <a href='https://git.org.ru/pomodoro/5/src/branch/master/DIRECTORY_TREE.md'>pomodoro5</a>
|
||||
└─ <a href='https://git.org.ru/pomodoro/6/src/branch/master/DIRECTORY_TREE.md'>pomodoro6</a>
|
||||
</pre>
|
||||
|
|
|
@ -4,5 +4,4 @@ cd ../..
|
|||
filename="pomodoro-$(date '+%Y-%m-%d').zip"
|
||||
rm -rf "$filename"
|
||||
7z a -tzip -ssw -mx9 -r0 "$filename" ./* -xr!".idea" -xr!".git" -x!"*.iml" \
|
||||
-x!"*.gem" -x!"*.lock" -x!"*.zip" -x!"_site*" -x!".token_*" -x!".repo_*" \
|
||||
-xr!"DIRECTORY_TREE.md" -xr!"CONTRIBUTING.md" -x!"*LICENSE*"
|
||||
-x!"*.gem" -x!"*.lock" -x!"*.zip" -x!"_site*" -x!".token_*" -x!".repo_*"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
#remote="git.org.ru"
|
||||
remote="hub.mos.ru"
|
||||
#remote="gitea.com"
|
||||
remote="git.org.ru"
|
||||
#remote="hub.mos.ru"
|
||||
echo "Переключение домена удалённого репозитория: $remote"
|
||||
|
|
|
@ -1,18 +1,27 @@
|
|||
#!/bin/bash
|
||||
echo "Обновление домена удалённого репозитория в перекрёстных ссылках в описаниях."
|
||||
remote="git.org.ru" && source info_param.sh
|
||||
# экранируем точки в названии домена
|
||||
domain="${remote//"."/"\."}"
|
||||
# название домена в верхнем регистре
|
||||
DOMAIN="${domain^^}"
|
||||
cd ../.. # выходим из папки и из репозитория
|
||||
# обходим все репозитории, расположенные на одном уровне с текущим
|
||||
find . -type f -name 'README*.md' | sort -r | while read -r file; do
|
||||
echo "$remote => $file"
|
||||
# заменяем git.org.ru => hub.mos.ru => иначе наоборот
|
||||
# сбрасываем значения параметров
|
||||
sed -i 's/gitea\.com/tmp_stub/g' "$file"
|
||||
sed -i 's/GITEA\.COM/TMP_STUB/g' "$file"
|
||||
sed -i 's/git\.org\.ru/tmp_stub/g' "$file"
|
||||
sed -i 's/GIT\.ORG\.RU/TMP_STUB/g' "$file"
|
||||
sed -i 's/hub\.mos\.ru/tmp_stub/g' "$file"
|
||||
sed -i 's/HUB\.MOS\.RU/TMP_STUB/g' "$file"
|
||||
# устанавливаем значения параметров
|
||||
sed -i 's/tmp_stub/'$domain'/g' "$file"
|
||||
sed -i 's/TMP_STUB/'$DOMAIN'/g' "$file"
|
||||
if [ "$remote" == "hub.mos.ru" ]; then
|
||||
sed -i 's/git\.org\.ru/hub\.mos\.ru/g' "$file"
|
||||
sed -i 's/GIT\.ORG\.RU/HUB\.MOS\.RU/g' "$file"
|
||||
sed -i 's/src\/branch/blob/g' "$file"
|
||||
else
|
||||
sed -i 's/hub\.mos\.ru/git\.org\.ru/g' "$file"
|
||||
sed -i 's/HUB\.MOS\.RU/GIT\.ORG\.RU/g' "$file"
|
||||
sed -i 's/blob/src\/branch/g' "$file"
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -46,12 +46,12 @@ find . -mindepth 1 -maxdepth 1 -type d | sort -r | while read -r dir; do
|
|||
fi
|
||||
description+=" — https://$owner$repo.mircloud.ru"
|
||||
else
|
||||
description="Серия статических вёб-сайтов / Описание и оглавление"
|
||||
description="Описание и оглавление"
|
||||
fi
|
||||
elif [[ "$dir" =~ "color-tomato" ]]; then
|
||||
description="Цветной помидор / Тема оформления Jekyll"
|
||||
description="Тема оформления / Цветной помидор"
|
||||
elif [[ "$dir" =~ "older-tomato" ]]; then
|
||||
description="Старый помидор / Тема оформления Jekyll"
|
||||
description="Тема оформления / Старый помидор"
|
||||
fi
|
||||
# скрипт для создания удалённого репозитория
|
||||
{
|
||||
|
|
|
@ -61,17 +61,17 @@ if [ -z "$1" ] || [ "$1" == "options" ]; then
|
|||
\"has_pull_requests\": false,
|
||||
\"has_releases\": false,
|
||||
\"has_wiki\": $has_wiki }" -i
|
||||
## Метод API появился в версии 1.21.0
|
||||
# echo "Добавление аватарки для репозитория."
|
||||
# picture=$repo
|
||||
# if [ "$type" == "org" ]; then
|
||||
# picture="website"
|
||||
# fi
|
||||
# avatar=$(basenc "../pomodoro/pictures/$picture.jpg" --base64 -w0)
|
||||
# curl -X POST "https://$remote/api/v1/repos/$owner/$repo/avatar" \
|
||||
# -H "Authorization: token $token" \
|
||||
# -H "Accept: application/json" \
|
||||
# -H "Content-Type: application/json" -d "{ \"image\": \"$avatar\" }" -i
|
||||
# Метод API появился в версии 1.21.0
|
||||
echo "Добавление аватарки для репозитория."
|
||||
picture=$repo
|
||||
if [ "$type" == "org" ]; then
|
||||
picture="website"
|
||||
fi
|
||||
avatar=$(basenc "../pomodoro/pictures/$picture.jpg" --base64 -w0)
|
||||
curl -X POST "https://$remote/api/v1/repos/$owner/$repo/avatar" \
|
||||
-H "Authorization: token $token" \
|
||||
-H "Accept: application/json" \
|
||||
-H "Content-Type: application/json" -d "{ \"image\": \"$avatar\" }" -i
|
||||
if [ "$1" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -11,7 +11,7 @@ find .. -mindepth 1 -maxdepth 1 -type d -printf \
|
|||
'cd %h/%f && ./.repo_remote.sh "delete" >.repo_remote.log\0' | xargs -L1 -0 -P0 bash -c
|
||||
# 2 Создание репозиториев на сервере
|
||||
find .. -mindepth 1 -maxdepth 1 -type d -printf \
|
||||
'cd %h/%f && ./.repo_remote.sh "create" >>.repo_remote.log\0' | xargs -L1 -0 -P0 bash -c
|
||||
'cd %h/%f && ./.repo_remote.sh "create" >>.repo_remote.log\0' | xargs -L1 -0 -P2 bash -c
|
||||
# 3 Создание локальных репозиториев и отправка данных на сервер
|
||||
# 4 Изменение настроек репозиториев на сервере, отключение ненужного
|
||||
find .. -mindepth 1 -maxdepth 1 -type d -printf \
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|  |
|
||||
| bash_scripts |
|
||||
|  |
|
||||
| draft |
|
||||
|  |
|
||||
| archive |
|
||||
|  |
|
||||
| pictures |
|
||||
|  |
|
||||
|
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Loading…
Add table
Reference in a new issue