diff --git a/scripts/scriptGeral.rb b/scripts/scriptGeral.rb
index fa23b435baeccf9e5c4d79cc850216df962942cd..dae670ac5e05d9c7b4e23d3ecf6b3f6ac0e16d93 100644
--- a/scripts/scriptGeral.rb
+++ b/scripts/scriptGeral.rb
@@ -3,6 +3,25 @@ class String
     self[/#{"\""}(.*?)#{"\""}/m, 1]
   end
 end
+
+def parseCollection searchColl, client
+  client.communities.all.each do |community|
+    client.communities.collections(:id => community.id).each do |collection|
+      if((searchColl.gsub('_',' ') <=> collection.name) == 0)
+        return(collection.id)
+      end
+    end
+  end
+end
+
+def parseCommunity searchComm, client
+  client.communities.all.each do |community|
+    if((searchComm.gsub('_',' ') <=> community.name) == 0)
+      return(community.id)
+    end
+  end
+end
+
 ###################################################################################################
 $LOAD_PATH.unshift('/home/starosta/c3sl/seppir/scriptsRuby/rest-client-gem/lib')
 #################################### A U T E N T I C A C A O ######################################