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

The "xxx.dictionary" folder isn't created on Apple Silicon #12

Open
melyux opened this issue Jun 7, 2022 · 1 comment
Open

The "xxx.dictionary" folder isn't created on Apple Silicon #12

melyux opened this issue Jun 7, 2022 · 1 comment

Comments

@melyux
Copy link

melyux commented Jun 7, 2022

At least that's the use case I have. This works on my Intel Mac (with so-so results as far as the final dictionary formatting, which I've never gotten to work properly with newlines and formatting), but on the M1 Mac, the scripts says identically that it created the ".dictionary" folder in the end, but the dictionary folder is not actually created. Using the --install flag throws an error saying that it couldn't find the .dictionary folder.

@sonerfromnurland
Copy link

sonerfromnurland commented Sep 30, 2022

@melyux
No, it works on M1. However, fonts look terrible. Be sure you are in sudo mode. You can find dicts from here
Screen Shot 2022-09-30 at 4 26 50 PM

Here is the log,

soner@Soners-MacBook-Pro ~ % sysctl -n machdep.cpu.brand_string
Apple M1 Max
soner@Soners-MacBook-Pro ~ % sudo -s
Password:
root@Soners-MacBook-Pro ~ # cd Desktop 
root@Soners-MacBook-Pro Desktop # dictconv convert /Users/soner/Downloads/1_stardict-Collins_Cobuild_5-2.4.2.tar.bz2  -i -v
Tmpdir created at /tmp/dictconv/1664543423073
Unarchived Collins_Cobuild_5.dict.dz
Loading dictionary...
Total length of entries: 34159
Loading dictionary [====================] 100% 0.0s
{
  version: '3.0.0',
  bookname: 'Collins Cobuild 5',
  wordcount: 34159,
  idxfilesize: 597489,
  sametypesequence: 'h',
  synwordcount: '11793',
  author: 'HarperCollins Publishers',
  description: "Collins COBUILD Advanced Learner's Dictionary 2006"
}
converting [====================] 100% 0.0s
Saving...
Copy assets...
Converted raw file path: /tmp/dictconv/raw/mac-Collins_Cobuild_5
Start building...
builder - Building mac-Collins_Cobuild_5.dictionary.
- 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 /tmp/dictconv/build/mac-Collins_Cobuild_5.dictionary.
Built /tmp/dictconv/build/mac-Collins_Cobuild_5.dictionary
Installed to ~/Library/Dictionaries/
root@Soners-MacBook-Pro Desktop # clear 

root@Soners-MacBook-Pro Desktop # dictconv convert /Users/soner/Downloads/2_stardict-Cambridge_Advanced_Learner_s_Dictionary-2.4.2.tar.bz2 -i -v
Tmpdir created at /tmp/dictconv/1664543683300
Unarchived Cambridge_Advanced_Learner_s_Dictionary.dict.dz
Loading dictionary...
Total length of entries: 45867
Loading dictionary [====================] 100% 0.0s
{
  version: '3.0.0',
  bookname: "Cambridge Advanced Learner's Dictionary",
  wordcount: 45867,
  idxfilesize: 874909,
  sametypesequence: 'h',
  synwordcount: '20369',
  author: 'Cambridge University Press',
  description: "Cambridge Advanced Learner's Dictionary (2nd edition published 2005), containing 72,500 sense entries including: definitions, grammatical coding, register and variety coding, example sentences with highlighted collocates"
}
converting [====================] 100% 0.0s
Saving...
Copy assets...
Converted raw file path: /tmp/dictconv/raw/mac-Cambridge_Advanced_Learner_s_Dictionary
Start building...
builder - Building mac-Cambridge_Advanced_Learner_s_Dictionary.dictionary.
- 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 /tmp/dictconv/build/mac-Cambridge_Advanced_Learner_s_Dictionary.dictionary.
Built /tmp/dictconv/build/mac-Cambridge_Advanced_Learner_s_Dictionary.dictionary
Installed to ~/Library/Dictionaries/
root@Soners-MacBook-Pro Desktop # dictconv convert /Users/soner/Downloads/stardict-babylon-collins4-2.4.2.tar.bz2  -i -v
Tmpdir created at /tmp/dictconv/1664543955960
Unarchived collins4.dict.dz
Loading dictionary...
Total length of entries: 34070
Loading dictionary [====================] 100% 0.0s
{
  version: '2.4.2',
  wordcount: 34070,
  synwordcount: '34122',
  idxfilesize: 694564,
  bookname: "Collins COBUILD Advanced Learner's English Dictionary",
  author: 'HarperCollins Publishers Ltd.',
  description: "Collins COBUILD Advanced Learner's English Dictionary [Fourth Edition]",
  sametypesequence: 'h'
}
converting [====================] 100% 0.0s
Saving...
Copy assets...
Converted raw file path: /tmp/dictconv/raw/mac-collins4
Start building...
builder - Building mac-collins4.dictionary.
- 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 /tmp/dictconv/build/mac-collins4.dictionary.
Built /tmp/dictconv/build/mac-collins4.dictionary
Installed to ~/Library/Dictionaries/
root@Soners-MacBook-Pro Desktop # dictconv convert
dictconv convert <stardict> [<destPath>]

Convert the startdict to Mac dictionary.

Positionals:
  stardict  <stardict> The path to the stardict file.        [string] [required]
  destPath  <destPath> The destination path.                            [string]

Options:
  --version      Show version number                                   [boolean]
  --name, -n     The name of dictionary                                 [string]
  --install, -i  Install the converted dictionary to the system
                                                      [boolean] [default: false]
  --verbose, -v  Print all logs                       [boolean] [default: false]
  -h, --help     Show help                                             [boolean]

Not enough non-option arguments: got 0, need at least 1
root@Soners-MacBook-Pro Desktop # dictconv convert /Users/soner/Downloads/3_stardict-Merriam-Webster_Collegiate_Dictionary-2.4.2.tar.bz2  -i -v
Tmpdir created at /tmp/dictconv/1664544043346
Unarchived Merriam-Webster_Collegiate_Dictionary.dict.dz
Loading dictionary...
Total length of entries: 108583
Loading dictionary [====================] 100% 0.0s
{
  version: '3.0.0',
  bookname: 'Merriam-Webster Collegiate® Dictionary',
  wordcount: 108583,
  idxfilesize: 1914910,
  sametypesequence: 'h',
  synwordcount: '186451',
  author: 'Merriam-Webster Inc.',
  description: 'Merriam-Webster’s Collegiate® Dictionary, Eleventh Edition. An up-to-date dictionary that comprises 225,000 definitions, over 40,000 word-use examples, more than 7,500 phrases and idioms, plus pronunciations, etymologies, and illustrations.'
}
converting [====================] 100% 0.0s
Saving...
Copy assets...
Converted raw file path: /tmp/dictconv/raw/mac-Merriam-Webster_Collegiate_Dictionary
Start building...
builder - Building mac-Merriam-Webster_Collegiate_Dictionary.dictionary.
- 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 /tmp/dictconv/build/mac-Merriam-Webster_Collegiate_Dictionary.dictionary.
Built /tmp/dictconv/build/mac-Merriam-Webster_Collegiate_Dictionary.dictionary
Installed to ~/Library/Dictionaries/
root@Soners-MacBook-Pro Desktop # dictconv convert /Users/soner/Downloads/4_stardict-MacMillanEnglishDictionary-2.4.2.tar.bz2  -i -v
Tmpdir created at /tmp/dictconv/1664544110437
Unarchived MacMillanEnglishDictionary.dict.dz
Loading dictionary...
Total length of entries: 43088
Loading dictionary [====================] 100% 0.0s
{
  version: '3.0.0',
  bookname: 'MacMillan English Dictionary -American',
  wordcount: 43088,
  idxfilesize: 754763,
  sametypesequence: 'h',
  synwordcount: '21290',
  author: 'MacMillan Publishers Limited',
  description: 'Based on MacMillan English Dictionary -American 2002 V1.1'
}
converting [====================] 100% 0.0s
Saving...
Copy assets...
Converted raw file path: /tmp/dictconv/raw/mac-MacMillanEnglishDictionary
Start building...
builder - Building mac-MacMillanEnglishDictionary.dictionary.
- 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 /tmp/dictconv/build/mac-MacMillanEnglishDictionary.dictionary.
Built /tmp/dictconv/build/mac-MacMillanEnglishDictionary.dictionary
Installed to ~/Library/Dictionaries/
root@Soners-MacBook-Pro Desktop # dictconv convert /Users/soner/Downloads/5_stardict-Oxford_Advanced_Learner_s_Dictionary_7-2.4.2.tar.bz2 -i -v
Tmpdir created at /tmp/dictconv/1664544131881
Unarchived Oxford_Advanced_Learner_s_Dictionary_7.dict.dz
Loading dictionary...
Total length of entries: 51241
Loading dictionary [====================] 100% 0.0s
{
  version: '3.0.0',
  bookname: "Oxford Advanced Learner's Dictionary 7th",
  wordcount: 51241,
  idxfilesize: 951070,
  sametypesequence: 'h',
  synwordcount: '15771',
  author: 'OUP'
}
converting [====================] 100% 0.0s
Saving...
Copy assets...
Converted raw file path: /tmp/dictconv/raw/mac-Oxford_Advanced_Learner_s_Dictionary_7
Start building...
builder - Building mac-Oxford_Advanced_Learner_s_Dictionary_7.dictionary.
- 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 /tmp/dictconv/build/mac-Oxford_Advanced_Learner_s_Dictionary_7.dictionary.
Built /tmp/dictconv/build/mac-Oxford_Advanced_Learner_s_Dictionary_7.dictionary
Installed to ~/Library/Dictionaries/
root@Soners-MacBook-Pro Desktop # dictconv convert /Users/soner/Downloads/6_stardict-LongmanDOCE5_1.5-2.4.2.tar.bz2  -i -v
Tmpdir created at /tmp/dictconv/1664544156235
Unarchived LongmanDOCE5_1.5.dict.dz
Loading dictionary...
Total length of entries: 61195
Loading dictionary [====================] 100% 0.0s
{
  version: '3.0.0',
  bookname: 'Longman Dictionary of Contemporary English',
  wordcount: 61195,
  idxfilesize: 1170787,
  sametypesequence: 'h',
  synwordcount: '4937',
  author: 'Longman Group Limited',
  description: 'Longman Dictionary of Contemporary English (5th Edition)'
}
converting [====================] 100% 0.0s
Saving...
Copy assets...
Converted raw file path: /tmp/dictconv/raw/mac-LongmanDOCE5_1.5
Start building...
builder - Building mac-LongmanDOCE5_1.5.dictionary.
- 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 /tmp/dictconv/build/mac-LongmanDOCE5_1.5.dictionary.
Built /tmp/dictconv/build/mac-LongmanDOCE5_1.5.dictionary
Installed to ~/Library/Dictionaries/
root@Soners-MacBook-Pro Desktop # 

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

No branches or pull requests

2 participants