All Projects → omgimanerd → nycurl

omgimanerd / nycurl

Licence: MIT License
A web server that fetches data from the New York Times and formats it for display in the terminal.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to nycurl

Getnews.tech
A web server that fetches data from the News API and formats it for display in the terminal.
Stars: ✭ 94 (+248.15%)
Mutual labels:  news, article, curl
Brotab
Control your browser's tabs from the command line
Stars: ✭ 137 (+407.41%)
Mutual labels:  commandline, command-line-tool
Lc
licensechecker (lc) a command line application which scans directories and identifies what software license things are under producing reports as either SPDX, CSV, JSON, XLSX or CLI Tabular output. Dual-licensed under MIT or the UNLICENSE.
Stars: ✭ 93 (+244.44%)
Mutual labels:  commandline, command-line-tool
vuejs-news
Single page app that pulls in news from NYTimes
Stars: ✭ 19 (-29.63%)
Mutual labels:  news, nytimes
Starcli
✨ Browse GitHub trending projects from your command line
Stars: ✭ 269 (+896.3%)
Mutual labels:  commandline, command-line-tool
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (+1177.78%)
Mutual labels:  commandline, command-line-tool
Gitlab Cli
Create a merge request from command line in gitlab
Stars: ✭ 224 (+729.63%)
Mutual labels:  commandline, command-line-tool
Simorgh
The BBC's Open Source Single Page Application. Contributions welcome! Used on some of our biggest websites, e.g.
Stars: ✭ 550 (+1937.04%)
Mutual labels:  news, article
Briefly
source based news in short : Winner @MumbaiHackathon 2018
Stars: ✭ 35 (+29.63%)
Mutual labels:  news, article
GNews
A Happy and lightweight Python Package that Provides an API to search for articles on Google News and returns a JSON response.
Stars: ✭ 271 (+903.7%)
Mutual labels:  news, article
note-keeper
📓 A tiny bash tool for taking and organizing notes.
Stars: ✭ 58 (+114.81%)
Mutual labels:  commandline, command-line-tool
garmin-connect-export
Downloads gpx, tcx or original fit files from your Garmin Connect Account.
Stars: ✭ 42 (+55.56%)
Mutual labels:  commandline, command-line-tool
gomphotherium
Gomphotherium (/ˌɡɒmfəˈθɪəriəm/; "welded beast"), a command line Mastodon client.
Stars: ✭ 22 (-18.52%)
Mutual labels:  commandline, command-line-tool
Ttyplot
a realtime plotting utility for terminal/console with data input from stdin
Stars: ✭ 532 (+1870.37%)
Mutual labels:  commandline, command-line-tool
starcli
✨ Browse trending GitHub projects from your command line
Stars: ✭ 436 (+1514.81%)
Mutual labels:  commandline, command-line-tool
You Dont Need Gui
Stop relying on GUI; CLI **ROCKS**
Stars: ✭ 4,766 (+17551.85%)
Mutual labels:  commandline, command-line-tool
Covid19 Tracker Cli
A curl-based command line tracker for Novel Coronavirus or COVID-19 pandemic. It Supports terminal for linux and macos, command prompt for windows, and termux for android with real-time updates.
Stars: ✭ 244 (+803.7%)
Mutual labels:  curl, command-line-tool
Websocat
Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
Stars: ✭ 3,477 (+12777.78%)
Mutual labels:  curl, command-line-tool
ariel-news-app
News App developed with Flutter featuring beautiful UI, category-based news, story for faster news reading, inbuilt article viewer, share feature, and more.
Stars: ✭ 31 (+14.81%)
Mutual labels:  news, article
pynytimes
Use all the New York Times APIs in Python!
Stars: ✭ 22 (-18.52%)
Mutual labels:  news, nytimes

nycurl

This is a web server that formats the latest news from the front page of the New York Times into a format that can be displayed in most terminals. A link to each article is included if the user wants to read the full article.

This project will no longer be updated or maintained as of August 2017. Please consider using its sister project getnews.tech, which uses the News API instead.

