Add urlgen/urlgen.cr

This commit is contained in:
gigirassy
2026-08-31 01:14:41 +02:00
parent f1d69007c1
commit 9b098d7647
+5
View File
@@ -0,0 +1,5 @@
# to generate a list of numbered urls in the style of example.com/1,example.com/2,...
a = ARGV.index("-r") || abort("usage: urlgen -r A-B template")
s, e = ARGV[a + 1].split('-').map(&.to_i)
t = ARGV[a + 2]
puts((s..e).map { |n| t.gsub("{}", n.to_s) }.join(","))