Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne authored and Wayne committed Oct 9, 2023
1 parent 90f0936 commit 5caffdd
Show file tree
Hide file tree
Showing 26 changed files with 7,414 additions and 1 deletion.
1,143 changes: 1,143 additions & 0 deletions Cambridge English-Chinese Dictionary/Cambridge English-Chinese Dictionary.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>Cambridge English Chinese Dictionary</string>
<key>CFBundleDisplayName</key>
<string>Cambridge English Chinese Dictionary</string>
<key>CFBundleName</key>
<string>Cambridge English Chinese Dictionary</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>DCSDictionaryCopyright</key>
<string>.</string>
<key>DCSDictionaryManufacturerName</key>
<string>.</string>
<key>DCSDictionaryXSL</key>
<string></string>
<key>DCSDictionaryDefaultPrefs</key>
<dict/>
<key>DCSDictionaryPrefsHTML</key>
<string></string>
</dict>
</plist>
Binary file not shown.
56 changes: 56 additions & 0 deletions Cambridge English-Chinese Dictionary/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#
# Makefile
#
#
#

###########################

# You need to edit these values.

DICT_NAME = "Cambridge English-Chinese Dictionary"
DICT_SRC_PATH = "Cambridge English-Chinese Dictionary.xml"
CSS_PATH = "Cambridge English-Chinese Dictionary.css"
PLIST_PATH = "Cambridge English-Chinese Dictionary.plist"

DICT_BUILD_OPTS =
# Suppress adding supplementary key.
# DICT_BUILD_OPTS = -s 0 # Suppress adding supplementary key.

###########################

# The DICT_BUILD_TOOL_DIR value is used also in "build_dict.sh" script.
# You need to set it when you invoke the script directly.

DICT_BUILD_TOOL_DIR = "/Library/Developer/Extras/Dictionary Development Kit"
DICT_BUILD_TOOL_BIN = "$(DICT_BUILD_TOOL_DIR)/bin"

###########################

DICT_DEV_KIT_OBJ_DIR = ./objects
export DICT_DEV_KIT_OBJ_DIR

DESTINATION_FOLDER = ~/Library/Dictionaries
RM = /bin/rm

###########################

all:
tar zxvf $(DICT_SRC_PATH).zip
"$(DICT_BUILD_TOOL_BIN)/build_dict.sh" $(DICT_BUILD_OPTS) $(DICT_NAME) $(DICT_SRC_PATH) $(CSS_PATH) $(PLIST_PATH)
zip -s 0 $(DICT_NAME).OtherResources.zip --out OtherResources.zip
tar zxvf OtherResources.zip --strip-components 1 -C $(DICT_DEV_KIT_OBJ_DIR)/$(DICT_NAME).dictionary/Contents/
$(RM) -rf OtherResources.zip
echo "Done."


install:
echo "Installing into $(DESTINATION_FOLDER)".
mkdir -p $(DESTINATION_FOLDER)
ditto --noextattr --norsrc $(DICT_DEV_KIT_OBJ_DIR)/$(DICT_NAME).dictionary $(DESTINATION_FOLDER)/$(DICT_NAME).dictionary
touch $(DESTINATION_FOLDER)
echo "Done."
echo "To test the new dictionary, try Dictionary.app."

clean:
$(RM) -rf $(DICT_DEV_KIT_OBJ_DIR)
54 changes: 54 additions & 0 deletions Merriam-Webster's Learner's Dictionary/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# Makefile
#
#
#

###########################

# You need to edit these values.

DICT_NAME = "Merriam-Webster's Learner's Dictionary"
DICT_SRC_PATH = "Merriam-Webster's Learner's Dictionary.xml"
CSS_PATH = "Merriam-Webster's Learner's Dictionary.css"
PLIST_PATH = "Merriam-Webster's Learner's Dictionary.plist"

DICT_BUILD_OPTS =
# Suppress adding supplementary key.
# DICT_BUILD_OPTS = -s 0 # Suppress adding supplementary key.

###########################

# The DICT_BUILD_TOOL_DIR value is used also in "build_dict.sh" script.
# You need to set it when you invoke the script directly.

DICT_BUILD_TOOL_DIR = "/Library/Developer/Extras/Dictionary Development Kit"
DICT_BUILD_TOOL_BIN = "$(DICT_BUILD_TOOL_DIR)/bin"

###########################

DICT_DEV_KIT_OBJ_DIR = ./objects
export DICT_DEV_KIT_OBJ_DIR

DESTINATION_FOLDER = ~/Library/Dictionaries
RM = /bin/rm

###########################

all:
tar zxvf $(DICT_SRC_PATH).zip
"$(DICT_BUILD_TOOL_BIN)/build_dict.sh" $(DICT_BUILD_OPTS) $(DICT_NAME) $(DICT_SRC_PATH) $(CSS_PATH) $(PLIST_PATH)
tar zxvf $(DICT_NAME).OtherResources.zip --strip-components 1 -C $(DICT_DEV_KIT_OBJ_DIR)/$(DICT_NAME).dictionary/Contents/
echo "Done."


install:
echo "Installing into $(DESTINATION_FOLDER)".
mkdir -p $(DESTINATION_FOLDER)
ditto --noextattr --norsrc $(DICT_DEV_KIT_OBJ_DIR)/$(DICT_NAME).dictionary $(DESTINATION_FOLDER)/$(DICT_NAME).dictionary
touch $(DESTINATION_FOLDER)
echo "Done."
echo "To test the new dictionary, try Dictionary.app."

clean:
$(RM) -rf $(DICT_DEV_KIT_OBJ_DIR)
Loading

0 comments on commit 5caffdd

Please sign in to comment.