[sword-svn] r3830 - in trunk/bindings/cordova: . cordova-plugin-crosswire-sword cordova-plugin-crosswire-sword/doc

scribe at crosswire.org scribe at crosswire.org
Mon Dec 7 19:12:31 EST 2020


Author: scribe
Date: 2020-12-07 19:12:31 -0500 (Mon, 07 Dec 2020)
New Revision: 3830

Modified:
   trunk/bindings/cordova/Makefile
   trunk/bindings/cordova/cordova-plugin-crosswire-sword/README.md
   trunk/bindings/cordova/cordova-plugin-crosswire-sword/RELEASENOTES.md
   trunk/bindings/cordova/cordova-plugin-crosswire-sword/doc/index.md
   trunk/bindings/cordova/cordova-plugin-crosswire-sword/package.json
   trunk/bindings/cordova/cordova-plugin-crosswire-sword/plugin.xml
Log:
updated cordova plugin documentation


Modified: trunk/bindings/cordova/Makefile
===================================================================
--- trunk/bindings/cordova/Makefile	2020-12-04 21:51:37 UTC (rev 3829)
+++ trunk/bindings/cordova/Makefile	2020-12-08 00:12:31 UTC (rev 3830)
@@ -18,6 +18,9 @@
 publish:
 	npm publish cordova-plugin-crosswire-sword/
 
+publishlogin:
+	npm adduser
+
 strip:
 	./libstrip.sh cordova-plugin-crosswire-sword/libs/ios/libSWORD.a
 	./libstrip.sh cordova-plugin-crosswire-sword/libs/ios/libcurl.a

Modified: trunk/bindings/cordova/cordova-plugin-crosswire-sword/README.md
===================================================================
--- trunk/bindings/cordova/cordova-plugin-crosswire-sword/README.md	2020-12-04 21:51:37 UTC (rev 3829)
+++ trunk/bindings/cordova/cordova-plugin-crosswire-sword/README.md	2020-12-08 00:12:31 UTC (rev 3830)
@@ -17,6 +17,6 @@
          under the License.
 -->
 
-# org.apache.cordova.device
+# org.crosswire.sword.cordova.SWORD
 
 Plugin documentation: [doc/index.md](doc/index.md)

Modified: trunk/bindings/cordova/cordova-plugin-crosswire-sword/RELEASENOTES.md
===================================================================
--- trunk/bindings/cordova/cordova-plugin-crosswire-sword/RELEASENOTES.md	2020-12-04 21:51:37 UTC (rev 3829)
+++ trunk/bindings/cordova/cordova-plugin-crosswire-sword/RELEASENOTES.md	2020-12-08 00:12:31 UTC (rev 3830)
@@ -20,38 +20,9 @@
 -->
 # Release Notes
 
-### 0.2.1 (Sept 5, 2013)
-* removed extraneous print statement
-* [CB-4432] copyright notice change
+### 0.2.2 (Dec 7, 2020)
+* Updated documentation
 
-### 0.2.3 (Sept 25, 2013)
-* CB-4889 bumping&resetting version
-* [windows8] commandProxy has moved
-* [BlackBerry10] removed uneeded permission tags in plugin.xml
-* CB-4889 renaming org.apache.cordova.core.device to org.apache.cordova.device
-* Rename CHANGELOG.md -> RELEASENOTES.md
-* updated to use commandProxy for ffos
-* add firefoxos support
-* [CB-4752] Incremented plugin version on dev branch. 
+### 0.2.1 (Nov 24, 2020)
+* SWORD 1.9.0 release
 
