simple_wiki_converter 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd68361cd5d2ebfc52e8a89425f99739eb075e6c728e33cf4e9bceb7ee80033f
4
- data.tar.gz: 96f4c245af607396ca0b67e36beaf6f71850b6c6e7e778b8d217ff59a89d7477
3
+ metadata.gz: f2aa4d5b9d0c6fe40b1f5de6183cb799388d1e5fc83a8881b937479fb726d290
4
+ data.tar.gz: a870fe95daa869018118049e7f42b5418c4f17a6722a2f34bdf33f3e33dcce30
5
5
  SHA512:
6
- metadata.gz: 17b935ee8d5a06518439466913b89149cb1625b96c3f6f5957f70a43e17bc84bc385f862f62cfaa054b9c82371f7df8937f580cf8e998485e42725e57532fcdc
7
- data.tar.gz: f26f4e8ab019a80dec942d2c9505eca222a7ae47657aafc3f2246b6c908d11b04df0cbc0a96ce5b18347b97790190b74f91134133de03451d86e124c70fadf02
6
+ metadata.gz: 7ab554cd2b59df12983f143265cd9d307dab2e51c5e63c42e6376dc9847ea66cf461c72532dfde7534fa46869e3a7201ecc72bc3ba177f7f9d7acb1454cfefdd
7
+ data.tar.gz: 959a32eaeeca53b55d7407e1578a4f254d8d1ef1fc97869525245c3c9fdf25763a375d5ce13fa7d478df92c0ba4c61b555279cfcc9f586cab60c2c98b8533524
data/README.md CHANGED
@@ -7,6 +7,14 @@ Wikipedia articles are infamous for being heavily referenced. One article could
7
7
 
8
8
  ## Installation
9
9
 
10
+ $ gem install simple_wiki_converter
11
+
12
+ $ require 'simple_wiki_converter'
13
+
14
+ $ scraper = SimpleWikiConverter::WikiScraper.new("enter-url-here")
15
+
16
+ $ puts scraper.scrape
17
+
10
18
  TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
11
19
 
12
20
  Install the gem and add to the application's Gemfile by executing:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleWikiConverter
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -36,17 +36,26 @@ module SimpleWikiConverter
36
36
  end
37
37
 
38
38
 
39
- if __FILE__ == $0
40
- def main
41
- if ARGV.empty?
42
- puts "Usage: simple_wiki_converter URL"
43
- exit
44
- end
45
39
 
46
- url = ARGV[0]
47
- scraper = SimpleWikiConverter::WikiScraper.new(url)
48
- puts scraper.scrape
40
+ def main
41
+ if ARGV.empty?
42
+ puts "Usage: simple_wiki_converter URL"
43
+ exit
49
44
  end
50
45
 
51
- main
52
- end
46
+ url = ARGV[0]
47
+ scraper = SimpleWikiConverter::WikiScraper.new(url)
48
+ scraped_content = scraper.scrape
49
+
50
+ # Define the filename
51
+ filename = "scraped_content.txt"
52
+
53
+ # Write to the file
54
+ File.open(filename, "w") do |file|
55
+ file.write(scraped_content)
56
+ end
57
+
58
+ puts "Scraped content saved to #{filename}"
59
+ end
60
+
61
+ main if __FILE__ == $0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_wiki_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shreyas