simple_wiki_converter 0.1.0 → 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: 549f7f60c3a88d65f6c3d1db498856aa89cf3bf32c7ec4d11a92756b6da2a5eb
4
- data.tar.gz: 327a5f2dfac246f5471a0907d9d3a05ecaa7c82f6cd1105eda74449acae28c57
3
+ metadata.gz: f2aa4d5b9d0c6fe40b1f5de6183cb799388d1e5fc83a8881b937479fb726d290
4
+ data.tar.gz: a870fe95daa869018118049e7f42b5418c4f17a6722a2f34bdf33f3e33dcce30
5
5
  SHA512:
6
- metadata.gz: b5bd71fc11835dd53d8fe3a465f64adfeb963ada9427b92375954edd8663f9fc6e8d4df9f184545c458e3506580bf6956c5b5febc173f1773e6a482c573b9708
7
- data.tar.gz: 838785c74b71bc0d38d31e8a4d3ac847a8757ee59fb70c0ea6a3306b5140fd6c10bc31c5d5ba37a8f61415d5fe5b0d528d3926e5ba7a89c6047fbd803224840a
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.0"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -35,6 +35,8 @@ module SimpleWikiConverter
35
35
  end
36
36
  end
37
37
 
38
+
39
+
38
40
  def main
39
41
  if ARGV.empty?
40
42
  puts "Usage: simple_wiki_converter URL"
@@ -42,8 +44,18 @@ def main
42
44
  end
43
45
 
44
46
  url = ARGV[0]
45
- scraper = SimpleWikiConverter::WikiScraper.new(url) # Updated to match the class name
46
- puts scraper.scrape
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}"
47
59
  end
48
60
 
49
- main # Invoking the main method
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.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shreyas