Exemple #1
0
 def _get_topic_sheet_ids(cls, topic, k=3, page=0):
     from sefaria.sheets import get_sheets_by_topic
     sheets = get_sheets_by_topic(topic.slug,
                                  limit=k,
                                  proj={"id": 1},
                                  page=page)
     return [s["id"] for s in sheets]
Exemple #2
0
    def import_sheets_by_tag(self, tag):
        from sefaria.sheets import get_sheets_by_topic

        self.updateFilter("Sheet Author", {"en": "Sheet Author", "he": "מחבר דף"})
        self.updateSort("weight", {"type": "Int", "en": "Weight", "he": "משקל"})
        sheet_list = get_sheets_by_topic(tag)
        for sheet in sheet_list:
            self.import_sheet(sheet["id"], remove_tags=[tag])