Explorar o código

Merge pull request #1325 from MasterEnoc/gcc

Update Gcc scraper
Simon Legner %!s(int64=5) %!d(string=hai) anos
pai
achega
3479917102
Modificáronse 2 ficheiros con 26 adicións e 2 borrados
  1. 14 0
      docs/file-scrapers.md
  2. 12 2
      lib/docs/scrapers/gnu/gcc.rb

+ 14 - 0
docs/file-scrapers.md

@@ -38,6 +38,20 @@ Go to https://www.erlang.org/downloads and download the HTML documentation file.
 ## Gnu
 
 ### GCC
+Go to https://gcc.gnu.org/onlinedocs/ and download the HTML tarball of GCC Manual and GCC CPP manual or run the following commands to download the tarballs:
+
+```sh
+# GCC manual
+mkdir docs/gcc~${VERSION}; \
+curl https://gcc.gnu.org/onlinedocs/gcc-$RELEASE/gcc-html.tar.gz | \
+tar --extract --gzip --strip-components=1 --directory=docs/gcc~${VERSION}
+
+# GCC CPP manual
+mkdir docs/gcc~${VERSION}_cpp; \
+curl https://gcc.gnu.org/onlinedocs/gcc-$RELEASE/cpp-html.tar.gz | \
+tar --extract --gzip --strip-components=1 --directory=docs/gcc~${VERSION}_cpp
+```
+
 ### GNU Fortran
 
 ## Gnuplot

+ 12 - 2
lib/docs/scrapers/gnu/gcc.rb

@@ -46,13 +46,23 @@ module Docs
       'Wtrigraphs.html' => 'Invocation.html'
     }
 
+    version '10' do
+      self.release = '10.2.0'
+      self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
+    end
+
+    version '10 CPP' do
+      self.release = '10.2.0'
+      self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
+    end
+
     version '9' do
-      self.release = '9.2.0'
+      self.release = '9.3.0'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
     end
 
     version '9 CPP' do
-      self.release = '9.2.0'
+      self.release = '9.3.0'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
 
       options[:replace_paths] = CPP_PATHS