npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@chatopera/docsbot

v1.0.3

Published

Documentation as a Chatbot. You know, for chat.

Downloads

4

Readme

Chatopera Docs BOT

Documentation as a Chatbot. You know, for chat.

Demo

image

Featured

  • 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

| Key | Sample | Description | | --- | --- | --- | | BASE_URL | https://docs.chatopera.com/products/ | conjunction for the per doc page link | | DOCS_HOME | ~/chatopera/docs/docfx_project/products | Docs root dir | | DOCS_FOLDERS | chatbot-platform,cskefu | Child dirs to be parsed in root dir | | FAQ_OUTPUT_FILE | ./tmp/bot.faq.json | Generated 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