aitextwatermarkremover-tools 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +48 -0
  4. data/lib/atwr_tools.rb +85 -0
  5. metadata +48 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8dd926a7b22da411c70e5fe094f351541b5453e609785e8074fd48ab8a95d465
4
+ data.tar.gz: 60b8010c971917d1124f9de3ebe620b16dfcea90717c8b934bcf8321cca367f2
5
+ SHA512:
6
+ metadata.gz: 3adacc43292f02ecb4e68700e09007e3795f069fdc8438dff88419ff0fa3920702a7990f4902484d3e282f777325b849176c191f6925850d494a3e3db7e51f90
7
+ data.tar.gz: 3e9f6450487eaa9aeb018fab0d68cd7e1b1403768dbdf2e2af8d4f3bfb01c2b56bc8bed00cb09e2b7099fd2b3d71db025df0f99cb30f47a1cbb9dbe84a65f8d1
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AI Text Watermark Remover Tools contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # aitextwatermarkremover-tools
2
+
3
+ Local command-line utilities for scanning and removing invisible Unicode characters from text files.
4
+
5
+ Inspired by [aitextwatermarkremover.com](https://aitextwatermarkremover.com/), this is an **independent third-party helper** and is not an official SDK or affiliated with that website.
6
+
7
+ ## Features
8
+
9
+ - **Scan** – Detect invisible Unicode characters (zero-width spaces, joiners, soft hyphens, etc.) and report their positions.
10
+ - **Clean** – Remove detected invisible characters while preserving all visible text.
11
+ - **Markdown tidy** – Strip common Markdown paste artifacts such as escaped brackets, redundant backslashes, and stray line breaks.
12
+
13
+ ## Non-features
14
+
15
+ This tool does **not**:
16
+
17
+ - Make network requests. Everything runs locally.
18
+ - Rewrite or paraphrase text.
19
+ - Guarantee bypass of any AI detection system.
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ # Node
25
+ npm install -g aitextwatermarkremover-tools
26
+
27
+ # Python
28
+ pip install aitextwatermarkremover-tools
29
+
30
+ # Go
31
+ go install github.com/bbwdadfg/aitextwatermarkremover-tools/cmd/atwr@v0.1.0
32
+ ```
33
+
34
+ Language libraries for PHP, Rust, Ruby, Dart, Java, .NET, Swift, Lua, Perl, and Haskell live in this same repository and expose the same three functions.
35
+
36
+ ## Usage
37
+
38
+ ```bash
39
+ atwr scan file.txt
40
+ atwr clean file.txt -o cleaned.txt
41
+ atwr tidy file.md
42
+ ```
43
+
44
+ Pass `--help` for full option listing.
45
+
46
+ ## License
47
+
48
+ MIT
data/lib/atwr_tools.rb ADDED
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AtwrTools
4
+ NAMES = {
5
+ 0x00AD => "SOFT HYPHEN",
6
+ 0x034F => "COMBINING GRAPHEME JOINER",
7
+ 0x061C => "ARABIC LETTER MARK",
8
+ 0x115F => "HANGUL CHOSEONG FILLER",
9
+ 0x1160 => "HANGUL JUNGSEONG FILLER",
10
+ 0x17B4 => "KHMER VOWEL INHERENT AQ",
11
+ 0x17B5 => "KHMER VOWEL INHERENT AA",
12
+ 0x180B => "MONGOLIAN FREE VARIATION SELECTOR ONE",
13
+ 0x180C => "MONGOLIAN FREE VARIATION SELECTOR TWO",
14
+ 0x180D => "MONGOLIAN FREE VARIATION SELECTOR THREE",
15
+ 0x180F => "MONGOLIAN FREE VARIATION SELECTOR FOUR",
16
+ 0x200B => "ZERO WIDTH SPACE",
17
+ 0x200C => "ZERO WIDTH NON-JOINER",
18
+ 0x200D => "ZERO WIDTH JOINER",
19
+ 0x200E => "LEFT-TO-RIGHT MARK",
20
+ 0x200F => "RIGHT-TO-LEFT MARK",
21
+ 0x202A => "LEFT-TO-RIGHT EMBEDDING",
22
+ 0x202B => "RIGHT-TO-LEFT EMBEDDING",
23
+ 0x202C => "POP DIRECTIONAL FORMATTING",
24
+ 0x202D => "LEFT-TO-RIGHT OVERRIDE",
25
+ 0x202E => "RIGHT-TO-LEFT OVERRIDE",
26
+ 0x202F => "NARROW NO-BREAK SPACE",
27
+ 0x205F => "MEDIUM MATHEMATICAL SPACE",
28
+ 0x2060 => "WORD JOINER",
29
+ 0x2061 => "FUNCTION APPLICATION",
30
+ 0x2062 => "INVISIBLE TIMES",
31
+ 0x2063 => "INVISIBLE SEPARATOR",
32
+ 0x2064 => "INVISIBLE PLUS",
33
+ 0x2066 => "LEFT-TO-RIGHT ISOLATE",
34
+ 0x2067 => "RIGHT-TO-LEFT ISOLATE",
35
+ 0x2068 => "FIRST STRONG ISOLATE",
36
+ 0x2069 => "POP DIRECTIONAL ISOLATE",
37
+ 0x206A => "INHIBIT SYMMETRIC SWAPPING",
38
+ 0x206B => "ACTIVATE SYMMETRIC SWAPPING",
39
+ 0x206C => "INHIBIT ARABIC FORM SHAPING",
40
+ 0x206D => "ACTIVATE ARABIC FORM SHAPING",
41
+ 0x206E => "NATIONAL DIGIT SHAPES",
42
+ 0x206F => "NOMINAL DIGIT SHAPES",
43
+ 0xFE00 => "VARIATION SELECTOR-1",
44
+ 0xFE01 => "VARIATION SELECTOR-2",
45
+ 0xFE02 => "VARIATION SELECTOR-3",
46
+ 0xFE03 => "VARIATION SELECTOR-4",
47
+ 0xFE0E => "TEXT VARIATION SELECTOR-15",
48
+ 0xFE0F => "EMOJI VARIATION SELECTOR-16",
49
+ 0xFEFF => "ZERO WIDTH NO-BREAK SPACE",
50
+ }.freeze
51
+
52
+ Finding = Struct.new(:index, :character, :code_point, :name, keyword_init: true)
53
+
54
+ module_function
55
+
56
+ def scan_invisible_characters(text)
57
+ findings = []
58
+ index = 0
59
+ text.each_char do |character|
60
+ name = NAMES[character.ord]
61
+ if name
62
+ findings << Finding.new(
63
+ index: index,
64
+ character: character,
65
+ code_point: format("U+%04X", character.ord),
66
+ name: name
67
+ )
68
+ end
69
+ index += character.bytesize
70
+ end
71
+ findings
72
+ end
73
+
74
+ def remove_invisible_characters(text)
75
+ text.each_char.reject { |character| NAMES.key?(character.ord) }.join
76
+ end
77
+
78
+ def strip_markdown_paste_residue(text)
79
+ text = text.gsub(/^\s{0,3}(?:\#{1,6}|[-*+] |\d+\. |>)\s?/, "")
80
+ text = text.gsub(/\\([\\`*_{}\[\]()#+.!|>~-])/, "\\1")
81
+ text = text.gsub(/(\*\*|__|~~|`)/, "")
82
+ text = text.gsub(/[ \t]+\n/, "\n")
83
+ text.gsub(/\n{3,}/, "\n\n")
84
+ end
85
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aitextwatermarkremover-tools
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - bbwdadfg
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: Local utilities to scan and remove invisible Unicode characters and tidy
13
+ Markdown paste residue. Independent third-party helper inspired by aitextwatermarkremover.com.
14
+ Not an official SDK. Runs offline.
15
+ email:
16
+ - bbwdadfg@users.noreply.github.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - LICENSE
22
+ - README.md
23
+ - lib/atwr_tools.rb
24
+ homepage: https://aitextwatermarkremover.com/
25
+ licenses:
26
+ - MIT
27
+ metadata:
28
+ homepage_uri: https://aitextwatermarkremover.com/
29
+ source_code_uri: https://github.com/bbwdadfg/aitextwatermarkremover-tools
30
+ changelog_uri: https://github.com/bbwdadfg/aitextwatermarkremover-tools/blob/master/CHANGELOG.md
31
+ rdoc_options: []
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '3.0'
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ requirements: []
45
+ rubygems_version: 4.0.11
46
+ specification_version: 4
47
+ summary: Scan and remove invisible Unicode characters from text.
48
+ test_files: []