Virastar Library

Cleaning-up Persian Texts!

Этот скрипт недоступен для установки пользователем. Он является библиотекой, которая подключается к другим скриптам мета-ключом // @require https://update.greasyfork.org/scripts/527228/1538801/Virastar%20Library.js

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey, Greasemonkey или Violentmonkey.

Для установки этого скрипта вам необходимо установить расширение, такое как Tampermonkey.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey или Violentmonkey.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey или Userscripts.

Чтобы установить этот скрипт, сначала вы должны установить расширение браузера, например Tampermonkey.

Чтобы установить этот скрипт, вы должны установить расширение — менеджер скриптов.

(у меня уже есть менеджер скриптов, дайте мне установить скрипт!)

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

(у меня уже есть менеджер стилей, дайте мне установить скрипт!)

Автор
Mohammad Khani
Версия
0.21.0
Создано
17.02.2025
Обновлено
17.02.2025
Размер
33,4 КБ
Лицензия
MIT

Virastar is a JavaScript library designed to process and standardize Persian text, enhancing its readability and ensuring compatibility across various platforms. It offers a comprehensive suite of functions that address common typographical and formatting issues in Persian writing.

Key Features:

  • Normalization of End-of-Line Characters: Converts Windows-style line breaks to Unix-style, ensuring consistent text formatting.

  • HTML Entity Decoding: Transforms numeric and selected HTML character entities into their corresponding characters, preserving the integrity of the text.

  • Dash Correction: Replaces triple dashes with an em dash and double dashes with an en dash, adhering to proper punctuation standards.

  • Ellipsis Standardization: Removes spaces between dots and replaces multiple dots with a single ellipsis character, maintaining typographical accuracy.

  • Date Formatting: Reorders date components and replaces delimiters with slashes, aligning with standard Persian date conventions.

  • Quotation Mark Replacement: Substitutes English quotation marks with their Persian equivalents, ensuring consistency in punctuation.

  • Hamzeh Correction: Addresses common issues with the Persian letter 'ه' followed by 'ی' or 'ء', replacing them with the standard 'هٔ'.

  • Arabic Character Conversion: Converts Arabic characters to their Persian counterparts, standardizing the script.

  • Zero-Width Non-Joiner (ZWNJ) Management: Cleans unnecessary ZWNJ characters, particularly around numbers, English words, spaces, and punctuation marks, to prevent unwanted word breaks.

  • Number Conversion: Replaces Arabic and English numerals with their Persian equivalents, ensuring numerical consistency.

  • Punctuation Standardization: Replaces English punctuation marks with their Persian counterparts, maintaining typographical consistency.

  • Spacing Adjustments: Removes unnecessary spaces before and after punctuation marks, parentheses, and braces, adhering to proper spacing conventions.

  • Diacritic Management: Cleans up diacritic characters, ensuring they are correctly placed and do not interfere with text readability.

  • Preservation Options: Allows for the preservation of frontmatter, HTML tags, comments, entities, URIs, and specific brackets or braces, providing flexibility in text processing.

By integrating Virastar into your projects, you can automate the cleaning and standardization of Persian text, leading to improved readability and consistency across your applications.