[devdocsgjs/main: 1689/1867] Add get_latest_version to latex




commit 589aeb7f6e682f04fb4d9c704ec8dfab06ab6852
Author: Enoc <brianhernandez222 hotmail com>
Date:   Tue Jun 1 01:14:03 2021 -0600

    Add get_latest_version to latex

 lib/docs/scrapers/latex.rb | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/lib/docs/scrapers/latex.rb b/lib/docs/scrapers/latex.rb
index e603b72a..816f1d64 100644
--- a/lib/docs/scrapers/latex.rb
+++ b/lib/docs/scrapers/latex.rb
@@ -1,8 +1,10 @@
+# coding: utf-8
 module Docs
   class Latex < UrlScraper
     self.name = 'LaTeX'
     self.slug = 'latex'
     self.type = 'simple'
+    self.release = 'April 2021'
     self.links = {
         home: 'https://ctan.org/pkg/latex2e-help-texinfo/'
     }
@@ -18,5 +20,12 @@ module Docs
       Public Domain Software
     HTML
 
+    def get_latest_version(opts)
+      body = fetch('https://latexref.xyz/', opts)
+      body = body.scan(/\(\w+\s\d+\)/)[0]
+      body.sub!('(', '')
+      body.sub!(')', '')
+    end
+
   end
 end


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]