π¦ ClawHub
Daily News
by @jaceymarvin99
Use when users need daily news summaries, current events, or want to stay informed about world news in Chinese.
βοΈ Configuration
--encoding, -e : Optional. Specifies the output response format. Valid options are text, json, markdown, image, and image-proxy. The API defaults to json if not specified.--date, -d : Optional. Fetch historical news for a specific date. If omitted, fetches today's news. Note: If this is the only argument provided, you can omit the --date flag entirely.Return Values
The script securely calls the 60s API and outputs the response to stdout. Depending on the encoding parameter, the response could be a JSON string, plain text, markdown, or image URLs.
Usage Examples
# Get today's news using default API encoding (json)
./scripts/news.shGet today's news in plain text format
./scripts/news.sh --encoding textGet news for a specific date using flags
./scripts/news.sh --date 2024-03-01Get news for a specific date (simplified usage without flags)
./scripts/news.sh 2024-03-01Get news for a specific date in markdown format
./scripts/news.sh -e markdown -d 2024-03-01
π Tips & Best Practices
Issue: No data returned
Issue: Image not loading
encoding=image-proxy instead of encoding=imageIssue: Old date requested
TERMINAL
clawhub install daliy-news