Skip to content

Commit

Permalink
logic cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Odyhibit committed Sep 11, 2024
1 parent fb1531e commit 2bf12ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/decode_five_strips_of_bacon.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,16 @@ def grab_clipboard() -> []:


def process_char(letter: str) -> str:
# pylint: disable=too-many-branches
"""decodes the attributes of one letter, and returns a hidden character
letter - string containing modifier characters, and the cover character
returns - string that is one decoded character
"""
output = [0, 0, 0, 0, 0]
if letter == " " or letter == "":
if letter in (" ", ""):
return ""
if letter[0] == " ":
letter = letter[1:]
elif letter[0] == "\u2060":
if letter[0] in (" ", "\u2060"):
letter = letter[1:]

if len(letter) > 0:
Expand Down Expand Up @@ -102,12 +101,13 @@ def process_char(letter: str) -> str:


def process_char_unicode(letter: str) -> str:
# pylint: disable=too-many-branches
"""decodes the attributes of one letter, and returns a hidden character
letter - string containing modifier characters, and the cover character
returns - string that is one decoded character
"""
if letter == " " or letter == "":
if letter in (" ", ""):
return ""
if letter[0] in (" ", "\u2060"):
letter = letter[1:]
Expand Down Expand Up @@ -195,6 +195,5 @@ def main():
pass



if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions src/encode_five_strips_of_bacon.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def get_bit_mask(hide_me: str, dictionary_choice: {}) -> str:


def add_bacon(letter: str, bit_mask: str, output_format: str) -> str:
# pylint: disable=too-many-branches
"""Add appropriate markdown prefix, and suffix
:param letter: one character of the covertext
:param bit_mask: the binary string representing one hidden character
Expand Down

0 comments on commit 2bf12ee

Please sign in to comment.