diff options
Diffstat (limited to 'dealconvert/formats')
-rw-r--r-- | dealconvert/formats/__init__.py | 3 | ||||
-rw-r--r-- | dealconvert/formats/cds.py | 2 | ||||
-rw-r--r-- | dealconvert/formats/dup.py | 2 | ||||
-rw-r--r-- | dealconvert/formats/pbn.py | 4 |
4 files changed, 6 insertions, 5 deletions
diff --git a/dealconvert/formats/__init__.py b/dealconvert/formats/__init__.py index 2d3d983..9ac48e3 100644 --- a/dealconvert/formats/__init__.py +++ b/dealconvert/formats/__init__.py @@ -4,8 +4,9 @@ import glob class DealFormat(object): cards = 'AKQJT98765432' - def __init__(self, interactive=True): + def __init__(self, interactive=True, jfr_only=False): self.interactive = interactive + self.jfr_only = jfr_only def parse(self, input_file): with open(input_file, 'rb') as content: diff --git a/dealconvert/formats/cds.py b/dealconvert/formats/cds.py index c7eeb5a..6137c4d 100644 --- a/dealconvert/formats/cds.py +++ b/dealconvert/formats/cds.py @@ -9,7 +9,7 @@ class CDSFormat(DealFormat): def suffix(self): return '.cds' - def __init__(self, interactive=True): + def __init__(self, *args, **kwargs): self.rzd_format = RZDFormat() def parse_content(self, content): diff --git a/dealconvert/formats/dup.py b/dealconvert/formats/dup.py index 19dca0f..3e34f2c 100644 --- a/dealconvert/formats/dup.py +++ b/dealconvert/formats/dup.py @@ -10,7 +10,7 @@ class DUPFormat(DealFormat): def suffix(self): return '.dup' - def __init__(self, interactive=True): + def __init__(self, *args, **kwargs): self.bri = BRIFormat() self.dge = DGEFormat() diff --git a/dealconvert/formats/pbn.py b/dealconvert/formats/pbn.py index 750d57d..04db8a2 100644 --- a/dealconvert/formats/pbn.py +++ b/dealconvert/formats/pbn.py @@ -144,8 +144,8 @@ class PBNFormat(DealFormat): dd_board = PBNBoard(lines) dd_table = DDTable(dd_board).get_dd_table(self.interactive) dd_contract = ParScore(dd_board).get_par_contract(dd_table) - dd_board.save_dd_table(dd_table) - dd_board.save_par_contract(dd_contract) + dd_board.save_dd_table(dd_table, jfr_only=self.jfr_only) + dd_board.save_par_contract(dd_contract, jfr_only=self.jfr_only) lines = [field.raw_field for field in dd_board.fields] except Exception as e: warnings.warn('unable to determine double-dummy data: %s' % e) |