Skip to content

Lemper29/Wikiterm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WikiTerm

C-based CLI utility for fetching and rendering plaintext Wikipedia article content via MediaWiki API.

Dependencies

  • libcurl: Network transport.
  • cJSON: JSON serialization and parsing.
  • POSIX environment: Required for popen and less integration.

Compilation

Just run

make

Usage

./build/wiki "Article Title"

Technical Specification

  • Protocol: MediaWiki Action API (action=query).
  • Format: prop=extracts with explaintext=1 for clean text removal of HTML/Markdown.
  • Network Configuration:
    • Connect Timeout: 30 seconds.
    • Total Timeout: 30 seconds.
    • Redirects: Follow location enabled.
    • User-Agent: wiki-extract/1.0.
  • I/O Handling:
    • Output is piped to less -R for paging support.
    • Falls back to stdout if popen fails.
  • Memory Management: Manual buffer reallocation via write_callback for dynamic API payloads.

License

MIT

About

Wikipedia in your terminal. No browser, no bullshit.

Resources

License

Stars

12 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors