Skip to content

Commit

Permalink
Updated Version.
Browse files Browse the repository at this point in the history
Fixed some bugs regarding copy-pasting issues and also improved the experience by allowing for the tweaking of the scramble aggressiveness.
  • Loading branch information
IDoUseLinux authored Nov 20, 2023
1 parent 01b8fb0 commit 1d1d18c
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions aint.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## (C) IDoUseLinux, MIT License, 2023

def spoof_text(ai_text, scramble_aggresiveness = 30) :
def spoof_text(ai_text, scramble_aggresiveness) :
spoofed_text = ''
for letter in ai_text :
## We take the original string and start scrambling it with look-alikes
Expand All @@ -28,4 +28,21 @@ def spoof_text(ai_text, scramble_aggresiveness = 30) :
spoofed_text += letter
return spoofed_text

print(spoof_text(input("Enter the AI generated text:\n"), scramble_aggresiveness=5))
ai_text = ''
while True :
## We ask them to input the ai-generated text 1 paragraph at a time because any enters would mess with the input option.
ai_paragraph = input("Please enter the AI-generated text 1 paragraph at a time. Leave blank if finished copying.\n")
if ai_paragraph != '' :
ai_text += ai_paragraph
else : break

scramble_aggresiveness = input("Please input the amount of scramble aggressiveness, leave blank for default\n")
print(scramble_aggresiveness)
while scramble_aggresiveness.isdigit() == False and scramble_aggresiveness != '' :
scramble_aggresiveness = input("Please input the amount of scramble aggressiveness, leave blank for default\n")

if scramble_aggresiveness == '' :
scramble_aggresiveness = 30
else : scramble_aggresiveness = int(scramble_aggresiveness)

print(spoof_text(ai_text=ai_text, scramble_aggresiveness=scramble_aggresiveness))

0 comments on commit 1d1d18c

Please sign in to comment.