From c3a2b9af4915d4051825c3815223224841e65355 Mon Sep 17 00:00:00 2001 From: saihaj Date: Tue, 3 Nov 2020 14:02:23 -0600 Subject: [PATCH] ci: fetch all history release scripts need all tag information to work Co-Authored-By: Harjot Singh --- .github/workflows/deploy.yml | 1 + README.md | 39 +++++++++++++++++++++++++----------- docs/README.md | 39 +++++++++++++++++++++++++----------- 3 files changed, 55 insertions(+), 24 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 76a13b7..0da866d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,6 +13,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + run: git fetch --prune --unshallow --tags - name: Use Node.js 12.x uses: actions/setup-node@v1 diff --git a/README.md b/README.md index 3d3336b..0106a18 100644 --- a/README.md +++ b/README.md @@ -84,10 +84,13 @@ Calculates the number of syllables according to Sanskrit prosody, Pingala, Matra **Example** ```js -countSyllables( 'ਪ੍ਰਭੂ ਪ੍ਰੇਮੀ ਪੜ੍ਹ ਚੜ੍ਹ ਦ੍ਵੈਤ' ) // expected output: 14 +countSyllables( 'ਪ੍ਰਭੂ ਪ੍ਰੇਮੀ ਪੜ੍ਹ ਚੜ੍ਹ ਦ੍ਵੈਤ' ) +// expected output: 14 ``` ### firstLetters(line) ⇒ String -Generates the first letters for a unicode Gurmukhi, Hindi transliteration, or English transliteration string. Includes any end-word vishraams, and line-end characters. +Generates the first letters for a unicode Gurmukhi, +Hindi transliteration, or English transliteration string. +Includes any end-word vishraams, and line-end characters. **Returns**: String - The first letters of each word in the provided Gurmukhi line. @@ -119,10 +122,12 @@ Checks if first char in string is part of the Gurmukhi Unicode block. **Example** ```js -isGurmukhi('ਗੁਰਮੁਖੀ') // => true isGurmukhi('gurmuKI') // => false +isGurmukhi('ਗੁਰਮੁਖੀ') // => true +isGurmukhi('gurmuKI') // => false ``` ### stripAccents(text) ⇒ String -Removes accents from ASCII/Unicode Gumrukhi letters with their base letter. Useful for generalising search queries. +Removes accents from ASCII/Unicode Gumrukhi letters with their base letter. +Useful for generalising search queries. **Returns**: String - A simplified version of the provided Gurmukhi string. @@ -132,10 +137,14 @@ Removes accents from ASCII/Unicode Gumrukhi letters with their base letter. Usef **Example** ```js -stripAccents('ਜ਼ਫ਼ੈਸ਼ਸਓ') // => ਜਫੈਸਸੳ stripAccents('Z^Svb') // => gKsvb +stripAccents('ਜ਼ਫ਼ੈਸ਼ਸਓ') // => ਜਫੈਸਸੳ +stripAccents('Z^Svb') // => gKsvb ``` ### stripEndings(text) ⇒ String -Strips line endings from any Gurmukhi or translation string. Accepts both Unicode and ASCII input. Useful for generating accurate first letters or modifying non-Gurbani for better display. *Not* designed for headings or Sirlekhs. +Strips line endings from any Gurmukhi or translation string. +Accepts both Unicode and ASCII input. +Useful for generating accurate first letters or modifying non-Gurbani for better display. +*Not* designed for headings or Sirlekhs. **Returns**: String - A ending-less version of the text. @@ -198,10 +207,12 @@ Converts Gurmukhi unicode text to ASCII, used GurmukhiAkhar font. **Example** ```js -toAscii('ਹਮਾ ਸਾਇਲਿ ਲੁਤਫ਼ਿ ਹਕ ਪਰਵਰਸ਼ ॥') // => hmw swieil luqi& hk prvrS ] toAscii('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => su bYiT iekMqR ]578] +toAscii('ਹਮਾ ਸਾਇਲਿ ਲੁਤਫ਼ਿ ਹਕ ਪਰਵਰਸ਼ ॥') // => hmw swieil luqi& hk prvrS ] +toAscii('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => su bYiT iekMqR ]578] ``` ### toEnglish(line) ⇒ String -Transliterates a line from Unicode Gurmukhi to english. Currently supports the `,`, `;`, `.` vishraam characters. +Transliterates a line from Unicode Gurmukhi to english. +Currently supports the `,`, `;`, `.` vishraam characters. **Returns**: String - The English transliteration of the provided Gurmukhi line. @@ -228,7 +239,8 @@ Transliterates Unicode Gurmukhi text to Hindi (Devanagari script). **Example** ```js -toHindi('ਕੁਲ ਜਨ ਮਧੇ ਮਿਲੵੋਿ ਸਾਰਗ ਪਾਨ ਰੇ ॥') // => कुल जन मधे मिल्यो सारग पान रे ॥ toHindi('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => सु बैठ इकंत्र ॥५७८॥ +toHindi('ਕੁਲ ਜਨ ਮਧੇ ਮਿਲੵੋਿ ਸਾਰਗ ਪਾਨ ਰੇ ॥') // => कुल जन मधे मिल्यो सारग पान रे ॥ +toHindi('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => सु बैठ इकंत्र ॥५७८॥ ``` ### toShahmukhi(text) ⇒ String Transliterates Unicode Gurmukhi text to the Shahmukhi script. @@ -241,7 +253,8 @@ Transliterates Unicode Gurmukhi text to the Shahmukhi script. **Example** ```js -toShahmukhi('ਹਮਾ ਸਾਇਲਿ ਲੁਤਫ਼ਿ ਹਕ ਪਰਵਰਸ਼ ॥') // => هما ساِال لُتف هک پرورش ۔۔ toShahmukhi('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => سُ بَےٹھ ِاکںتر ۔۔۵۷۸۔۔ +toShahmukhi('ਹਮਾ ਸਾਇਲਿ ਲੁਤਫ਼ਿ ਹਕ ਪਰਵਰਸ਼ ॥') // => هما ساِال لُتف هک پرورش ۔۔ +toShahmukhi('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => سُ بَےٹھ ِاکںتر ۔۔۵۷۸۔۔ ``` ### toSyllabicSymbols(text) ⇒ String Represents text in syllables according to Sanskrit prosody, Pingala, Matra/Meter/Morae @@ -254,7 +267,8 @@ Represents text in syllables according to Sanskrit prosody, Pingala, Matra/Meter **Example** ```js -toSyllabicSymbols( 'ਪ੍ਰਭੂ ਪ੍ਰੇਮੀ ਪੜ੍ਹ ਚੜ੍ਹ ਦ੍ਵੈਤ' ) // expected output: '12 22 11 11 21' +toSyllabicSymbols( 'ਪ੍ਰਭੂ ਪ੍ਰੇਮੀ ਪੜ੍ਹ ਚੜ੍ਹ ਦ੍ਵੈਤ' ) +// expected output: '12 22 11 11 21' ``` ### toUnicode(text) ⇒ String Converts ASCII text used in the GurmukhiAkhar font to Unicode. @@ -267,7 +281,8 @@ Converts ASCII text used in the GurmukhiAkhar font to Unicode. **Example** ```js -toUnicode('kul jn mDy imil´o swrg pwn ry ]') // => ਕੁਲ ਜਨ ਮਧੇ ਮਿਲੵੋਿ ਸਾਰਗ ਪਾਨ ਰੇ ॥ toUnicode('su bYiT iekMqR ]578]') // => ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥ +toUnicode('kul jn mDy imil´o swrg pwn ry ]') // => ਕੁਲ ਜਨ ਮਧੇ ਮਿਲੵੋਿ ਸਾਰਗ ਪਾਨ ਰੇ ॥ +toUnicode('su bYiT iekMqR ]578]') // => ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥ ``` ## Community diff --git a/docs/README.md b/docs/README.md index 3d3336b..0106a18 100644 --- a/docs/README.md +++ b/docs/README.md @@ -84,10 +84,13 @@ Calculates the number of syllables according to Sanskrit prosody, Pingala, Matra **Example** ```js -countSyllables( 'ਪ੍ਰਭੂ ਪ੍ਰੇਮੀ ਪੜ੍ਹ ਚੜ੍ਹ ਦ੍ਵੈਤ' ) // expected output: 14 +countSyllables( 'ਪ੍ਰਭੂ ਪ੍ਰੇਮੀ ਪੜ੍ਹ ਚੜ੍ਹ ਦ੍ਵੈਤ' ) +// expected output: 14 ``` ### firstLetters(line) ⇒ String -Generates the first letters for a unicode Gurmukhi, Hindi transliteration, or English transliteration string. Includes any end-word vishraams, and line-end characters. +Generates the first letters for a unicode Gurmukhi, +Hindi transliteration, or English transliteration string. +Includes any end-word vishraams, and line-end characters. **Returns**: String - The first letters of each word in the provided Gurmukhi line. @@ -119,10 +122,12 @@ Checks if first char in string is part of the Gurmukhi Unicode block. **Example** ```js -isGurmukhi('ਗੁਰਮੁਖੀ') // => true isGurmukhi('gurmuKI') // => false +isGurmukhi('ਗੁਰਮੁਖੀ') // => true +isGurmukhi('gurmuKI') // => false ``` ### stripAccents(text) ⇒ String -Removes accents from ASCII/Unicode Gumrukhi letters with their base letter. Useful for generalising search queries. +Removes accents from ASCII/Unicode Gumrukhi letters with their base letter. +Useful for generalising search queries. **Returns**: String - A simplified version of the provided Gurmukhi string. @@ -132,10 +137,14 @@ Removes accents from ASCII/Unicode Gumrukhi letters with their base letter. Usef **Example** ```js -stripAccents('ਜ਼ਫ਼ੈਸ਼ਸਓ') // => ਜਫੈਸਸੳ stripAccents('Z^Svb') // => gKsvb +stripAccents('ਜ਼ਫ਼ੈਸ਼ਸਓ') // => ਜਫੈਸਸੳ +stripAccents('Z^Svb') // => gKsvb ``` ### stripEndings(text) ⇒ String -Strips line endings from any Gurmukhi or translation string. Accepts both Unicode and ASCII input. Useful for generating accurate first letters or modifying non-Gurbani for better display. *Not* designed for headings or Sirlekhs. +Strips line endings from any Gurmukhi or translation string. +Accepts both Unicode and ASCII input. +Useful for generating accurate first letters or modifying non-Gurbani for better display. +*Not* designed for headings or Sirlekhs. **Returns**: String - A ending-less version of the text. @@ -198,10 +207,12 @@ Converts Gurmukhi unicode text to ASCII, used GurmukhiAkhar font. **Example** ```js -toAscii('ਹਮਾ ਸਾਇਲਿ ਲੁਤਫ਼ਿ ਹਕ ਪਰਵਰਸ਼ ॥') // => hmw swieil luqi& hk prvrS ] toAscii('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => su bYiT iekMqR ]578] +toAscii('ਹਮਾ ਸਾਇਲਿ ਲੁਤਫ਼ਿ ਹਕ ਪਰਵਰਸ਼ ॥') // => hmw swieil luqi& hk prvrS ] +toAscii('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => su bYiT iekMqR ]578] ``` ### toEnglish(line) ⇒ String -Transliterates a line from Unicode Gurmukhi to english. Currently supports the `,`, `;`, `.` vishraam characters. +Transliterates a line from Unicode Gurmukhi to english. +Currently supports the `,`, `;`, `.` vishraam characters. **Returns**: String - The English transliteration of the provided Gurmukhi line. @@ -228,7 +239,8 @@ Transliterates Unicode Gurmukhi text to Hindi (Devanagari script). **Example** ```js -toHindi('ਕੁਲ ਜਨ ਮਧੇ ਮਿਲੵੋਿ ਸਾਰਗ ਪਾਨ ਰੇ ॥') // => कुल जन मधे मिल्यो सारग पान रे ॥ toHindi('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => सु बैठ इकंत्र ॥५७८॥ +toHindi('ਕੁਲ ਜਨ ਮਧੇ ਮਿਲੵੋਿ ਸਾਰਗ ਪਾਨ ਰੇ ॥') // => कुल जन मधे मिल्यो सारग पान रे ॥ +toHindi('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => सु बैठ इकंत्र ॥५७८॥ ``` ### toShahmukhi(text) ⇒ String Transliterates Unicode Gurmukhi text to the Shahmukhi script. @@ -241,7 +253,8 @@ Transliterates Unicode Gurmukhi text to the Shahmukhi script. **Example** ```js -toShahmukhi('ਹਮਾ ਸਾਇਲਿ ਲੁਤਫ਼ਿ ਹਕ ਪਰਵਰਸ਼ ॥') // => هما ساِال لُتف هک پرورش ۔۔ toShahmukhi('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => سُ بَےٹھ ِاکںتر ۔۔۵۷۸۔۔ +toShahmukhi('ਹਮਾ ਸਾਇਲਿ ਲੁਤਫ਼ਿ ਹਕ ਪਰਵਰਸ਼ ॥') // => هما ساِال لُتف هک پرورش ۔۔ +toShahmukhi('ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥') // => سُ بَےٹھ ِاکںتر ۔۔۵۷۸۔۔ ``` ### toSyllabicSymbols(text) ⇒ String Represents text in syllables according to Sanskrit prosody, Pingala, Matra/Meter/Morae @@ -254,7 +267,8 @@ Represents text in syllables according to Sanskrit prosody, Pingala, Matra/Meter **Example** ```js -toSyllabicSymbols( 'ਪ੍ਰਭੂ ਪ੍ਰੇਮੀ ਪੜ੍ਹ ਚੜ੍ਹ ਦ੍ਵੈਤ' ) // expected output: '12 22 11 11 21' +toSyllabicSymbols( 'ਪ੍ਰਭੂ ਪ੍ਰੇਮੀ ਪੜ੍ਹ ਚੜ੍ਹ ਦ੍ਵੈਤ' ) +// expected output: '12 22 11 11 21' ``` ### toUnicode(text) ⇒ String Converts ASCII text used in the GurmukhiAkhar font to Unicode. @@ -267,7 +281,8 @@ Converts ASCII text used in the GurmukhiAkhar font to Unicode. **Example** ```js -toUnicode('kul jn mDy imil´o swrg pwn ry ]') // => ਕੁਲ ਜਨ ਮਧੇ ਮਿਲੵੋਿ ਸਾਰਗ ਪਾਨ ਰੇ ॥ toUnicode('su bYiT iekMqR ]578]') // => ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥ +toUnicode('kul jn mDy imil´o swrg pwn ry ]') // => ਕੁਲ ਜਨ ਮਧੇ ਮਿਲੵੋਿ ਸਾਰਗ ਪਾਨ ਰੇ ॥ +toUnicode('su bYiT iekMqR ]578]') // => ਸੁ ਬੈਠਿ ਇਕੰਤ੍ਰ ॥੫੭੮॥ ``` ## Community