Skip to content

Commit

Permalink
Update code to handle invalid input tab files
Browse files Browse the repository at this point in the history
  • Loading branch information
catus felis committed Nov 8, 2022
1 parent ec0df0f commit b0ff0f0
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch-convert_all.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"args": ["--input", "ext-dict/star_anhviet.tab"],
"args": ["--input_folder", "./ext-dict", "--output_folder", "./ext-output", "--extension", "tab"]
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch-tab_stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"program": "./bin/tab_stats.py",
"console": "integratedTerminal",
"justMyCode": true,
"args": ["--input", "ext-stardict-vi/ko-vi/star_hanviet.tab"],
Expand Down
25 changes: 17 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,23 @@
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"type": "rdbg",
"name": "Debug current file with rdbg",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"args": ["--input_folder", "./ext-dict", "--output_folder", "./ext-output", "--extension", "tab"]
"script": "${file}",
"args": ["--from-lang",
"Vietnamese",
"--to-lang Vietnamese",
"--output",
"./ext-output/lingvo/Bach_khoa_toan_thu.dsl",
"./ext-dict/Bach_khoa_toan_thu.tab"],

"askParameters": false
},
{
"type": "rdbg",
"name": "Attach with rdbg",
"request": "attach"
}
]
}

}
27 changes: 27 additions & 0 deletions .vscode/rubylaunch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "rdbg",
"name": "Debug current file with rdbg",
"request": "launch",
"script": "${file}",
"args": ["--from-lang",
"Vietnamese",
"--to-lang Vietnamese",
"--output",
"./ext-output/lingvo/Wikipedia.dsl",
"./ext-dict/Wikipedia.tab"],

"askParameters": true
},
{
"type": "rdbg",
"name": "Attach with rdbg",
"request": "attach"
}
]
}
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem "debug", require: false
20 changes: 20 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
GEM
remote: https://rubygems.org/
specs:
debug (1.6.3)
irb (>= 1.3.6)
reline (>= 0.3.1)
io-console (0.5.11)
irb (1.4.2)
reline (>= 0.3.0)
reline (0.3.1)
io-console (~> 0.5)

PLATFORMS
x86_64-linux

DEPENDENCIES
debug

BUNDLED WITH
2.3.25
4 changes: 2 additions & 2 deletions bin/convert_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def main() -> None:

args, array = parser.parse_known_args()

input_folder = args.input_folder.replace(' ', '\\ ')
output_folder = args.output_folder.replace(' ', '\\ ')
input_folder = args.input_folder.replace(' ', '\\ ')
output_folder = args.output_folder.replace(' ', '\\ ')
extension = args.extension
metadata = args.metadata

Expand Down
4 changes: 2 additions & 2 deletions bin/install_linux_packages.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

sudo apt-get install dictzip &&
sudo apt install ruby-full
sudo apt install ruby-full &&
sudo gem install bundler debug io-console
2 changes: 1 addition & 1 deletion dsl-tools
Submodule dsl-tools updated 1 files
+20 −2 tab2dsl/tab2dsl.rb

0 comments on commit b0ff0f0

Please sign in to comment.