This commit is contained in:
Бахирев 2024-03-23 01:22:07 +03:00
parent 2c3593db63
commit c3e8f39cf0
9 changed files with 90 additions and 79 deletions

View file

@ -35,39 +35,40 @@ Visualization and analysis of your git repository data ([demo](https://assayo.on
- forecast cost;
### Table of contents
- [How to quickly view the number of commits?](#link-1)
- [How to concat authors?](#link-2)
- [How to export data from git?](#link-3)
- [For online viewing](#link-4)
- [For offline viewing](#link-5)
- [How to view the report?](#link-6)
- [Online](#headers)
- [Offline](#headers)
- [How to rebuild the report build?](#link-)
- [How to view a report on a group of microservices?](#link-)
- [How to brand the interface?](#link-)
- [How to sign commits?](#link-)
- [How to add checking for commit message?](#link-)
- [Use file commit-msg](#link-)
- [Use package pre-commit](#link-)
- [How to automate data collection?](#link-)
- [With backend](#link-)
- [Without backend](#link-)
- [DevOps (CI/CD)](#link-)
- [Public server](#link-)
- [Private server](#link-)
- [How to update the Docker image?](#link-)
- [How to add or edit a translation?](#link-)
- [RoadMap](#link-)
- [Contacts](#link-)
- [Online](#link-7)
- [Offline](#link-8)
- [How to rebuild the report build?](#link-9)
- [How to view a report on a group of microservices?](#link-10)
- [How to brand the interface?](#link-11)
- [How to sign commits?](#link-12)
- [How to add checking for commit message?](#link-13)
- [Use file commit-msg](#link-14)
- [Use package pre-commit](#link-15)
- [How to automate data collection?](#link-16)
- [With backend](#link-17)
- [Without backend](#link-18)
- [DevOps (CI/CD)](#link-19)
- [Public server](#link-20)
- [Private server](#link-21)
- [How to update the Docker image?](#link-22)
- [How to add or edit a translation?](#link-23)
- [RoadMap](#link-24)
- [Contacts](#link-25)
<a name="link-1"></a>
### How to quickly view the number of commits?
In the root directory of your project, run:
```
git shortlog -s -n -e
```
<a name="link-2"></a>
### How to concat authors?
In the root directory of your project, you need to create a `.mailmap` file.
Example of the contents of the file:
@ -79,56 +80,62 @@ Alex B <alex@mail.uk> <man64@yahoo.com>
```
Read more about the format of this file you can [here](https://git-scm.com/docs/gitmailmap).
<a name="link-3"></a>
### How to export data from git?
<a name="link-4"></a>
#### For online viewing
In the root directory of your project run:
```
git --no-pager log --numstat --oneline --all --reverse --date=iso-strict --pretty=format:"%ad>%cN>%cE>%s" > log.txt
```
<a name="link-5"></a>
#### For offline viewing
```
git --no-pager log --numstat --oneline --all --reverse --date=iso-strict --pretty=format:"%ad>%cN>%cE>%s" | sed -e 's/\\/\\\\/g' | sed -e 's/`/"/g' | sed -e 's/^/report.push(\`/g' | sed 's/$/\`\);/g' | sed 's/\$/_/g' > log.txt
```
Git will create a file `log.txt`.
This file contains data for show a report.
The difference between the online and offline format is the presence of a wrapper for strings. The offline format will be pulled up like a `js` file if you just opened `/build/index.html `
<a name="link-6"></a>
### How to view the report?
<a name="link-7"></a>
#### Online
- go to the [website](https://assayo.online/);
- click the “[Demo](https://assayo.online/demo)” button;
- drag the `log.txt` file into the browser window;
<a name="link-8"></a>
#### Offline
- download this repository;
- drag the `log.txt` file to the `/build` folder;
- run `/build/index.html`;
- or drag the `/build` folder to your repository (where the `log.txt` is located). You can change the name. For example, from `/build` to `/report`.
In this case, it is important that the `log.txt` file is generated by the command for offline viewing.
<a name="link-9"></a>
### How to rebuild the report build?
- download this repository
- run `npm install`
- run `npm run build`
- the new build will be in the `/build` folder
<a name="link-10"></a>
### How to view a report on a group of microservices?
- generate for each microservice file `log.txt` (`log-1.txt`, `log-2.txt`, `log-3.txt` and etc.)
- see “How to view an online report?”. At the last step, drag all the files at once into the browser window.
- see “How to see a report offline?”. At the second step, drag all microservice files (`log-1.txt`, `log-2.txt`, `log-3.txt` and etc.) to the report folder (`/build`).
<a name="link-11"></a>
### How to brand the interface?
You can create your own interface theme. Options:
- **Title**. You can set default document title in the URL parameter ```title```. Example: ```?title=You Company```
- **Visual theme**. To do this, you need to prepare a CSS file with new styles and specify its URL in the ```theme``` parameter. Example: ```?theme=//company.com/some.css```. You can use class names as selectors. Most of them do not change in new versions.
- **Language**. You can set language in the URL parameter ```lang```. Example: ```?lang=es```
<a name="link-12"></a>
### How to sign commits?
Follow the [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/). Example:
```
JIRA-1234 feat(profile): Added avatar for user
@ -138,22 +145,22 @@ JIRA-1234 feat(profile): Added avatar for user
- feature `(profile - new page on site or new function, use one (two) short wordor an abbreviation)`
- what problem were solved `(Added avatar for user)`
<a name="link-13"></a>
### How to add checking for commit message?
<a name="link-14"></a>
#### Use file `commit-msg`
1. Create file `commit-msg` in folder `.git/hooks/`
2. Add this text in file:
```
#!/usr/bin/env bash
if ! grep -iqE "(JIRA-[0-9]{1,5})(\s)(feat|fix|docs|style|refactor|test|chore)((\([a-z0-9_-]{1,}\)){0,})(:\s)([a-z]{1,})" "$1"; then
echo "Need commit message like: JIRA-12 fix(profile): some text. Read Semantic Commit Messages" >&2
exit 1
fi
```
<a name="link-15"></a>
#### Use package [pre-commit](https://www.npmjs.com/package/pre-commit)
1. Add in file `package.json` property `commit-msg`:
```
...
@ -165,29 +172,32 @@ fi
```
2. Run command `npm install pre-commit`
<a name="link-16"></a>
### How to automate data collection?
<a name="link-17"></a>
#### With backend
- use module [Assayo Crawler](https://github.com/bakhirev/assayo-crawler);
<a name="link-18"></a>
#### Without backend
- create a clone of the repository you need;
- copy the `build` folder to the root;
- open `build/index.html` in the browser and add it to bookmarks;
- add a shortcut to `build/assets/ci-cd.sh` to the startup folder (Windows);
Every time you restart the computer, the script will update statistics on all the data that automatically merged into the main branch.
<a name="link-19"></a>
### DevOps (CI/CD)
<a name="link-20"></a>
#### Public server
You can upload the data file for report construction to a public URL. And use the websites [assayo](https://assayo.online/?ref=github&lang=en) to visualize it.
```
https://assayo.online/demo/?dump=//you_site.com/some/log.txt
```
<a name="link-21"></a>
#### Private server
- download the [docker image](https://hub.docker.com/r/bakhirev/assayo);
- run it on your local network;
@ -197,9 +207,9 @@ http://assayo_url/?dump=//you_url/some/log.txt
assayo_url - URL of the assayo container, it listens on port 80;
you_url - URL of your container with git logs;
```
By default, the image will run at ```http://127.0.0.1:80/```. If it doesn't work, check if port 80 is free.
<a name="link-22"></a>
#### How to update the Docker image?
- remove metrics, alerts, old builds;
- run ```npm run build```
@ -208,6 +218,7 @@ By default, the image will run at ```http://127.0.0.1:80/```. If it doesn't work
- add tag ```docker tag IMAGE_ID bakhirev/assayo:latest```;
- push image to [Docker Hub](https://hub.docker.com/r/bakhirev/assayo);
<a name="link-23"></a>
### Releases are planned approximately once every six months. Whats next:
- more recommendations and achievements;
- annual/monthly summaries, report printing;
@ -216,13 +227,13 @@ By default, the image will run at ```http://127.0.0.1:80/```. If it doesn't work
- different roles for statistics (hiding finances);
- development of the backend, integration with other systems;
<a name="link-24"></a>
### How to add or edit a translation?
You can add a new translation or correct an existing one in the ```ts/translations/``` folder.
[Instruction](https://docs.github.com/ru/get-started/exploring-projects-on-github/contributing-to-a-project)
[Instruction](https://github.com/firstcontributions/first-contributions)
<a name="link-25"></a>
### Feedback, suggestions, comments
- telegramm [@bakhirev](https://t.me/bakhirev) (priority method of communication)
- [alexey-bakhirev@yandex.ru](mailto:alexey-bakhirev@yandex.ru)
- website [https://assayo.online/](https://assayo.online/)
- website [https://assayo.online/](https://assayo.online/?ref=github&lang=en)

View file

@ -7,9 +7,9 @@
> - [Deutsch](https://github.com/bakhirev/assayo/blob/main/documents/DE.md)
> - [日本語](https://github.com/bakhirev/assayo/blob/main/documents/JA.md)
# [Assayo](https://assayo.jp/?ref=github&lang=ru)
# [Assayo](https://assayo.online/?ref=github&lang=de)
Visualisierung und analyse ihrer Git-datenbank ([demo](https://assayo.jp/demo/?dump=./test.txt&lang=ru)).
Visualisierung und analyse ihrer Git-datenbank ([demo](https://assayo.online/demo/?dump=./test.txt&lang=ru)).
##### Mitarbeiter können den neuen arbeitsplatz bewerten
- arbeitsgeschwindigkeit;
@ -68,8 +68,8 @@ Der unterschied zwischen den formaten liegt im vorhandensein einer wrapper für
### Wie kann ich den bericht mit dem internet anzeigen?
- gehe zu [Webseite](https://assayo.jp/)
- den knopf drücken “[Demonstration](https://assayo.jp/demo?lang=ru)”
- gehe zu [Webseite](https://assayo.online/)
- den knopf drücken “[Demonstration](https://assayo.online/demo?lang=ru)”
- datei ziehen `log.txt` in das Browserfenster
### Wie kann ich einen bericht ohne internet anzeigen?
@ -122,9 +122,9 @@ Jedes mal, wenn der computer neu gestartet wird, aktualisiert das skript die sta
#### Öffentlicher server
Sie können eine datendatei zum erstellen eines berichts auf eine öffentliche URL hochladen. Sie können die Website verwenden, um sie zu visualisieren [assayo](https://assayo.jp/). Geben sie im URL-parameter die adresse an, an der die daten liegen ```dump```:
Sie können eine datendatei zum erstellen eines berichts auf eine öffentliche URL hochladen. Sie können die Website verwenden, um sie zu visualisieren [assayo](https://assayo.online/). Geben sie im URL-parameter die adresse an, an der die daten liegen ```dump```:
```
https://assayo.jp/demo/?dump=//you_site.com/some/log.txt
https://assayo.online/demo/?dump=//you_site.com/some/log.txt
```
#### Privater server
@ -153,10 +153,10 @@ Schau [haupt dokumentation](https://github.com/bakhirev/assayo/blob/main/documen
### Wie kann ich eine übersetzung hinzufügen oder bearbeiten?
Sie können eine neue übersetzung hinzufügen oder die aktuelle im abschnitt korrigieren ```ts/translations/```.
[Anleitung](https://docs.github.com/ru/get-started/exploring-projects-on-github/contributing-to-a-project)
[Anleitung](https://github.com/firstcontributions/first-contributions)
### Wünsche, Anregungen, Kommentare
- telegramm [@bakhirev](https://t.me/bakhirev) (vorrangiger kommunikationsweg)
- [alexey-bakhirev@yandex.ru](mailto:alexey-bakhirev@yandex.ru)
- web site [https://assayo.jp/](https://assayo.jp/)
- web site [https://assayo.online/](https://assayo.online/?ref=github&lang=de)

View file

@ -9,7 +9,7 @@
> - [Deutsch](https://github.com/bakhirev/assayo/blob/main/documents/DE.md)
> - [日本語](https://github.com/bakhirev/assayo/blob/main/documents/JA.md)
# [Assayo](https://assayo.online/?ref=github&lang=ru)
# [Assayo](https://assayo.online/?ref=github&lang=es)
Visualización y análisis de los datos de su repositorio git. ([демо](https://assayo.online/demo/?dump=./test.txt)).
@ -162,10 +162,10 @@ Por defecto, la imagen se ejecutará en la siguiente dirección ```http://127.0.
### ¿Cómo añadir o editar una traducción?
Puede agregar una nueva traducción o corregir la actual en la sección ```ts/translations/```.
[Instrucciones](https://docs.github.com/ru/get-started/exploring-projects-on-github/contributing-to-a-project)
[Instrucciones](https://github.com/firstcontributions/first-contributions)
### Deseos, sugerencias, comentarios
- telegramm [@bakhirev](https://t.me/bakhirev) (La forma preferencial de contacto)
- [alexey-bakhirev@yandex.ru](mailto:alexey-bakhirev@yandex.ru)
- sitio web [https://assayo.online/](https://assayo.online/)
- sitio web [https://assayo.online/](https://assayo.online/?ref=github&lang=es)

View file

@ -9,7 +9,7 @@
> - [Deutsch](https://github.com/bakhirev/assayo/blob/main/documents/DE.md)
> - [日本語](https://github.com/bakhirev/assayo/blob/main/documents/JA.md)
# [Assayo](https://assayo.online/?ref=github&lang=ru)
# [Assayo](https://assayo.online/?ref=github&lang=fr)
Visualisation et analyse des données de votre dépôt Git ([демо](https://assayo.online/demo/?dump=./test.txt)).
@ -161,10 +161,10 @@ Par défaut, l'image s'exécute à ```http://127.0.0.1:80/```. Si cela ne foncti
### Comment ajouter ou modifier une traduction?
Vous pouvez ajouter une nouvelle traduction ou corriger la traduction existante dans le section ```ts/translations/```.
[Instruction](https://docs.github.com/ru/get-started/exploring-projects-on-github/contributing-to-a-project)
[Instruction](https://github.com/firstcontributions/first-contributions)
### Souhaits, suggestions, commentaires
- telegramm [@bakhirev](https://t.me/bakhirev) (voie de communication prioritaire)
- [alexey-bakhirev@yandex.ru](mailto:alexey-bakhirev@yandex.ru)
- site [https://assayo.online/](https://assayo.online/)
- site [https://assayo.online/](https://assayo.online/?ref=github&lang=fr)

View file

@ -9,9 +9,9 @@
> - [Deutsch](https://github.com/bakhirev/assayo/blob/main/documents/DE.md)
> - [日本語](https://github.com/bakhirev/assayo/blob/main/documents/JA.md)
# [Assayo](https://assayo.jp/?ref=github&lang=ru)
# [Assayo](https://assayo.online/?ref=github&lang=ja)
データの可視化とGitレポジトリの分析 ([デモ](https://assayo.jp/demo/?dump=./test.txt&lang=ru)).
データの可視化とGitレポジトリの分析 ([デモ](https://assayo.online/demo/?dump=./test.txt&lang=ru)).
##### 従業員は新しい職場を評価することができます
- 働きのペース;
@ -70,8 +70,8 @@ Gitはファイルを作成します `log.txt`.
### インターネットを使ってレポートを見るにはどうすれば良いでしょうか。
- に切り替える [ウェブサイト](https://assayo.jp/)
- ボタンを押す “[デモ](https://assayo.jp/demo?lang=ru)”
- に切り替える [ウェブサイト](https://assayo.online/)
- ボタンを押す “[デモ](https://assayo.online/demo?lang=ru)”
- ファイルをドラッグ&ドロップする `log.txt` ブラウザウィンドウで
### インターネットを使用せずレポートを見るにはどうしたらよいでしょうか
@ -124,9 +124,9 @@ JIRA-1234 feat(profile): Added avatar for user
#### 公開サーバ
データをレポートビルド用に公開するファイルをURLで公開することができます。その視覚化は、サイト上で利用可能なツールを使用することで行うことができます。 [assayo](https://assayo.jp/). データがある場所のアドレスを、URLパラメータに入力してください。 ```dump```:
データをレポートビルド用に公開するファイルをURLで公開することができます。その視覚化は、サイト上で利用可能なツールを使用することで行うことができます。 [assayo](https://assayo.online/). データがある場所のアドレスを、URLパラメータに入力してください。 ```dump```:
```
https://assayo.jp/demo/?dump=//you_site.com/some/log.txt
https://assayo.online/demo/?dump=//you_site.com/some/log.txt
```
#### プライベートサーバー
@ -155,10 +155,10 @@ you_url - gitのログのコンテナーのURLアドレス;
### 翻訳を追加または編集するにはどうすればいいでしょうか。
新しい翻訳を追加するか、現在の翻訳を修正するために、以下のセクションでそれを行うことができます: ```ts/translations/```.
[取扱説明書](https://docs.github.com/ru/get-started/exploring-projects-on-github/contributing-to-a-project)
[取扱説明書](https://github.com/firstcontributions/first-contributions)
### 願い、提案、コメント
- telegramm [@bakhirev](https://t.me/bakhirev) (優先通信方式)
- [alexey-bakhirev@yandex.ru](mailto:alexey-bakhirev@yandex.ru)
- ウェブサイト [https://assayo.jp/](https://assayo.jp/)
- ウェブサイト [https://assayo.online/](https://assayo.online/?ref=github&lang=ja)

View file

@ -9,9 +9,9 @@
> - [Deutsch](https://github.com/bakhirev/assayo/blob/main/documents/DE.md)
> - [日本語](https://github.com/bakhirev/assayo/blob/main/documents/JA.md)
# [Assayo](https://assayo.jp/?ref=github&lang=ru)
# [Assayo](https://assayo.online/?ref=github&lang=pt)
Visualização e análise de dados do seu repositório git ([demonstração](https://assayo.jp/demo/?dump=./test.txt&lang=ru)).
Visualização e análise de dados do seu repositório git ([demonstração](https://assayo.online/demo/?dump=./test.txt&lang=ru)).
##### Funcionario de avaliar o novo local de trabalho
- ritmo de trabalho;
@ -70,8 +70,8 @@ A diferença entre os formatos está na existência de uma envoltória para as l
### Como ver o relatório da Internet?
- Ir para [site](https://assayo.jp/)
- Pressione o botão “[Demonstração](https://assayo.jp/demo?lang=ru)”
- Ir para [site](https://assayo.online/)
- Pressione o botão “[Demonstração](https://assayo.online/demo?lang=ru)”
- Arrastar e largar `log.txt` na janela do navegador
### Como visualizar o relatório sem internet?
@ -124,9 +124,9 @@ A cada reinício do computador, o script atualiza a estatística com todos os da
#### Servidor Público
Você pode disponibilizar o arquivo com os dados para construção do relatório em um URL público. Para visualizá-lo, você pode usar um site [assayo](https://assayo.jp/). Especifique o endereço onde os dados estão localizados no parâmetro de URL ```dump```:
Você pode disponibilizar o arquivo com os dados para construção do relatório em um URL público. Para visualizá-lo, você pode usar um site [assayo](https://assayo.online/). Especifique o endereço onde os dados estão localizados no parâmetro de URL ```dump```:
```
https://assayo.jp/demo/?dump=//you_site.com/some/log.txt
https://assayo.online/demo/?dump=//you_site.com/some/log.txt
```
#### Servidor Privado
@ -155,10 +155,10 @@ Vide [documentação básica](https://github.com/bakhirev/assayo/blob/main/docum
### Como adicionar ou editar uma tradução?
Você pode adicionar uma nova tradução ou corrigir uma existente na seção ```ts/translations/```.
[Instrução](https://docs.github.com/ru/get-started/exploring-projects-on-github/contributing-to-a-project)
[Instrução](https://github.com/firstcontributions/first-contributions)
### Sugestões, sugestões, comentários
- telegramm [@bakhirev](https://t.me/bakhirev) (método de comunicação prioritário)
- [alexey-bakhirev@yandex.ru](mailto:alexey-bakhirev@yandex.ru)
- site [https://assayo.jp/](https://assayo.jp/)
- site [https://assayo.online/](https://assayo.online/?ref=github&lang=pt)

View file

@ -224,10 +224,10 @@ you_url - URL адресс вашего контейнера с логами
### Как добавить или отредактировать перевод?
Вы можете добавить новый перевод или поправить текущий в разделе ```ts/translations/```.
[Инструкция](https://docs.github.com/ru/get-started/exploring-projects-on-github/contributing-to-a-project)
[Инструкция](https://github.com/firstcontributions/first-contributions)
### Пожелания, предложения, замечания
- telegramm [@bakhirev](https://t.me/bakhirev) (приоритетный способ связи)
- [alexey-bakhirev@yandex.ru](mailto:alexey-bakhirev@yandex.ru)
- сайт [https://assayo.online/](https://assayo.online/)
- сайт [https://assayo.online/](https://assayo.online/?ref=github&lang=ru)

View file

@ -149,7 +149,7 @@ you_url - URL адресс вашего контейнера с логами
### Как добавить или отредактировать перевод?
Вы можете добавить новый перевод или поправить текущий в разделе ```ts/translations/```.
[Инструкция](https://docs.github.com/ru/get-started/exploring-projects-on-github/contributing-to-a-project)
[Инструкция](https://github.com/firstcontributions/first-contributions)
### Пожелания, предложения, замечания
- telegramm [@bakhirev](https://t.me/bakhirev) (приоритетный способ связи)

View file

@ -9,9 +9,9 @@
> - [Deutsch](https://github.com/bakhirev/assayo/blob/main/documents/DE.md)
> - [日本語](https://github.com/bakhirev/assayo/blob/main/documents/JA.md)
# [Assayo](https://assayo.jp/?ref=github&lang=ru)
# [Assayo](https://assayo.online/?ref=github&lang=zh)
对您的git仓库的数据进行可视化和分析 ([示范表现](https://assayo.jp/demo/?dump=./test.txt&lang=ru)).
对您的git仓库的数据进行可视化和分析 ([示范表现](https://assayo.online/demo/?dump=./test.txt&lang=ru)).
##### 工作人员可以评估新工作场所
- 工作节奏;
@ -70,8 +70,8 @@ Git会创建一个文件 `log.txt`.
### 如何在线查看报告?
- 切换到 [网站](https://assayo.jp/)
- 按下按钮 “[示范](https://assayo.jp/demo?lang=ru)”
- 切换到 [网站](https://assayo.online/)
- 按下按钮 “[示范](https://assayo.online/demo?lang=ru)”
- 拖放文件 `log.txt` 在浏览器窗口中
### 如何在没有网络环境下查看报告?
@ -124,9 +124,9 @@ JIRA-1234 feat(profile): Added avatar for user
#### 公共服务器
您可以将数据构建报告文件发布到公共URL可以使用网站来显示它。 [assayo](https://assayo.jp/). 指定数据所在的地址作为URL参数 ```dump```:
您可以将数据构建报告文件发布到公共URL可以使用网站来显示它。 [assayo](https://assayo.online/). 指定数据所在的地址作为URL参数 ```dump```:
```
https://assayo.jp/demo/?dump=//you_site.com/some/log.txt
https://assayo.online/demo/?dump=//you_site.com/some/log.txt
```
#### 专用服务器
@ -155,10 +155,10 @@ you_url - git日志的容器的URL地址;
### 如何添加或编辑翻译?
您可以在“翻译”部分添加新翻译或更正当前翻译。 ```ts/translations/```.
[指示手册](https://docs.github.com/ru/get-started/exploring-projects-on-github/contributing-to-a-project)
[指示手册](https://github.com/firstcontributions/first-contributions)
### 愿望,建议,意见
- telegramm [@bakhirev](https://t.me/bakhirev) (优先通信方法)
- [alexey-bakhirev@yandex.ru](mailto:alexey-bakhirev@yandex.ru)
- 网站 [https://assayo.jp/](https://assayo.jp/)
- 网站 [https://assayo.online/](https://assayo.online/?ref=github&lang=zh)