• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

tiagoalvesdulce/dcrtimestamptweet: Example of a simple twitter bot to timestamp ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

tiagoalvesdulce/dcrtimestamptweet

开源软件地址:

https://github.com/tiagoalvesdulce/dcrtimestamptweet

开源编程语言:

JavaScript 100.0%

开源软件介绍:

Dcrtimestamptweet

Twitter bot to timestamp a thread when a chosen keyword is mentioned. This bot uses IPFS as a decentralized database to store the tweet thread json and uses dcrtime for timestamping.

Installation

  1. Create a twitter account and apply for access

  2. Generate twitter access tokens

  3. Make a .env File

    $ touch .env
    
  4. Add the generated credentials in the .env file

    TWITTER_CONSUMER_KEY=<GENERATED_API_KEY>
    TWITTER_CONSUMER_SECRET=<GENERATED_API_KEY_SECRET>
    TWITTER_ACCESS_TOKEN=<GENERATED_ACCESS_TOKEN>
    TWITTER_ACCESS_TOKEN_SECRET=<GENERATED_ACCESS_TOKEN_SECRET>
    TRACKED_WORD="@dcrtimestampbot" // mention which will call the bot
    
  5. Run yarn command

    $ yarn
    
  6. Start app

    $ yarn start
    

Now, when the TRACKED_WORD is mentioned on Twitter, the bot will save the thread to IPFS, timestamp it and reply the tweet with the SHA256 hash anchored to dcrtime and the IPFS hash.

  1. Example of stringified thread that will be timestamped and saved to IPFS

    [{"user":{"id_str":"892766033714179434","name":"decred bot","screen_name":"decred_bot"},"id_str":"1116353485199556609","created_at":"Thu Apr 11 14:53:06 +0000 2019","text":"this is an awesome test! @dcrtimestamptweet","repliedid":null}]
    

Further information

It is not necessary to run IPFS in order to make the bot work properly, although it is good running your own daemon instance so you can test changes you've made.

install IPFS

  1. Follow the IPFS Installation instructions

  2. Run IPFS Daemon

    $ ipfs daemon
    

License

dcrtimestamptweet is licensed under the copyfree ISC License.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
kadnan/Python-IPFS: Integration of IPFS with Python发布时间:2022-06-22
下一篇:
raviganwal/ipfs_client_flutter: IPFS client for flutter发布时间:2022-06-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap