# frozen_string_literal: true require "cli/parser" require "resource" require "formula" module Homebrew module_function def aspell_dictionaries_args Homebrew::CLI::Parser.new do usage_banner <<~EOS `aspell-dictionaries` Generates the new dictionaries for the `aspell` formula. EOS end end def aspell_dictionaries aspell_dictionaries_args.parse dictionary_url = "https://ftp.gnu.org/gnu/aspell/dict" dictionary_mirror = "https://ftpmirror.gnu.org/aspell/dict" languages = {} index_output, = curl_output("#{dictionary_url}/0index.html") index_output.split("").each do |line| next unless line.start_with?("