# Path: linux_story/common.py
# def get_max_challenge_number():
# def get_username():
# def get_story_file(name):
# 
# Path: linux_story/helper_functions.py
# def get_ascii_art(name):
#     """
#     Load an ASCII art file.
# 
#     Args:
#         name (str) - the name of the asset file
# 
#     Returns:
#         ascii_art (str) - the ASCII art asset as a block of text
#     """
# 
#     ascii_art = name
#     asset_path = get_path_to_file_in_system(name)
# 
#     try:
#         with open(asset_path) as f:
#             ascii_art = f.read()
# 
#     except (IOError, OSError) as e:
#             logger.error('Could not load file {} - [{}]'.format(asset_path, e))
#     except Exception as e:
#             logger.error('Unexpected error while loading the ascii art'
#                          ' - [{}]'.format(e))
# 
#     return ascii_art


import os
from gi.repository import Gtk, Gdk
from linux_story.common import images_dir
from linux_story.helper_functions import get_ascii_art
        self.set_size_request(self.WIDTH, self.HEIGHT)

        self.__pack_locked_spells()

        # sigh.. this is basically to get showing and hiding right for the two widgets
        self.connect('show', self.__on_show)
        self.grid.connect('show', self.__on_show)
        self.caps_lock_warning.connect('show', self.__on_show)

        # default to normal theme
        self.set_normal_theme()

    @staticmethod
    def __create_caps_lock_warning():
        box = Gtk.Box()
        box.get_style_context().add_class("caps_lock_warning")
        box.set_margin_top(10)
        box.set_margin_bottom(10)

        title = '<span foreground="orange" font="15" weight="bold">' \
                'Watch out, Caps Lock is activated on your keyboard' \
                '</span>'
        description = 'Terminal commands are \'case sensitive\' so have to be written' \
                      ' with capital or lower\ncase letters exactly as the computer' \
                      ' expects them, for example write' \
                      ' <span foreground="yellow">ls</span> not' \
                      ' <span foreground="yellow">LS</span>.'

        left_box = Gtk.Box()
        left_box.set_margin_left(10)

# Path: linux_story/common.py
# def get_max_challenge_number():
# def get_username():
# def get_story_file(name):
# 
# Path: linux_story/helper_functions.py
# def get_ascii_art(name):
#     """
#     Load an ASCII art file.
# 
#     Args:
#         name (str) - the name of the asset file
# 
#     Returns:
#         ascii_art (str) - the ASCII art asset as a block of text
#     """
# 
#     ascii_art = name
#     asset_path = get_path_to_file_in_system(name)
# 
#     try:
#         with open(asset_path) as f:
#             ascii_art = f.read()
# 
#     except (IOError, OSError) as e:
#             logger.error('Could not load file {} - [{}]'.format(asset_path, e))
#     except Exception as e:
#             logger.error('Unexpected error while loading the ascii art'
#                          ' - [{}]'.format(e))
# 
#     return ascii_art


# Path: linux_story/gtk3/Spellbook.py
import os
from gi.repository import Gtk, Gdk
from linux_story.common import images_dir
from linux_story.helper_functions import get_ascii_art

        self.set_size_request(self.WIDTH, self.HEIGHT)

        self.__pack_locked_spells()

        # sigh.. this is basically to get showing and hiding right for the two widgets
        self.connect('show', self.__on_show)
        self.grid.connect('show', self.__on_show)
        self.caps_lock_warning.connect('show', self.__on_show)

        # default to normal theme
        self.set_normal_theme()

    @staticmethod
    def __create_caps_lock_warning():
        box = Gtk.Box()
        box.get_style_context().add_class("caps_lock_warning")
        box.set_margin_top(10)
        box.set_margin_bottom(10)

        title = '<span foreground="orange" font="15" weight="bold">' \
                'Watch out, Caps Lock is activated on your keyboard' \
                '</span>'
        description = 'Terminal commands are \'case sensitive\' so have to be written' \
                      ' with capital or lower\ncase letters exactly as the computer' \
                      ' expects them, for example write' \
                      ' <span foreground="yellow">ls</span> not' \
                      ' <span foreground="yellow">LS</span>.'

        left_box = Gtk.Box()
        left_box.set_margin_left(10)

        left_box.add(Gtk.Image.new_from_file(os.path.join(images_dir, 'caps_lock.png')))