Changeset 94
- Timestamp:
- Wed Oct 18 16:03:29 2006
- Files:
-
- branches/stable-1.7/WikidPadStarter.py (modified) (diff)
- branches/stable-1.7/wikidpad_unicode.iss (modified) (diff)
- branches/stable-1.7/WikidPadHelp/data/WIKIWORDPROPS.grl (modified)
- branches/stable-1.7/WikidPadHelp/data/WIKIRELATIONS.grl (modified)
- branches/stable-1.7/WikidPadHelp/data/ChangeLog.wiki (modified) (diff)
- branches/stable-1.7/WikidPadHelp/data/WIKIWORDS.grl (modified)
- branches/stable-1.7/lib/pwiki/WikiTxtCtrl.py (modified) (diff)
- branches/stable-1.7/lib/pwiki/wikidata/WikiDataManager.py (modified) (diff)
- branches/stable-1.7/lib/pwiki/wikidata/original_sqlite/WikiData.py (modified) (diff)
- branches/stable-1.7/lib/pwiki/wikidata/compact_sqlite/WikiData.py (modified) (diff)
- branches/stable-1.7/lib/pwiki/wikidata/original_gadfly/WikiData.py (modified) (diff)
- branches/stable-1.7/lib/pwiki/Configuration.py (modified) (diff)
- branches/stable-1.7/lib/pwiki/PersonalWikiFrame.py (modified) (diff)
- branches/stable-1.7/lib/pwiki/Localization.py (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
branches/stable-1.7/WikidPadStarter.py
r90 r94 4 4 os.stat_float_times(True) 5 5 6 VERSION_STRING = "wikidPad 1.7rc 2"6 VERSION_STRING = "wikidPad 1.7rc3" 6 6 7 7 if not hasattr(sys, 'frozen'): -
branches/stable-1.7/wikidpad_unicode.iss
r90 r94 43 43 SolidCompression=true 44 44 AppName=WikidPad 45 AppVerName=WikidPad 1.7rc 245 AppVerName=WikidPad 1.7rc3 45 45 DefaultDirName={pf}\WikidPad 46 46 DefaultGroupName=WikidPad 47 47 AppID={{22A83C29-58A8-4CAB-8EDC-918D74F8429E} 48 48 VersionInfoVersion=1.7 49 VersionInfoTextVersion=WikidPad 1.7rc 249 VersionInfoTextVersion=WikidPad 1.7rc3 49 49 LicenseFile=C:\DATEN\Projekte\Wikidpad\Current\license.txt 50 50 AllowNoIcons=true 51 51 ShowLanguageDialog=yes 52 52 Compression=lzma/ultra 53 OutputBaseFilename=WikidPad-1.7rc 253 OutputBaseFilename=WikidPad-1.7rc3 53 53 InternalCompressLevel=ultra 54 54 AppCopyright=© 2005-2006 Jason Horman, Michael Butscher, Gerhard Reitmayr -
branches/stable-1.7/WikidPadHelp/data/ChangeLog.wiki
r90 r94 2 2 3 3 4 Oct. 18, 2006 (1.7rc3) 5 6 * Bug fixed: Pages were shown as parentless even if an alias 7 of the page had a parent 8 * Bug fixed: Detection of Linux OS failed due to a typo 9 * Bug fixed: Opening a particular page on startup by mentioning 10 the .wiki file on commandline did not work 11 * Bug fixed: Special URLs containing $ couldn't be activated 12 (further fixes may be necessary) 13 14 4 15 Sep. 22, 2006 (1.7rc2) 5 16 -
branches/stable-1.7/lib/pwiki/WikiTxtCtrl.py
r90 r94 1862 1862 # urls.append("file:%s" % url) 1863 1863 1864 urls = [url.replace("%24", "$") for url in urls] 1864 1865 1865 1866 self.editor.DoDropText(x, y, " ".join(urls)) -
branches/stable-1.7/lib/pwiki/wikidata/WikiDataManager.py
r90 r94 89 89 90 90 91 def splitConfigPathAndWord(wikiCombinedFilename): 92 """ 93 wikiCombinedFilename -- Path of config filename or possibly name of a wiki file 94 95 return: tuple (cfg, wikiword) with cfg real config filepath (None if it 96 couldn't be found. wikiword is the wikiword to jump to or None 97 """ 98 wikiConfig = createWikiConfiguration() 99 wikiConfigFilename = wikiCombinedFilename 100 wikiWord = None 101 102 while True: 103 try: 104 # config.read(wikiConfigFile) 105 wikiConfig.loadConfig(wikiConfigFilename) 106 return wikiConfigFilename, wikiWord 107 except Exception, e: 108 # try to recover by checking if the parent dir contains the real wiki file 109 # if it does the current wiki file must be a wiki word file, so open the 110 # real wiki to the wiki word. 111 # try: 112 parentDir = os.path.dirname(os.path.dirname(wikiConfigFilename)) 113 if parentDir: 114 wikiFiles = [file for file in os.listdir(parentDir) \ 115 if file.endswith(".wiki")] 116 if len(wikiFiles) > 0: 117 wikiWord = os.path.basename(wikiConfigFilename) 118 wikiWord = wikiWord[0:len(wikiWord)-5] 119 120 # if this is win95 or < the file name could be a 8.3 alias, file~1 for example 121 windows83Marker = wikiWord.find("~") 122 if windows83Marker != -1: 123 wikiWord = wikiWord[0:windows83Marker] 124 matchingFiles = [file for file in wikiFiles \ 125 if file.lower().startswith(wikiWord)] 126 if matchingFiles: 127 wikiWord = matchingFiles[0] 128 129 wikiConfigFilename = os.path.join(parentDir, wikiFiles[0]) 130 continue 131 # self.openWiki(join(parentDir, wikiFiles[0]), wikiWord) 132 return None, None 133 134 91 135 92 136 # TODO Remove this hackish solution … … 138 182 def __init__(self, wikiConfigFilename, wikiSyntax, dbtype): # dataDir, fileStorDir, dbtype, ): 139 183 wikiConfig = createWikiConfiguration() 140 141 while True: 142 try: 143 # config.read(wikiConfigFile) 144 wikiConfig.loadConfig(wikiConfigFilename) 145 except Exception, e: 146 # try to recover by checking if the parent dir contains the real wiki file 147 # if it does the current wiki file must be a wiki word file, so open the 148 # real wiki to the wiki word. 149 # try: 150 parentDir = os.path.dirname(os.path.dirname(wikiConfigFilename)) 151 if parentDir: 152 wikiFiles = [file for file in os.listdir(parentDir) \ 153 if file.endswith(".wiki")] 154 if len(wikiFiles) > 0: 155 wikiWord = os.path.basename(wikiConfigFilename) 156 wikiWord = wikiWord[0:len(wikiWord)-5] 157 158 # if this is win95 or < the file name could be a 8.3 alias, file~1 for example 159 windows83Marker = wikiWord.find("~") 160 if windows83Marker != -1: 161 wikiWord = wikiWord[0:windows83Marker] 162 matchingFiles = [file for file in wikiFiles \ 163 if file.lower().startswith(wikiWord)] 164 if matchingFiles: 165 wikiWord = matchingFiles[0] 166 wikiConfigFilename = os.path.join(parentDir, wikiFiles[0]) 167 continue 168 # self.openWiki(join(parentDir, wikiFiles[0]), wikiWord) 169 raise 170 171 break 184 wikiConfig.loadConfig(wikiConfigFilename) 185 186 # while True: 187 # try: 188 # # config.read(wikiConfigFile) 189 # wikiConfig.loadConfig(wikiConfigFilename) 190 # except Exception, e: 191 # # try to recover by checking if the parent dir contains the real wiki file 192 # # if it does the current wiki file must be a wiki word file, so open the 193 # # real wiki to the wiki word. 194 # # try: 195 # parentDir = os.path.dirname(os.path.dirname(wikiConfigFilename)) 196 # if parentDir: 197 # wikiFiles = [file for file in os.listdir(parentDir) \ 198 # if file.endswith(".wiki")] 199 # if len(wikiFiles) > 0: 200 # wikiWord = os.path.basename(wikiConfigFilename) 201 # wikiWord = wikiWord[0:len(wikiWord)-5] 202 # 203 # # if this is win95 or < the file name could be a 8.3 alias, file~1 for example 204 # windows83Marker = wikiWord.find("~") 205 # if windows83Marker != -1: 206 # wikiWord = wikiWord[0:windows83Marker] 207 # matchingFiles = [file for file in wikiFiles \ 208 # if file.lower().startswith(wikiWord)] 209 # if matchingFiles: 210 # wikiWord = matchingFiles[0] 211 # wikiConfigFilename = os.path.join(parentDir, wikiFiles[0]) 212 # continue 213 # # self.openWiki(join(parentDir, wikiFiles[0]), wikiWord) 214 # raise 215 # 216 # break 172 217 173 218 # except Exception, ne: -
branches/stable-1.7/lib/pwiki/wikidata/original_sqlite/WikiData.py
r88 r94 389 389 no entries in the wikiwords table.))) 390 390 """ 391 # words = self._getAllPageNamesFromDisk() 392 # 393 # # Filter out non-wiki words 394 # wordSet = sets.Set([word for word in words if not word.startswith("[")]) 395 # 396 # # Remove all which have parents 397 # relations = self.getAllRelations() 398 # for word, relation in relations: 399 # wordSet.discard(relation) 400 # 401 # # Create a sorted list of them 402 # words = list(wordSet) 403 # words.sort() 404 # 405 # return words 406 391 # "select word from wikiwords where not word glob '[[]*' " 392 # "except select relation from wikirelations") 393 407 394 return self.connWrap.execSqlQuerySingleColumn( 408 395 "select word from wikiwords where not word glob '[[]*' " 409 "except select relation from wikirelations") 396 "except select relation from wikirelations " 397 "except select word from wikiwordprops where key='alias' and " 398 "value in (select relation from wikirelations)") 410 399 411 400 def addRelationship(self, word, toWord): -
branches/stable-1.7/lib/pwiki/wikidata/compact_sqlite/WikiData.py
r88 r94 426 426 get the words that have no parents. 427 427 """ 428 # "select word from wikiwordcontent where not word glob '[[]*' " 429 # "except select relation from wikirelations") 428 430 429 431 return self.connWrap.execSqlQuerySingleColumn( 430 432 "select word from wikiwordcontent where not word glob '[[]*' " 431 "except select relation from wikirelations") 433 "except select relation from wikirelations " 434 "except select word from wikiwordprops where key='alias' and " 435 "value in (select relation from wikirelations)") 432 436 433 437 def addRelationship(self, word, toWord): -
branches/stable-1.7/lib/pwiki/wikidata/original_gadfly/WikiData.py
r88 r94 348 348 no entries in the wikiwords table.))) 349 349 """ 350 # words = self._getAllPageNamesFromDisk()351 #352 # # Filter out non-wiki words353 # wordSet = sets.Set([word for word in words if not word.startswith("[")])354 #355 # # Remove all which have parents356 # relations = self.getAllRelations()357 # for word, relation in relations:358 # wordSet.discard(relation)359 360 350 wordSet = sets.Set(self.getAllDefinedWikiPageNames()) 361 351 362 352 # Remove all which have parents 363 353 relations = self._getAllRelations() 364 for word, relation in relations: 365 wordSet.discard(relation) 354 childWords = sets.Set([relation for word, relation in relations]) 355 356 # Remove directly mentioned words (not an alias of the word) 357 wordSet -= childWords 366 358 367 # Create a sorted list of them 359 # for word, relation in relations: 360 # wordSet.discard(relation) 361 362 # Remove words where an alias of the word is a child 363 for word in tuple(wordSet): # "tuple" to create a sequence copy of wordSet 364 for k, alias in self.getPropertiesForWord(word): 365 if k != u"alias": 366 continue 367 368 if alias in childWords: 369 wordSet.discard(word) 370 break # break inner for loop 371 372 373 # Create a list of them 368 374 words = list(wordSet) 369 375 words.sort() -
branches/stable-1.7/lib/pwiki/Configuration.py
r88 r94 32 32 """ 33 33 try: 34 return os.uname[0] == "Linux" 34 return os.uname()[0] == "Linux" 34 34 except AttributeError: 35 35 return False -
branches/stable-1.7/lib/pwiki/PersonalWikiFrame.py
r88 r94 2062 2062 2063 2063 2064 2065 def openWiki(self, wikiConfigFilename, wikiWordToOpen=None, 2064 def openWiki(self, wikiCombinedFilename, wikiWordToOpen=None, 2066 2065 ignoreWdhName=False): 2067 2066 """ … … 2070 2069 wiki config file (if any) be ignored? 2071 2070 """ 2072 2073 # trigger hooks 2074 self.hooks.openWiki(self, wikiConfigFilename) 2075 2071 2076 2072 # Save the state of the currently open wiki, if there was one open 2077 2073 # if the new config is the same as the old, don't resave state since … … 2084 2080 2085 2081 # make sure the config exists 2086 if (not exists(wikiConfigFilename)): 2087 self.displayErrorMessage(u"Wiki configuration file '%s' not found" % 2088 wikiConfigFilename) 2089 if wikiConfigFilename in self.wikiHistory: 2090 self.wikiHistory.remove(wikiConfigFilename) 2082 # if (not exists(wikiConfigFilename)): 2083 # self.displayErrorMessage(u"Wiki configuration file '%s' not found" % 2084 # wikiConfigFilename) 2085 # if wikiConfigFilename in self.wikiHistory: 2086 # self.wikiHistory.remove(wikiConfigFilename) 2087 # return False 2088 2089 # make sure the config exists 2090 cfgPath, splittedWikiWord = WikiDataManager.splitConfigPathAndWord( 2091 wikiCombinedFilename) 2092 2093 if cfgPath is None: 2091 2094 return False 2092 2095 2093 2096 # if self.wikiConfigFilename != wikiConfigFilename: 2094 2097 self.closeWiki() 2098 2099 # trigger hooks 2100 self.hooks.openWiki(self, wikiCombinedFilename) 2101 2095 2102 # self.buildMainMenu() # ??? 2096 2103 2097 # read in the config file2098 # config = ConfigParser.ConfigParser()2099 # try:2100 # # config.read(wikiConfigFile)2101 # self.configuration.loadWikiConfig(wikiConfigFilename)2102 # except Exception, e:2103 # # try to recover by checking if the parent dir contains the real wiki file2104 # # if it does the current wiki file must be a wiki word file, so open the2105 # # real wiki to the wiki word.2106 # # try:2107 # parentDir = dirname(dirname(wikiConfigFilename))2108 # if parentDir:2109 # wikiFiles = [file for file in os.listdir(parentDir) \2110 # if file.endswith(".wiki")]2111 # if len(wikiFiles) > 0:2112 # wikiWord = basename(wikiConfigFilename)2113 # wikiWord = wikiWord[0:len(wikiWord)-5]2114 #2115 # # if this is win95 or < the file name could be a 8.3 alias, file~1 for example2116 # windows83Marker = wikiWord.find("~")2117 # if windows83Marker != -1:2118 # wikiWord = wikiWord[0:windows83Marker]2119 # matchingFiles = [file for file in wikiFiles \2120 # if file.lower().startswith(wikiWord)]2121 # if matchingFiles:2122 # wikiWord = matchingFiles[0]2123 # self.openWiki(join(parentDir, wikiFiles[0]), wikiWord)2124 # return2125 #2126 # # except Exception, ne:2127 # # traceback.print_exc()2128 # # self.displayErrorMessage(u"Error reading config file '%s'" %2129 # # wikiConfigFilename, ne)2130 # # return False2131 #2132 # # config variables2133 # wikiName = self.configuration.get("main", "wiki_name")2134 # dataDir = self.configuration.get("wiki_db", "data_dir")2135 #2136 # # except Exception, e:2137 # if wikiName is None or dataDir is None:2138 # raise BadConfigurationFileException(2139 # "Wiki configuration file is corrupted")2140 # # self.displayErrorMessage("Wiki configuration file is corrupted", e)2141 # # # traceback.print_exc()2142 # # return False2143 #2144 # # absolutize the path to data dir if it's not already2145 # if not isabs(dataDir):2146 # dataDir = join(dirname(wikiConfigFilename), dataDir)2147 #2148 # dataDir = mbcsDec(abspath(dataDir), "replace")[0]2149 #2150 # # self.wikiConfigFilename = wikiConfigFilename2151 # # self.wikiName = wikiName2152 # # self.dataDir = dataDir2153 #2154 # # Path to file storage2155 # fileStorDir = join(dirname(wikiConfigFilename), "files")2156 #2157 # # create the db interface to the wiki data2158 # wikiDataManager = None2159 #2160 #2161 # if not ignoreWdhName:2162 # wikidhName = self.configuration.get("main",2163 # "wiki_database_type", "")2164 # else:2165 # wikidhName = None2166 # if wikidhName:2167 # if not WikiDataManager.isDbHandlerAvailable(wikidhName):2168 # self.displayErrorMessage( # TODO !!!!!!2169 # 'Required data handler %s not available' % wikidhName)2170 # wikidhName = None2171 # else:2172 # wikiDataManager = WikiDataManager.openWikiDocument(self,2173 # wikidhName, dataDir, fileStorDir, self.wikiSyntax)2174 #2175 # if not wikidhName:2176 # wdhandlers = DbBackendUtils.listHandlers()2177 # if len(wdhandlers) == 0:2178 # raise NoDbHandlerException(2179 # 'No data handler available to open database.')2180 # # self.displayErrorMessage(2181 # # 'No data handler available to open database.')2182 # return2183 #2184 # # Ask for the data handler to use2185 # index = wxGetSingleChoiceIndex(u"Choose database type",2186 # u"Choose database type", [wdh[1] for wdh in wdhandlers],2187 # self)2188 # if index == -1:2189 # return2190 #2191 # wikiDataManager = WikiDataManager.openWikiDocument(self,2192 # wdhandlers[index][0], dataDir, fileStorDir,2193 # self.wikiSyntax)2194 2104 if ignoreWdhName: 2195 2105 # Explicitly ask for wiki data handler … … 2205 2115 try: 2206 2116 wikiDataManager = WikiDataManager.openWikiDocument( 2207 wikiConfigFilename, self.wikiSyntax, dbtype)2117 cfgPath, self.wikiSyntax, dbtype) 2207 2117 break 2208 2118 except (UnknownDbHandlerException, DbHandlerNotAvailableException), e: … … 2220 2130 # Something else went wrong 2221 2131 self.displayErrorMessage("Error connecting to database in '%s'" 2222 % wikiConfigFilename, e)2132 % cfgPath, e) 2222 2132 traceback.print_exc() 2223 2133 return False … … 2238 2148 2239 2149 2240 # # Set file storage according to configuration2241 # fs = self.getWikiDataManager().getFileStorage()2242 #2243 # fs.setModDateMustMatch(self.configuration.getboolean("main",2244 # "fileStorage_identity_modDateMustMatch", False))2245 # fs.setFilenameMustMatch(self.configuration.getboolean("main",2246 # "fileStorage_identity_filenameMustMatch", False))2247 # fs.setModDateIsEnough(self.configuration.getboolean("main",2248 # "fileStorage_identity_modDateIsEnough", False))2249 2250 2251 2150 # what was the last wiki word opened 2252 2151 lastWikiWord = wikiWordToOpen 2253 2152 if not lastWikiWord: 2153 lastWikiWord = splittedWikiWord 2154 if not lastWikiWord: 2254 2155 lastWikiWord = self.configuration.get("main", "first_wiki_word", u"") 2255 2156 if lastWikiWord == u"": … … 2304 2205 2305 2206 # trigger hook 2306 self.hooks.openedWiki(self, self.wikiName, wikiCo nfigFilename)2207 self.hooks.openedWiki(self, self.wikiName, wikiCombinedFilename) 2306 2207 2307 2208 # return that the wiki was opened successfully
