Skip to content

Commit

Permalink
User register_all function from alternative_encodings, add romaji enc…
Browse files Browse the repository at this point in the history
…oding
  • Loading branch information
insolor committed Jun 1, 2024
1 parent b4aada1 commit c968d9b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions csv_bisect_gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
from pathlib import Path
from tkinter import filedialog, messagebox

from alternative_encodings import cp859, cp866i, viscii
import alternative_encodings
from tkinter_layout_helpers import pack_manager

from csv_bisect_gui.bisect_tool import BisectTool

cp859.register()
cp866i.register()
viscii.register()

alternative_encodings.register_all()

encodings = [
"cp437",
Expand All @@ -28,11 +25,11 @@
"cp1251",
"latin3",
"latin9",
"romaji",
"viscii",
"utf-8",
]


is_windows = platform.system() == "Windows"


Expand Down Expand Up @@ -167,14 +164,14 @@ def exclude_from_csv(self):
return

selection = list(self.bisect_tool.selected_nodes)

if len(selection) > 1:
messagebox.showerror("ERROR", "Select one row")
return

node = selection[0]
selection_slice = node.slice

before_selection = slice(0, selection_slice.start)
after_selection = slice(selection_slice.stop, -1)

Expand Down

0 comments on commit c968d9b

Please sign in to comment.