diff --git a/lib/docs/filters/tcl_tk/clean_html.rb b/lib/docs/filters/tcl_tk/clean_html.rb index 5691c3f6fb..ab99f781f3 100644 --- a/lib/docs/filters/tcl_tk/clean_html.rb +++ b/lib/docs/filters/tcl_tk/clean_html.rb @@ -35,6 +35,10 @@ def call node.content = node.content.capitalize end + css('pre').each do |node| + node['data-language'] = 'tcl' + end + doc end end diff --git a/lib/docs/scrapers/tcl_tk.rb b/lib/docs/scrapers/tcl_tk.rb index ec9d5ed427..95a9cf86b4 100644 --- a/lib/docs/scrapers/tcl_tk.rb +++ b/lib/docs/scrapers/tcl_tk.rb @@ -3,11 +3,8 @@ class TclTk < UrlScraper self.name = 'Tcl/Tk' self.type = 'tcl_tk' self.slug = 'tcl_tk' - self.release = '8.6.6' - self.base_url = 'https://www.tcl.tk/man/tcl/' - self.root_path = 'contents.htm' self.links = { - home: 'https://www.tcl.tk/', + home: 'https://www.tcl-lang.org/', code: 'https://sourceforge.net/projects/tcl/files/Tcl/' } @@ -27,11 +24,22 @@ class TclTk < UrlScraper ] options[:attribution] = <<-HTML - Licensed under Tcl/Tk terms + Licensed under Tcl/Tk terms HTML + version '9.0' do + self.base_url = "https://www.tcl-lang.org/man/tcl#{self.version}/" + self.release = '9.0.2' + end + + version '8.6' do + self.base_url = "https://www.tcl-lang.org/man/tcl#{self.version}/" + self.root_path = 'contents.htm' + self.release = '8.6.16' + end + def get_latest_version(opts) - doc = fetch_doc('https://www.tcl.tk/man/tcl/contents.htm', opts) + doc = fetch_doc('https://www.tcl-lang.org/man/tcl/', opts) doc.at_css('h2').content.scan(/Tk([0-9.]+)/)[0][0] end end diff --git a/public/icons/docs/tcl_tk/16.png b/public/icons/docs/tcl_tk/16.png index eb88a3bb08..4485795098 100644 Binary files a/public/icons/docs/tcl_tk/16.png and b/public/icons/docs/tcl_tk/16.png differ diff --git a/public/icons/docs/tcl_tk/16@2.png b/public/icons/docs/tcl_tk/16@2.png deleted file mode 100644 index 3e00d1f653..0000000000 Binary files a/public/icons/docs/tcl_tk/16@2.png and /dev/null differ diff --git a/public/icons/docs/tcl_tk/16@2x.png b/public/icons/docs/tcl_tk/16@2x.png new file mode 100644 index 0000000000..969c355c95 Binary files /dev/null and b/public/icons/docs/tcl_tk/16@2x.png differ diff --git a/public/icons/docs/tcl_tk/SOURCE b/public/icons/docs/tcl_tk/SOURCE index 91f3566f9c..c6aea9ed9a 100644 --- a/public/icons/docs/tcl_tk/SOURCE +++ b/public/icons/docs/tcl_tk/SOURCE @@ -1 +1 @@ -https://commons.wikimedia.org/wiki/File:Tcl.svg +https://www.tcl-lang.org/images/plume.png