Fix bunch of grammar mistakes
This commit is contained in:
@@ -52,7 +52,7 @@ verbose = 8
|
|||||||
|
|
||||||
[-ValuesAndExpressions::ProhibitEmptyQuotes]
|
[-ValuesAndExpressions::ProhibitEmptyQuotes]
|
||||||
# cause we consider following correct and useful: my $var = '';
|
# 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]
|
[-ValuesAndExpressions::ProhibitNoisyQuotes]
|
||||||
# Other people, other opinions: "," is better readable than qw(,)
|
# Other people, other opinions: "," is better readable than qw(,)
|
||||||
@@ -92,4 +92,3 @@ lib_sections = NAME | VERSION | DESCRIPTION | AUTHOR | LICENSE AND COPYRIGHT
|
|||||||
|
|
||||||
[-ControlStructures::ProhibitDeepNests]
|
[-ControlStructures::ProhibitDeepNests]
|
||||||
# Have to use it, so fuckoff
|
# Have to use it, so fuckoff
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ When you require to perform this procedure?
|
|||||||
Why do i have to perform this procedure?
|
Why do i have to perform this procedure?
|
||||||
- Some modules are vendored with bot
|
- Some modules are vendored with bot
|
||||||
- BDB can vary its on-disk format depending on dbd version that linked with
|
- 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?
|
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.
|
Procedure steps.
|
||||||
@@ -22,8 +22,8 @@ On source system perform following steps:
|
|||||||
|
|
||||||
On target system perform these steps:
|
On target system perform these steps:
|
||||||
1. remove vendor_perl dir in bot' directory
|
1. remove vendor_perl dir in bot' directory
|
||||||
2. run "bash bootstrap.sh" (no quotes) and wait until it suscessfuly build and
|
2. run "bash bootstrap.sh" (no quotes) and wait until it successfully build and
|
||||||
installl required modules.
|
install required modules.
|
||||||
3. run perl bin/cache_import.pl script. It should create cache and exit
|
3. run perl bin/cache_import.pl script. It should create cache and exit
|
||||||
silently.
|
silently.
|
||||||
|
|
||||||
|
|||||||
14
README.md
14
README.md
@@ -38,11 +38,11 @@ and all libraries should be downloaded, built, tested and installed.
|
|||||||
## Running
|
## Running
|
||||||
|
|
||||||
This bot does not [ultilize][4] webhooks, so in order to run it only well
|
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
|
### 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.
|
and API keys and secrets in order to work.
|
||||||
|
|
||||||
#### OpenWeatherMap
|
#### OpenWeatherMap
|
||||||
@@ -58,13 +58,13 @@ It is still impossible to disable this plugin, but "I'm working on it".
|
|||||||
#### Imgur
|
#### Imgur
|
||||||
|
|
||||||
This plugin "just exists" and is actually used nowhere around the code.
|
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.
|
should sign in imgur and get access token.
|
||||||
|
|
||||||
Actually at this time this "plugin" can be stub-ed with default config values.
|
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]
|
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.
|
[this][11] one.
|
||||||
|
|
||||||
#### Flickr
|
#### Flickr
|
||||||
@@ -77,13 +77,13 @@ and secrets from flickr api.
|
|||||||
Before using it bot must be bootstrapped via **`bootstrap.sh`**.
|
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.
|
[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
|
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.
|
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
|
Run **bin/flickr_init.pl** first time and follow on screen instructions - copy and
|
||||||
paste given link to browser login to flickr account adn yo'll be redirected to
|
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
|
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
|
**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.
|
under data/image directory (in default config). You're done.
|
||||||
|
|||||||
26
README_RU.md
26
README_RU.md
@@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
## Что это такое
|
## Что это такое
|
||||||
|
|
||||||
Это бот основанный на перловых модулях [Telegram::Bot][1] для работы в
|
Это бот, основанный на перловых модулях [Telegram::Bot][1] для работы в
|
||||||
мессенджере Telegram и [Hailo][2] для генерации "умной" беседы.
|
мессенджере Telegram и [Hailo][2] для генерации "умной" беседы.
|
||||||
|
|
||||||
Для корректной работы пришлось форкнуть [Telegram::Bot][1] чтобы обновить
|
Для корректной работы, пришлось форкнуть [Telegram::Bot][1], чтобы обновить
|
||||||
интерфейс API до [Telegram Bot API v5][3]. Для избежания неоднозначностей модуль
|
интерфейс API до [Telegram Bot API v5][3]. Для избежания неоднозначностей, модуль
|
||||||
пришлось переименовать и теперь он идёт в составе бота. Возможно, когда модуль
|
пришлось переименовать и теперь он идёт в составе бота. Возможно, когда модуль
|
||||||
отлежится и будет похож на стабильный, он стнет самостоятельным и поселится на
|
отлежится и будет похож на стабильный, он стнет самостоятельным и поселится на
|
||||||
metacpan.org
|
metacpan.org
|
||||||
|
|
||||||
Конфиг бота должен лежать в **data/config.json**, пример конфига расположен в
|
Конфиг бота должен лежать в **data/config.json**. Пример конфига расположен в
|
||||||
**data/sample_config.json**.
|
**data/sample_config.json**.
|
||||||
|
|
||||||
Бота можно запустить через **bin/aleesa-telegram-bot** и он взлетит как юниксовый
|
Бота можно запустить через **bin/aleesa-telegram-bot** и он взлетит, как юниксовый
|
||||||
демон (сделает двойной fork() и отцепится от stdio).
|
демон (сделает двойной 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,
|
группа пакетов , perl, perl-devel, perl-local-lib, perl-app-cpanm, sqlite-devel,
|
||||||
zlib-devel, openssl-devel, libdb4-devel (Berkeley DB devel), make.
|
zlib-devel, openssl-devel, libdb4-devel (Berkeley DB devel), make.
|
||||||
|
|
||||||
После установки этих пакетов можно будет запустить:
|
После установки этих пакетов, можно будет запустить:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ bash bootstrap.sh
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
и по идее всё что нужно будет выкачено, собрано и разложено куда надо.
|
и, по идее, всё что нужно будет выкачено, собрано и разложено куда надо.
|
||||||
|
|
||||||
## Запуск и работа
|
## Запуск и работа
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ bash bootstrap.sh
|
|||||||
|
|
||||||
#### OpenWeatherMap
|
#### OpenWeatherMap
|
||||||
|
|
||||||
Для работы погодного плагина надо [заргистрироваться][5], [залогиниться][6] и
|
Для работы погодного плагина, надо [заргистрироваться][5], [залогиниться][6] и
|
||||||
[создать][7] api key. Free plan предлагает всё необхдимое для работы "плагина".
|
[создать][7] api key. Free plan предлагает всё необхдимое для работы "плагина".
|
||||||
|
|
||||||
Когда api key будет создан, его нужно вписать в **config.json** "секцию"
|
Когда api key будет создан, его нужно вписать в **config.json** "секцию"
|
||||||
@@ -70,7 +70,7 @@ openweathermap в качестве appid. На этом всё.
|
|||||||
"картиночных" командах бота.
|
"картиночных" командах бота.
|
||||||
|
|
||||||
Есть скрипт, который поможет с регистрацией приложения в api Flickr -
|
Есть скрипт, который поможет с регистрацией приложения в api Flickr -
|
||||||
**bin/flickr_init.pl** он достанет все нужные ключи и секреты к ним.
|
**bin/flickr_init.pl**, он достанет все нужные ключи и секреты к ним.
|
||||||
|
|
||||||
До запуска этого скрипта, бот должен быть забутстраплен через **`bootstrap.sh`**.
|
До запуска этого скрипта, бот должен быть забутстраплен через **`bootstrap.sh`**.
|
||||||
|
|
||||||
@@ -78,12 +78,12 @@ openweathermap в качестве appid. На этом всё.
|
|||||||
*разлогиньтесь*, это нужно, чтобы потом проще было достать параметр verifier.
|
*разлогиньтесь*, это нужно, чтобы потом проще было достать параметр verifier.
|
||||||
|
|
||||||
Запишите [app key и secret][13] в **config.json**. Удостоверьтесь, что параметр
|
Запишите [app key и secret][13] в **config.json**. Удостоверьтесь, что параметр
|
||||||
"verifier" в конфиге либо закоменчен либо отсутствует.
|
"verifier" в конфиге либо закоменчен, либо отсутствует.
|
||||||
|
|
||||||
Запустите **bin/flickr_init.pl** и следуте предлагаемым инструкциям - в итоге
|
Запустите **bin/flickr_init.pl** и следуте предлагаемым инструкциям - в итоге
|
||||||
будет дана ссылка, которую надо скопипастить в браузер. По ссылке предложат
|
будет дана ссылка, которую надо скопипастить в браузер. По ссылке предложат
|
||||||
залогиниться, далее надо будет разрешить приложению просматривать профиль и
|
залогиниться, далее надо будет разрешить приложению просматривать профиль и,
|
||||||
через один-два редиректа вы попадёте на example.com. Из адресной строки браузера
|
через один-два редиректа, вы попадёте на example.com. Из адресной строки браузера
|
||||||
надо скопировать параметр "verifier" и вписать его в **config.json**.
|
надо скопировать параметр "verifier" и вписать его в **config.json**.
|
||||||
|
|
||||||
Чтобы сохранить в бд плагина API access token для нормальной работы "плагина",
|
Чтобы сохранить в бд плагина API access token для нормальной работы "плагина",
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ sub RandomCommonPhrase {
|
|||||||
'Повтори свой вопрос, не поняла',
|
'Повтори свой вопрос, не поняла',
|
||||||
'Выйди и зайди нормально',
|
'Выйди и зайди нормально',
|
||||||
'Я подумаю',
|
'Я подумаю',
|
||||||
'Даже не знаю что на это ответить',
|
'Даже не знаю, что на это ответить',
|
||||||
'Ты упал такие вопросы девочке задавать?',
|
'Ты упал такие вопросы девочке задавать?',
|
||||||
'Можно и так, но не уверена',
|
'Можно и так, но не уверена',
|
||||||
'А как ты думаешь?',
|
'А как ты думаешь?',
|
||||||
|
|||||||
Reference in New Issue
Block a user