GithubHelp home page GithubHelp logo

itz-fork / betterpyrodocs Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 68 KB

Simple & Easy-to-use search engine to search for pyrogram api methods and raw functions

Home Page: https://itz-fork.github.io/BetterPyroDocs

License: MIT License

TypeScript 68.18% JavaScript 13.10% HTML 17.58% CSS 1.13%
deno mongodb-atlas pyrogram

betterpyrodocs's Introduction

Better Pyro Docs

Simple & Easy-to-use search engine to search for pyrogram api methods and raw functions

What's in

API

  • Directory: api

  • About: API to search for pyrogram's api methods and raw functions

  • Run with deno:

    deno run --allow-net --allow-env api/main.ts
  • Search for

    • Methods
      [GET] /search/methods/<query>
      
    • Raw functions
      [GET] /search/raw/<query>
      

Bot

  • Directory: bot

  • About: Telegram bot to search for pyrogram's api methods and raw functions using inline mode

  • Run with deno:

    deno run --allow-net --allow-env --allow-run --allow-read --allow-write bot/main.ts
  • Search for

    • Methods
      !m <query>
      
    • Raw functions
      !r <query>
      

Web

Guides

Update cache

Update cached data lives inside cache directory.

deno run --allow-net --allow-write lib/scraper.ts

Update database

Updated mongodb database collections based on local cache

deno run --allow-net --allow-read --allow-env scripts/save_to_db.ts

Create search indexes

You need to create 2 search indexes to make it work. First one for api methods and other one for raw functions

  • Click on "Browse Collections"
  • Navigate to search tab of the mongodb cluster
  • Click on "CREATE INDEX" button
  • Select "JSON Editor" and click on "Next" button
  • Select database collection
    • API_METHODS - for api methods index
    • RAW_FUNCTIONS - for raw functions index
  • Give "Index name"
    • api_methods - for api methods index
    • raw_functions - for raw functions index
  • Copy and paste the following index definition to the json editor
    • For api methods index
    {
        "mappings": {
            "dynamic": false,
            "fields": {
                "name": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                }
            }
        }
    }
    
    • For raw functions index
    {
        "mappings": {
            "dynamic": false,
            "fields": {
                "class_name": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                }
            }
        }
    }
    

Why?

The main goal of this project is to improve my web scraping skills, experiment with deno and mongodb atlas full text feature.

License

Licensed under MIT

betterpyrodocs's People

Contributors

itz-fork avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

5l1v3r1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.