-### 0.2.4 (Oct 28, 2013)
-* CB-5128: added repo + issue tag in plugin.xml for device plugin
-* CB-5085 device.cordova returning wrong value
-* [CB-4915] Incremented plugin version on dev branch.
-
-### 0.2.5 (Dec 4, 2013)
-* CB-5316 Spell Cordova as a brand unless it's a command or script
-* [ubuntu] use cordova/exec/proxy
-* add ubuntu platform
-* Modify Device.platform logic to use amazon-fireos as the platform for Amazon Devices
-* 1. Added amazon-fireos platform. 2. Change to use cordova-amazon-fireos as the platform if user agent contains 'cordova-amazon-fireos'
-
-### 0.2.6 (Jan 02, 2014)
-* CB-5658 Add doc/index.md for Device plugin
-* CB-5504 Moving Telephony Logic out of Device
-
-### 0.2.7 (Jan 07, 2014)
-* CB-5737 Fix exception on close caused by left over telephony code from CB-5504
-
-### 0.2.8 (Feb 05, 2014)
-* Tizen support added

Modified: trunk/bindings/cordova/cordova-plugin-crosswire-sword/doc/index.md
===================================================================
--- trunk/bindings/cordova/cordova-plugin-crosswire-sword/doc/index.md	2020-12-04 21:51:37 UTC (rev 3829)
+++ trunk/bindings/cordova/cordova-plugin-crosswire-sword/doc/index.md	2020-12-08 00:12:31 UTC (rev 3830)
@@ -17,197 +17,132 @@
     under the License.
 -->
 
-# org.apache.cordova.device
+# org.crosswire.sword.cordova.SWORD
 
-This plugin defines a global `device` object, which describes the device's hardware and software.
+This plugin defines a global 'SWORD' object, which provides access to CrossWire's SWORD engine.
 Although the object is in the global scope, it is not available until after the `deviceready` event.
 
-    document.addEventListener("deviceready", onDeviceReady, false);
-    function onDeviceReady() {
-        console.log(device.cordova);
-    }
-
-## Installation
-
-    cordova plugin add org.apache.cordova.device
-
-## Properties
-
-- device.cordova
-- device.model
-- device.name
-- device.platform
-- device.uuid
-- device.version
-
-## device.cordova
-
-Get the version of Cordova running on the device.
-
 ### Supported Platforms
 
-- Amazon Fire OS
 - Android
-- BlackBerry 10
-- Firefox OS
 - iOS
-- Tizen
-- Windows Phone 7 and 8
-- Windows 8
 
-## device.model
-
-The `device.model` returns the name of the device's model or
-product. The value is set by the device manufacturer and may be
-different across versions of the same product.
-
-### Supported Platforms
-
-- Android
-- BlackBerry 10
-- iOS
-- Tizen
-- Windows Phone 7 and 8
-- Windows 8
-
 ### Quick Example
 
-    // Android:    Nexus One       returns "Passion" (Nexus One code name)
-    //             Motorola Droid  returns "voles"
-    // BlackBerry: Torch 9800      returns "9800"
-    // iOS:     for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
-    //
-    var model = device.model;
+	document.addEventListener("deviceready", onDeviceReady, false);
 
-### Android Quirks
+	function onDeviceReady() {
 
-- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.
+		var moduleName = 'KJV';
+		var verse = 'Jn.3.16';
 
-### Tizen Quirks
+		SWORD.mgr.getModuleByName(moduleName, module) {
+			module.setKeyText(verse, function() {
+				module.renderText(function(entryText) {
+					console.log(verse + ': ' + entryText + '(' + moduleName + ')');
+				});
+			});
+		});
+	}
 
-- Returns the device model assigned by the vendor, for example, `TIZEN`
+## Installation
 
-### Windows Phone 7 and 8 Quirks
+	cordova plugin add cordova-plugin-crosswire-sword
 
-- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.
 
-## device.name
+## Defines and statics
+	SWORD.CATEGORY_BIBLES
+	SWORD.CATEGORY_COMMENTARIES
+	SWORD.CATEGORY_LEXDICTS
+	SWORD.CATEGORY_GENBOOKS
+	SWORD.CATEGORY_DAILYDEVOS
+	SWORD.osisOT - array of OSIS OT Books
+	SWORD.osisNT - array of OSIS NT Books
 
-__WARNING__: `device.name` is deprecated as of version 2.3.0. Use `device.model` instead.
 
