This commit is contained in:
InsanusMokrassar committed 2023-10-01 09:48:10 +00:00
1 parent 61bd1d1e6f
commit 0f3a55c756
4 files changed
+84 -38

No files matched your search

+1 -1
View File
@@ -1 +1 @@
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Insanus Mokrassar libraries home","text":"<p>Hello :) It is my libraries docs place and I glad to welcome you here. I hope, this documentation place will help you.</p>"},{"location":"index.html#projects","title":"Projects","text":"Common and independent TelegramBotAPI Plagubot"},{"location":"index.html#dependencies-graph","title":"Dependencies graph:","text":"%%{init: {\"flowchart\": {\"defaultRenderer\": \"elk\"}} }%% flowchart TB KSLog[KSLog] MicroUtils[MicroUtils] TelegramBotAPI[TelegramBotAPI] TelegramBotAPI-examples[TelegramBotAPI-examples ] PlaguBot[PlaguBot] TelegramBotAPILibraries[TelegramBotAPILibraries] PlaguBotPlugins[PlaguBotPlugins] PlaguBotExample[PlaguBotExample] BooruGrabberTelegramBot[BooruGrabberTelegramBot] SauceNaoTelegramBot[SauceNaoTelegramBot] PlaguPoster[PlaguPoster] PlaguBotSuggestionsBot[PlaguBotSuggestionsBot] TelegramBotTutorial[TelegramBotTutorial] Krontab[Krontab] KJSUiKit[KJSUiKit] SauceNaoAPI[SauceNaoAPI] Navigation[Navigation] TelegramBotAPI-bot_template[TelegramBotAPI-bot_template] PlaguBotPluginTemplate[PlaguBotPluginTemplate] PlaguBotBotTemplate[PlaguBotBotTemplate] MicroUtils --&gt; KSLog TelegramBotAPI --&gt; MicroUtils TelegramBotAPI-examples --&gt; TelegramBotAPI PlaguBot --&gt; TelegramBotAPI TelegramBotAPILibraries --&gt; PlaguBot PlaguBotPlugins --&gt; TelegramBotAPILibraries PlaguBotExample --&gt; PlaguBotPlugins BooruGrabberTelegramBot --&gt; TelegramBotAPI BooruGrabberTelegramBot --&gt; Krontab SauceNaoTelegramBot --&gt; TelegramBotAPI SauceNaoTelegramBot --&gt; SauceNaoAPI TelegramBotTutorial --&gt; PlaguBotPlugins PlaguBotSuggestionsBot --&gt; PlaguBotPlugins PlaguPoster --&gt; PlaguBotPlugins PlaguPoster --&gt; Krontab SauceNaoAPI --&gt; MicroUtils Navigation --&gt; MicroUtils TelegramBotAPI-bot_template -.- TelegramBotAPI PlaguBotPluginTemplate -.- PlaguBot PlaguBotBotTemplate -.- PlaguBot"},{"location":"krontab/index.html","title":"krontab","text":"<p>Library was created to give oppotunity to launch some things from time to time according to some schedule in runtime of applications.</p>"},{"location":"krontab/index.html#how-to-use","title":"How to use","text":"<p>There are several ways to configure and use this library:</p> <ul> <li>From some string</li> <li>From builder</li> </ul> <p>Anyway, to start some action from time to time you will need to use one of extensions/functions:</p> <pre><code>val kronScheduler = /* creating of KronScheduler instance */;\nkronScheduler.doWhile {\n// some action\ntrue // true - repeat on next time\n}\n</code></pre>"},{"location":"krontab/index.html#including-in-project","title":"Including in project","text":"<p>If you want to include <code>krontab</code> in your project, just add next line to your dependencies part:</p> <pre><code>implementation \"dev.inmo:krontab:$krontab_version\"\n</code></pre> <p>Next version is the latest currently for the library:</p> <p></p> <p>For old version of Gradle, instead of <code>implementation</code> word developers must use <code>compile</code>.</p>"},{"location":"krontab/index.html#config-from-string","title":"Config from string","text":"<p>Developers can use more simple way to configure repeat times is string. String configuring like a <code>crontab</code>, but with a little bit different meanings:</p> <pre><code>/--------------- Seconds\n| /------------- Minutes\n| | /----------- Hours\n| | | /--------- Days of months\n| | | | /------- Months\n| | | | | /----- (optional) Year\n| | | | | | /--- (optional) Timezone offset\n| | | | | | | / (optional) Week days\n* * * * * * 0o *w\n</code></pre> <p>It is different with original <code>crontab</code> syntax for the reason, that expected that in practice developers will use seconds and minutes with more probability than months (for example) or even years. In fact, developers will use something like:</p> <pre><code>doWhile(\"/5 * * * *\") {\nprintln(\"Called\")\ntrue // true - repeat on next time\n}\n</code></pre> <p>An other version:</p> <pre><code>doInfinity(\"/5 * * * *\") {\nprintln(\"Called\")\n}\n</code></pre> <p>Both of examples will print <code>Called</code> message every five seconds.</p>"},{"location":"krontab/index.html#config-via-builder","title":"Config via builder","text":"<p>Also, this library currently supports DSL for creating the same goals:</p> <pre><code>val kronScheduler = buildSchedule {\nseconds {\nfrom (0) every 5\n}\n}\nkronScheduler.doWhile {\nprintln(\"Called\")\ntrue // true - repeat on next time\n}\n</code></pre> <p>Or</p> <pre><code>val kronScheduler = buildSchedule {\nseconds {\n0 every 5\n}\n}\nkronScheduler.doWhile {\nprintln(\"Called\")\ntrue // true - repeat on next time\n}\n</code></pre> <p>Or</p> <pre><code>val kronScheduler = bLine truncated
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Insanus Mokrassar libraries home","text":"<p>Hello :) It is my libraries docs place and I glad to welcome you here. I hope, this documentation place will help you.</p>"},{"location":"index.html#projects","title":"Projects","text":"Common and independent TelegramBotAPI Plagubot"},{"location":"index.html#dependencies-graph","title":"Dependencies graph:","text":"%%{init: {\"flowchart\": {\"defaultRenderer\": \"elk\"}} }%% flowchart TB KSLog[KSLog] MicroUtils[MicroUtils] TelegramBotAPI[TelegramBotAPI] TelegramBotAPI-examples[TelegramBotAPI-examples ] PlaguBot[PlaguBot] TelegramBotAPILibraries[TelegramBotAPILibraries] PlaguBotPlugins[PlaguBotPlugins] PlaguBotExample[PlaguBotExample] BooruGrabberTelegramBot[BooruGrabberTelegramBot] SauceNaoTelegramBot[SauceNaoTelegramBot] PlaguPoster[PlaguPoster] PlaguBotSuggestionsBot[PlaguBotSuggestionsBot] TelegramBotTutorial[TelegramBotTutorial] Krontab[Krontab] KJSUiKit[KJSUiKit] SauceNaoAPI[SauceNaoAPI] Navigation[Navigation] TelegramBotAPI-bot_template[TelegramBotAPI-bot_template] PlaguBotPluginTemplate[PlaguBotPluginTemplate] PlaguBotBotTemplate[PlaguBotBotTemplate] MicroUtils --&gt; KSLog TelegramBotAPI --&gt; MicroUtils TelegramBotAPI-examples --&gt; TelegramBotAPI PlaguBot --&gt; TelegramBotAPI TelegramBotAPILibraries --&gt; PlaguBot PlaguBotPlugins --&gt; TelegramBotAPILibraries PlaguBotExample --&gt; PlaguBotPlugins BooruGrabberTelegramBot --&gt; TelegramBotAPI BooruGrabberTelegramBot --&gt; Krontab SauceNaoTelegramBot --&gt; TelegramBotAPI SauceNaoTelegramBot --&gt; SauceNaoAPI TelegramBotTutorial --&gt; PlaguBotPlugins PlaguBotSuggestionsBot --&gt; PlaguBotPlugins PlaguPoster --&gt; PlaguBotPlugins PlaguPoster --&gt; Krontab SauceNaoAPI --&gt; MicroUtils Navigation --&gt; MicroUtils TelegramBotAPI-bot_template -.- TelegramBotAPI PlaguBotPluginTemplate -.- PlaguBot PlaguBotBotTemplate -.- PlaguBot"},{"location":"krontab/index.html","title":"krontab","text":"<p>Library was created to give oppotunity to launch some things from time to time according to some schedule in runtime of applications.</p>"},{"location":"krontab/index.html#how-to-use","title":"How to use","text":"<p>There are several ways to configure and use this library:</p> <ul> <li>From some string</li> <li>From builder</li> </ul> <p>Anyway, to start some action from time to time you will need to use one of extensions/functions:</p> <pre><code>val kronScheduler = /* creating of KronScheduler instance */;\nkronScheduler.doWhile {\n// some action\ntrue // true - repeat on next time\n}\n</code></pre>"},{"location":"krontab/index.html#including-in-project","title":"Including in project","text":"<p>If you want to include <code>krontab</code> in your project, just add next line to your dependencies part:</p> <pre><code>implementation \"dev.inmo:krontab:$krontab_version\"\n</code></pre> <p>Next version is the latest currently for the library:</p> <p></p> <p>For old version of Gradle, instead of <code>implementation</code> word developers must use <code>compile</code>.</p>"},{"location":"krontab/index.html#config-from-string","title":"Config from string","text":"<p>Developers can use more simple way to configure repeat times is string. String configuring like a <code>crontab</code>, but with a little bit different meanings:</p> <pre><code>/--------------- Seconds\n| /------------- Minutes\n| | /----------- Hours\n| | | /--------- Days of months\n| | | | /------- Months\n| | | | | /----- (optional) Year\n| | | | | | /--- (optional) Timezone offset\n| | | | | | | / (optional) Week days\n* * * * * * 0o *w\n</code></pre> <p>It is different with original <code>crontab</code> syntax for the reason, that expected that in practice developers will use seconds and minutes with more probability than months (for example) or even years. In fact, developers will use something like:</p> <pre><code>doWhile(\"/5 * * * *\") {\nprintln(\"Called\")\ntrue // true - repeat on next time\n}\n</code></pre> <p>An other version:</p> <pre><code>doInfinity(\"/5 * * * *\") {\nprintln(\"Called\")\n}\n</code></pre> <p>Both of examples will print <code>Called</code> message every five seconds.</p>"},{"location":"krontab/index.html#config-via-builder","title":"Config via builder","text":"<p>Also, this library currently supports DSL for creating the same goals:</p> <pre><code>val kronScheduler = buildSchedule {\nseconds {\nfrom (0) every 5\n}\n}\nkronScheduler.doWhile {\nprintln(\"Called\")\ntrue // true - repeat on next time\n}\n</code></pre> <p>Or</p> <pre><code>val kronScheduler = buildSchedule {\nseconds {\n0 every 5\n}\n}\nkronScheduler.doWhile {\nprintln(\"Called\")\ntrue // true - repeat on next time\n}\n</code></pre> <p>Or</p> <pre><code>val kronScheduler = bLine truncated
+36 -36
View File
@@ -2,182 +2,182 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://docs.inmo.dev/index.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/index.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/describing/krontabscheduler.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/describing/string-format.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/introduction/faq.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/introduction/how-to-use.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/krontab/introduction/including-in-project.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/kslog/index.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/kslog/logging.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/kslog/setup.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/micro_utils/index.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/navigation/index.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/index.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/faq.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/dsls/keyboards.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/dsls/live-location.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/dsls/text.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/guides/keyboards.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/before-any-bot-project.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/first-bot.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/including-in-your-project.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/introduction/proxy-setup.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/api-extensions.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/behaviour-builder-with-fsm.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/behaviour-builder.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/exceptions-handling.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/files-handling.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/low-level-work-with-bots.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/media-groups.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/types-conversations.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/logic/updates-with-flows.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/plagubot/index.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/updates/heroku.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/updates/long-polling.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/updates/updates-filters.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://docs.inmo.dev/tgbotapi/updates/webhooks.html</loc>
<lastmod>2023-09-30</lastmod>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
BIN
View File
Binary file not shown.
+47 -1
View File
@@ -727,8 +727,10 @@
<p>Bot is initializing with the next algorithm:</p>
<div class="mermaid">flowchart TB
main["Main"]
Join["Endless join bot work"]
subgraph ConfigReading
direction LR
ConfigJsonParsing["Parsing to Json"]
ConfigParsing["Parsing to global config"]
ConfigJsonParsing --&gt; ConfigParsing
@@ -738,18 +740,62 @@
BotConstructorCalling["Calling of PlaguBot constructor"]
subgraph BotStart
direction TB
BotStartKoinAppInit["Initialization of koin app"]
subgraph BotStartSetupDI
sample
direction LR
subgraph BotStartSetupDIPutDefaults["Put defaults in DI"]
direction LR
BotStartSetupDIPutDefaultsConfig["Config"]
BotStartSetupDIPutDefaultsPluginsList["Plugins list"]
BotStartSetupDIPutDefaultsDatabaseConfig["Database Config"]
BotStartSetupDIPutDefaultsDefaultJson["Default Json"]
BotStartSetupDIPutDefaultsPlagubot["PlaguBot itself"]
BotStartSetupDIPutDefaultsTelegramBot["TelegramBot"]
end
BotStartSetupDIIncludes["`Synchronous (in queue) registration of all plugins __setupDI__ modules`"]
BotStartSetupDIPutDefaults --&gt; BotStartSetupDIIncludes
end
BotStartKoinAppStart["`Starting of koin application. Since this step all modules from __setupDI__ of plugins will be available`"]
subgraph BotStartBehaviourContextInitialization["Initialization of behaviour context"]
direction TB
BotStartBehaviourContextInitializationStatesManager["`Get from DI or create default **DefaultStatesManagerRepo**`"]
BotStartBehaviourContextInitializationStatesManagerRepo["`Get from DI or create default **StatesManagerRepo**`"]
BotStartBehaviourContextInitializationStatesManagerUsedCondition{"Is the default one used?"}
BotStartBehaviourContextInitializationOnStartConflictsResolver["Getting of all OnStartContextsConflictResolver"]
BotStartBehaviourContextInitializationOnUpdateConflictsResolver["Getting of all OnUpdateContextsConflictResolver"]
BotStartBehaviourContextInitializationStateHandlingErrorHandler["`Get from DI or create default **StateHandlingErrorHandler**`"]
subgraph BotStartBehaviourContextInitializationSetupPlugins["Plugins bot functionality init"]
BotStartBehaviourContextInitializationSetupPluginsSetupBotPlugin["`Call **setupBotPlugin** for each plugin`"]
end
BotStartBehaviourContextInitializationStatesManager --&gt; BotStartBehaviourContextInitializationStatesManagerUsedCondition
BotStartBehaviourContextInitializationStatesManagerUsedCondition --"Yes"--&gt; BotStartBehaviourContextInitializationStatesManagerRepo
BotStartBehaviourContextInitializationStatesManagerUsedCondition --"No"--&gt; BotStartBehaviourContextInitializationStateHandlingErrorHandler
BotStartBehaviourContextInitializationStatesManagerRepo --&gt; BotStartBehaviourContextInitializationOnStartConflictsResolver
BotStartBehaviourContextInitializationOnStartConflictsResolver --&gt; BotStartBehaviourContextInitializationOnUpdateConflictsResolver
BotStartBehaviourContextInitializationOnUpdateConflictsResolver --&gt; BotStartBehaviourContextInitializationStateHandlingErrorHandler
BotStartBehaviourContextInitializationStateHandlingErrorHandler --&gt; BotStartBehaviourContextInitializationSetupPlugins
end
BotStartDeleteWebhook["Delete webhooks"]
BotStartStartLongPolling["Start long polling"]
BotStartKoinAppInit --&gt; BotStartSetupDI
BotStartSetupDI --&gt; BotStartKoinAppStart
BotStartKoinAppStart --&gt; BotStartBehaviourContextInitialization
BotStartBehaviourContextInitialization --&gt; BotStartDeleteWebhook
BotStartDeleteWebhook --&gt; BotStartStartLongPolling
end
main --&gt; ConfigReading
ConfigReading --&gt; BotConstructorCalling
BotConstructorCalling --&gt; BotStart
BotStart --&gt; Join
</div>
</article>
</div>