bilisim_sozlugu 0.0.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -3
- data/bilisim_sozlugu.gemspec +4 -4
- data/bin/sozluk +9 -0
- data/lib/bilisim_sozlugu.rb +8 -10
- data/lib/bilisim_sozlugu/version.rb +1 -1
- metadata +17 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5352629a505e9557ca606f6860c053ec981d501d9cbc5ed5b9b06c3f10360e6f
|
4
|
+
data.tar.gz: 62e2a031616ef835f0cb7abe1bd49d50dadac411e78756b5cfbf368cf167a85e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd8d385a4f1900703350b6e00cd1a7ecc7e4dc6cf05b11f653a6f540fa2adcdf40d480a36a1b5e778bfe8a830a330e342e101ca0810c5b25bc2f74e820a2ba90
|
7
|
+
data.tar.gz: 255bbc2741d5e516354beb9466b4d81e16db5adf5faddf02ab23c007d07dfa30dd138204740caf654a99b03527e6c99b2b716ebd889b2d0fbe2d5b88bd7c3ebc
|
data/README.md
CHANGED
@@ -20,9 +20,7 @@ Or install it yourself as:
|
|
20
20
|
## Usage
|
21
21
|
|
22
22
|
```
|
23
|
-
|
24
|
-
$ require 'bilisim_sozlugu'
|
25
|
-
$ BilisimSozlugu.search('memory')
|
23
|
+
$ sozluk memory
|
26
24
|
|
27
25
|
# +---------------------------+-----------------------------+
|
28
26
|
# | belleği derleyip toplama | memory compaction |
|
data/bilisim_sozlugu.gemspec
CHANGED
@@ -8,18 +8,18 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = BilisimSozlugu::VERSION
|
9
9
|
spec.authors = ["Ender Ahmet Yurt"]
|
10
10
|
spec.email = ["enderyurt@gmail.com"]
|
11
|
-
spec.summary = "Translate
|
12
|
-
spec.description = "Translating English
|
11
|
+
spec.summary = "Translate Computer Terms from English to Turkish."
|
12
|
+
spec.description = "Translating English terms related to Computer Sciences to Turkish from Informatics Association of Turkey's offical website."
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables =
|
17
|
+
spec.executables = 'sozluk'
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.6"
|
22
22
|
spec.add_development_dependency "rake"
|
23
|
-
spec.add_development_dependency "nokogiri", "
|
23
|
+
spec.add_development_dependency "nokogiri", ">= 1.10.8"
|
24
24
|
spec.add_development_dependency "terminal-table"
|
25
25
|
end
|
data/bin/sozluk
ADDED
data/lib/bilisim_sozlugu.rb
CHANGED
@@ -2,25 +2,23 @@ require "rubygems"
|
|
2
2
|
require "open-uri"
|
3
3
|
require "nokogiri"
|
4
4
|
require 'terminal-table'
|
5
|
-
|
6
5
|
require "bilisim_sozlugu/version"
|
7
6
|
|
8
7
|
module BilisimSozlugu
|
9
|
-
URL
|
8
|
+
URL = "http://eski.tbd.org.tr/index.php?sayfa=sozluk&mi1&tipi=ara&harf=A&arama=".freeze
|
9
|
+
CSS_SELECTOR = "table tbody tr".freeze
|
10
10
|
|
11
11
|
def self.search(word)
|
12
|
-
words = []
|
13
12
|
call_url = URL + word
|
14
|
-
page
|
15
|
-
rows
|
16
|
-
|
13
|
+
page = Nokogiri::HTML(open(call_url))
|
14
|
+
rows = page.css(CSS_SELECTOR)
|
15
|
+
|
16
|
+
if rows.last.text.match("Aranan Kelime")
|
17
17
|
puts "Aradığınız kelime bulunamadı."
|
18
18
|
else
|
19
|
-
rows.
|
20
|
-
words << [row.children.first.children.text, row.children.last.text]
|
21
|
-
end
|
19
|
+
words = rows.map { |row| [row.children.first.children.text, row.children.last.text] }
|
22
20
|
table = Terminal::Table.new :rows => words.drop(2)
|
23
21
|
puts table
|
24
|
-
end
|
22
|
+
end
|
25
23
|
end
|
26
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bilisim_sozlugu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ender Ahmet Yurt
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: nokogiri
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.10.8
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.10.8
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: terminal-table
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,11 +66,12 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description: Translating English
|
70
|
-
|
69
|
+
description: Translating English terms related to Computer Sciences to Turkish from
|
70
|
+
Informatics Association of Turkey's offical website.
|
71
71
|
email:
|
72
72
|
- enderyurt@gmail.com
|
73
|
-
executables:
|
73
|
+
executables:
|
74
|
+
- sozluk
|
74
75
|
extensions: []
|
75
76
|
extra_rdoc_files: []
|
76
77
|
files:
|
@@ -80,13 +81,14 @@ files:
|
|
80
81
|
- README.md
|
81
82
|
- Rakefile
|
82
83
|
- bilisim_sozlugu.gemspec
|
84
|
+
- bin/sozluk
|
83
85
|
- lib/bilisim_sozlugu.rb
|
84
86
|
- lib/bilisim_sozlugu/version.rb
|
85
87
|
homepage: ''
|
86
88
|
licenses:
|
87
89
|
- MIT
|
88
90
|
metadata: {}
|
89
|
-
post_install_message:
|
91
|
+
post_install_message:
|
90
92
|
rdoc_options: []
|
91
93
|
require_paths:
|
92
94
|
- lib
|
@@ -101,10 +103,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
103
|
- !ruby/object:Gem::Version
|
102
104
|
version: '0'
|
103
105
|
requirements: []
|
104
|
-
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
106
|
-
signing_key:
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.7.10
|
108
|
+
signing_key:
|
107
109
|
specification_version: 4
|
108
|
-
summary: Translate
|
110
|
+
summary: Translate Computer Terms from English to Turkish.
|
109
111
|
test_files: []
|
110
|
-
has_rdoc:
|