mirror of
https://github.com/johnkerl/miller.git
synced 2026-08-01 12:11:15 +00:00
reference-dsl
This commit is contained in:
parent
0867f89e41
commit
f1084f2a58
5 changed files with 6181 additions and 2 deletions
12
docs/h3foo
Executable file
12
docs/h3foo
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
awk '{
|
||||
if ($0 ~ /.*<h3>.*/) {
|
||||
sub(/<h3>/, "");
|
||||
sub(/<\/h3>/, "");
|
||||
print;
|
||||
print "................................................................";
|
||||
} else {
|
||||
print $0
|
||||
}
|
||||
}' "$@"
|
||||
33
docs/mk-func-h2s.sh
Executable file
33
docs/mk-func-h2s.sh
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
# In case the user running this has a .mlrrc
|
||||
export MLRRC=__none__
|
||||
|
||||
mlr -F | grep -v '^[a-zA-Z]' | uniq | while read funcname; do
|
||||
echo ""
|
||||
echo ".. _\"$funcname\":"
|
||||
echo ""
|
||||
echo "$funcname"
|
||||
echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
|
||||
echo ""
|
||||
echo '::'
|
||||
echo ''
|
||||
mlr --help-function "$funcname" | sed 's/^/ /'
|
||||
echo ''
|
||||
echo ''
|
||||
done
|
||||
|
||||
mlr -F | grep '^[a-zA-Z]' | sort -u | while read funcname; do
|
||||
echo ""
|
||||
echo ".. _\"$funcname\":"
|
||||
echo ""
|
||||
echo "$funcname"
|
||||
echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
|
||||
echo ""
|
||||
echo '::'
|
||||
echo ''
|
||||
mlr --help-function "$funcname" | sed 's/^/ /'
|
||||
echo ''
|
||||
echo ''
|
||||
done
|
||||
|
||||
22
docs/mk-func-table.rb
Executable file
22
docs/mk-func-table.rb
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
lines = `mlr --list-all-functions-as-table`
|
||||
counter = 0
|
||||
lines.split("\n").each do |line|
|
||||
counter = counter + 1
|
||||
if line =~ /^? :.*/ # has an extra whitespace which throws off the naive split
|
||||
ig, nore, function_class, nargs = line.split(/\s+/)
|
||||
name = '? :'
|
||||
else
|
||||
name, function_class, nargs = line.split(/\s+/)
|
||||
end
|
||||
|
||||
if counter == 1
|
||||
puts "+--------------+-----------+-------+"
|
||||
puts "| #{name} | #{function_class} | #{nargs} |"
|
||||
puts "+==============+===========+=======+"
|
||||
else
|
||||
puts "| a href=\"##{name}\" #{name} | #{function_class} | #{nargs} |"
|
||||
puts "+--------------+-----------+-------+"
|
||||
end
|
||||
end
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue