system_call 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/system_call.rb +48 -0
  3. metadata +45 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 03f1747215da02471f4acd043d64f7178433ce9b
4
+ data.tar.gz: 98f698a3741beeb5acb82bf5773254e6540f6371
5
+ SHA512:
6
+ metadata.gz: df3b870e0b4280cb9f8dfee7d503061874a79855568304c019ae20d872ca558d127c15fa4b66ad7e5b19a92a3e4b7e07ef43aadaf6831e00884f54fb4643547f
7
+ data.tar.gz: 6ead349a8b5b5a1c7b38d6b06fcb491b61384dae7a9f1da4ac36d4f75638ffad3407d4b7881368b61f93215a33fbe0b18f823e367e31c17e4c2ac4810c2be20c
@@ -0,0 +1,48 @@
1
+ require 'rubygems'
2
+ require 'nokogiri'
3
+ require 'open-uri'
4
+ require 'action_view'
5
+
6
+ class System_Call
7
+
8
+ def generate_list()
9
+
10
+ $stdout = File.new('E:/System Calls in UNIX.txt', 'a')
11
+ $stdout.sync = true
12
+ addr = "http://linasm.sourceforge.net/docs/syscalls"
13
+ new_page = Nokogiri::HTML(open("http://linasm.sourceforge.net/docs/syscalls/index.php"))
14
+ moji = new_page.css('aside')
15
+ moji1 = moji.css('a').map { |link| link['href'] }
16
+ $count_1 = moji1.length
17
+ $counting = 1
18
+ while $counting < $count_1
19
+ $full = "http://linasm.sourceforge.net/docs/syscalls/" + moji1[$counting]
20
+ $counting = $counting + 1
21
+ pageo = Nokogiri::HTML(open($full))
22
+ puts pageo.css('title').text
23
+ sho = pageo.css('tr')
24
+ $count = 1
25
+ $countx = sho.length
26
+ while $count < $countx
27
+ link1 = sho[$count].css('a').map { |link| link['href'] }
28
+ if !link1[0]
29
+ $count = $count + 1
30
+ next
31
+ end
32
+ puts link1[0]
33
+ page = Nokogiri::HTML(open(link1[0]))
34
+ sh = page.css('pre')
35
+ puts sh.length
36
+ puts "SYSTEM CALL:"
37
+ puts page.css('title').text
38
+ puts "FUNCTIONALITY:"
39
+ puts sh[1].text
40
+ puts "SYNOPSIS:"
41
+ puts sh[2].text
42
+ puts "DESCRIPTION"
43
+ puts sh[3].text
44
+ $count = $count + 1
45
+ end
46
+ end
47
+ end
48
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: system_call
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Aditya Chatterjee
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-08-10 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A gem for creating a list of system calls used in UNIX based systems
14
+ email: aditianhacker@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/system_call.rb
20
+ homepage: http://rubygems.org/gems/system_call
21
+ licenses:
22
+ - CC0-1.0
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.4.5.1
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: The system_call gem provides a way to scrape data from linasm.sourceforge.net
44
+ to create a list of system calls used in UNIX based systems
45
+ test_files: []