Example Output

$ curl nycurl.sytes.net?i=5
┌──────────────────────────────────────────────────────────────────────┐
│                                                                      │
│              To find a list of sections to query, use:               │
│                      curl nycurl.sytes.net/help                      │
│                                                                      │
├───┬──────────────┬───────────────────────────────────────────────────┤
│ # │ Section      │ Details                                           │
├───┼──────────────┼───────────────────────────────────────────────────┤
│ 0 │ Arts         │ Canada Debates Whether Gift of Leibovitz Photos   │
│   │              │ Is Also a Tax Dodge                               │
│   │              │ Four years after the donation of 2,070 photos     │
│   │              │ created by Annie Leibovitz to a Nova Scotia       │
│   │              │ museum, a government panel is balking at its $20  │
│   │              │ million valuation.                                │
│   │              │ https://nyti.ms/2tH1g2N                           │
├───┼──────────────┼───────────────────────────────────────────────────┤
│ 1 │ Books        │ What Happens When Liberty Fails to Deliver        │
│   │              │ In “The Retreat of Western Liberalism,” Edward    │
│   │              │ Luce argues that the tradition of liberty is      │
│   │              │ under mortal threat.                              │
│   │              │ https://nyti.ms/2tFDJ2g                           │
├───┼──────────────┼───────────────────────────────────────────────────┤
│ 2 │ Briefing     │ Senate, John McCain, Jeff Sessions: Your Tuesday  │
│   │              │ Evening Briefing                                  │
│   │              │ Here’s what you need to know at the end of the    │
│   │              │ day.                                              │
│   │              │ https://nyti.ms/2tHzEdW                           │
├───┼──────────────┼───────────────────────────────────────────────────┤
│ 3 │ Briefing     │ Donald Trump, Republican Party, Russia: Your      │
│   │              │ Wednesday Briefing                                │
│   │              │ Here’s what you need to know to start your day.   │
│   │              │ https://nyti.ms/2tXFUtp                           │
├───┼──────────────┼───────────────────────────────────────────────────┤
│ 4 │ Business Day │ To Punish Putin, Economic Sanctions Are Unlikely  │
│   │              │ to Do the Trick                                   │
│   │              │ Using economic penalties to achieve diplomatic    │
│   │              │ goals has a poor track record when the target is  │
│   │              │ powerful and autocratic, and workarounds exist.   │
│   │              │ https://nyti.ms/2tGwbwj                           │
├───┴──────────────┴───────────────────────────────────────────────────┤
│              Follow @omgimanerd on Twitter and GitHub.               │
│                Open source contributions are welcome!                │
│                 https://github.com/omgimanerd/nycurl                 │
└──────────────────────────────────────────────────────────────────────┘

Usage

You can fetch the latest news simply by typing

curl nycurl.sytes.net

This application also accepts queries to the various sections of the NY Times.

curl nycurl.sytes.net/technology
curl nycurl.sytes.net/politics

Get a list of acceptable sections to query using:

curl nycurl.sytes.net/help

By default, nycurl will format the table to be a max of 72 characters wide. If you would like to specify a custom width for your terminal, you can do so using:

curl nycurl.sytes.net?w=92
curl nycurl.sytes.net/technology?w=100

You can also limit the number of articles to display.

curl nycurl.sytes.net?n=10
curl nycurl.sytes.net?n=12\&w=95

Note that when combining the parameters on the command line as query parameters, you must use \& to escape the ampersand character.

Contributing

Fork this repository and send me a pull request with any suggestions and changes. Use StandardJS to format your code.

You will need to acquire a Top Stories API Key from the New York Times and a URL Shortener API Key from Google Developers. Add them to your .bashrc or other environment variable configuration:

export NYTIMES_API_KEY=YOUR_KEY_HERE
export URL_SHORTENER_API_KEY=YOUR_KEY_HERE

Install the project dependencies:

npm install # or yarn install
webpack

Run the server:

node server.js

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].