Acode:
This is something I’ve wanted to be able to do for a while, so I finally coded up a little Zig program to do it. I’m quite tired after a long day and threw this together quickly for fun, there will be a proper readme and such this weekend, but this is a tool that lets you look up telephone area codes from the command line. Currently it’s limited to North America, but I want to make you able to look up country codes and other fun things too. It uses a teeny janky handrolled csv parser, but it does what I needed.
Supported Zig versions
Tested with latest Zig master as well as 0.16.0.
GitHub link
Output example
quin@Minix~/acode$ ./zig-out/bin/acode 303
The 303 area code is used in the following parts of Colorado:
Arvada, Aurora, Boulder, Brighton, Broomfield, Castle Rock, Castlewood, Columbine, Commerce City, Denver, Englewood, Highlands Ranch, Ken Caryl, Lafayette, Lakewood, Littleton, Longmont, Loveland, Northglenn, Parker, Southglenn, Thornton, Westminster, and Wheat Ridge.
quin@Minix~/acode$ ./zig-out/bin/acode 910
The 910 area code is used in the following parts of North Carolina:
Fayetteville, Fort Bragg, Jacksonville, Lumberton, and Wilmington.
quin@Minix~/acode$ ./zig-out/bin/acode 204
The 204 area code is used in the following parts of Manitoba:
Brandon, Dauphin, Flin Flon, Morden, Portage la Prairie, Selkirk, Steinbach, The Pas, Thompson, Winkler, and Winnipeg.
quin@Minix~/acode$