From de9bc17d44423d9a80b7014331cc06fc1739be0e Mon Sep 17 00:00:00 2001 From: Marco Filetti Date: Thu, 17 Dec 2015 12:27:41 +0200 Subject: [PATCH] Added contentHash --- JustUsed/DiMe Data/DocumentInformationElement.swift | 2 ++ JustUsed/Info.plist | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/JustUsed/DiMe Data/DocumentInformationElement.swift b/JustUsed/DiMe Data/DocumentInformationElement.swift index 5079268..3f3d90d 100644 --- a/JustUsed/DiMe Data/DocumentInformationElement.swift +++ b/JustUsed/DiMe Data/DocumentInformationElement.swift @@ -27,6 +27,7 @@ class DocumentInformationElement: DiMeBase { // attempt to fetch plain text from url if let url = NSURL(string: histItem.url), urlData = NSData(contentsOfURL: url), atString = NSAttributedString(HTML: urlData, documentAttributes: nil) { theDictionary["plainTextContent"] = atString.string + theDictionary["contentHash"] = atString.string.sha1() } // set dime-required fields @@ -56,6 +57,7 @@ class DocumentInformationElement: DiMeBase { let docUrl = NSURL(fileURLWithPath: histItem.path) if let pdfDoc = PDFDocument(URL: docUrl), plainString = pdfDoc.getText() { id = plainString.sha1() + theDictionary["contentHash"] = plainString.sha1() theDictionary["plainTextContent"] = plainString } else { id = histItem.path.sha1() diff --git a/JustUsed/Info.plist b/JustUsed/Info.plist index 54cfd50..b5d66ef 100644 --- a/JustUsed/Info.plist +++ b/JustUsed/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.1 + 1.0.1 CFBundleSignature ???? CFBundleVersion - 3 + 2 LSApplicationCategoryType LSMinimumSystemVersion