-## device.platform
+## Properties
+	SWORD.available - if SWORD is available for use
+	SWORD.version - SWORD C++ version
+	SWORD.installMgr - access to SWORD's InstallMgr (an instance of class InstallMgr described below)
+	SWORD.mgr - access to SWORD's module library manager SWMgr (an instance of class SWMgr described below)
+	SWORD.httpUtils - access to general http requests methods provided by SWORD's C++ transport agent (see HTTPUtils described below)
 
-Get the device's operating system name.
 
-    var string = device.platform;
+## Class Properties and Methods
 
-### Supported Platforms
+### InstallMgr
+	InstallMgr.setUserDisclaimerConfirmed
+	InstallMgr.syncConfig
+	InstallMgr.getRemoteSources
+	InstallMgr.refreshRemoteSource
+	InstallMgr.getRemoteModInfoList
+	InstallMgr.getRemoteModuleByName
+	InstallMgr.remoteInstallModule
+	InstallMgr.uninstallModule
 
-- Android
-- BlackBerry 10
-- Firefox OS
-- iOS
-- Tizen
-- Windows Phone 7 and 8
-- Windows 8
 
-### Quick Example
+### SWModule
+	SWModule.SEARCHTYPE_REGEX
+	SWModule.SEARCHTYPE_PHRASE
+	SWModule.SEARCHTYPE_MULTIWORD
+	SWModule.SEARCHTYPE_ENTRYATTR
+	SWModule.SEARCHTYPE_LUCENE
 
-    // Depending on the device, a few examples are:
-    //   - "Android"
-    //   - "BlackBerry 10"
-    //   - "iOS"
-    //   - "WinCE"
-    //   - "Tizen"
-    var devicePlatform = device.platform;
+	SWModule.SEARCHOPTION_ICASE
 
-### Windows Phone 7 Quirks
+	SWModule.name
+	SWModule.description
+	SWModule.category
+	SWModule.direction
+	SWModule.language
+	SWModule.font
+	SWModule.shortCopyright
+	SWModule.shortPromo
+	SWModule.cipherKey
+	SWModule.remoteSourceName
 
-Windows Phone 7 devices report the platform as `WinCE`.
+	SWModule.setKeyText
+	SWModule.search
+	SWModule.getKeyText
+	SWModule.getRenderText
+	SWModule.getStripText
+	SWModule.getRawEntry
+	SWModule.shareVerse
+	SWModule.getRenderChapter
+	SWModule.getRenderHeader
+	SWModule.getKeyChildren
+	SWModule.getVerseKey
+	SWModule.getConfigEntry
+	SWModule.popError
+	SWModule.getEntryAttribute
+	SWModule.next
+	SWModule.previous
+	SWModule.begin
+	SWModule.getBookNames
+	SWModule.parseKeyList
+	SWModule.setRawEntry
 
-### Windows Phone 8 Quirks
+### SWMgr
+	SWMgr.getModInfoList
+	SWMgr.getModuleByName
+	SWMgr.getExtraConfigSections
+	SWMgr.getExtraConfigKeys
+	SWMgr.getExtraConfigValue
+	SWMgr.setExtraConfigValue
+	SWMgr.addExtraConfig
+	SWMgr.startBibleSync
+	SWMgr.stopBibleSync
+	SWMgr.sendBibleSyncMessage
+	SWMgr.setJavascript
+	SWMgr.getAvailableLocales
+	SWMgr.setDefaultLocale
+	SWMgr.translate
+	SWMgr.setGlobalOption
+	SWMgr.getPrefixPath
 
-Windows Phone 8 devices report the platform as `Win32NT`.
+### HTTPUtils
+	HTTPUtils.METHOD_GET
+	HTTPUtils.METHOD_POST
 
-## device.uuid
+	HTTPUtils.makeRequest
 
