# This file automatically generates Crystal strings of rows within an HTML Javascript licenses table # # These strings will then be placed within a `<%= %>` statement in licenses.ecr at compile time which # will be interpolated at run-time. This interpolation is only for the translation of the "source" string # so maybe we can just switch to a non-translated string to simplify the logic here. # # The Javascript Web Labels table defined at https://www.gnu.org/software/librejs/free-your-javascript.html#step3 # for example just reiterates the name of the source file rather than use a "source" string. all_javascript_files = Dir.glob("assets/**/*.js") videojs_js = [] of String invidious_js = [] of String all_javascript_files.each do |js_path| if js_path.starts_with?("assets/videojs/") videojs_js << js_path[7..] else invidious_js << js_path[7..] end end def create_licence_tr(path, file_name, licence_name, licence_link, source_location) tr = <<-HTML "