notesgrip 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +13 -0
- data/README.rdoc +67 -6
- data/lib/notesgrip/NotesRichTextItem.rb +35 -2
- data/lib/notesgrip/NotesSession.rb +2 -2
- data/lib/notesgrip/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 689f2be079ff5a6424e9c710e47d5ae853788013
|
4
|
+
data.tar.gz: 108862770223ab12a726bd9695ff6cdfbfee7be9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82b393dacf265396899fdd21321cb3764499a92f96cc44347dde63d2a624e3819897885429cb87964cc64cd52fc534fe8c31cfce59dca965201ecfad2cbee2d6
|
7
|
+
data.tar.gz: 26aca3a36c32299caf9bb88924daa903614a894e65099121436d8d5f961349c9fcccc5faee89c7b6a4001219914afeb531e54e55f00b4bc5b26b44ce02cd2a4f
|
data/CHANGELOG.rdoc
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
== 0.0.6 (2014/09/05)
|
2
|
+
[Features:]
|
3
|
+
* Add methods to NotesRichTextItem class
|
4
|
+
* each_embeddedFile
|
5
|
+
* each_embeddedLink
|
6
|
+
* each_embeddedOLE
|
7
|
+
* Modified the README
|
8
|
+
|
9
|
+
[Bugfix:]
|
10
|
+
* Fixed NotesSession#hashPassword().
|
11
|
+
|
12
|
+
== 0.0.5 (2014/08/31)
|
13
|
+
Initial Release.
|
data/README.rdoc
CHANGED
@@ -56,7 +56,27 @@ Wrap NotesDatabase object.
|
|
56
56
|
db.each_document {|doc|
|
57
57
|
p doc
|
58
58
|
}
|
59
|
-
|
59
|
+
[each_view {|view| block}]
|
60
|
+
Calls the given block for each view in database.
|
61
|
+
db.each_view {|view|
|
62
|
+
p view
|
63
|
+
}
|
64
|
+
[each_form {|form| block}]
|
65
|
+
Calls the given block for each form in database.
|
66
|
+
db.each_form {|form|
|
67
|
+
p form
|
68
|
+
}
|
69
|
+
[each_agent {|agent| agent}]
|
70
|
+
Calls the given block for each agent in database.
|
71
|
+
db.each_agent {|agent|
|
72
|
+
p agent
|
73
|
+
}
|
74
|
+
[each_profile {|profile| block}]
|
75
|
+
Calls the given block for each profile in database.
|
76
|
+
db.each_profile {|profile|
|
77
|
+
p profile
|
78
|
+
}
|
79
|
+
|
60
80
|
== Notesgrip:NotesView class
|
61
81
|
Wrap NotesView object.
|
62
82
|
ns = NotesGrip::NotesSession.new
|
@@ -72,7 +92,24 @@ Wrap NotesView object.
|
|
72
92
|
}
|
73
93
|
[[index]]
|
74
94
|
Return the document at index.
|
75
|
-
|
95
|
+
[each_entry {|entry| block}]
|
96
|
+
Calls the given block for each entry in the view.
|
97
|
+
view = db.view("All")
|
98
|
+
view.each_entry {|entry|
|
99
|
+
p entry
|
100
|
+
}
|
101
|
+
[each_column {|column| block}]
|
102
|
+
Calls the given block for each column in the view.
|
103
|
+
view = db.view("All")
|
104
|
+
view.each_column {|entry|
|
105
|
+
p entry
|
106
|
+
}
|
107
|
+
[UNID]
|
108
|
+
Alias of UniversalID().
|
109
|
+
[count]
|
110
|
+
[size]
|
111
|
+
Return count of entries of view.
|
112
|
+
|
76
113
|
=== Notesgrip:NotesDocumentCollection class
|
77
114
|
Wrap NotesDocumentCollection object.
|
78
115
|
ns = NotesGrip::NotesSession.new
|
@@ -102,6 +139,7 @@ Wrap NotesDocument object.
|
|
102
139
|
Alias of UniversalID().
|
103
140
|
[[itemname]]
|
104
141
|
Return Notesgrip::NotesItem object which is identified by itemname in the document.
|
142
|
+
If item type is richtext, return Notesgrip::NotesRichTextItem object.
|
105
143
|
[[itemname]=other_item]
|
106
144
|
Copy other NotesItem with given item name.
|
107
145
|
[each_item{|item| block}]
|
@@ -120,16 +158,39 @@ Wrap NotesItem object.
|
|
120
158
|
Copy item_value into my field. You can set Array into the field.
|
121
159
|
[each_value {|value| block}]
|
122
160
|
Calls the given block for each item value in the field.
|
123
|
-
[richitem_attached?]
|
124
|
-
Return true if Embeded oject in the field.
|
125
161
|
[to_s]
|
126
162
|
Return text string in the field.
|
163
|
+
[EmbeddedObjects]
|
164
|
+
Return [], because the field type is TEXT.
|
165
|
+
|
166
|
+
== Notesgrip:NotesRichTextItem class
|
167
|
+
Wrap NotesRichTextItem object. This class is sub class of Notesgrip::NotesItem.
|
168
|
+
ns = NotesGrip::NotesSession.new
|
169
|
+
db = ns.getDatabase("servername", "dbname.nsf")
|
170
|
+
view = db.view("All")
|
171
|
+
doc = view.GetFirstDocument
|
172
|
+
doc["Body"].add_file("./sample.pdf") # Body is RichText Field.
|
173
|
+
doc.save
|
174
|
+
===Additional Methods
|
175
|
+
[Values=item_value, text=item_value]
|
176
|
+
Copy item_value into my field. You can set Array into the field.
|
177
|
+
[each_value {|value| block}]
|
178
|
+
Calls the given block for each item value in the field.
|
179
|
+
[to_s]
|
180
|
+
Return text string in the field.
|
181
|
+
[EmbeddedObjects]
|
182
|
+
Return array of Notesgrip::NotesEmbeddedObject in the RichText field.
|
183
|
+
Return [] if this field has no Embedded object.
|
184
|
+
[each_embeddedFile]
|
185
|
+
Calls the given block for each file type embedded object in the field.
|
186
|
+
[each_embeddedLink]
|
187
|
+
Calls the given block for each link type embedded object in the field.
|
188
|
+
[each_embeddedOLE]
|
189
|
+
Calls the given block for each OLE type embedded object in the field.
|
127
190
|
|
128
191
|
|
129
192
|
= Author
|
130
193
|
notesgrip@tech-notes.dyndns.org
|
131
194
|
|
132
|
-
|
133
|
-
|
134
195
|
= License
|
135
196
|
MIT
|
@@ -98,6 +98,7 @@ module Notesgrip
|
|
98
98
|
@raw_object.GetFormattedText( tabstrip, lineLength )
|
99
99
|
end
|
100
100
|
|
101
|
+
# ------ Additional Methods -----
|
101
102
|
def [](embobj_name)
|
102
103
|
raw_embobj = @raw_object.GetEmbeddedObject(embobj_name)
|
103
104
|
if raw_embobj
|
@@ -107,8 +108,40 @@ module Notesgrip
|
|
107
108
|
end
|
108
109
|
end
|
109
110
|
|
110
|
-
def
|
111
|
-
|
111
|
+
def AddFile(filename)
|
112
|
+
fullname = FileSystemObject.instance.fullpath(filename)
|
113
|
+
self.EmbedObject(EMBED_ATTACHMENT, "", fullname)
|
114
|
+
end
|
115
|
+
alias add_file AddFile
|
116
|
+
|
117
|
+
def each_embedded
|
118
|
+
@raw_object.EmbeddedObjects.each {|rawEmbObj|
|
119
|
+
yield NotesEmbeddedObject.new(rawEmbObj)
|
120
|
+
}
|
121
|
+
end
|
122
|
+
|
123
|
+
def each_embeddedFile
|
124
|
+
@raw_object.EmbeddedObjects.each {|rawEmbObj|
|
125
|
+
if rawEmbObj.Type == EMBED_ATTACHMENT
|
126
|
+
yield NotesEmbeddedObject.new(rawEmbObj)
|
127
|
+
end
|
128
|
+
}
|
129
|
+
end
|
130
|
+
|
131
|
+
def each_embeddedLink
|
132
|
+
@raw_object.EmbeddedObjects.each {|rawEmbObj|
|
133
|
+
if rawEmbObj.Type == EMBED_OBJECTLINK
|
134
|
+
yield NotesEmbeddedObject.new(rawEmbObj)
|
135
|
+
end
|
136
|
+
}
|
137
|
+
end
|
138
|
+
|
139
|
+
def each_embeddedOLE
|
140
|
+
@raw_object.EmbeddedObjects.each {|rawEmbObj|
|
141
|
+
if rawEmbObj.Type == EMBED_OBJECT
|
142
|
+
yield NotesEmbeddedObject.new(rawEmbObj)
|
143
|
+
end
|
144
|
+
}
|
112
145
|
end
|
113
146
|
|
114
147
|
def inspect
|
data/lib/notesgrip/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notesgrip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yac4423
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -46,6 +46,7 @@ extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
48
|
- .gitignore
|
49
|
+
- CHANGELOG.rdoc
|
49
50
|
- Gemfile
|
50
51
|
- LICENSE
|
51
52
|
- LICENSE.txt
|