Changeset 110
- Timestamp:
- Sun Mar 25 06:01:46 2007
- Files:
-
- branches/stable-1.8/WikidPadStarter.py (modified) (diff)
- branches/stable-1.8/wikidpad_unicode.iss (modified) (diff)
- branches/stable-1.8/WikidPadHelp/WikidPadHelp.wiki (modified) (diff)
- branches/stable-1.8/WikidPadHelp/data/WIKIRELATIONS.grl (modified)
- branches/stable-1.8/WikidPadHelp/data/ChangeLog.wiki (modified) (diff)
- branches/stable-1.8/WikidPadHelp/data/WIKIWORDS.grl (modified)
- branches/stable-1.8/lib/pwiki/Exporters.py (modified) (diff)
- branches/stable-1.8/lib/pwiki/wikidata/original_sqlite/WikiData.py (modified) (diff)
- branches/stable-1.8/lib/pwiki/wikidata/compact_sqlite/WikiData.py (modified) (diff)
- branches/stable-1.8/lib/pwiki/wikidata/original_gadfly/WikiData.py (modified) (diff)
- branches/stable-1.8/lib/pwiki/StringOps.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
branches/stable-1.8/WikidPadStarter.py
r105 r110 4 4 os.stat_float_times(True) 5 5 6 VERSION_STRING = "wikidPad 1.8rc 2"6 VERSION_STRING = "wikidPad 1.8rc3" 6 6 7 7 if not hasattr(sys, 'frozen'): -
branches/stable-1.8/wikidpad_unicode.iss
r105 r110 39 39 SolidCompression=true 40 40 AppName=WikidPad 41 AppVerName=WikidPad 1.8rc 241 AppVerName=WikidPad 1.8rc3 41 41 DefaultDirName={pf}\WikidPad 42 42 DefaultGroupName=WikidPad 43 43 AppID={{22A83C29-58A8-4CAB-8EDC-918D74F8429E} 44 44 VersionInfoVersion=1.8 45 VersionInfoTextVersion=WikidPad 1.8rc 245 VersionInfoTextVersion=WikidPad 1.8rc3 45 45 LicenseFile=C:\DATEN\Projekte\Wikidpad\Current\license.txt 46 46 AllowNoIcons=true 47 47 ShowLanguageDialog=yes 48 48 Compression=lzma/ultra 49 OutputBaseFilename=WikidPad-1.8rc 249 OutputBaseFilename=WikidPad-1.8rc3 49 49 InternalCompressLevel=ultra 50 50 AppCopyright=© 2005-2007 Jason Horman, Michael Butscher, Gerhard Reitmayr -
branches/stable-1.8/WikidPadHelp/WikidPadHelp.wiki
r99 r110 4 4 [main] 5 5 footnotes_as_wikiwords = False 6 last_wiki_word = WikidPadHelp6 last_wiki_word = ChangeLog 6 6 filestorage_identity_moddatemustmatch = False 7 7 wiki_name = WikidPadHelp -
branches/stable-1.8/WikidPadHelp/data/ChangeLog.wiki
r105 r110 2 2 3 3 4 Feb. 25, 2007 (1.8rc2) 4 Mar. 25, 2007 (1.8rc3) 5 6 * Bug fixed (at least for Windows NT/2K/XP): Wiki words with 7 foreign characters were not recognized or recognized with 8 wrong characters after rebuild of wikis with 9 "Original ..." types. 10 * Bug fixed: Bad HTML links to anchors on same wiki page. 11 12 13 14 Feb. 25, 2007 (1.8rc2, repository revision in "stable-1.8" branch: 105) 5 15 6 16 * Filter to remove double clipboard pastes when using the -
branches/stable-1.8/lib/pwiki/Exporters.py
r100 r110 267 267 def setWikiDataManager(self, wikiDataManager): 268 268 self.wikiDataManager = wikiDataManager 269 self.wikiData = self.wikiDataManager.getWikiData() 269 if self.wikiDataManager is None: 270 self.wikiData = None 271 else: 272 self.wikiData = self.wikiDataManager.getWikiData() 270 273 271 274 def getTempFileSet(self): … … 274 277 def _exportHtmlSingleFile(self): 275 278 if len(self.wordList) == 1: 279 self.exportType = u"html_multi" 276 280 return self._exportHtmlMultipleFiles() 277 281 … … 373 377 374 378 fp.write(self.getFileFooter()) 375 fp.reset() 379 fp.reset() 375 379 realfp.close() 376 380 self.copyCssFile(self.exportDest) … … 757 761 758 762 759 # for wikiWord, deepness in flatTree:760 # while deepness < deepStack[-1]:761 # deepStack.pop()762 # print "getContentTreeBody9", deepness, deepStack[-1]763 # result.append(u"</ul>\n")764 # if not wikiWord in wordSet:765 # continue766 #767 # if deepness > deepStack[-1]:768 # print "getContentTreeBody10", deepness, deepStack[-1]769 # deepStack.append(deepness)770 # result.append(u"<ul>\n")771 #772 # wordSet.remove(wikiWord)773 #774 # print "getContentTreeBody11", repr(wikiWord)775 # result.append(u'<li><a href="%s">%s</a>\n' % (wordToLink(wikiWord),776 # wikiWord))777 #778 # result.append(u"</ul>\n" * (len(deepStack) - 1))779 #780 # # list words not in the tree781 # if len(wordSet) > 0:782 # print "getContentTreeBody13"783 # remainList = list(wordSet)784 # self.mainControl.getCollator().sort(remainList)785 #786 # print "getContentTreeBody14", repr(remainList)787 # result.append(u"<ul>\n")788 # for wikiWord in remainList:789 # result.append(u'<li><a href="%s">%s</a>\n' % (wordToLink(wikiWord),790 # wikiWord))791 #792 # result.append(u"</ul>\n")793 794 795 763 lastdeepness = 0 796 764 … … 1266 1234 formatting = self.mainControl.getFormatting() 1267 1235 unescapeNormalText = formatting.unescapeNormalText 1236 wikiDocument = self.mainControl.getWikiDocument() 1268 1237 1269 1238 for i in xrange(len(tokens)): … … 1592 1561 word = tok.node.nakedWord # self.mainControl.getFormatting().normalizeWikiWord(tok.text) 1593 1562 link = self.links.get(word) 1563 1564 selfLink = False 1594 1565 1595 1566 if link: 1567 if not self.exportType in (u"html_single", u"xml"): 1568 wikiData = wikiDocument.getWikiData() 1569 linkTo = wikiData.getAliasesWikiWord(word) 1570 linkFrom = wikiData.getAliasesWikiWord(self.wikiWord) 1571 if linkTo == linkFrom: 1572 # Page links to itself 1573 selfLink = True 1574 1596 1575 # Add anchor fragment if present 1597 1576 if tok.node.anchorFragment: 1598 link += u"#" + tok.node.anchorFragment 1577 if selfLink: 1578 # Page links to itself, so replace link URL 1579 # by the anchor. 1580 link = u"#" + tok.node.anchorFragment 1581 else: 1582 link += u"#" + tok.node.anchorFragment 1599 1583 1600 1584 if self.asXml: # TODO XML -
branches/stable-1.8/lib/pwiki/wikidata/original_sqlite/WikiData.py
r105 r110 33 33 # pass 34 34 35 from pwiki.StringOps import getBinCompactForDiff, applyBinCompact, mbcsEnc, \ 36 mbcsDec, binCompactToCompact, fileContentToUnicode, utf8Enc, utf8Dec, \ 35 from pwiki.StringOps import getBinCompactForDiff, applyBinCompact, pathEnc, \ 36 pathDec, binCompactToCompact, fileContentToUnicode, utf8Enc, utf8Dec, \ 37 37 BOM_UTF8, Tokenizer 38 38 … … 59 59 raise DbWriteAccessError(e) 60 60 61 dbfile = mbcsDec(dbfile)[0]61 dbfile = pathDec(dbfile)[0] 61 61 try: 62 62 self.connWrap = DbStructure.ConnectWrap(sqlite.connect(dbfile)) … … 666 666 def _getAllPageNamesFromDisk(self): # Used for rebuilding wiki 667 667 try: 668 files = glob.glob( mbcsEnc(join(self.dataDir,668 files = glob.glob(pathEnc(join(self.dataDir, 668 668 u'*' + self.pagefileSuffix), "replace")[0]) 669 return [ mbcsDec(basename(file), "replace")[0].replace(self.pagefileSuffix, '')669 return [pathDec(basename(file), "replace")[0].replace(self.pagefileSuffix, '') 669 669 for file in files] # TODO: Unsafe. Suffix like e.g. '.wiki' may appear 670 670 # in the word. E.g. "The.great.wiki.for.all.wiki" -
branches/stable-1.8/lib/pwiki/wikidata/compact_sqlite/WikiData.py
r105 r110 34 34 # pass 35 35 36 from pwiki.StringOps import getBinCompactForDiff, applyBinCompact, mbcsEnc, mbcsDec,\36 from pwiki.StringOps import getBinCompactForDiff, applyBinCompact, pathEnc, pathDec,\ 36 36 binCompactToCompact, fileContentToUnicode, utf8Enc, utf8Dec, Tokenizer 37 37 … … 58 58 raise DbWriteAccessError(e) 59 59 60 dbfile = mbcsDec(dbfile)[0]60 dbfile = pathDec(dbfile)[0] 60 60 try: 61 61 self.connWrap = DbStructure.ConnectWrap(sqlite.connect(dbfile)) … … 1505 1505 self.connWrap.commit() 1506 1506 1507 fnames = glob.glob(join( mbcsEnc(self.dataDir, "replace")[0], '*.wiki'))1507 fnames = glob.glob(join(pathEnc(self.dataDir, "replace")[0], '*.wiki')) 1507 1507 for fn in fnames: 1508 word = basename( mbcsDec(fn, "replace")[0]).replace('.wiki', '') # mbcsDec1508 word = basename(pathDec(fn, "replace")[0]).replace('.wiki', '') 1508 1508 1509 1509 fp = open(fn) -
branches/stable-1.8/lib/pwiki/wikidata/original_gadfly/WikiData.py
r105 r110 35 35 from pwiki import SearchAndReplace 36 36 37 from pwiki.StringOps import mbcsEnc, mbcsDec, utf8Enc, utf8Dec, BOM_UTF8, \37 from pwiki.StringOps import pathEnc, pathDec, utf8Enc, utf8Dec, BOM_UTF8, \ 37 37 fileContentToUnicode, wikiWordToLabel 38 38 … … 638 638 # TODO More general Wikiword to filename mapping 639 639 def _getAllPageNamesFromDisk(self): # Used for rebuilding wiki 640 files = glob.glob( mbcsEnc(join(self.dataDir,640 files = glob.glob(pathEnc(join(self.dataDir, 640 640 u'*' + self.pagefileSuffix), "replace")[0]) 641 return [ mbcsDec(basename(file), "replace")[0].replace(self.pagefileSuffix, '')641 return [pathDec(basename(file), "replace")[0].replace(self.pagefileSuffix, '') 641 641 for file in files] # TODO: Unsafe. Suffix like e.g. '.wiki' may appear 642 642 # in the word. E.g. "The.great.wiki.for.all.wiki" … … 651 651 """ 652 652 653 # return mbcsEnc(join(self.dataDir, "%s.wiki" % wikiWord))[0]653 # return pathEnc(join(self.dataDir, "%s.wiki" % wikiWord))[0] 653 653 return join(self.dataDir, (u"%s" + self.pagefileSuffix) % wikiWord) 654 654 -
branches/stable-1.8/lib/pwiki/StringOps.py
r100 r110 25 25 26 26 27 from Configuration import isUnicode, isOSX, isLinux 27 from Configuration import isUnicode, isOSX, isLinux, isWindows, isWin9x 27 27 28 28 … … 97 97 98 98 99 if isWindows() and not isWin9x(): 100 def dummy(s, e=""): 101 return s, len(s) 102 103 pathEnc = dummy 104 pathDec = dummy 105 else: 106 pathEnc = mbcsEnc 107 pathDec = mbcsDec 108 109 99 110 if isUnicode(): 100 111 def uniToGui(text):
