コード例 #1
0
    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)
コード例 #2
0
    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)
コード例 #3
0
    def testConvertToOrgLinkNotation(self):
        target = ["[[www.google.be][Search]]"]
        source = ["[Search](www.google.be)"]

        result = orgOutput.convertToOrgLinkNotation(source)

        self.assertEqual(result, target)
コード例 #4
0
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)