ImpUnit 0.3.1 → 0.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f85b197264749f965fb00349b1b90ddeea4293c9e0a69773c3781eb163f58934
4
- data.tar.gz: 97cd6854f3b1c546036f9a1fc75593a038cd19749b1faac04769b824586464ab
3
+ metadata.gz: deeeeaa4b363cfe259a846c34cfec6a8bf6829147b0bbcd28eeab3a7fe7c9afd
4
+ data.tar.gz: 07197fae2ad86bb46fdab92b54099d5b755dedb61309dde9bac53f11916b867c
5
5
  SHA512:
6
- metadata.gz: f3b1be34e3321f021742d5abd05dbb3531499b7e062ecefe962bacb66c713a7ab87511b2c7aea7e5769cf4a04a5d029698444be458b3b7bae51b392b35d588a1
7
- data.tar.gz: 15d9729030e568ad345ce011e594db474033f81a3852d77a7b427b93ab5d4b636805e25d969d271110c54ed3f01acc39cfd12ee1f8ab9e83cc1be795e86e6adc
6
+ metadata.gz: 39b8c09eaa84453083c5b1318256f102a677001dd26018666cb80cdf3f7241f49f12f5c70999911aa00dbb137f11d6ba60c6198c216f4c7474f7e040bf46b188
7
+ data.tar.gz: 54996748d1ea6013a0130d35360137c2f1b6dc35f81d25742973013d41eeef280cc49a1b48c1433fa51faa485f50010ff4f5ec723ab4cf4f99276f66de2abbda
data/ImpUnit.gemspec CHANGED
@@ -10,8 +10,8 @@ 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.}
14
- spec.homepage = "https://lwflouisa.github.io/ImpUnitGem"
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
+ spec.homepage = "https://github.com/LWFlouisa/ImpUnitApp"
15
15
 
16
16
  # Specify which files should be added to the gem when it is released.
17
17
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -1,3 +1,3 @@
1
1
  module ImpUnit
2
- VERSION = "0.3.1"
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'>
486
508
 
487
- date = File.read("date.txt").strip.to_s
509
+ <channel>
510
+ <title>Personal Blog</title>
511
+ <link>http://localhost:8000/feed.xml</link>
512
+ <description>Local Feed for ImpUnit output.</description>
488
513
 
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}"
514
+ #{new_output}
515
+ #{old_output}
516
+ </channel>
517
+
518
+ </rss>"
519
+
520
+ open("feed/feed.xml", "w") { |f|
521
+ f.puts generate_xml
495
522
  }
496
523
  end
497
524
  end
@@ -555,6 +582,8 @@ end"
555
582
  f.puts new_value
556
583
  }
557
584
 
585
+ sleep(0.5)
586
+
558
587
  ImpUnit::BotWings.reshape
559
588
  end
560
589
 
@@ -674,30 +703,38 @@ end"
674
703
  end
675
704
  end
676
705
 
677
- #module Bianca
678
- #class SmallTalk
679
- #def self.name
680
- #end
706
+ module Bianca
707
+ class SmallTalk
708
+ def self.discuss
709
+ require "programr"
681
710
 
682
- #def self.pets
683
- #end
711
+ bot_name = File.read("data/bot_identity/name.txt").strip
712
+ usr_name = File.read("data/usr_identity/name.txt").strip
684
713
 
685
- #def self.hobbies
686
- #end
714
+ brains = Dir.glob("brain/*")
687
715
 
688
- #def self.jobs
689
- #end
716
+ robot = ProgramR::Facade.new
717
+ robot.learn(brains)
690
718
 
691
- #def self.skills
692
- #end
719
+ puts " Welcome to #{bot_name}. This is the terminal for Bianca."
693
720
 
694
- #def self.weather
695
- #end
721
+ while true
722
+ print "#{usr_name } >> "
723
+ s = STDIN.gets.chomp
696
724
 
697
- #def self.operate
698
- #end
699
- #end
700
- #end
725
+ reaction = robot.get_reaction(s)
726
+
727
+ if reaction == ""
728
+ STDOUT.puts "#{bot_name} << I have no idea."
729
+ elsif reaction == "Closing"
730
+ abort
731
+ else
732
+ STDOUT.puts "#{bot_name} << #{reaction}"
733
+ end
734
+ end
735
+ end
736
+ end
737
+ end
701
738
 
702
739
  ## Measuring the distance between objects and size of objects in space.
703
740
  #module SpatialRelationships
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.1
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: []
@@ -55,7 +56,7 @@ files:
55
56
  - bin/setup
56
57
  - lib/ImpUnit.rb
57
58
  - lib/ImpUnit/version.rb
58
- homepage: https://lwflouisa.github.io/ImpUnitGem
59
+ homepage: https://github.com/LWFlouisa/ImpUnitApp
59
60
  licenses: []
60
61
  metadata: {}
61
62
  post_install_message: