From 0649a76ff7d7b9504eee3d8f81e2acb6964dbdde Mon Sep 17 00:00:00 2001
From: Dalmon Ian Martins de Oliveira <dimo13@c3sl.ufpr.br>
Date: Tue, 16 Jun 2015 17:53:40 +0000
Subject: [PATCH] =?UTF-8?q?Adiciona=20fun=C3=A7=C3=A3o=20auxiliar=20de=20t?=
 =?UTF-8?q?ratamento=20do=20arquivo=20de=20metadados?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 insert_objeducacionais.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/insert_objeducacionais.sh b/insert_objeducacionais.sh
index 6dbba82..d17f975 100644
--- a/insert_objeducacionais.sh
+++ b/insert_objeducacionais.sh
@@ -22,6 +22,16 @@ createreq() {
 		-d "$json"
 }
 
+mapmetadata() {
+	sed -re 's/collection.collection.collection/dc\.category/' \
+		-e '/(description)[[:digit:]]/d' \
+		-e 's/rightsholder/rights\.holder/' \
+		-e "s/'//g" \
+		-e 's/"//g' \
+		-e 's/category2/category/' "$1"/metadados.txt |\
+	grep -e '^dc\.'
+}
+
 [ $# -ne 3 ] && echo "Uso: $0 <src dir> <base dir> <collection id>"
 
 readonly srcdir="$1"
-- 
GitLab