1

Fix bunch of grammar mistakes

This commit is contained in:
eleksir
2021-10-17 01:14:38 +03:00
parent bb399a5051
commit 1abb95622a
5 changed files with 26 additions and 27 deletions

View File

@@ -52,7 +52,7 @@ verbose = 8
[-ValuesAndExpressions::ProhibitEmptyQuotes]
# cause we consider following correct and useful: my $var = '';
# the recomended use of q{} looks too complex: my $var = q{};
# the recommended use of q{} looks too complex: my $var = q{};
[-ValuesAndExpressions::ProhibitNoisyQuotes]
# Other people, other opinions: "," is better readable than qw(,)
@@ -92,4 +92,3 @@ lib_sections = NAME | VERSION | DESCRIPTION | AUTHOR | LICENSE AND COPYRIGHT
[-ControlStructures::ProhibitDeepNests]
# Have to use it, so fuckoff

View File

@@ -7,10 +7,10 @@ When you require to perform this procedure?
Why do i have to perform this procedure?
- Some modules are vendored with bot
- BDB can vary its on-disk format depending on dbd version that linked with
perl interpreter itself and its apropriate module.
perl interpreter itself and its appropriate module.
How can i guess that i miss to perform this procedure?
Most notable sympthom is 'BDB0091 DB_VERSION_MISMATCH' in logs and bot admin settings are lost.
Most notable symptom is 'BDB0091 DB_VERSION_MISMATCH' in logs and bot admin settings are lost.
Procedure steps.
@@ -22,8 +22,8 @@ On source system perform following steps:
On target system perform these steps:
1. remove vendor_perl dir in bot' directory
2. run "bash bootstrap.sh" (no quotes) and wait until it suscessfuly build and
installl required modules.
2. run "bash bootstrap.sh" (no quotes) and wait until it successfully build and
install required modules.
3. run perl bin/cache_import.pl script. It should create cache and exit
silently.

View File

@@ -38,11 +38,11 @@ and all libraries should be downloaded, built, tested and installed.
## Running
This bot does not [ultilize][4] webhooks, so in order to run it only well
internet connection is requied, no public-available ip address is needed.
internet connection is required, no public-available ip address is needed.
### Additional Settings to be performed in order to run bot as it designed
There are some "plugins" that requires registration on thrird party services
There are some "plugins" that requires registration on third party services
and API keys and secrets in order to work.
#### OpenWeatherMap
@@ -58,13 +58,13 @@ It is still impossible to disable this plugin, but "I'm working on it".
#### Imgur
This plugin "just exists" and is actually used nowhere around the code.
Anyway, to make use of it besides registering apropriate handler in code, you
Anyway, to make use of it besides registering appropriate handler in code, you
should sign in imgur and get access token.
Actually at this time this "plugin" can be stub-ed with default config values.
Anyway, to fetch access token you should [login][8] and perform [registration][9]
of your app. Then you should authorise your app according to [this][10] manual. Or
of your app. Then you should authorize your app according to [this][10] manual. Or
[this][11] one.
#### Flickr
@@ -77,13 +77,13 @@ and secrets from flickr api.
Before using it bot must be bootstrapped via **`bootstrap.sh`**.
[Login][11] and create an [app][12] in your flickr account. Then *logout* flickr account.
(It is required in order to properly get "verfier" parameter later).
(It is required in order to properly get "verifier" parameter later).
Put your [app key and secret][13] to **config.json**. Ensure that "verifier" parameter
in Flickr-related part of config either absent or commented out.
Run **bin/flickr_init.pl** first time and follow on screen instuctions - copy and
paste given link to browser login to flickr account adn yo'll be redirected to
Run **bin/flickr_init.pl** first time and follow on screen instructions - copy and
paste given link to browser login to flickr account and you'll be redirected to
example.com. Check address bar in browser to get so-called "verifier", put it in
**config.json**. Then run **bin/flickr_init.pl** again to store API access token in db
under data/image directory (in default config). You're done.

View File

