def to_markup_dict(self, markup, hide_keys=None, show_keys="all"):
        keys_to_show = [
            "tiid",
            "aliases",
            "biblio",
            "awards",
            "genre",
            "genre_icon",
            "display_genre_plural",
            "countries_str",

             # for sorting
            "year",
            "awardedness_score",
            "metrics_raw_sum",
            "title",
            "authors",

             # for debugging
            "mendeley_discipline",

            # to show the "view on impactstory" badges
            "embed_markup",
            "fulltext_cta"
        ]
        my_dict = self.to_dict(keys_to_show)

        my_dict["markup"] = markup.make(my_dict)

        if hide_keys is not None:
            for key_to_hide in hide_keys:
                try:
                    del my_dict[key_to_hide]
                except __HOLE__:
                    pass
        elif show_keys != "all":
            my_small_dict = {}
            for k, v in my_dict.iteritems():
                if k in show_keys:
                    my_small_dict[k] = v

            my_dict = my_small_dict

        return my_dict
dataset/ETHPy150Open Impactstory/total-impact-webapp/totalimpactwebapp/product.py/Product.to_markup_dict