| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from HTMLParser import HTMLParser | 5 from HTMLParser import HTMLParser |
| 6 import logging | 6 import logging |
| 7 import os | 7 import os |
| 8 import re | 8 import re |
| 9 | 9 |
| 10 from data_source import DataSource | 10 from data_source import DataSource |
| 11 from docs_server_utils import FormatKey | 11 from docs_server_utils import FormatKey |
| 12 from document_parser import ParseDocument | |
| 13 from extensions_paths import INTROS_TEMPLATES, ARTICLES_TEMPLATES | 12 from extensions_paths import INTROS_TEMPLATES, ARTICLES_TEMPLATES |
| 14 from file_system import FileNotFoundError | 13 from file_system import FileNotFoundError |
| 15 from future import Future | 14 from future import Future |
| 16 from third_party.handlebar import Handlebar | 15 from third_party.handlebar import Handlebar |
| 17 | 16 |
| 18 | 17 |
| 19 | 18 |
| 20 # TODO(kalman): rename this HTMLDataSource or other, then have separate intro | 19 # TODO(kalman): rename this HTMLDataSource or other, then have separate intro |
| 21 # article data sources created as instances of it. | 20 # article data sources created as instances of it. |
| 22 class IntroDataSource(DataSource): | 21 class IntroDataSource(DataSource): |
| (...skipping 28 matching lines...) Expand all Loading... |
| 51 except FileNotFoundError: | 50 except FileNotFoundError: |
| 52 continue | 51 continue |
| 53 # Not found. Do the first operation again so that we get a stack trace - we | 52 # Not found. Do the first operation again so that we get a stack trace - we |
| 54 # know that it'll fail. | 53 # know that it'll fail. |
| 55 get_from_base_path(base_paths[0]) | 54 get_from_base_path(base_paths[0]) |
| 56 raise AssertionError() | 55 raise AssertionError() |
| 57 | 56 |
| 58 def Cron(self): | 57 def Cron(self): |
| 59 # TODO(kalman): Walk through the intros and articles directory. | 58 # TODO(kalman): Walk through the intros and articles directory. |
| 60 return Future(value=()) | 59 return Future(value=()) |
| OLD | NEW |