Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert issue - html tags #1

Open
michalterbert opened this issue May 20, 2020 · 6 comments
Open

Convert issue - html tags #1

michalterbert opened this issue May 20, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@michalterbert
Copy link

Hi!
I used stardict-comn_dictd04_slovnyk_en-pl-2.4.2.tar.bz2
dictconv installed on Mac Os Catalina (brew + yarn).
╰─$ dictconv convert stardict-comn_dictd04_slovnyk_en-pl-2.4.2.tar.bz2 -i -v Tmpdir created at /var/folders/pv/2cp12wnx5pq1vf5nx8jm1pm00000gn/T/dictconv/1589971345574 Unarchived slovnyk_en-pl.dict.dz Loading dictionary... { version: '2.4.2', wordcount: 15420, idxfilesize: 252910, bookname: 'slovnyk_en-pl', date: '2009.01.30', sametypesequence: 'x', description: 'This file was converted from the original database on: Sat Sep 18 20:07:50 2004 The original data is available from: http://www.slovnyk.org/prg/gszotar/index.html This dictionary is licenced under GNU GPL version 2 (http://www.gnu.org/copyleft/gpl.txt) The converting script is in {00-database-script}. Below are scripts for building .index/.dict files. Extract them using the following command: mimencode -ub | gunzip | tar x H4sIAHl5TEEAA+2UW3PTOBTH82p9irPGkLYbW7KTNN1w2R2GUh4YlmHaJ0KDYyuxpracseQm veS7c6S0EGBmZ1+AYUa/GVuW/D8XHx05orNWlHnnR8JixkbDYYcxFo8OD83I4sHAjkiSJINO zOJ41B/1WdxHfXzYH3WA/dCs7miVThuATlbwVtWX/6HjjfoZCf1cHvxBZ0JSVRDyAACv4EWq +RgSxgaU/UXZCOLhOOmP2RACKyFYr+ksVfxwAHv7NwSQLNXw5Mnxvy/J1EAIY2Ge6tTIQpU1 Yqmt7jkv6xWkDYftooJ53YDtQCEXEAmZ8zWNcpFpmIuSq8iaHa91k+KSLngFrTJSfETbEt2Z WVZXVSrzsVVXouIyq3MOYTuDW1i08los8cFs9JoQk6YVmnlWgB/84xvZVrRjPSMbQkyCAoSE g6jV86MoU5fR7Dp5DHlNPJOjTCv+9CPPihoCgQ4Uz6Gr6MTIwyOjpbT7kXjmo6a74nvjLzbT 9+fhhwNKF49B0ZBOjR3xrNp/29QZV/bbv1gGn536ED97lKD6hnh3FhNyWggFRiJqmTZXgLNS ZPh5PCctlrqBkzdncPL2NVxic6MIEtgrtF6OKV2tVtFCtlHdLGhWL69KPtd0sSwjvdb7BF1z rLpEO21S2m6nCYCVuvl+9zcR8TE5b3ZtWsUPBFYcp+nqAro4mqQ9ka/hKVSpzoq9gPWAnvvv z/0Pfo/u29dz2EPJvtV6xQpQrNqZ0o1VJz149/r4zcnpKwihby28nM+/Ft0r/oTYKja8VHzr 8Pvo0cFd5G9Cm9hfeY13Q28d/4/Yu8E9vhYaku2yTcwUy1s2Quo5+PZQTeREPlQTCWDufg+K VQ8wCgo3Xbi9Besj+NtY7hxRP2A+8Tam3KYT5pWGMCzrLC05NO303Vl0dvoyPIIwG+KLldBF 3eqw4Klpjwn6Clvo7vSEKutLeXVh+2KJ10Jd1xiO2qMbFboqu1szhaFvPvfnxv9mav83AE2F 6/f97JO8lpz86n+iw+FwOBwOh8PhcDgcDofD4XA4HA6Hw+FwOBwOx+/EJywBdIcAKAAA Source url: http://www.slovnyk.org/prg/gszotar/index.html' } converting [====================] 100% 0.0s Saving... Copy assets... Converted raw file path: /var/folders/pv/2cp12wnx5pq1vf5nx8jm1pm00000gn/T/dictconv/raw/mac-slovnyk_en-pl Start building... builder - Building mac-slovnyk_en-pl.dictionary. builder - Checking source. builder - Cleaning objects directory. builder - Preparing dictionary template. builder - Preprocessing dictionary sources. builder - Extracting index data. builder - Preparing dictionary bundle. builder - Adding body data. builder - Preparing index data. builder - Building key_text index. builder - Building reference index. builder - Fixing dictionary property. builder - Copying CSS. builder - Finished building /var/folders/pv/2cp12wnx5pq1vf5nx8jm1pm00000gn/T/dictconv/build/mac-slovnyk_en-pl.dictionary. Built /var/folders/pv/2cp12wnx5pq1vf5nx8jm1pm00000gn/T/dictconv/build/mac-slovnyk_en-pl.dictionary Installed to ~/Library/Dictionaries/

After convertion, I have html tags not supported by App Dict:
image

Could you take a look on that case?
thanks!

@ritou11
Copy link
Owner

ritou11 commented May 20, 2020

It seems like a bug with xdxf format, which is non-trivial to support since XSLT is not easy in Node.js. Hopefully I'll come up with a hack of this. Can you provide the dictionary file to test?

@ritou11 ritou11 added the bug Something isn't working label May 20, 2020
@michalterbert
Copy link
Author

@ritou11
Copy link
Owner

ritou11 commented May 20, 2020

I added basic support for xdxf format in v0.1.1. Also, I checked your dict and it can be converted here now.
mac-slovnyk_en-pl.dictionary.zip

@michalterbert
Copy link
Author

Hi,
Thanks, now is much better but not perfect :)
image

I think that should look like below screen:
image

What do you think?
Thanks for quick fix 👍

@ritou11
Copy link
Owner

ritou11 commented May 21, 2020

You're right, I've also noticed that problem with newline. However, it is some issue with the xslt-ts package like #2 , which is the only one I could find to do xslt.

@michalterbert
Copy link
Author

btw. the best scenario will be used https://dumps.wikimedia.org/enwiktionary/ and convert them do Mac Dict :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants