happygirl 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/Manifest.txt +1 -0
- data/README.txt +10 -11
- data/Rakefile +1 -1
- data/index.html +12 -0
- data/lib/happy_girl.rb +11 -3
- data/lib/messages.yaml +3 -1
- data.tar.gz.sig +0 -0
- metadata +4 -3
- metadata.gz.sig +1 -1
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/README.txt
CHANGED
@@ -3,13 +3,9 @@ HappyGirl
|
|
3
3
|
http://rubyforge.org/projects/happygirl/
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
|
-
Have you ever needed to express your love every minute? If your beloved use
|
7
|
-
computer you can install her this application that will articulate your
|
8
|
-
feeling every now and then (even when you are absent).
|
6
|
+
Have you ever needed to express your love every minute? If your beloved use computer you can install her this application that will articulate your feeling every now and then (even when you are absent).
|
9
7
|
|
10
|
-
Makes your girlfriend or wife happy, so it makes you happy :). Based on
|
11
|
-
http://homepage.mac.com/khsu/HappyWife/HappyWife.html. It shows a love message
|
12
|
-
every once in a while.
|
8
|
+
Makes your girlfriend or wife happy, so it makes you happy :). Based on http://homepage.mac.com/khsu/HappyWife/HappyWife.html. It shows a love message every once in a while.
|
13
9
|
|
14
10
|
== SYNOPSIS:
|
15
11
|
First you should create file ~/.happygirl.yaml, like:
|
@@ -19,14 +15,17 @@ every once in a while.
|
|
19
15
|
- Because she is so wonderful
|
20
16
|
- Because she is ...
|
21
17
|
SecondsToWait: 3600
|
22
|
-
|
18
|
+
NextMessageIsRandom: true # If set to true every message will be randomly selected. If any other value is provided messages are showed sequentialy.
|
19
|
+
StartMessageIndex: 1 # Message to show up first after running program. Any non numerical value means random message.
|
20
|
+
|
23
21
|
Next you run program:
|
24
|
-
|
22
|
+
|
23
|
+
% happy_girl
|
25
24
|
|
26
25
|
And every SecondsToWait seconds you will see a window with message.
|
26
|
+
|
27
27
|
*WARNING*
|
28
|
-
You should click _Accept the Love_ button instead of closing window (because
|
29
|
-
that would close application).
|
28
|
+
You should click _Accept the Love_ button instead of closing window (because that would close application).
|
30
29
|
|
31
30
|
== REQUIREMENTS:
|
32
31
|
|
@@ -35,7 +34,7 @@ that would close application).
|
|
35
34
|
|
36
35
|
== INSTALL:
|
37
36
|
|
38
|
-
|
37
|
+
% sudo gem install happygirl
|
39
38
|
|
40
39
|
== LICENSE:
|
41
40
|
|
data/Rakefile
CHANGED
data/index.html
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
6
|
+
<title>redirect</title>
|
7
|
+
<meta http-equiv="Refresh" content="1; URL=happygirl/">
|
8
|
+
</head>
|
9
|
+
<body id="index">
|
10
|
+
Please see: <a href="http://happygirl.rubyforge.org/happygirl/">documentation</a>.
|
11
|
+
</body>
|
12
|
+
</html>
|
data/lib/happy_girl.rb
CHANGED
@@ -3,7 +3,7 @@ require 'yaml'
|
|
3
3
|
# $:.unshift(File::join(File::dirname(File::dirname(__FILE__)), "/lib"))
|
4
4
|
|
5
5
|
class HappyGirl
|
6
|
-
VERSION = '1.0
|
6
|
+
VERSION = '1.1.0'
|
7
7
|
def readConfig()
|
8
8
|
begin
|
9
9
|
@cfg = YAML::parse(File.open("#{ENV['HOME']}/.happygirl.yaml"))
|
@@ -11,6 +11,10 @@ class HappyGirl
|
|
11
11
|
@cfg = YAML::parse(File.open(File::dirname(__FILE__) + '/messages.yaml'))
|
12
12
|
end
|
13
13
|
@messages = @cfg["Messages"].value
|
14
|
+
smi = @cfg["StartMessageIndex"]
|
15
|
+
@msgIdx = smi.value.to_i unless smi.nil? or smi.value.to_i.to_s != smi.value
|
16
|
+
@msgIdx = nil if @msgIdx < 0 or @msgIdx >= @messages.length
|
17
|
+
@randomNext = true unless @cfg["NextMessageIsRandom"].nil? or @cfg["NextMessageIsRandom"].value != "true"
|
14
18
|
end
|
15
19
|
|
16
20
|
def initialize()
|
@@ -52,8 +56,12 @@ class HappyGirl
|
|
52
56
|
@msgIdx = rand(@messages.length) if @msgIdx.nil?
|
53
57
|
@why.text(@messages[@msgIdx].value)
|
54
58
|
@root.deiconify()
|
55
|
-
@
|
56
|
-
|
59
|
+
if @randomNext
|
60
|
+
@msgIdx = rand(@messages.length)
|
61
|
+
else
|
62
|
+
@msgIdx += 1
|
63
|
+
@msgIdx %= @messages.length
|
64
|
+
end
|
57
65
|
end
|
58
66
|
|
59
67
|
def start()
|
data/lib/messages.yaml
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: happygirl
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0
|
7
|
-
date: 2007-11-
|
6
|
+
version: 1.1.0
|
7
|
+
date: 2007-11-16 00:00:00 +01:00
|
8
8
|
summary: Displays love message once on a while
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: roman.kamyk@gmail.com
|
12
12
|
homepage: " by Roman Kamyk <roman.kamyk@gmail.com> made for his sweetheart --- Agnieszka :)"
|
13
13
|
rubyforge_project: happygirl
|
14
|
-
description: "Makes your girlfriend or wife happy, so it makes you happy :). Based on http://homepage.mac.com/khsu/HappyWife/HappyWife.html. It shows a love message every once in a while. == SYNOPSIS: First you should create file ~/.happygirl.yaml, like: WindowTitle: Some Love Message Question: Why John Loves Mary? Messages: - Because she is so wonderful - Because she is ... SecondsToWait: 3600 Next you run program:
|
14
|
+
description: "Makes your girlfriend or wife happy, so it makes you happy :). Based on http://homepage.mac.com/khsu/HappyWife/HappyWife.html. It shows a love message every once in a while. == SYNOPSIS: First you should create file ~/.happygirl.yaml, like: WindowTitle: Some Love Message Question: Why John Loves Mary? Messages: - Because she is so wonderful - Because she is ... SecondsToWait: 3600 NextMessageIsRandom: true # If set to true every message will be randomly selected. If any other value is provided messages are showed sequentialy. StartMessageIndex: 1 # Message to show up first after running program. Any non numerical value means random message. Next you run program: % happy_girl And every SecondsToWait seconds you will see a window with message. *WARNING* You should click _Accept the Love_ button instead of closing window (because that would close application). == REQUIREMENTS:"
|
15
15
|
autorequire:
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- README.txt
|
57
57
|
- Rakefile
|
58
58
|
- bin/happy_girl
|
59
|
+
- index.html
|
59
60
|
- lib/happy_girl.rb
|
60
61
|
- lib/heart.gif
|
61
62
|
- lib/messages.yaml
|
metadata.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
�)
|
1
|
+
ma�Gɏ��Ғ�p���72�B�O"����`Q���吠X%�&ϩ��2���3�P�)����o�w�H�0�����m�y�~:���i�ɄiC�CG�X�l��%����})$�G±��"�V�ș+؟�\r?����CFi ��2S�0��d���5�;{?��^h������5pUG"����f����ڜ�D��ޝ���O��ʀ#H�`�k����/����_`.��*��d�M�����������n�
|