Skip to content

added tutorial for qr-code-terminal plugin - #969

Merged
lijiarui merged 7 commits into
wechaty:masterfrom
shwetalsoni:qr-code-terminal-plugin
Jul 8, 2021
Merged

lijiarui merged 7 commits into
wechaty:masterfrom
shwetalsoni:qr-code-terminal-plugin

Conversation

@shwetalsoni

@shwetalsoni shwetalsoni commented Jun 23, 2021 •

Copy link
Copy Markdown
Member

Added tutorial for QR code terminal plugin.

Screenshot from 2021-06-27 13-33-11
Screenshot from 2021-06-27 13-33-40
Screenshot from 2021-06-27 13-33-56
Screenshot from 2021-06-27 13-34-09
Screenshot from 2021-06-27 13-34-23
Screenshot from 2021-06-27 13-34-35

@shwetalsoni
shwetalsoni requested review from a team as code owners June 23, 2021 08:27
@shwetalsoni

Copy link
Copy Markdown
Member Author

Tag #891

@shwetalsoni shwetalsoni mentioned this pull request Jun 23, 2021
33 tasks done
@shwetalsoni shwetalsoni added GSoD 2021 tutorials Related to tutorial docs labels Jun 23, 2021

@proudofsimin proudofsimin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, could you explain more about this plugin at the beginning? Is it the users (developers) or customers will scan the QR code? What will the developers receive when someone scan the QR code? And what will it show on phone after scanning the QR code?

npm i wechaty-plugin-contrib
```

## 2. Integrating the plugin

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the v-ing form. Use imperative sentence.

bot.start()
```

## 3. Running the bot

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the v-ing form. Use imperative sentence.

@shwetalsoni

Copy link
Copy Markdown
Member Author

Hi, could you explain more about this plugin at the beginning? Is it the users (developers) or customers will scan the QR code? What will the developers receive when someone scan the QR code? And what will it show on phone after scanning the QR code?

Hii simin,
Actually this plugin is just for demonstrating that how a user can use this plugin in their bot. So, now on scanning this qr code it wont do anything.

I think for better explanation I can provide a conclusion at end reffering to ding dong bot because there we have used this plugin. On scanning that qr code users can connect to whatsapp and wechat.

What do you think or is their any better way to do this ?

@proudofsimin proudofsimin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @shraddhavp,

Let me clear up. So in here, you use the plugin to generate a QR code first, and then you are required to use the events (are they called events?) to define the function for it. Am I right? I agree with your suggestion that mentioning a real example really helps me/user to clear it up. Thank you.

@shwetalsoni

Copy link
Copy Markdown
Member Author

Hii @proudofsimin
I have changed ing(s) to imperative form.
I have also added conclusion section at end describing about the application of QR code terminal plugin.
I have updated the screenshots for better understanding.
Thank you :)

@shwetalsoni

Copy link
Copy Markdown
Member Author

Hi @shraddhavp,

Let me clear up. So in here, you use the plugin to generate a QR code first, and then you are required to use the events (are they called events?) to define the function for it. Am I right? I agree with your suggestion that mentioning a real example really helps me/user to clear it up. Thank you.

yeah, you get it right. I have made the changes now. You can review it.
Btw it's not @shraddhavp 😅

@proudofsimin

Copy link
Copy Markdown
Contributor

Hii @proudofsimin
I have changed ing(s) to imperative form.
I have also added conclusion section at end describing about the application of QR code terminal plugin.
I have updated the screenshots for better understanding.
Thank you :)

Thanks for the modification and adding the starter bot. Could you put the "create the starter bot" in step one like #963 ? Thank you.

P.s. sorry for linking the wrong name...

@proudofsimin proudofsimin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's only minor modification left, approve first.

@shwetalsoni

Copy link
Copy Markdown
Member Author

Hii @proudofsimin
I have changed ing(s) to imperative form.
I have also added conclusion section at end describing about the application of QR code terminal plugin.
I have updated the screenshots for better understanding.
Thank you :)

Thanks for the modification and adding the starter bot. Could you put the "create the starter bot" in step one like #963 ? Thank you.

P.s. sorry for linking the wrong name...

I have added this step

@lijiarui lijiarui mentioned this pull request Jul 6, 2021

@lijiarui lijiarui left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls change as I request.


### 1. Create a starter bot

Follow the instructions on the **Starter Bot** page to create the foundation of a Wechaty bot.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add a starter bot link here for Starter Bot

@shwetalsoni shwetalsoni Jul 7, 2021 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I will add the link here. Started Bot will be under examples/basic/. We have this section in the upcoming weeks in our proposal. So once the starter bot is added and merged we can provide the link here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could file a new issue for this. Once you create a new issue, I will ignore this part.


Now, you are done with the integration of `QR code terminal plugin` with your bot. For running the bot you have to **export/set** an environment variable with the type of puppet to use and then run the bot.

#### Linux/macOS

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should unify the style here, you did a good job at #888 , it looks like this:

image

You can use code like this:

<Tabs
  groupId="operating-systems"
  defaultValue="linux"
  values={[
    { label: 'Linux',   value: 'linux', },
    { label: 'macOS',   value: 'mac', },
    { label: 'Windows', value: 'windows', },
  ]
}>

<TabItem value="linux">

You can use this `QR code terminal` plugin for building the bots where you have to connect to a device. You can refer to [Ding Dong bot](../getting-started/hard-way.mdx). In ding dong bot you have to scan the generated QR code to connect to **Whatsapp/Wechat**.

## References

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add video link reference here: https://www.youtube.com/watch?v=tfGZXoe_aA4

## References

* [GitHub repository of Wechaty Plugin Contrib](https://github.com/wechaty/wechaty-plugin-contrib)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls remove blank lines here.

@shwetalsoni

Copy link
Copy Markdown
Member Author

@lijiarui I have made the suggested changes except for the starter bot link which I'll add later when the starter bot is created and merged.

@lijiarui

lijiarui commented Jul 7, 2021 •

Copy link
Copy Markdown
Member

Good job! After you file a new issue for this and link to this PR, I will approve this PR.

@shwetalsoni

Copy link
Copy Markdown
Member Author

@lijiarui I have created issue #1032 for keeping the record of all the features that need to be added later mentioning all the respective PR's.

@lijiarui lijiarui left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! Appoved

@lijiarui
lijiarui merged commit 38c5a71 into wechaty:master Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSoD 2021 tutorials Related to tutorial docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants