Skip to content

ファイル名にドットが含まれる場合に出力ファイル名が欠損する問題の修正#37

Open
checche wants to merge 1 commit intondl-lab:masterfrom
yaichi-tech:fix/dotted-filename-issue-36
Open

ファイル名にドットが含まれる場合に出力ファイル名が欠損する問題の修正#37
checche wants to merge 1 commit intondl-lab:masterfrom
yaichi-tech:fix/dotted-filename-issue-36

Conversation

@checche
Copy link
Copy Markdown

@checche checche commented Apr 3, 2026

概要

  • abc.def.pdf のようなドット入りファイル名を処理すると、出力が abc.xml / abc.txt となり .def が欠落する問題を修正
  • .split(".")[0]os.path.splitext()[0] / Path.stem に置き換え、最後の拡張子のみを除去するように変更

Closes #36

試験内容

1

digidepo_2531162.0024.jpg 等のドット入りファイル名でOCR実行し、出力ファイル名が digidepo_2531162.0024.xml / digidepo_2531162.0024.txt となること

  1. cp resource/digidepo_2531162_0024.jpg resource/digidepo_2531162.0024.jpg
  2. resource/digidepo_2531162.0024.jpg をGUIに入力
  3. 以下のファイルが出力されていることを確認
    digidepo_2531162.0024_tei.xml, digidepo_2531162.0024.json, digidepo_2531162.0024.txt, digidepo_2531162.0024.xml, viz_digidepo_2531162.0024.jpg

2

digidepo_2531162_0024.jpg 等の通常ファイル名で従来通り動作すること

  1. resource/digidepo_2531162_0024.jpg をGUIに入力
  2. 以下のファイルが出力されていることを確認
    digidepo_2531162_0024_tei.xml, digidepo_2531162_0024.json, digidepo_2531162_0024.txt, digidepo_2531162_0024.xml, viz_digidepo_2531162_0024.jpg

.split(".")[0] を os.path.splitext()[0] / Path.stem に置き換え、
最後の拡張子のみを除去するように修正。(ndl-lab#36)
@checche checche marked this pull request as ready for review April 3, 2026 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ファイル名に .が入っている場合

1 participant