nakiri
Version, currently main branch1 version
- main branchlatestDec 3, 2024
github.com/secos/nakiri
A CLI tool for extracting data from web pages using CSS selectors
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
nakiri:
github: secos/nakiri
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.0.0- License
- MIT
- Author
- Your Name
- Target
nakirifrom src/nakiri.cr
Dependencies
Runtime Dependencies
Development Dependencies
- ameba~> 1.5.0github: crystal-ameba/amebadev
- spec-kemal*github: kemalcr/spec-kemaldev
README
Nakiri
A command-line tool for extracting data from web pages using CSS selectors. Nakiri can fetch content from URLs or read HTML from standard input, making it useful for web scraping and HTML parsing tasks.
Installation
shards install
crystal build src/nakiri.cr
Usage
nakiri -u URL -s SELECTOR [-a ATTRIBUTE]
Options
-u, --url=URL: URL to scrape (optional, reads from stdin if not provided)-s, --selector=SELECTOR: CSS selector (required)-a, --attribute=ATTR: Attribute to extract (optional)-h, --help: Show help message
Examples
Extract all links from a webpage:
nakiri -u https://example.com -s "a" -a href
Extract all image sources:
nakiri -u https://example.com -s "img" -a src
Extract text content from specific elements:
nakiri -u https://example.com -s ".article-content p"
Process HTML from stdin:
curl https://example.com | nakiri -s "h1"
Requirements
- Crystal >= 1.0.0
License
This project is open source and available under the MIT License.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Dec 3, 2024
- Crystal
>= 1.0.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/secos/nakiri
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 15, 2026
- Versions
- 1