Skip to content

Commit

Permalink
find and share map details for all scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
WardCunningham committed Sep 27, 2023
1 parent e468efb commit f595d91
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ def split find, query
halt 200, {:params => params, :result => result}.to_json
end

get '/xref' do
headers 'Access-Control-Allow-Origin' => '*'
content_type 'text/plain'
`ruby xref.rb`
end

get '/favicon.png' do
headers 'Access-Control-Allow-Origin' => '*'
send_file 'favicon.png'
Expand Down
7 changes: 7 additions & 0 deletions xref.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
file = 'cron.sh'
script = File.read(file).split(/\n/)
script.each_with_index do |line, index|
if line.include? "#"
puts "#{file} #{index} #{line}"
end
end

0 comments on commit f595d91

Please sign in to comment.