summaryrefslogtreecommitdiffstats
path: root/share/extensions/text_randomcase.py
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2018-09-09 08:28:15 +0000
committerMartin Owens <doctormo@gmail.com>2018-09-09 08:28:15 +0000
commit36c73a704b281e616d779b1eac5430d7527a9338 (patch)
tree189c5defb29728d428f44e17903bde11b89540a1 /share/extensions/text_randomcase.py
parentUpdate selection-chemistry.cpp (diff)
downloadinkscape-36c73a704b281e616d779b1eac5430d7527a9338.tar.gz
inkscape-36c73a704b281e616d779b1eac5430d7527a9338.zip
Move extensions to git inkscape-extensions repository
Diffstat (limited to 'share/extensions/text_randomcase.py')
-rwxr-xr-xshare/extensions/text_randomcase.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/share/extensions/text_randomcase.py b/share/extensions/text_randomcase.py
deleted file mode 100755
index 74c061a7c..000000000
--- a/share/extensions/text_randomcase.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-import chardataeffect, inkex, string
-
-import random
-
-class C(chardataeffect.CharDataEffect):
-
- def process_chardata(self,text, line, par):
- r = ""
- a = 1
- for i in range(len(text)):
- c = text[i]
- # bias the randomness towards inversion of the previous case:
- if a > 0:
- a = random.choice([-2,-1,1])
- else:
- a = random.choice([-1,1,2])
- if a > 0 and c.isalpha():
- r = r + c.upper()
- elif a < 0 and c.isalpha():
- r = r + c.lower()
- else:
- r = r + c
-
- return r
-
-c = C()
-c.affect()