From e889d2081cf10963d52e0a41faef6e4ebcd0ef72 Mon Sep 17 00:00:00 2001 From: Yaakov Ellis Date: Tue, 11 Feb 2014 10:06:10 +0200 Subject: [PATCH] Add nuget to readme --- EllisWeb.Gematria.Tests/Calculator_Tests.cs | 4 ++-- README.md | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/EllisWeb.Gematria.Tests/Calculator_Tests.cs b/EllisWeb.Gematria.Tests/Calculator_Tests.cs index 4626fd9..8cd5b16 100644 --- a/EllisWeb.Gematria.Tests/Calculator_Tests.cs +++ b/EllisWeb.Gematria.Tests/Calculator_Tests.cs @@ -182,8 +182,8 @@ public void ConvertToGematriaNumericString_ThreeDigit_NoSeparators_ReturnsCorrec [Test] public void ConvertToGematriaNumericString_ThreeDigit_WithSeparators_ReturnsCorrectString() { - int input = 245; - string expected = "רמ\"ה"; + int input = 613; + string expected = "תרי\"ג"; string output = Calculator.ConvertToGematriaNumericString(input); Assert.AreEqual(expected, output); } diff --git a/README.md b/README.md index ac4ade7..4143970 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ A .net class library for calculating the Gematria / Gematriya value of strings o You can learn more about Gematria in one of these sites ([1](http://en.wikipedia.org/wiki/Gematria), [2](http://www.i18nguy.com/unicode/hebrew-numbers.html)) +The library is available for installation [via nuget package](https://www.nuget.org/packages/Gematria/): + + PM> Install-Package Gematria + This library exposes the following methods, all available through the static `Calculator` class: * `GetGematriaValue` @@ -20,6 +24,13 @@ This library exposes the following methods, all available through the static `Ca * `ConvertToGematriaNumericString` * Convert a number into its Gematria Numeric Representation +Sample Usage: + + Calculator.GetNumericGematriaValue("התשעד"); // returns 5774 + Calculator.GetNumericGematriaValue("ה'תשע"ד"); // returns 5774 + Calculator.ConvertToGematriaNumericString(613); // returns תרי"ג + Calculator.ConvertToGematriaNumericString(613, false); // returns תריג + As explained in the links above, there are different systems that can be used for translating Hebrew letters into numeric equivalents. The Gematria library allows use of the following four methods: 1. Absolute Value (מספר הכרחי): @@ -36,5 +47,6 @@ As explained in the links above, there are different systems that can be used fo * Calculated the value of each letter using the absolute system, truncating all zeros * Leads to a sequence of values in order of letters: 1-9, 1-9, 1-9 -All code is (c) Ellis Web Development, Ltd (http://ellisweb.net) and is released under the MIT License (http://opensource.org/licenses/MIT) -For more information, please contact Yaakov Ellis (yaakov@ellisweb.net) \ No newline at end of file +All code is (c) [Ellis Web Development, Ltd](http://ellisweb.net) and is released under the [MIT License](http://opensource.org/licenses/MIT). + +For more information, please contact me at [@yaakov](http://twitter.com/yaakov). Pull Requests and Issues are welcome. \ No newline at end of file