Update chapter-05-gbdialog-reference.md

This commit is contained in:
Rodrigo Rodriguez 2022-10-16 16:10:38 -03:00 committed by GitHub
parent fa569a7d14
commit 526d4ed0d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,9 +82,9 @@ The following file types are loaded from a .gbdialog package: `.vbs`, `.vb`, `.b
![image](https://user-images.githubusercontent.com/14840374/146782691-7c28998b-7485-4d34-af33-da87d1b26088.png) ![image](https://user-images.githubusercontent.com/14840374/146782691-7c28998b-7485-4d34-af33-da87d1b26088.png)
### Using General Bots Web Automation ### Using General Bots Web Automation to ask humans about unreadable captchas
``` ```BASIC
mobile = "5521000000000" mobile = "5521000000000"
page = GET HTML "https://www.any-website.com/" page = GET HTML "https://www.any-website.com/"
@ -106,7 +106,7 @@ TALK TO mobile, "Login done, thanks."
On the fly table as images. On the fly table as images.
``` ```BASIC
SET MAX LINES 1000 SET MAX LINES 1000
data = FIND "data.xlsx", data = FIND "data.xlsx",
data = SELECT a, SUM(b) AS b FROM data GROUP BY a data = SELECT a, SUM(b) AS b FROM data GROUP BY a
@ -117,7 +117,7 @@ SEND FILE png
On the fly charts On the fly charts
``` ```BASIC
data = [10, 20, 30] data = [10, 20, 30]
legends= "Steve;Yui;Carlos" legends= "Steve;Yui;Carlos"
img = CHART "pie", data, legends img = CHART "pie", data, legends
@ -127,7 +127,7 @@ SAVE img as "folder/filename.jpg"
### Using complete General Bots Conversational Data Analytics ### Using complete General Bots Conversational Data Analytics
``` ```BASIC
TALK "General Bots Labs presents FISCAL DATA SHOW BY BASIC" TALK "General Bots Labs presents FISCAL DATA SHOW BY BASIC"
TALK "Gift Contributions to Reduce the Public Debt API (https://fiscaldata.treasury.gov/datasets/gift-contributions-reduce-debt-held-by-public/gift-contributions-to-reduce-the-public-debt)" TALK "Gift Contributions to Reduce the Public Debt API (https://fiscaldata.treasury.gov/datasets/gift-contributions-reduce-debt-held-by-public/gift-contributions-to-reduce-the-public-debt)"
@ -161,6 +161,64 @@ SAVE doc AS "resume.docx"
SEND EMAIL "noreply@pragmatismo.io", "Subject", doc SEND EMAIL "noreply@pragmatismo.io", "Subject", doc
``` ```
### Automating GitHub Issue creation with General Bots Automation
```BASIC
REM Realiza login no GitHub.
page = GET HTML "https://github.com/login"
SET page, "#login_field", "username"
SET page, "#password", "*******"
PRESS ENTER ON page
REM Verificar 2FA.
SET HEAR ON "5521999999999"
TALK "Digite o código de dupla autenticação enviado..."
HEAR code
SET page, "#otp", code
PRESS ENTER ON page
REM Extrai cada Issue da planilha e cria no GitHub.
list = FIND "issues.xlsx"
index = 1
DO WHILE index <38
row = list[index]
page = GET HTML "https://github.com/GeneralBots/BotServer/issues/new"
SET page, "#issue_title", row.title
SET page, "#issue_body", row.body
CLICK page, "#new_issue > div > div > div.Layout-main > div > div.timeline-comment.color-bg-default.hx_comment-box--tip > div > div.flex-items-center.flex-justify-end.d-none.d-md-flex.mx-2.mb-2.px-0 > button"
TALK "Issue '" + row.title + "' criado."
WAIT 5
index = index + 1
LOOP
EXIT
```
### Using POST data ### Using POST data
You can use POST passing a variable as the second param in the POST call. The example You can use POST passing a variable as the second param in the POST call. The example