|
12 | 12 |
|
13 | 13 | from PySide6.QtCore import QObject, Slot, Signal, QThreadPool, QSettings, QCoreApplication |
14 | 14 | from PySide6.QtGui import QAction |
15 | | -from PySide6.QtWidgets import QWidget, QDialog, QDialogButtonBox, QVBoxLayout, \ |
| 15 | +from PySide6.QtWidgets import QWidget, QDialogButtonBox, QVBoxLayout, \ |
16 | 16 | QProgressDialog, QMessageBox, QTabWidget, QFileDialog, QComboBox, QHBoxLayout, QMenu, QPushButton, QLabel, \ |
17 | 17 | QInputDialog |
18 | 18 | from brf2ebrl.common import PageLayout |
19 | 19 | from brf2ebrl.parser import EBrailleParserOptions |
20 | | -from brf2ebrl.plugin import find_plugins |
| 20 | +from brf2ebrl.plugin import find_plugins |
21 | 21 |
|
22 | 22 | from convert2ebrl.convert_task import ConvertTask, Notification |
23 | 23 | from convert2ebrl.settings import SettingsProfile |
24 | 24 | from convert2ebrl.settings.defaults import DEFAULT_SETTINGS_PROFILES_LIST |
25 | | -from convert2ebrl.tabs.general_tab import ConversionGeneralSettingsWidget |
| 25 | +from convert2ebrl.tabs.general_tab import ConversionGeneralSettingsWidget, expand_input_brfs |
26 | 26 | from convert2ebrl.tabs.metadata_tab import MetadataWidget |
27 | 27 | from convert2ebrl.tabs.page_settings_tab import ConversionPageSettingsWidget |
28 | 28 | from convert2ebrl.utils import RunnableAdapter, load_settings_profiles, save_settings_profiles, load_settings_profile, \ |
29 | 29 | save_settings_profile |
30 | 30 |
|
31 | | - |
32 | 31 | DISCOVERED_PARSER_PLUGINS = find_plugins() |
33 | 32 |
|
34 | 33 | class SettingsProfilesWidget(QWidget): |
@@ -210,9 +209,7 @@ def _update_validity(self): |
210 | 209 | @Slot() |
211 | 210 | def on_apply(self): |
212 | 211 | number_of_steps = 1000 |
213 | | - brf_list = [brf for f in self._brf2ebrf_form.input_brfs for brf in |
214 | | - ([os.path.join(f, b) for b in os.listdir(f) if |
215 | | - os.path.splitext(b)[1].lower() == ".brf"] if os.path.isdir(f) else [f])] |
| 212 | + brf_list = expand_input_brfs(self._brf2ebrf_form.input_brfs) |
216 | 213 | num_of_inputs = len(brf_list) |
217 | 214 | output_ebrf = self._brf2ebrf_form.output_ebrf |
218 | 215 | if os.path.exists(output_ebrf): |
|
0 commit comments