def testConvertToOrgLinkNotationDoubleInText(self): target = ["Here is some [[www.emacs.org][emacs]] text and this is [[www.google.be][Search]] a link"] source = ["Here is some [emacs](www.emacs.org) text and this is [Search](www.google.be) a link"] result = orgOutput.convertToOrgLinkNotation(source) self.assertEqual(result, target)
def testConvertToOrgLinkNotationInTextNoLink(self): target = ["Here is some text and this is [[www.google.be][Search]] a link", "no link"] source = ["Here is some text and this is [Search](www.google.be) a link", "no link"] result = orgOutput.convertToOrgLinkNotation(source) self.assertEqual(result, target)
def testConvertToOrgLinkNotation(self): target = ["[[www.google.be][Search]]"] source = ["[Search](www.google.be)"] result = orgOutput.convertToOrgLinkNotation(source) self.assertEqual(result, target)
def ever2org(pSourceFile, pDestinationFile): vCache = cacheFile(pSourceFile) if isOrgModeFile(vCache): vCache = removeEmptyLines(vCache) vCache = orgOutput.completeOrgTableNotation(vCache) vCache = unescapeCharsFile(vCache, fEscapeChars) vCache = orgOutput.convertToOrgLinkNotation(pSource=vCache) vCache = orgOutput.convertDoneToOrg(pCache = vCache) vCache = orgOutput.convertTodoToOrg(pCache = vCache) writeFile(pDestinationFile, vCache)