]> gitweb.michael.orlitzky.com - hath.git/blob - hath.cabal
hath.cabal: drop a word and a period from the synopsis
[hath.git] / hath.cabal
1 cabal-version: 3.0
2 name: hath
3 version: 0.5.7
4 author: Michael Orlitzky
5 maintainer: Michael Orlitzky <michael@orlitzky.com>
6 homepage: http://michael.orlitzky.com/code/hath.xhtml
7 bug-reports: mailto:michael@orlitzky.com
8 category: Utils
9 license: AGPL-3.0-only
10 license-file: doc/LICENSE
11 build-type: Simple
12 extra-source-files:
13 doc/man1/hath.1
14 test/shell/*.test
15 synopsis:
16 Hath manipulates network blocks in CIDR notation.
17 description:
18 Hath is a Haskell program for working with network blocks in CIDR
19 notation. When dealing with blocks of network addresses, there are a
20 few things that one usually wants to do with them:
21
22 * Create a regular expression matching the CIDR block(s). This is
23 because grep will throw up if you feed it CIDR.
24
25 * Combine small blocks into larger ones. For example, if you have two
26 consecutive \/24s, they might combine into a larger \/23.
27
28 * View the result of block combination in a useful way.
29
30 * List them.
31
32 Hath has several modes to perform these functions:
33
34 * __Regexed__
35 This computes a (Perl-compatible) regular expression matching
36 the input CIDR blocks. It's the default mode of operation.
37
38 * __Reduced__
39 This combines small blocks into larger ones where possible, and
40 eliminates redundant blocks. The output should be equivalent to
41 the input, though.
42
43 * __Duped__
44 Shows only the blocks that would be removed by reduce; that is, it
45 shows the ones that would get combined into larger blocks or are
46 simply redundant.
47
48 * __Diffed__
49 Shows what would change if you used reduce. Uses diff-like
50 notation.
51
52 * __Listed__
53 List the IP addresses contained within the given CIDRs.
54
55 /Examples/:
56
57 Compute a (Perl-compatible) regular expression matching
58 the input CIDR blocks. It's the default mode of operation.
59
60 @
61 $ echo \"10.0.0.0\/29 10.0.0.8\/29\" | hath
62 ((10)\.(0)\.(0)\.(15|14|13|12|11|10|9|8|7|6|5|4|3|2|1|0))
63 @
64
65 Combine two \/24s into a \/23:
66
67 @
68 $ echo \"10.0.0.0\/24 10.0.1.0\/24\" | hath reduced
69 10.0.0.0/23
70 @
71
72 List the addresses in 192.168.0.240\/29:
73
74 @
75 $ echo 192.168.0.240\/29 | hath listed
76 192.168.0.240
77 192.168.0.241
78 192.168.0.242
79 192.168.0.243
80 192.168.0.244
81 192.168.0.245
82 192.168.0.246
83 192.168.0.247
84 @
85
86 The command-line syntax and complete set of options are documented in
87 the man page.
88
89
90 executable hath
91 default-language:
92 Haskell2010
93
94 main-is:
95 Main.hs
96
97 hs-source-dirs:
98 src/
99
100 other-modules:
101 Bit
102 Cidr
103 CommandLine
104 ExitCodes
105 IPv4Address
106 Maskable
107 Maskbits
108 Octet
109 Paths_hath
110
111 autogen-modules:
112 Paths_hath
113
114 build-depends:
115 base >= 4.15 && < 5.0,
116 cmdargs >= 0.10,
117 split >= 0.2,
118 tasty >= 0.8,
119 tasty-hunit >= 0.8,
120 tasty-quickcheck >= 0.8.1
121
122
123 test-suite testsuite
124 type: exitcode-stdio-1.0
125 hs-source-dirs: src test
126 default-language: Haskell2010
127 main-is: TestSuite.hs
128
129 other-modules:
130 Bit
131 Cidr
132 IPv4Address
133 Maskable
134 Maskbits
135 Octet
136
137 build-depends:
138 base >= 4.15 && < 5.0,
139 split >= 0.2,
140 tasty >= 0.8,
141 tasty-hunit >= 0.8,
142 tasty-quickcheck >= 0.8.1
143
144
145 -- These won't work without shelltestrunner installed in your
146 -- $PATH. Maybe there is some way to tell Cabal that.
147 test-suite shelltests
148 type: exitcode-stdio-1.0
149 hs-source-dirs: test
150 default-language: Haskell2010
151 main-is: ShellTests.hs
152
153 build-depends:
154 base >= 4.15 && < 5.0,
155 process >= 1.1
156
157
158 source-repository head
159 type: git
160 location: http://gitweb.michael.orlitzky.com/hath.git
161 branch: master