pilot.linkstec 0.0.99__tar.gz → 0.0.101__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/PKG-INFO +1 -1
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/pyproject.toml +1 -1
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/control/impl/base_controller.py +23 -1
- pilot_linkstec-0.0.101/src/pilot/create_python/config/create_file.py +17 -0
- pilot_linkstec-0.0.101/src/pilot/create_python/sample/config/properties.py +18 -0
- pilot_linkstec-0.0.101/src/pilot/job/base/convert/delimiterSwitcherJob.py +25 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/generate/generateJsonBaseJob.py +1 -1
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/generate/generateTextBaseJob.py +1 -1
- pilot_linkstec-0.0.101/src/pilot/job/base/program/cobol/convert/spitPreDigit.py +26 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/impl/base_job.py +4 -2
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/unit/impl/base_unit.py +20 -2
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot.linkstec.egg-info/PKG-INFO +1 -1
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot.linkstec.egg-info/SOURCES.txt +4 -4
- pilot_linkstec-0.0.99/src/pilot/conver/nkf_converter.py +0 -28
- pilot_linkstec-0.0.99/src/pilot/processor/code_processor.py +0 -8
- pilot_linkstec-0.0.99/src/pilot/processor/code_processor_pipeline.py +0 -14
- pilot_linkstec-0.0.99/src/pilot/util/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/LICENSE +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/README.md +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/setup.cfg +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/base/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/base/ai_call.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/base/ai_info.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/base/chage_file_tag_base.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/base/db_operation_base.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/base/delete_commnents_base.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/base/file_operation.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/base/get_file_encoding.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/base/make_parsing_java_file_order_base.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/base/split_file_base.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/client/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/client/ai_client.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/config/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/config/config_reader.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/control/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/control/control_interface.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/control/impl/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/conver/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/conver/commentRemover.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/conver/converfileEncodding.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/create_python/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/create_python/config/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/create_python/create_python.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/create_python/sample/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/create_python/sample/child_sample/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/create_python/sample/child_sample/job/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/create_python/sample/config/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/db/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/db/create_table.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/db/db_connect.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/db/db_main.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/db/db_util.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/db/ddl/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/db/dml/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/db/sql_executor.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/db/sql_loader.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/db/sql_service.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/file_tool/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/file_tool/create_prompt_file.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/file_tool/json_file_tool.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/generater/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/generater/vertexai.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/convert/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/convert/encodingTransformerJob.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/convert/tabReplaceJob.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/generate/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/program/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/program/cobol/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/program/cobol/convert/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/program/java/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/program/java/generateDetailDesignPrompt.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/impl/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/job_interface.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/logging/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/logging/logger.py +0 -0
- {pilot_linkstec-0.0.99/src/pilot/processor → pilot_linkstec-0.0.101/src/pilot/prompt}/__init__.py +0 -0
- {pilot_linkstec-0.0.99/src/pilot/prompt → pilot_linkstec-0.0.101/src/pilot/splitters}/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/splitters/cobolsplitter.py +0 -0
- {pilot_linkstec-0.0.99/src/pilot/splitters → pilot_linkstec-0.0.101/src/pilot/unit}/__init__.py +0 -0
- {pilot_linkstec-0.0.99/src/pilot/unit → pilot_linkstec-0.0.101/src/pilot/unit/impl}/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/unit/unit_interface.py +0 -0
- {pilot_linkstec-0.0.99/src/pilot/unit/impl → pilot_linkstec-0.0.101/src/pilot/util}/__init__.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/util/files.py +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot.linkstec.egg-info/dependency_links.txt +0 -0
- {pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot.linkstec.egg-info/top_level.txt +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import shutil
|
|
3
|
+
import time
|
|
3
4
|
from concurrent.futures import ThreadPoolExecutor
|
|
4
5
|
|
|
5
6
|
|
|
@@ -19,7 +20,7 @@ class BaseController(ControlInterface):
|
|
|
19
20
|
return BaseUnit()
|
|
20
21
|
|
|
21
22
|
def run(self,configfile: str = None):
|
|
22
|
-
|
|
23
|
+
|
|
23
24
|
config_dto = ConfigReader(configfile).get_dto()
|
|
24
25
|
unit = self._init_unit()
|
|
25
26
|
unit.config_dto = config_dto
|
|
@@ -83,3 +84,24 @@ class BaseController(ControlInterface):
|
|
|
83
84
|
pass
|
|
84
85
|
|
|
85
86
|
|
|
87
|
+
def copy_result_files_to_next_control_without_delete(from_configfile: str,to_configfile: str ):
|
|
88
|
+
from_config_dto = ConfigReader(from_configfile).get_dto()
|
|
89
|
+
to_config_dto = ConfigReader(to_configfile).get_dto()
|
|
90
|
+
from_runsteps = from_config_dto.steps
|
|
91
|
+
to_runsteps = to_config_dto.steps
|
|
92
|
+
from_workspace = from_config_dto.work_space
|
|
93
|
+
to_workspace = to_config_dto.work_space
|
|
94
|
+
from_fold = os.path.join(from_workspace, from_runsteps[-1])
|
|
95
|
+
to_fold = os.path.join(to_workspace, to_runsteps[0])
|
|
96
|
+
os.makedirs(to_fold, exist_ok=True)
|
|
97
|
+
shutil.copytree(from_fold, to_fold, dirs_exist_ok=True)
|
|
98
|
+
for root, _, files in os.walk(to_fold):
|
|
99
|
+
for fname in files:
|
|
100
|
+
if fname.endswith(('.trg', '.begin', '.end')):
|
|
101
|
+
try:
|
|
102
|
+
os.remove(os.path.join(root, fname))
|
|
103
|
+
except OSError:
|
|
104
|
+
pass
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import textwrap
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class create_file():
|
|
5
|
+
# 静的な文字列(詳細プロンプト)
|
|
6
|
+
|
|
7
|
+
detail_prompt: str = textwrap.dedent("""\
|
|
8
|
+
|
|
9
|
+
work_space=C:/workspace/lsc_sci/plsql_detail
|
|
10
|
+
|
|
11
|
+
sub_project_name=common
|
|
12
|
+
sub_source_folder=clearner
|
|
13
|
+
sub_sub_source_folder_1=cobol
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
""").strip()
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import textwrap
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class create_file():
|
|
5
|
+
# 静的な文字列(詳細プロンプト)
|
|
6
|
+
|
|
7
|
+
detail_prompt: str = textwrap.dedent("""\
|
|
8
|
+
|
|
9
|
+
work_space={{WORK_SPACE}}
|
|
10
|
+
|
|
11
|
+
project={{PROJECT_NAME}}
|
|
12
|
+
steps={{STEP_NAME}}
|
|
13
|
+
runsteps={{STEP_NAME}}
|
|
14
|
+
multisteps=
|
|
15
|
+
threads=1
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
""").strip()
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from pilot.job.impl.base_job import BaseJob
|
|
4
|
+
|
|
5
|
+
class DelimiterSwitcherJob(BaseJob):
|
|
6
|
+
|
|
7
|
+
def __init__(self, *args, **kwargs):
|
|
8
|
+
super().__init__(*args, **kwargs)
|
|
9
|
+
self.from_sep = ''
|
|
10
|
+
self.to_sep = ''
|
|
11
|
+
self.desc_file_path = None
|
|
12
|
+
self.src_file_path = None
|
|
13
|
+
|
|
14
|
+
def run(self):
|
|
15
|
+
replaced_text = []
|
|
16
|
+
if self.src_file_path is None:
|
|
17
|
+
self.src_file_path = Path(self.file_path)
|
|
18
|
+
with open(self.src_file_path, 'r', encoding='utf-8', newline='') as rf:
|
|
19
|
+
for line in rf:
|
|
20
|
+
replaced_text.append(line.replace(self.from_sep, self.to_sep))
|
|
21
|
+
if self.desc_file_path is None:
|
|
22
|
+
self.desc_file_path = Path(self.file_path)
|
|
23
|
+
with open(self.desc_file_path, 'w', encoding='utf-8', newline='') as wf:
|
|
24
|
+
wf.writelines(replaced_text)
|
|
25
|
+
super().run()
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
from pilot.job.impl.base_job import BaseJob
|
|
3
|
+
|
|
4
|
+
class SpitPreDigit(BaseJob):
|
|
5
|
+
def run(self):
|
|
6
|
+
|
|
7
|
+
with open(self.file_path, 'r', encoding='utf-8') as f:
|
|
8
|
+
lines = f.readlines()
|
|
9
|
+
|
|
10
|
+
cleaned_lines = []
|
|
11
|
+
for line in lines:
|
|
12
|
+
# 先頭6文字を抽出
|
|
13
|
+
prefix = line[:6]
|
|
14
|
+
|
|
15
|
+
# 先頭6文字がすべて数字(かつ6文字以上ある)かチェック
|
|
16
|
+
if len(prefix) == 6 and prefix.isdigit():
|
|
17
|
+
# 数字だった場合は7文字目以降を保存
|
|
18
|
+
cleaned_lines.append(line[6:])
|
|
19
|
+
else:
|
|
20
|
+
# 数字でない(または6文字未満)場合はそのまま保存
|
|
21
|
+
cleaned_lines.append(line)
|
|
22
|
+
|
|
23
|
+
with open(self.file_path, 'w', encoding='utf-8') as f:
|
|
24
|
+
f.writelines(cleaned_lines)
|
|
25
|
+
|
|
26
|
+
|
|
@@ -81,7 +81,7 @@ class BaseJob(JobInterface):
|
|
|
81
81
|
|
|
82
82
|
try:
|
|
83
83
|
base_dir = os.path.join(self.config_dto.work_space, self.current_step)
|
|
84
|
-
return
|
|
84
|
+
return base_dir
|
|
85
85
|
except ValueError:
|
|
86
86
|
return self._file_path
|
|
87
87
|
|
|
@@ -331,7 +331,9 @@ class BaseJob(JobInterface):
|
|
|
331
331
|
ジョブ実行前の前処理を行うメソッド。
|
|
332
332
|
必要に応じてサブクラスでオーバーライドして使用する。
|
|
333
333
|
"""
|
|
334
|
-
|
|
334
|
+
if not self.change_current_trg_to_begin():
|
|
335
|
+
return False
|
|
336
|
+
return True
|
|
335
337
|
|
|
336
338
|
def post_run(self):
|
|
337
339
|
"""
|
|
@@ -30,9 +30,27 @@ class BaseUnit(UnitInterface):
|
|
|
30
30
|
job.step_index = index
|
|
31
31
|
job.file_path = file_path
|
|
32
32
|
if self.job_need_run(job, filename, index):
|
|
33
|
+
if index != 0:
|
|
34
|
+
if not job.pre_run():
|
|
35
|
+
continue
|
|
33
36
|
job.run()
|
|
34
37
|
if index != 0:
|
|
35
38
|
job.post_run()
|
|
36
39
|
|
|
37
|
-
def job_need_run(self, job:BaseJob,filename: str,
|
|
38
|
-
|
|
40
|
+
def job_need_run(self, job:BaseJob ,filename: str, step_index: int):
|
|
41
|
+
if step_index == 0:
|
|
42
|
+
return True
|
|
43
|
+
file_ext = file_ext = filename.split('.')[-1]
|
|
44
|
+
if file_ext == "trg":
|
|
45
|
+
# ★ trgファイルは、jobのfile_pathに設定する
|
|
46
|
+
job.current_trg_file_path = job.file_path
|
|
47
|
+
job.file_path = job.file_path.rsplit('.trg', 1)[0]
|
|
48
|
+
return True
|
|
49
|
+
elif file_ext == "end":
|
|
50
|
+
#job.copy_input_file_to_next_step(job.file_path.rsplit('.', 1)[0])
|
|
51
|
+
#job.create_next_step_end_trg_file()
|
|
52
|
+
return False
|
|
53
|
+
elif file_ext == "begin":
|
|
54
|
+
return False
|
|
55
|
+
else:
|
|
56
|
+
return False
|
|
@@ -27,14 +27,15 @@ src/pilot/control/impl/base_controller.py
|
|
|
27
27
|
src/pilot/conver/__init__.py
|
|
28
28
|
src/pilot/conver/commentRemover.py
|
|
29
29
|
src/pilot/conver/converfileEncodding.py
|
|
30
|
-
src/pilot/conver/nkf_converter.py
|
|
31
30
|
src/pilot/create_python/__init__.py
|
|
32
31
|
src/pilot/create_python/create_python.py
|
|
33
32
|
src/pilot/create_python/config/__init__.py
|
|
33
|
+
src/pilot/create_python/config/create_file.py
|
|
34
34
|
src/pilot/create_python/sample/__init__.py
|
|
35
35
|
src/pilot/create_python/sample/child_sample/__init__.py
|
|
36
36
|
src/pilot/create_python/sample/child_sample/job/__init__.py
|
|
37
37
|
src/pilot/create_python/sample/config/__init__.py
|
|
38
|
+
src/pilot/create_python/sample/config/properties.py
|
|
38
39
|
src/pilot/db/__init__.py
|
|
39
40
|
src/pilot/db/create_table.py
|
|
40
41
|
src/pilot/db/db_connect.py
|
|
@@ -54,6 +55,7 @@ src/pilot/job/__init__.py
|
|
|
54
55
|
src/pilot/job/job_interface.py
|
|
55
56
|
src/pilot/job/base/__init__.py
|
|
56
57
|
src/pilot/job/base/convert/__init__.py
|
|
58
|
+
src/pilot/job/base/convert/delimiterSwitcherJob.py
|
|
57
59
|
src/pilot/job/base/convert/encodingTransformerJob.py
|
|
58
60
|
src/pilot/job/base/convert/tabReplaceJob.py
|
|
59
61
|
src/pilot/job/base/generate/__init__.py
|
|
@@ -62,15 +64,13 @@ src/pilot/job/base/generate/generateTextBaseJob.py
|
|
|
62
64
|
src/pilot/job/base/program/__init__.py
|
|
63
65
|
src/pilot/job/base/program/cobol/__init__.py
|
|
64
66
|
src/pilot/job/base/program/cobol/convert/__init__.py
|
|
67
|
+
src/pilot/job/base/program/cobol/convert/spitPreDigit.py
|
|
65
68
|
src/pilot/job/base/program/java/__init__.py
|
|
66
69
|
src/pilot/job/base/program/java/generateDetailDesignPrompt.py
|
|
67
70
|
src/pilot/job/impl/__init__.py
|
|
68
71
|
src/pilot/job/impl/base_job.py
|
|
69
72
|
src/pilot/logging/__init__.py
|
|
70
73
|
src/pilot/logging/logger.py
|
|
71
|
-
src/pilot/processor/__init__.py
|
|
72
|
-
src/pilot/processor/code_processor.py
|
|
73
|
-
src/pilot/processor/code_processor_pipeline.py
|
|
74
74
|
src/pilot/prompt/__init__.py
|
|
75
75
|
src/pilot/splitters/__init__.py
|
|
76
76
|
src/pilot/splitters/cobolsplitter.py
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import subprocess
|
|
2
|
-
import sys
|
|
3
|
-
|
|
4
|
-
class NkfConverter:
|
|
5
|
-
def __init__(self, nkf_args=None):
|
|
6
|
-
"""
|
|
7
|
-
コンストラクタ
|
|
8
|
-
:param nkf_args: nkf に渡す引数のリスト(例: ['-w', '--overwrite'])
|
|
9
|
-
指定しない場合はデフォルト値を使用
|
|
10
|
-
"""
|
|
11
|
-
if nkf_args is None:
|
|
12
|
-
nkf_args = ['-w', '--overwrite']
|
|
13
|
-
self.nkf_args = nkf_args
|
|
14
|
-
|
|
15
|
-
def convert(self, file_path):
|
|
16
|
-
"""
|
|
17
|
-
nkf を使ってファイルの文字コード変換を行う
|
|
18
|
-
:param file_path: 変換対象のファイルパス
|
|
19
|
-
:return: nkfの変換結果のバイト列、失敗したらNone
|
|
20
|
-
"""
|
|
21
|
-
cmd = ['nkf32'] + self.nkf_args + [file_path]
|
|
22
|
-
try:
|
|
23
|
-
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
|
|
24
|
-
print(f"nkfの実行完了しました: {file_path}")
|
|
25
|
-
except subprocess.CalledProcessError as e:
|
|
26
|
-
print(f"nkfの実行でエラーが発生しました: {e.stderr.decode()}", file=sys.stderr)
|
|
27
|
-
return None
|
|
28
|
-
return result.stdout
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
|
|
3
|
-
from pilot.processor.code_processor import CodeProcessor
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class CodeProcessorPipeline:
|
|
7
|
-
def __init__(self, processors: List[CodeProcessor]):
|
|
8
|
-
self.processors = processors
|
|
9
|
-
|
|
10
|
-
def run(self, lines: List[str]) -> List[str]:
|
|
11
|
-
result = lines
|
|
12
|
-
for processor in self.processors:
|
|
13
|
-
result = processor.process(result)
|
|
14
|
-
return result
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/base/make_parsing_java_file_order_base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/create_python/sample/config/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/convert/tabReplaceJob.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/program/cobol/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot/job/base/program/java/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pilot_linkstec-0.0.99/src/pilot/processor → pilot_linkstec-0.0.101/src/pilot/prompt}/__init__.py
RENAMED
|
File without changes
|
{pilot_linkstec-0.0.99/src/pilot/prompt → pilot_linkstec-0.0.101/src/pilot/splitters}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pilot_linkstec-0.0.99/src/pilot/splitters → pilot_linkstec-0.0.101/src/pilot/unit}/__init__.py
RENAMED
|
File without changes
|
{pilot_linkstec-0.0.99/src/pilot/unit → pilot_linkstec-0.0.101/src/pilot/unit/impl}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pilot_linkstec-0.0.99/src/pilot/unit/impl → pilot_linkstec-0.0.101/src/pilot/util}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pilot_linkstec-0.0.99 → pilot_linkstec-0.0.101}/src/pilot.linkstec.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|