-Get the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
-
-    var string = device.uuid;
-
-### Description
-
-The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
-
-### Supported Platforms
-
-- Android
-- BlackBerry 10
-- iOS
-- Tizen
-- Windows Phone 7 and 8
-- Windows 8
-
-### Quick Example
-
-    // Android: Returns a random 64-bit integer (as a string, again!)
-    //          The integer is generated on the device's first boot
-    //
-    // BlackBerry: Returns the PIN number of the device
-    //             This is a nine-digit unique integer (as a string, though!)
-    //
-    // iPhone: (Paraphrased from the UIDevice Class documentation)
-    //         Returns a string of hash values created from multiple hardware identifies.
-    //         It is guaranteed to be unique for every device and can't be tied
-    //         to the user account.
-    // Windows Phone 7 : Returns a hash of device+current user,
-    // if the user is not defined, a guid is generated and will persist until the app is uninstalled
-    // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
-    // unique to every GSM and UMTS mobile phone.
-    var deviceID = device.uuid;
-
-### iOS Quirk
-
-The `uuid` on iOS is not unique to a device, but varies for each
-application, for each installation.  It changes if you delete and
-re-install the app, and possibly also when you upgrade iOS, or even
-upgrade the app per version (apparent in iOS 5.1). The `uuid` is not
-a reliable value.
-
-### Windows Phone 7 and 8 Quirks
-
-The `uuid` for Windows Phone 7 requires the permission
-`ID_CAP_IDENTITY_DEVICE`.  Microsoft will likely deprecate this
-property soon.  If the capability is not available, the application
-generates a persistent guid that is maintained for the duration of the
-application's installation on the device.
-
-## device.version
-
-Get the operating system version.
-
-    var string = device.version;
-
-### Supported Platforms
-
-- Android 2.1+
-- BlackBerry 10
-- iOS
-- Tizen
-- Windows Phone 7 and 8
-- Windows 8
-
-### Quick Example
-
-    // Android:    Froyo OS would return "2.2"
-    //             Eclair OS would return "2.1", "2.0.1", or "2.0"
-    //             Version can also return update level "2.1-update1"
-    //
-    // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
-    //
-    // iPhone:     iOS 3.2 returns "3.2"
-    //
-    // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
-    // Tizen: returns "TIZEN_20120425_2"
-    var deviceVersion = device.version;
-

Modified: trunk/bindings/cordova/cordova-plugin-crosswire-sword/package.json
===================================================================
--- trunk/bindings/cordova/cordova-plugin-crosswire-sword/package.json	2020-12-04 21:51:37 UTC (rev 3829)
+++ trunk/bindings/cordova/cordova-plugin-crosswire-sword/package.json	2020-12-08 00:12:31 UTC (rev 3830)
@@ -1,6 +1,6 @@
 {
   "name": "cordova-plugin-crosswire-sword",
-  "version": "0.2.0",
+  "version": "0.2.2",
   "description": "The SWORD Project Plugin",
   "cordova": {
     "id": "cordova-plugin-crosswire-sword",
@@ -16,13 +16,12 @@
   },
   "keywords": [
     "cordova",
-    "crosswire",
-    "sword",
+    "CrossWire",
+    "SWORD",
     "Bible",
     "ecosystem:cordova",
     "cordova-android",
-    "cordova-ios",
-    "cordova-amazon-fireos"
+    "cordova-ios"
   ],
   "author": "CrossWire Bible Society",
   "license": "GNU 2.0"

Modified: trunk/bindings/cordova/cordova-plugin-crosswire-sword/plugin.xml
===================================================================
--- trunk/bindings/cordova/cordova-plugin-crosswire-sword/plugin.xml	2020-12-04 21:51:37 UTC (rev 3829)
+++ trunk/bindings/cordova/cordova-plugin-crosswire-sword/plugin.xml	2020-12-08 00:12:31 UTC (rev 3830)
@@ -4,7 +4,7 @@
     xmlns:rim="http://www.blackberry.com/ns/widgets"
     xmlns:android="http://schemas.android.com/apk/res/android"
     id="cordova-plugin-crosswire-sword"
-    version="0.2.0">
+    version="0.2.2">
     <name>cordova-plugin-crosswire-sword</name>
     <description>The SWORD Project Plugin</description>
     <license>GNU 2.0</license>



More information about the sword-cvs mailing list