Skip to content

gnosis23/opencli-plugin-bohao-work

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

opencli-plugin-bohao-work

🔌 An OpenCLI plugin — Scrape blog post listings from bohao.work.

OpenCLI License: MIT

Features

  • 📰 Fetch latest blog posts from bohao.work
  • 🔢 Customizable result limit
  • 📄 Multiple output formats (table/JSON)
  • ⚡ Pure YAML implementation, zero dependencies

Install

# Via OpenCLI plugin manager
opencli plugin install github:gnosis23/opencli-plugin-bohao-work

# Or manually
git clone https://github.com/gnosis23/opencli-plugin-bohao-work \
  ~/.opencli/plugins/bohao-work

Usage

# Get post list (default: 10 posts)
opencli bohao-work posts

# Get specific number of posts
opencli bohao-work posts --limit 5

# Output as JSON
opencli bohao-work posts -f json

Parameters

Parameter Type Default Description
--limit int 10 Number of posts to return
-f, --format string table Output format: table / json

Output Examples

Table format:

┌──────┬─────────────────────────────┬────────────┬──────────────────────────────────────┐
│ rank │ name                        │ date       │ url                                  │
├──────┼─────────────────────────────┼────────────┼──────────────────────────────────────┤
│ 1    │ Post Title 1                │ 2024-01-15 │ https://bohao.work/posts/xxx         │
│ 2    │ Post Title 2                │ 2024-01-10 │ https://bohao.work/posts/yyy         │
└──────┴─────────────────────────────┴────────────┴──────────────────────────────────────┘

JSON format:

[
  {
    "rank": 1,
    "name": "Post Title 1",
    "date": "2024-01-15",
    "url": "https://bohao.work/posts/xxx"
  }
]

Plugin Structure

This is a pure YAML plugin — no dependencies, no build step.

opencli-plugin-bohao-work/
├── posts.yaml    # YAML adapter (defines scraping logic)
└── README.md     # This document

Technical Details

  • Adapter Type: YAML Playwright Adapter
  • Target Site: https://bohao.work
  • Scraping Logic:
    1. Navigate to bohao.work
    2. Execute JavaScript to extract post information
    3. Limit results based on limit parameter

Data Schema

Extracted fields:

  • rank - Ranking number
  • name - Post title
  • date - Publication date
  • url - Post link

Development

# Clone repository
git clone https://github.com/gnosis23/opencli-plugin-bohao-work.git

# Local testing
opencli dev posts.yaml posts --limit 5

Related Links

License

MIT © gnosis23

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors