Comments (14)
Or two tools that do each separately:
cidr2range
range2cidr
from cli.
For reference, we had a chat and the answer is if we encounter input like:
1.1.1.0,1.1.1.2,other data
we'd output the 2 CIDR result as:
1.1.1.0/31,other data
1.1.1.2/32,other data
i.e. copying the surrounding data per CIDR.
from cli.
Yeah I like 2 tools named cidr2range and range2cidr
from cli.
Great, those names might also be easier to get & discover on distribution repos like homebrew/apt.
from cli.
I'll make PRs for getting these on the official homebrew tap tomorrow my time, yes. No point really adding them to the IPinfo tap at this point since it'll be replaced pretty quickly I reckon, given the good feedback we got from the homebrew guys on the previous stuff.
from cli.
Made PRs for Homebrew:
cidr2range: Homebrew/homebrew-core#78164
range2cidr: Homebrew/homebrew-core#78166
from cli.
Awesome 🥳 Thanks a lot!
from cli.
I think we have almost all the base code needed to do this already so that should be good!
from cli.
Any idea for the name of a tool like this? This would also be the subcommand.
Some ideas:
cidrconvert
cidrconv
cc
from cli.
@coderholic A question about ranges that don't combine nicely into a single CIDR:
What to do about a range like 1.1.1.0,1.1.1.2
which really requires 2 CIDRs 1.1.1.0/31
and 1.1.1.2/32
? (Obviously the other way around is not a problem.)
from cli.
Just print both, and if so with a comma delimiter between them? Or skip these cases by default with a flag to force outputting multiple CIDRs if necessary?
from cli.
This'll be available in the v2 release fairly soon. Just wrapping it up.
from cli.
When it's released, if there are any other issues let's make new issues for it.
from cli.
Are there Hombrew tap issues to track progress on adding cidr2range
and range2cidr
? I can't see these in https://github.com/ipinfo/homebrew-tap so assumed you've gone with adding them to Homebrew tap at once.
from cli.
Related Issues (20)
- Country flag emoji oddly displayed HOT 10
- Implement netIP functionalities in CLI HOT 1
- Bug in `ipinfo tool upper` HOT 1
- Windows 11 (Defender): Trojan:Win32/Bearfoos.B!ml Trojan Virus HOT 3
- Piping a list of IP addresses to map and summarize is NOT working HOT 1
- More basic IP tools
- "ipinfo tool aggregate" weirdness HOT 3
- Linux aarch64 not supported HOT 3
- API endpoint for usage HOT 3
- Tool → aggregate function throwing error at file input HOT 1
- Tool → `aggregate` function does not print IPs as is HOT 5
- IPinfo CLI tool command → `aggregate` closer inspection of operation recommended HOT 1
- Even with installation failure the CLI indicates success HOT 1
- Different GLIBC version in 3.3.0? HOT 3
- How it the CLI handles manual input of tokens?
- ipinfo no longer works on Windows 7, Windows Server 2008 HOT 1
- IPinfo CLI Download command: Invalid character 'U' looking for beginning of value
- Windows Defender flagging as Name: Trojan:Win32/Bearfoos.A!ml
- brew install ipinfo-cli
- The aggregate tool does not support IP range aggregation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.