Socket
Book a DemoInstallSign in
Socket

@chatopera/docsbot

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chatopera/docsbot

Documentation as a Chatbot. You know, for chat.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

Chatopera Docs BOT

Documentation as a Chatbot. You know, for chat.

Demo

image

  • Parse local markdown docs inside directory recursivly, generate FAQs File for Chatopera BOT Platform.

  • Further import into a BOT on Chatopera, details in doc.

Install

Publish on npmjs, link.

npm install -g @chatopera/docsbot

Now, docsbot is available in CLI path.

Usage

docsbot --baseurl $BASE_URL \
    -i $DOCS_HOME \
    -f $DOCS_FOLDERS \
    -o $FAQ_OUTOUT
KeySampleDescription
BASE_URLhttps://docs.chatopera.com/products/conjunction for the per doc page link
DOCS_HOME~/chatopera/docs/docfx_project/productsDocs root dir
DOCS_FOLDERSchatbot-platform,cskefuChild dirs to be parsed in root dir
FAQ_OUTPUT_FILE./tmp/bot.faq.jsonGenerated file in Chatopera BOT FAQ Format

Assume your docs folders are like this, and docs site are at https://docs.chatopera.com/products/:

$DOCS_HOME(Root dir)
└───chatbot-platform
    |───appendix
    |───contract
    |───explanations
    |───howto-guides
    |───references
    │   ├───func-builtin
    │   └───sdk
    │       ├───chatbot
    │       └───chatopera
    └───tutorials

Then, the Docs link address of $DOCS_HOME/chatbot-platform/appendix/index.md would be interpreted as https://docs.chatopera.com/products/chatbot-platform/appendix/index.html.

This docs are also hosted on GitHub.

  • baseurl: set with command line
  • docfoler: iterater with DOCS_FOLDER, split by ,
  • filepath: the markdown files in each docfoler, where extension .md is replaced with .html

Upload into Chatopera BOT Platform

Install Chatopera SDK for bot CLI.

npm install -g @chatopera/sdk

Touch .env

# Chatopera BOT Service endpoint
BASE_URL=https://docs.chatopera.com/products/
BOT_PROVIDER=https://bot.chatopera.com
BOT_CLIENT_ID=xx
BOT_CLIENT_SECRET=xx
BOT_ACCESS_TOKEN=
# BOT_FAQ_FILE is generated by docsbot
BOT_FAQ_FILE=bot.faq.json

Run the job

source .env
bot faq -a import -f ./$BOT_FAQ_FILE

Others

docsbot --help

Development

npm install
node bin/cmd.js --help
cp sample.env .env
./scripts/dev.sh

License

Apache2

chatoper banner

FAQs

Package last updated on 29 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.