Permalink
Browse files

Added firefox extension support. Whoo!

  • Loading branch information...
1 parent 2f884e1 commit dfa3c7c92de84f8e92f3f6deeb334a5e9111f52d @nifgraup committed Mar 18, 2012
Showing with 66 additions and 5 deletions.
  1. +18 −5 makedict.sh
  2. +11 −0 packages/mozilla/install.js
  3. +37 −0 packages/mozilla/install.rdf
View
@@ -76,17 +76,30 @@ elif [ "$1" = "packages" ]; then
echo "Usage: $0 packages is"
exit 1
fi
- echo "Making Libreoffice extension..."
+
TODAY=`date +%Y.%m.%d`
+
+ echo "Making Libreoffice extension..."
rm -f dicts/hunspell-is-$TODAY.oxt
rm -rf tmp/libreoffice
- cp -rf packages/libreoffice tmp/
+ cp -rf packages/libreoffice ${TMP}/
cd tmp/libreoffice
sed -i 's/TODAYPLACEHOLDER/'$TODAY'/g' description.xml
- zip -r ../../dicts/hunspel-is-$TODAY.oxt *
+ zip -r ../../dicts/hunspell-is-$TODAY.oxt *
+ cd ../../
+ zip dicts/hunspell-is-$TODAY.oxt dicts/is.dic dicts/is.aff
+
+ echo "Making Mozilla extension..."
+ rm -f dicts/hunspell-is-$TODAY.xpi
+ rm -rf tmp/mozilla
+ cp -rf packages/mozilla ${TMP}/
+ cd ${TMP}/mozilla
+ sed -i 's/TODAYPLACEHOLDER/'$TODAY'/g' install.js
+ sed -i 's/TODAYPLACEHOLDER/'$TODAY'/g' install.rdf
+ mkdir dictionaries
+ cp ../../dicts/is.dic ../../dicts/is.aff dictionaries/
+ zip -r ../../dicts/hunspell-is-$TODAY.xpi *
cd ../../
- zip dicts/hunspel-is-$TODAY.oxt dicts/is.dic dicts/is.aff
- cd ..
elif [ "$1" != "" ]; then
echo "Downloading files..."
@@ -0,0 +1,11 @@
+var err = initInstall("Icelandic Dictionary", "is@dictionaries.addons.mozilla.org", "TODAYPLACEHOLDER");
+if (err != SUCCESS)
+ cancelInstall();
+
+var fProgram = getFolder("Program");
+err = addDirectory("", "is@dictionaries.addons.mozilla.org",
+ "dictionaries", fProgram, "dictionaries", true);
+if (err != SUCCESS)
+ cancelInstall();
+
+performInstall();
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+ <Description about="urn:mozilla:install-manifest">
+ <em:id>is@dictionaries.addons.mozilla.org</em:id>
+ <em:unpack>true</em:unpack>
+ <em:version>TODAYPLACEHOLDER</em:version>
+ <em:type>2</em:type>
+ <em:creator>The hunspell-is project</em:creator>
+ <em:contributor>The Icelandic Wiktionary contributors</em:contributor>
+ <em:contributor>Orðabók Háskóla Íslands</em:contributor>
+ <em:contributor>Reiknistofnun Háskóla Íslands</em:contributor>
+ <em:targetApplication>
+ <Description>
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+ <em:minVersion>2.0</em:minVersion>
+ <em:maxVersion>4.0</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
+ <em:minVersion>2.0</em:minVersion>
+ <em:maxVersion>3.1</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:targetApplication>
+ <Description>
+ <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
+ <em:minVersion>1.1a</em:minVersion>
+ <em:maxVersion>2.0</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <em:name>Icelandic spelling dictionary</em:name>
+ <em:description>Icelandic spelling dictionary, based on the hunspell-is project, https://github.com/nifgraup/hunspell-is.</em:description>
+ </Description>
+</RDF>

0 comments on commit dfa3c7c

Please sign in to comment.