ImpUnit 0.3.4 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42cd656008cd503ee77c65bbca9609d82d22556268794221e825f506427a2afb
4
- data.tar.gz: 7140702f3392bfa6f2533c36b32bf95431bd0029d2d6eda84bad7dda75f37640
3
+ metadata.gz: deeeeaa4b363cfe259a846c34cfec6a8bf6829147b0bbcd28eeab3a7fe7c9afd
4
+ data.tar.gz: 07197fae2ad86bb46fdab92b54099d5b755dedb61309dde9bac53f11916b867c
5
5
  SHA512:
6
- metadata.gz: 95c9856c1da4d736d2a91e7abc7d3ff76a69024aa8d6c7401880fd74cc138657f4b08c6b3e54ca11f3345299efc67829ce29aafd26b82b66e98dfcb6a7e81963
7
- data.tar.gz: 576f3b26ab1da9bb8fe63226ff0a3d18882836e0925077de2f9db8646f297ed17b27a3b906fe4c570dcdf064200e7415b44b659e1602825c2574b3e38b441059
6
+ metadata.gz: 39b8c09eaa84453083c5b1318256f102a677001dd26018666cb80cdf3f7241f49f12f5c70999911aa00dbb137f11d6ba60c6198c216f4c7474f7e040bf46b188
7
+ data.tar.gz: 54996748d1ea6013a0130d35360137c2f1b6dc35f81d25742973013d41eeef280cc49a1b48c1433fa51faa485f50010ff4f5ec723ab4cf4f99276f66de2abbda
data/ImpUnit.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["lwflouisa@gmail.com"]
11
11
 
12
12
  spec.summary = %q{ImpUnit engine. The intent is a human like intelligence small enough to fit into a thumb drive.}
