ImpUnit 0.3.4 → 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 +4 -4
- data/ImpUnit.gemspec +1 -1
- data/lib/ImpUnit/version.rb +1 -1
- data/lib/ImpUnit.rb +56 -29
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: deeeeaa4b363cfe259a846c34cfec6a8bf6829147b0bbcd28eeab3a7fe7c9afd
|
4
|
+
data.tar.gz: 07197fae2ad86bb46fdab92b54099d5b755dedb61309dde9bac53f11916b867c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/lib/ImpUnit/version.rb
CHANGED
data/lib/ImpUnit.rb
CHANGED
@@ -355,9 +355,9 @@ end"
|
|
355
355
|
attributes = ['Rikusuto']
|
356
356
|
|
357
357
|
training = [
|
358
|
-
[ 0.5,
|
359
|
-
[ 50.0, "will you obtain
|
360
|
-
[100.0,
|
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,
|
395
|
-
[ 25.0,
|
396
|
-
[ 50.0,
|
397
|
-
[ 75.0, "
|
398
|
-
[100.0,
|
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
|
-
|
454
|
+
old_output = File.read("feed/old_feed.txt")
|
455
455
|
|
456
|
-
|
456
|
+
# Get the date.
|
457
|
+
system("date > date/date.txt")
|
457
458
|
|
458
|
-
#
|
459
|
-
|
460
|
-
|
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 = "
|
471
|
-
ejento = "
|
472
|
-
rikusuto = "
|
473
|
-
atemu = "
|
474
|
-
nitote = "
|
475
|
-
kara = "
|
476
|
-
yuza = "
|
477
|
-
lieu = "
|
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
|
-
|
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
|
-
|
518
|
+
</rss>"
|
488
519
|
|
489
|
-
open("
|
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.
|
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: []
|