Changeset 740:119f013c8e27 in hatta-dev for hatta.py
Legend:
- Unmodified
- Added
- Removed
-
hatta.py
r739 r740 185 185 help='Use the STYLE pygments style for highlighting', 186 186 metavar='STYLE') 187 add('-D', '--subdirectories', dest='subdirectories', 188 action="store_true", 189 help='Store subpages as subdirectories in the filesystem') 187 190 188 191 options, args = parser.parse_args() … … 662 665 if filename.startswith(self.repo_prefix): 663 666 yield self._file_to_title(filename) 667 668 669 class WikiSubdirectoryStorage(WikiStorage): 670 """ 671 A version of WikiStorage that keeps the subpages in real subdirectories in 672 the filesystem. 673 674 """ 675 676 # XXX Override required methods here. 677 664 678 665 679 class WikiParser(object): … … 2446 2460 self.icon_page = self.config.get('icon_page', None) 2447 2461 self.pygments_style = self.config.get('pygments_style', 'tango') 2448 2449 self.storage = self.storage_class(self.path, self.page_charset) 2462 self.subdirectories = self.config.get_bool('subdirectories', False) 2463 if self.subdirectories: 2464 self.storage = WikiSubdirectoryStorage(self.path, self.page_charset) 2465 else: 2466 self.storage = self.storage_class(self.path, self.page_charset) 2450 2467 if not os.path.isdir(self.cache): 2451 2468 os.makedirs(self.cache)
Note: See TracChangeset
for help on using the changeset viewer.
