-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from gigamac/parameterised-jobs-stages
Parameterised jobs stages
- Loading branch information
Showing
8 changed files
with
1,526 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
class Specials: | ||
characters = dict([ | ||
('$', '#36;'), | ||
('[', '#91;'), | ||
(']', '#93;'), | ||
(' ', '#32;'), | ||
('"','#34;') | ||
]) | ||
|
||
def __init__(self): | ||
self = self | ||
|
||
def cleanse_special_characters(self,test_string): | ||
# specials = Specials() | ||
# def replace_specials(test_string): | ||
parsed_string = test_string | ||
for char in self.characters: | ||
parsed_string = parsed_string.replace(char,'') | ||
return parsed_string | ||
|
||
def utf8_special_characters(self,test_string): | ||
# specials = Specials() | ||
# def replace_specials(test_string): | ||
parsed_string = '' | ||
for char in test_string: | ||
parsed_string += self.characters.get(char,char) | ||
return parsed_string | ||
|
||
# return replace_specials(test_string) if len([char for char in test_string if char in Specials().characters]) > 0 else return test_string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.