@@ -2,19 +2,19 @@
## Что это такое
Это бот основанный на перловых модулях [Telegram::Bot][1] для работы в
Это бот, основанный на перловых модулях [Telegram::Bot][1] для работы в
мессенджере Telegram и [Hailo][2] для генерации "умной" беседы.
Для корректной работы пришлось форкнуть [Telegram::Bot][1] чтобы обновить
интерфейс API до [Telegram Bot API v5][3]. Для избежания неоднозначностей модуль
Для корректной работы, пришлось форкнуть [Telegram::Bot][1], чтобы обновить
интерфейс API до [Telegram Bot API v5][3]. Для избежания неоднозначностей, модуль
пришлось переименовать и теперь он идёт в составе бота. Возможно, когда модуль
отлежится и будет похож на стабильный, он стнет самостоятельным и поселится на
metacpan.org
Конфиг бота должен лежать в **data/config.json**, пример конфига расположен в
Конфиг бота должен лежать в **data/config.json**. Пример конфига расположен в
**data/sample_config.json**.
Бота можно запустить через **bin/aleesa-telegram-bot** и он взлетит как юниксовый
Бота можно запустить через **bin/aleesa-telegram-bot** и он взлетит, как юниксовый
демон (сделает двойной fork() и отцепится от stdio).
## Установка
@@ -22,11 +22,11 @@ metacpan.org
Чтобы запустить приложение, его надо "забурстрапить" - загрузить и собрать все
необходимые зависимости.
Понадобится perl-5.18 а желательно новее, "Development Tools" или подобная
Понадобится perl-5.18, а желательно новее, "Development Tools" или подобная
группа пакетов , perl, perl-devel, perl-local-lib, perl-app-cpanm, sqlite-devel,
zlib-devel, openssl-devel, libdb4-devel (Berkeley DB devel), make.
После установки этих пакетов можно будет запустить:
После установки этих пакетов, можно будет запустить:
```bash
@@ -34,7 +34,7 @@ bash bootstrap.sh
```
и по идее всё что нужно будет выкачено, собрано и разложено куда надо.
и, по идее, всё что нужно будет выкачено, собрано и разложено куда надо.
## Запуск и работа
@@ -49,7 +49,7 @@ bash bootstrap.sh
#### OpenWeatherMap
Для работы погодного плагина надо [заргистрироваться][5], [залогиниться][6] и
Для работы погодного плагина, надо [заргистрироваться][5], [залогиниться][6] и
[создать][7] api key. Free plan предлагает всё необхдимое для работы "плагина".
Когда api key будет создан, его нужно вписать в **config.json** "секцию"
@@ -70,7 +70,7 @@ openweathermap в качестве appid. На этом всё.
"картиночных" командах бота.
Есть скрипт, который поможет с регистрацией приложения в api Flickr -
**bin/flickr_init.pl** он достанет все нужные ключи и секреты к ним.
**bin/flickr_init.pl**, он достанет все нужные ключи и секреты к ним.
До запуска этого скрипта, бот должен быть забутстраплен через **`bootstrap.sh`**.
@@ -78,12 +78,12 @@ openweathermap в качестве appid. На этом всё.
*разлогиньтесь*, это нужно, чтобы потом проще было достать параметр verifier.
Запишите [app key и secret][13] в **config.json**. Удостоверьтесь, что параметр
"verifier" в конфиге либо закоменчен либо отсутствует.
"verifier" в конфиге либо закоменчен, либо отсутствует.
Запустите **bin/flickr_init.pl** и следуте предлагаемым инструкциям - в итоге
будет дана ссылка, которую надо скопипастить в браузер. По ссылке предложат
залогиниться, далее надо будет разрешить приложению просматривать профиль и
через один-два редиректа вы попадёте на example.com. Из адресной строки браузера
залогиниться, далее надо будет разрешить приложению просматривать профиль и,
через один-два редиректа, вы попадёте на example.com. Из адресной строки браузера
надо скопировать параметр "verifier" и вписать его в **config.json**.
Чтобы сохранить в бд плагина API access token для нормальной работы "плагина",

View File

@@ -45,7 +45,7 @@ sub RandomCommonPhrase {
'Повтори свой вопрос, не поняла',
'Выйди и зайди нормально',
'Я подумаю',
'Даже не знаю что на это ответить',
'Даже не знаю, что на это ответить',
'Ты упал такие вопросы девочке задавать?',
'Можно и так, но не уверена',
'А как ты думаешь?',