13
- spec.description = %q{Implementing the main engine and subroutines into a gem so I don't have to continuously recreate the wheel.}
13
+ spec.description = %q{Implementing the main engine and subroutines into a gem so I don't have to continuously recreate the wheel. Finally got the local subscriptions feed for rikusuto mode to work.}
14
14
  spec.homepage = "https://github.com/LWFlouisa/ImpUnitApp"
15
15
 
16
16
  # Specify which files should be added to the gem when it is released.
@@ -1,3 +1,3 @@
1
1
  module ImpUnit
2
- VERSION = "0.3.4"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/ImpUnit.rb CHANGED
@@ -355,9 +355,9 @@ end"
355
355
  attributes = ['Rikusuto']
356
356
 
357
357
  training = [
358
- [ 0.5, "will you get"],
359
- [ 50.0, "will you obtain"],
360
- [100.0, "may I have"],
358
+ [ 0.5, "vohonitos viyos eros"], # will you get
359
+ [ 50.0, "vohonitos viyos obetenos"], # will you obtain
360
+ [100.0, "putos ne avoros"], # may I have
361
361
  ]
362
362
 
363
363
  # Instantiate the tree, and train it based on the data (set default to '1')
@@ -391,11 +391,11 @@ end"
391
391
  attributes = ['Atemu']
392
392
 
393
393
  training = [
394
- [ 0.5, "a banana"],
395
- [ 25.0, "an orange"],
396
- [ 50.0, "an apple"],
397
- [ 75.0, "a pineapple"],
398
- [100.0, "a lime"],
394
+ [ 0.5, "Eramos onas bananos"], # Banana
395
+ [ 25.0, "Eramos onas oranigos"], # Orange
396
+ [ 50.0, "Eramos onas pomos"], # Apple
397
+ [ 75.0, "Eramos onas pinapuros"], # Pineapple
398
+ [100.0, "Eramos onas himos"], # Lime
399
399
  ]
400
400
 
401
401
  # Instantiate the tree, and train it based on the data (set default to '1')
@@ -451,15 +451,18 @@ end"
451
451
 
452
452
  # ImpUnit::FXML.generate
453
453
  def self.generate
454
- xml_header = '<?xml version="1.0" encoding="UTF-8"?>
454
+ old_output = File.read("feed/old_feed.txt")
455
455
 
456
- <?xml-stylesheet type="text/css" href="styles/stylesheet.css"?>'
456
+ # Get the date.
457
+ system("date > date/date.txt")
457
458
 
458
- # Topic tags
459
- topic_header = "<topic>"
460
- topic_bottom = "</topic>"
459
+ # Immutables
460
+ date = File.read("date/date.txt").strip
461
+ date_title = date.tr " ", "_"
461
462
 
462
463
  # Read in from files.
464
+ system("ruby .rikusuto.rb; ruby .atemu.rb; ruby .yuza.rb")
465
+
463
466
  agent_name = File.read("data/usr_identity/name.txt").strip.to_s
464
467
  request_type = File.read("data/rikusuto/request.txt").strip.to_s
465
468
  item = File.read("data/atemu/items.txt").strip.to_s
@@ -467,14 +470,14 @@ end"
467
470
  local_name = File.read("data/usr_identity/local_name.txt").strip.to_s
468
471
 
469
472
  # Create XML tags
470
- salut = "Hello"
471
- ejento = " #{agent_name}"
472
- rikusuto = " #{request_type}"
473
- atemu = " #{item}"
474
- nitote = " for"
475
- kara = " from"
476
- yuza = " #{user_name}"
477
- lieu = " #{local_name}?"
473
+ salut = "Ehiyo"
474
+ ejento = "#{agent_name}!"
475
+ rikusuto = "#{request_type}"
476
+ atemu = "#{item}"
477
+ nitote = "nitote"
478
+ kara = "kara"
479
+ yuza = "#{user_name}?"
480
+ lieu = "#{local_name}?"
478
481
 
479
482
  conjucate = [nitote, kara]
480
483
  consign = conjucate.sample
@@ -482,16 +485,40 @@ end"
482
485
  user_location = [yuza, lieu]
483
486
  usign = user_location[0]
484
487
 
485
- system("date +'%Y-%d-%m' > date.txt")
488
+ # Generate description and XML timeline.
489
+ description = "#{salut} #{ejento} #{atemu} #{rikusuto} #{consign} #{usign}"
490
+
491
+ open("documents/#{date_title}.txt", "w") { |f|
492
+ f.puts description
493
+ }
494
+
495
+ new_output = "
496
+ <item>
497
+ <title>#{date}</title>
498
+ <link>http://localhost:8000/documents/#{date_title}.txt</link>
499
+ <description><![CDATA[<p>#{description}</p>]]></description>
500
+ </item>"
501
+
502
+ open("feed/old_feed.txt", "w") { |f|
503
+ f.puts new_output
504
+ }
505
+
506
+ generate_xml = "<?xml version='1.0' encoding='UTF-8' ?>
507
+ <rss version='2.0'>
508
+
509
+ <channel>
510
+ <title>Personal Blog</title>
511
+ <link>http://localhost:8000/feed.xml</link>
512
+ <description>Local Feed for ImpUnit output.</description>
513
+
514
+ #{new_output}
515
+ #{old_output}
516
+ </channel>
486
517
 
487
- date = File.read("date.txt").strip.to_s
518
+ </rss>"
488
519
 
489
- open("#{date}-update.md", "w") { |f|
490
- f.puts "---"
491
- f.puts "title: '#{date} Update'"
492
- f.puts "layout: post"
493
- f.puts "---"
494
- f.puts "#{salut} #{ejento} #{rikusuto} #{atemu} #{consign} #{usign}"
520
+ open("feed/feed.xml", "w") { |f|
521
+ f.puts generate_xml
495
522
  }
496
523
  end
497
524
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ImpUnit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - LWFlouisa
@@ -39,7 +39,8 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  description: Implementing the main engine and subroutines into a gem so I don't have
42
- to continuously recreate the wheel.
42
+ to continuously recreate the wheel. Finally got the local subscriptions feed for
43
+ rikusuto mode to work.
43
44
  email:
44
45
  - lwflouisa@gmail.com
45
46
  executables: []