Changeset 245
- Timestamp:
- 01/12/11 13:56:54 (2 years ago)
- Location:
- branches/mbutscher/work
- Files:
-
- 3 modified
-
extensions/wikidPadParser/WikidPadParser.py (modified) (6 diffs)
-
lib/pwiki/DocPages.py (modified) (4 diffs)
-
lib/pwiki/wikidata/WikiDataManager.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/mbutscher/work/extensions/wikidPadParser/WikidPadParser.py
r231 r245 3 3 4 4 # Official parser plugin for wiki language "WikidPad default 2.0" 5 # Last modified (format YYYY-MM-DD): 201 0-12-255 # Last modified (format YYYY-MM-DD): 2011-01-12 6 6 7 7 … … 13 13 14 14 import re # from pwiki.rtlibRepl import re 15 from pwiki.WikiExceptions import * 15 16 from pwiki.StringOps import UPPERCASE, LOWERCASE, revStr 16 17 from pwiki.WikiDocument import WikiDocument … … 1982 1983 # In an anchor of a possible bracketed wiki word 1983 1984 tofind = line[-mat.end():] 1984 wikiWord = revStr(mat.group("wikiWord")) 1985 wikiLinkCore = revStr(mat.group("wikiWord")) 1986 wikiWord = _TheHelper.resolvePrefixSilenceAndWikiWordLink( 1987 wikiLinkCore, docPage)[2] 1988 1985 1989 anchorBegin = revStr(mat.group("anchorBegin")) 1986 1990 … … 1991 1995 1992 1996 for a in anchors: 1993 backStepMap[BracketStart + wiki Word+1997 backStepMap[BracketStart + wikiLinkCore + 1994 1998 BracketEnd + 1995 1999 WikiWordAnchorStart + a] = len(tofind) … … 2002 2006 # In an anchor of a possible camel case word 2003 2007 tofind = line[-mat.end():] 2004 wikiWord = revStr(mat.group("wikiWord")) 2008 wikiLinkCore = revStr(mat.group("wikiWord")) 2009 wikiWord = _TheHelper.resolvePrefixSilenceAndWikiWordLink( 2010 wikiLinkCore, docPage)[2] 2011 2005 2012 anchorBegin = revStr(mat.group("anchorBegin")) 2006 2013 … … 2011 2018 2012 2019 for a in anchors: 2013 backStepMap[wikiWord + WikiWordAnchorStart+2020 backStepMap[wikiWord + wikiLinkCore + 2014 2021 a] = len(tofind) 2015 2022 except WikiWordNotFoundException: -
branches/mbutscher/work/lib/pwiki/DocPages.py
r234 r245 1518 1518 threadstop=DUMBTHREADSTOP): 1519 1519 1520 # Step 1: Refresh attributes 1520 1521 self.refreshAttributesFromPageAst(pageAst, threadstop=threadstop) 1521 1522 1523 # Some attributes control format details so check if attribute 1524 # refresh changed the details 1522 1525 formatDetails2 = self.getFormatDetails() 1523 1526 if not formatDetails.isEquivTo(formatDetails2): … … 1526 1529 return False 1527 1530 1528 return self.refreshMainDbCacheFromPageAst(pageAst, fireEvent=fireEvent, 1531 # Step 2: Refresh todos, link structure ... 1532 self.refreshMainDbCacheFromPageAst(pageAst, fireEvent=fireEvent, 1529 1533 threadstop=threadstop) 1534 1535 # Step 3: Update index search data 1536 self.putIntoSearchIndex(threadstop=threadstop) 1537 1538 return True 1539 1530 1540 1531 1541 … … 1740 1750 """ 1741 1751 with self.textOperationLock: 1752 threadstop.testRunning() 1753 1742 1754 if not self.getWikiDocument().isSearchIndexEnabled(): 1743 1755 return True # Or false? … … 1816 1828 if step == -1: 1817 1829 self._refreshMetaData(pageAst, formatDetails, threadstop=threadstop) 1818 1830 1819 1831 with self.textOperationLock: 1820 1832 if not liveTextPlaceHold is self.liveTextPlaceHold: -
branches/mbutscher/work/lib/pwiki/wikidata/WikiDataManager.py
r234 r245 1686 1686 It also automatically refreshes the index to the latest version if needed. 1687 1687 """ 1688 # print "--getSearchIndex1"1689 1688 if not self.isSearchIndexEnabled(): 1690 1689 return None 1691 # print "--getSearchIndex4"1692 1690 1693 1691 import whoosh.index, whoosh.writing … … 2056 2054 attrs["wikiPage"] = miscevt.getSource() 2057 2055 self.fireMiscEventProps(attrs) 2058 miscevt.getSource().putIntoSearchIndex()2056 # miscevt.getSource().putIntoSearchIndex() 2059 2057 elif miscevt.has_key("saving new wiki page"): 2060 2058 self.autoLinkRelaxInfo = None 2061 miscevt.getSource().putIntoSearchIndex()2059 # miscevt.getSource().putIntoSearchIndex() 2062 2060 elif miscevt.has_key("reread cc blacklist needed"): 2063 2061 self._updateCcWordBlacklist()
