Browse Source

Update Gcc scraper

- Add 10.2.0 version

- Update previous versions
MasterEnoc 5 years ago
parent
commit
fd3b81e7c0
2 changed files with 40 additions and 12 deletions
  1. 18 0
      docs/file-scrapers.md
  2. 22 12
      lib/docs/scrapers/gnu/gcc.rb

+ 18 - 0
docs/file-scrapers.md

@@ -35,6 +35,24 @@ 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
+wget https://gcc.gnu.org/onlinedocs/gcc-<version>/gcc-html.tar.gz
+# Gcc cpp manual
+wget https://gcc.gnu.org/onlinedocs/gcc-<version>/cpp-html.tar.gz
+```
+
+Then extract the content of the tarball and move it to the devdocs directory.
+
+```sh
+tar xf <tarball>
+# Gcc
+mv <extracted_directory> path/to/devdocs/docs/gcc~<version>/
+# Gcc Cpp
+mv <extracted_directory> path/to/devdocs/docs/gcc~<version>_cpp/
+```
 ### GNU Fortran
 
 ## Gnuplot

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

@@ -46,79 +46,89 @@ 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
     end
 
     version '8' do
-      self.release = '8.3.0'
+      self.release = '8.4.0'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
     end
 
     version '8 CPP' do
-      self.release = '8.3.0'
+      self.release = '8.4.0'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
 
       options[:replace_paths] = CPP_PATHS
     end
 
     version '7' do
-      self.release = '7.4.0'
+      self.release = '7.5.0'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
     end
 
     version '7 CPP' do
-      self.release = '7.4.0'
+      self.release = '7.5.0'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
 
       options[:replace_paths] = CPP_PATHS
     end
 
     version '6' do
-      self.release = '6.4.0'
+      self.release = '6.5.0'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
 
       options[:root_title] = 'Using the GNU Compiler Collection (GCC)'
     end
 
     version '6 CPP' do
-      self.release = '6.4.0'
+      self.release = '6.5.0'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
 
       options[:replace_paths] = CPP_PATHS
     end
 
     version '5' do
-      self.release = '5.4.0'
+      self.release = '5.5.0'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
 
       options[:root_title] = 'Using the GNU Compiler Collection (GCC)'
     end
 
     version '5 CPP' do
-      self.release = '5.4.0'
+      self.release = '5.5.0'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
 
       options[:replace_paths] = CPP_PATHS
     end
 
     version '4' do
-      self.release = '4.9.3'
+      self.release = '4.9.4'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
 
       options[:root_title] = 'Using the GNU Compiler Collection (GCC)'
     end
 
     version '4 CPP' do
-      self.release = '4.9.3'
+      self.release = '4.9.4'
       self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
 
       options[:replace_paths] = CPP_PATHS