Changeset 139

Show
Ignore:
Timestamp:
Fri Jan 25 05:43:30 2008
Author:
mbutscher
Message:

branches/stable-1.8:

* Bug fixed: Linux: Some problems with non-ascii characters

in pathes (some other issues are there yet)
* Linux: Assumed file system encoding is now UTF-8
* Bug fixed: Command line help did not appear
* In "Delete wiki word" confirmation dialog, "No" is now
the default answer

Files:

Legend:

Unmodified
Added
Removed
Modified
  • branches/mbutscher/TodoList.txt

    r132 r139  
    2 2  
    3 3  
    4   +++ Activating last footnote should go to first [Requests: 2]  
    5   > I've used the footnotes feature briefly today, and thought it would be good to cícle through the bracketed numbers, as usually there are only two occurences anyway. I mean when you are sent to the bottom of the page (to the footnote), you could easily find your way back where you left the text by clicking on the footnote number again.  
    6    
    7    
    8   +++ Favorite wikis bar  [2 requests]  
    9   Another small feature request. How about a "button bar" for favorite  
    10   wiki files? Yes I know you have the recent file list, but it keeps  
    11   changing order. If I could have (say) 4 buttons on the button bar  
    12   which could be assigned to files and  also if those "buttons" could  
    13   have dedicated shortcuts (g. F1->F4) - I'd be really happy.  
    14    
    15   Thinking about it - if you dedicated F1 to open the WikiHelp file it  
    16   would even follow a Windows Help convention. Guess I'd be looking at  
    17   F2-F5 then  
    18    
    19    
    20 4 +++ Command line call plugin  
    21 5 >> For example, the user could select some text in the editor and press a  
     
    33 17  
    34 18  
    35   +++ Option to ignore single linebreak for HTML export  
    36   > 3. WikidPad entries currently preserve line-breaks entered by the user,  
    37   > similar to the HTML <pre> element. This can be seen in the preview and  
    38   > the HTML export.  
    39   >  
    40   > Motivation: Wikis (and HTML) usually ignore line-breaks; you have to  
    41   > either use a <br> element or enter a blank line to achieve a  
    42   > line-break.  
    43   >  
    44   > Since existing WikidPad users probably expect the current line-break  
    45   > behaviour, you probably don't want to change this; however it would be  
    46   > great if WikidPad had a configuration option to store line-breaks  
    47   > normally but to ignore line-breaks when displaying them and in the HTML  
    48   > output.  
    49    
    50    
    51 19 +++ Allow own icon for each wiki (Done for systray)  
    52 20 *Details*:  
     
    62 30 +++ Tree context menu: URL to clipboard  
    63 31 convenience would not hurt :) Like ability to copy topic urls directly  
    64   >from the tree with right click :)  
      32 from the tree with right click :)  
    64 32  
    65 33  
     
    95 63  
    96 64  
      65 > When exporting a page (or pages) to a single (or many) HTML files, I  
      66 > have noticed that any linked image files are NOT copied to the HTML  
      67 > output folder... ie they don't exist when viewed in the browser. The  
      68 > sources says they are expected to exist in a <files> subfolder but  
      69 > this doesn't get created either.  
      70 >  
      71 > Interestingly, any dynamically created output (say from neato or  
      72 > dot.exe) ARE copied into the output - but NOT into a <files>  
      73 > sub-folder, but as images in the export directory.  
      74 >  
      75 > This all seems a bit inconsistent!!. Perhaps for EXPORT then ALL files  
      76 > should end up in a single folder? (sort of - as specified by the user?)  
      77  
      78  
    97 79 +++ Shortcuts to go to next/previous heading  
    98 80 > Are there keyboard shortcuts for folding and unfolding, as well as to  
     
    109 92  
    110 93  
    111   +++ Use "open" on Linux  
    112   > This should now at least work for "http:" and "ftp:" links.  
    113    
    114   > "file:" links may not always work as desired, but currently I don't know  
    115   > how to start the right application for e.g. an Open Office or audio file  
    116   > on Linux.  
    117    
    118   On the command line i use 'open <filename>' to start the apropriate application for the file. the 'open' comand is provided by Gnome, which I use on my desktop. However, I think it is the same command for KDE, so you might try to launch 'open' for the file in question.  
    119   *Details*:  
    120   "open" is not always supported, e.g. Ubuntu and derivates do not have it.  
    121    
    122    
    123 94 +++ Timeview: Customizable colors for busy days [low prio.]  
    124 95 > Just a cosmetic thing, but I find black (shades of) very siniter to mark the busiest days. Like somebody died then. Maybe this could be set by the user?  
     
    168 139  
    169 140  
    170   +++ Modification time ordering  
    171   I think it would be a great addition to have ability to sort based on  
    172   last modified date of the topics.  
    173    
    174    
    175   +++ Mod. date or days since last mod. in tree  
    176   I'd actually like to see a number / date  without moving a mouse.  
    177    
    178    
    179 141 +++ Option to keep particular attributes open in tree  
    180 142 > Question: Can we freeze open a category within the Views menu?  For  
     
    206 168  
    207 169  
      170 I think it would be a great addition to have ability to sort based on  
      171 last modified date of the topics.  
      172  
      173  
      174 I'd actually like to see a number / date  without moving a mouse.  
      175  
    208 176  
    209 177 +++ Graphical view of interconnection between pages  
     
    290 260  
    291 261  
    292   +++ List of aliases in alias property  
    293   Example: [alias:stupid;cats;stupid cats]  
    294    
    295   Should mean the same as  
    296    
    297   [alias:stupid]  
    298   [alias:cats]  
    299   [alias:stupid cats]  
    300    
    301    
    302 262 +++ Ensure visibility of autocomplete popup  
    303 263 Speaking of the autocomplete suggestions window: don't know if you've noticed, but if you switch to another window while on (without choosing a suggestion), it will stay on top. it is quite funny, actually, and maybe shouldn't be fixed, though.  
    304 264  
    305   Also, if you use autocomplete near the end of the sentence (near the right edge of the monitor) it will not be visible, as it runs out of screen. I'm not too clear here, am I? Do you know what I mean?  
      265 Also, if you use autocomplete near the end of the sentence (near the right edge of the monitor) it will not be visible, as it runs out of screen.  
      266  
      267  
      268 > How would I go about creating an additional entry in the right-click  
      269 > context menu? Ideally, this would be possible with a plugin of type  
      270 > "ContextMenuFunctions", but this seems not to be available currently.  
    306 271  
    307 272  
    308 273 +++ Autocomplete should suggest built-in attributes  
    309   more autocomplete: it should maybe suggest built-in attributes, even if they haven't been used on any pages in the wiki before. I mean sometimes I have problem remembering them like: "Oh, is it 'auto-linking:..'? Or '[auto-link:..'? Nah, it's '[auto_linking:..'. Yes, I know I'm stupid.  
      274 more autocomplete: it should maybe suggest built-in attributes, even if they haven't been used on any pages in the wiki before. I mean sometimes I have problem remembering them like: "Oh, is it 'auto-linking:..'? Or '[auto-link:..'? Nah, it's '[auto_linking:..'.  
    309 274  
    310 275  
     
    503 469  
    504 470  
    505   +++ Select folded text when selecting heading  
    506   maybe when you highlight a folded heading, the text (although not visible) under it should be highlighted/selected as well. so, when dragged (deleted), the text should be moved (deleted) too. (this is how old-school outlining works, anyway, and it has its ups and downs, so needs some more thinking. maybe deleting should work differently? or whole thing should be optional? brr, i don't like these questions...  
    507    
    508    
    509 471 +++ Option to ignore repeated attributes on a page.  
    510 472 Normally, properties are intended to tag a whole page, therefore WikidPad thinks it is an error if the same property appears twice. I can at least create an option to switch off this behavior.  
     
    578 540  
    579 541  
    580   +++ date format with weekday between 1 and 7  
    581   I use the ISO-8601 format. http://www.saqqara.demon.co.uk/datefmt.htm  
    582    
    583   But for weekdays it uses 1 to 7 for Monday to Sunday.  
    584    
    585   Can it be a other literal, for example %q, similar to %w but for ISO-8601?  
    586    
    587   %w : Weekday as a decimal number [0(Sunday),6]  
    588   %q : Weekday as a decimal number [1(Monday),7]  
    589    
    590   So I can write  2006-03-25  or  2006-W12-6  for today.  
    591    
    592    
    593 542 +++ mark search words in different color on found pages  
    594 543 > mark search words in different color on found pages  
     
    823 772  
    824 773  
      774 I am using bulleted lists quite heavily while writing ideas, notes,  
      775 etc. In order to structure them I use indentation. If possible I  
      776 would like an enhancement in the indentation behaviour, pretty much  
      777 as MS-Word does it:  
      778  
      779 1. More indentation ("|" indicates cursor position)  
      780 ---------------------------------------------------  
      781    * Text text text  
      782    * | <press TAB>  
      783  
      784 Result:  
      785    * Text text text  
      786       * |  
      787  
      788 2. Less indentation  
      789 -------------------  
      790    * Text text text  
      791       * more text more txt  
      792       * | <press Shift-TAB>  
      793  
      794 Result:  
      795    * Text text text  
      796       * more text more txt  
      797    * |  
      798  
    825 799  
    826 800 +++ Bug: rmdir  
     
    912 887  
    913 888  
      889 maybe when you highlight a folded heading, the text (although not visible) under it should be highlighted/selected as well. so, when dragged (deleted), the text should be moved (deleted) too. (this is how old-school outlining works, anyway, and it has its ups and downs, so needs some more thinking. maybe deleting should work differently? or whole thing should be optional? brr, i don't like these questions...  
      890  
      891  
    914 892 +++ Outline features (drag and drop bullets)  
    915 893 > Supporting todo entries in bulleted lists was already requested some  
     
    928 907  
    929 908  
      909 > The ability to move paragraph/s up or down with a shortcut key combo  
      910 > is one feature available in OpenOffice that I miss in WikidPad. That  
      911 > is, to easily move an entire paragraph above or below the adjoining  
      912 > paragraph. Perhaps ALT-UP and ALT-DOWN.  
      913  
      914 > For headings I would say that if unfolded, treat all paragraphs  
      915 > equally even if one is a heading, but if folded then move the entire  
      916 > grouping under the heading. This could also work in the doc. structure  
      917 > window.  
      918  
      919  
    930 920 +++ Direct single parent and indirect ones (uncles)  
    931 921 > . either zero or one pages may claim a wikiword as its child. The  
  • branches/stable-1.8/WikidPadStarter.py

    r137 r139  
    25 25 # (2, 0, 200, 0) is 2.0final  
    26 26  
    27   VERSION_TUPLE = ("wikidPad", 1, 8, 112, 0)  
      27 VERSION_TUPLE = ("wikidPad", 1, 8, 113, 0)  
    27 27  
    28   VERSION_STRING = "wikidPad 1.8rc12"  
      28 VERSION_STRING = "wikidPad 1.8rc13"  
    28 28  
    29 29 if not hasattr(sys, 'frozen'):  
  • branches/stable-1.8/wikidpad_unicode.iss

    r137 r139  
    39 39 SolidCompression=true  
    40 40 AppName=WikidPad  
    41   AppVerName=WikidPad 1.8rc12  
      41 AppVerName=WikidPad 1.8rc13  
    41 41 DefaultDirName={pf}\WikidPad  
    42 42 DefaultGroupName=WikidPad  
    43 43 AppID={{22A83C29-58A8-4CAB-8EDC-918D74F8429E}  
    44   VersionInfoVersion=1.8.112.0  
    45   VersionInfoTextVersion=WikidPad 1.8rc12  
      44 VersionInfoVersion=1.8.113.0  
      45 VersionInfoTextVersion=WikidPad 1.8rc13  
    46 46 LicenseFile=C:\DATEN\Projekte\Wikidpad\Current\license.txt  
    47 47 AllowNoIcons=true  
    48 48 ShowLanguageDialog=yes  
    49 49 Compression=lzma/ultra  
    50   OutputBaseFilename=WikidPad-1.8rc12  
      50 OutputBaseFilename=WikidPad-1.8rc13  
    50 50 InternalCompressLevel=ultra  
    51 51 AppCopyright=© 2005-2007 Jason Horman, Michael Butscher, Gerhard Reitmayr  
  • branches/stable-1.8/WikidPadHelp/WikidPadHelp.wiki

    r135 r139  
    4 4 [main]  
    5 5 footnotes_as_wikiwords = False  
    6   last_wiki_word = WikidPadHelp  
      6 last_wiki_word = ChangeLog  
    6 6 filestorage_identity_moddatemustmatch = False  
    7 7 wiki_name = WikidPadHelp  
     
    11 11 filestorage_identity_filenamemustmatch = False  
    12 12 filestorage_identity_moddateisenough = False  
    13   further_wiki_words = BulletedLists  
      13 further_wiki_words =  
    13 13 first_wiki_word = WikidPadHelp  
    14 14  
  • branches/stable-1.8/WikidPadHelp/data/ChangeLog.wiki

    r137 r139  
    2 2  
    3 3  
    4   Dec. 26, 2007 (1.8rc12)  
      4 Jan. 25, 2008 (1.8rc13)  
      5  
      6     * Bug fixed: Linux: Some problems with non-ascii characters  
      7       in pathes (some other issues are there yet)  
      8     * Linux: Assumed file system encoding is now UTF-8  
      9     * Bug fixed: Command line help did not appear  
      10     * In "Delete wiki word" confirmation dialog, "No" is now  
      11       the default answer  
      12  
      13  
      14  
      15 Dec. 26, 2007 (1.8rc12, repository revision in "stable-1.8" branch: 137)  
    5 16  
    6 17     * Bug fixed: Bad handling of empty input in  
  • branches/stable-1.8/lib/pwiki/WikiTxtCtrl.py

    r125 r139  
    67 67      
    68 68     def __init__(self, parent, id, txtCtrl, rect, font, presenter, searchInit=None):  
    69           wx.Frame.__init__(self, parent, id, u"", rect.GetPosition(),  
    70                   rect.GetSize(), wx.NO_BORDER)  
      69         wx.Frame.__init__(self, parent, id, u"WikidPad i-search",  
      70                 rect.GetPosition(), rect.GetSize(), wx.NO_BORDER)  
    71 71  
    72 72         self.txtCtrl = txtCtrl  
     
    196 196 #         self.idleCounter = 0       # Used to reduce idle load  
    197 197         self.searchStr = u""  
    198            
      198  
    198 198         # If autocompletion word was choosen, how many bytes to delete backward  
    199 199         # before inserting word, if word ...  
  • branches/stable-1.8/lib/pwiki/PluginManager.py

    r135 r139  
    5 5  
    6 6  
    7   from StringOps import mbcsEnc  
      7 from StringOps import mbcsEnc, pathEnc  
    7 7  
    8 8 """The PluginManager and PluginAPI classes implement a generic plugin framework.  
     
    139 139         exclusions = excludeFiles[:]  
    140 140         for directory in directories:  
    141               if not os.access(mbcsEnc(directory, "replace")[0], os.F_OK):  
      141             if not os.access(pathEnc(directory), os.F_OK):  
    141 141                 continue  
    142 142             files = os.listdir(directory)  
     
    149 149                     continue  
    150 150                 if os.path.isfile(fullname) and ext == '.py':  
    151                       module = self.importCode(open(fullname), moduleName)  
      151                     module = self.importCode(open(pathEnc(fullname)), moduleName)  
    151 151                 elif os.path.isdir(fullname):  
    152 152                     module = self.importDirectory(fullname)  
  • branches/stable-1.8/lib/pwiki/Exporters.py

    r135 r139  
    294 294         self.styleSheet = "wikistyle.css"  
    295 295  
    296           if exists(outputFile):  
    297               os.unlink(outputFile)  
      296         if exists(pathEnc(outputFile)):  
      297             os.unlink(pathEnc(outputFile))  
    298 298  
    299           realfp = open(outputFile, "w")  
      299         realfp = open(pathEnc(outputFile), "w")  
    299 299         fp = utf8Writer(realfp, "replace")  
    300 300         fp.write(self.getFileHeaderMultiPage(self.mainControl.wikiName))  
     
    376 376             outputFile = join(self.exportDest, self.convertFilename(u"index.html"))  
    377 377             try:  
    378                   if exists(outputFile):  
    379                       os.unlink(outputFile)  
      378                 if exists(pathEnc(outputFile)):  
      379                     os.unlink(pathEnc(outputFile))  
    380 380      
    381                   realfp = open(outputFile, "w")  
      381                 realfp = open(pathEnc(outputFile), "w")  
    381 381                 fp = utf8Writer(realfp, "replace")  
    382 382  
     
    425 425         outputFile = self.exportDest  
    426 426  
    427           if exists(outputFile):  
    428               os.unlink(outputFile)  
      427         if exists(pathEnc(outputFile)):  
      428             os.unlink(pathEnc(outputFile))  
    429 429  
    430           realfp = open(outputFile, "w")  
      430         realfp = open(pathEnc(outputFile), "w")  
    430 430         fp = utf8Writer(realfp, "replace")  
    431 431  
     
    485 485         outputFile = join(dir, self.convertFilename(u"%s.html" % word))  
    486 486         try:  
    487               if exists(outputFile):  
    488                   os.unlink(outputFile)  
      487             if exists(pathEnc(outputFile)):  
      488                 os.unlink(pathEnc(outputFile))  
    489 489  
    490               realfp = open(outputFile, "w")  
      490             realfp = open(pathEnc(outputFile), "w")  
    490 490             fp = utf8Writer(realfp, "replace")  
    491 491              
     
    675 675  
    676 676     def copyCssFile(self, dir):  
    677           if not exists(mbcsEnc(join(dir, 'wikistyle.css'))[0]):  
    678               cssFile = mbcsEnc(join(self.mainControl.wikiAppDir, 'export', 'wikistyle.css'))[0]  
      677         if not exists(pathEnc(join(dir, 'wikistyle.css'))):  
      678             cssFile = pathEnc(join(self.mainControl.wikiAppDir, 'export',  
      679                     'wikistyle.css'))  
    679 680             if exists(cssFile):  
    680                   shutil.copy(cssFile, dir)  
      681                 shutil.copy(cssFile, pathEnc(dir))  
    680 681  
    681 682     def shouldExport(self, wikiWord, wikiPage=None):  
     
    1800 1801 #                     os.unlink(outputFile)  
    1801 1802      
    1802                   fp = open(outputFile, "wb")  
      1803                 fp = open(pathEnc(outputFile), "wb")  
    1802 1803                 fp.write(filehead)  
    1803 1804                 fp.write(enc(content, "replace")[0])  
     
    1806 1807                  
    1807 1808                 try:  
    1808                       os.utime(outputFile, (long(modified), long(modified)))  
      1809                     os.utime(pathEnc(outputFile), (long(modified), long(modified)))  
    1808 1809                 except:  
    1809 1810                     pass  
     
    1963 1964         try:  
    1964 1965             try:  
    1965                   self.rawExportFile = open(self.exportDest, "w")  
    1966        
      1966                 self.rawExportFile = open(pathEnc(self.exportDest), "w")  
      1967  
    1967 1968                 # Only UTF-8 mode currently  
    1968 1969                 self.rawExportFile.write(BOM_UTF8)  
  • branches/stable-1.8/lib/pwiki/wikidata/WikiDataManager.py

    r125 r139  
    9 9  
    10 10 from pwiki.WikiExceptions import *  
    11   from pwiki.StringOps import mbcsDec, re_sub_escape  
      11 from pwiki.StringOps import mbcsDec, re_sub_escape, pathEnc  
    11 11 from pwiki.DocPages import WikiPage, FunctionalPage, AliasWikiPage  
    12 12  
     
    639 639                     os.path.dirname(wikiConfigPath),  
    640 640                     u"%s.wiki" % toWikiWord)  
    641               os.rename(wikiConfigPath, renamedConfigPath)  
      641             os.rename(pathEnc(wikiConfigPath), pathEnc(renamedConfigPath))  
    641 641  
    642 642             # Load it again  
  • branches/stable-1.8/lib/pwiki/wikidata/original_sqlite/WikiData.py

    r110 r139  
    53 53  
    54 54         try:  
    55               if (not exists(dbfile)):  
      55             if (not exists(pathEnc(dbfile))):  
    55 55                 DbStructure.createWikiDB(None, dataDir)  # , True  
    56 56         except (IOError, OSError, sqlite.Error), e:  
     
    59 59             raise DbWriteAccessError(e)  
    60 60  
    61           dbfile = pathDec(dbfile)[0]  
      61         dbfile = pathDec(dbfile)  
    61 61         try:  
    62               self.connWrap = DbStructure.ConnectWrap(sqlite.connect(dbfile))  
      62             self.connWrap = DbStructure.ConnectWrap(  
      63                     sqlite.connect(pathEnc(dbfile)))  
    63 64         except (IOError, OSError, sqlite.Error), e:  
    64 65             traceback.print_exc()  
     
    661 662  
    662 663  
    663    
    664    
    665 664     # TODO More general Wikiword to filename mapping  
    666 665     def _getAllPageNamesFromDisk(self):   # Used for rebuilding wiki  
    667 666         try:  
    668 667             files = glob.glob(pathEnc(join(self.dataDir,  
    669                       u'*' + self.pagefileSuffix), "replace")[0])  
    670               return [pathDec(basename(file), "replace")[0].replace(self.pagefileSuffix, '')  
    671                       for file in files]   # TODO: Unsafe. Suffix like e.g. '.wiki' may appear  
    672                                           #  in the word. E.g. "The.great.wiki.for.all.wiki"  
      668                     u'*' + self.pagefileSuffix)))  
      669              
      670             result = []  
      671             for file in files:  
      672                 word = pathDec(basename(file))  
      673                 if word.endswith(self.pagefileSuffix):  
      674                     word = word[:-len(self.pagefileSuffix)]  
      675                  
      676                 result.append(word)  
      677              
      678             return result  
      679  
      680 #         return [pathDec(basename(file)).replace(self.pagefileSuffix, '')  
      681 #                 for file in files]   # TODO: Unsafe. Suffix like e.g. '.wiki' may appear  
      682 #                                     #  in the word. E.g. "The.great.wiki.for.all.wiki"  
    673 683         except (IOError, OSError, sqlite.Error), e:  
    674 684             traceback.print_exc()  
     
    678 688     # TODO More general Wikiword to filename mapping  
    679 689     def getWikiWordFileName(self, wikiWord):  
    680           return join(self.dataDir, (u"%s" + self.pagefileSuffix) % wikiWord)  
      690         return pathEnc(join(self.dataDir,  
      691                 (u"%s" + self.pagefileSuffix) % wikiWord))  
    681 692  
    682 693     def isDefinedWikiWord(self, word):  
  • branches/stable-1.8/lib/pwiki/wikidata/original_sqlite/DbStructure.py

    r99 r139  
    12 12  
    13 13 from pwiki.WikiExceptions import *  
    14   from pwiki.StringOps import mbcsDec, mbcsEnc, utf8Enc, utf8Dec, applyBinCompact, \  
    15           getBinCompactForDiff, wikiWordToLabel  
      14 from pwiki.StringOps import mbcsDec, utf8Enc, utf8Dec, applyBinCompact, \  
      15         getBinCompactForDiff, wikiWordToLabel, pathEnc  
    16 16 from pwiki.SearchAndReplace import SearchReplaceOperation  
    17 17  
     
    427 427     """  
    428 428     dbfile = join(dataDir, "wikiovw.sli")  
    429       if (not exists(dbfile) or overwrite):  
    430           if (not exists(dataDir)):  
    431               mkdir(dataDir)  
      429     if (not exists(pathEnc(dbfile)) or overwrite):  
      430         if (not exists(pathEnc(dataDir))):  
      431             mkdir(pathEnc(dataDir))  
    432 432         else:  
    433               if exists(dbfile) and overwrite:  
    434                   unlink(dbfile)  
      433             if exists(pathEnc(dbfile)) and overwrite:  
      434                 unlink(pathEnc(dbfile))  
    435 435  
    436 436         # create the database  
  • branches/stable-1.8/lib/pwiki/wikidata/compact_sqlite/WikiData.py

    r110 r139  
    52 52  
    53 53         try:  
    54               if (not exists(dbfile)):  
      54             if (not exists(pathEnc(dbfile))):  
    54 54                 DbStructure.createWikiDB(None, dataDir)  # , True  
    55 55         except (IOError, OSError, sqlite.Error), e:  
     
    58 58             raise DbWriteAccessError(e)  
    59 59  
    60           dbfile = pathDec(dbfile)[0]  
      60 #         dbfile = pathDec(dbfile)  
    60 60         try:  
    61               self.connWrap = DbStructure.ConnectWrap(sqlite.connect(dbfile))  
      61             self.connWrap = DbStructure.ConnectWrap(  
      62                     sqlite.connect(pathEnc(dbfile)))  
    62 63         except (IOError, OSError, sqlite.Error), e:  
    63 64             traceback.print_exc()  
     
    1505 1506         self.connWrap.commit()  
    1506 1507  
    1507           fnames = glob.glob(join(pathEnc(self.dataDir, "replace")[0], '*.wiki'))  
      1508         fnames = glob.glob(pathEnc(join(self.dataDir, '*.wiki')))  
    1507 1508         for fn in fnames:  
    1508               word = basename(pathDec(fn, "replace")[0]).replace('.wiki', '')  
      1509             word = pathDec(basename(fn)).replace('.wiki', '')  
    1508 1509  
    1509 1510             fp = open(fn)  
     
    1515 1516 #             word = self.pWiki.getFormatting().normalizeWikiWordImport(word)  
    1516 1517             if self.dataManager.getFormatting().isNakedWikiWord(word):  
    1517                   self.setContent(word, content, moddate=stat(fn).st_mtime)  
      1518                 self.setContent(word, content, moddate=stat(pathEnc(fn)).st_mtime)  
    1517 1518 #             self.connWrap.execSql("insert or replace into wikiwordcontent(word, "+\  
    1518 1519 #                     "content, modified) values (?,?,?)", (word, sqlite.Binary(content), \  
  • branches/stable-1.8/lib/pwiki/wikidata/compact_sqlite/DbStructure.py

    r99 r139  
    13 13 from pwiki.WikiExceptions import *  
    14 14 from pwiki.StringOps import mbcsDec, mbcsEnc, utf8Enc, utf8Dec, applyBinCompact, \  
    15           getBinCompactForDiff, wikiWordToLabel  
      15         getBinCompactForDiff, wikiWordToLabel, pathEnc  
    15 15 from pwiki.SearchAndReplace import SearchReplaceOperation  
    16 16  
     
    427 427     """  
    428 428     dbfile = join(dataDir, "wiki.sli")  
    429       if (not exists(dbfile) or overwrite):  
    430           if (not exists(dataDir)):  
    431               mkdir(dataDir)  
      429     if (not exists(pathEnc(dbfile)) or overwrite):  
      430         if (not exists(pathEnc(dataDir))):  
      431             mkdir(pathEnc(dataDir))  
    432 432         else:  
    433               if exists(dbfile) and overwrite:  
    434                   unlink(dbfile)  
      433             if exists(pathEnc(dbfile)) and overwrite:  
      434                 unlink(pathEnc(dbfile))  
    435 435  
    436 436         # create the database  
    437           connwrap = ConnectWrap(sqlite.connect(dbfile))  
      437         connwrap = ConnectWrap(sqlite.connect(pathEnc(dbfile)))  
    437 437          
    438 438         try:  
  • branches/stable-1.8/lib/pwiki/wikidata/original_gadfly/WikiData.py