diff --git a/Entire_Spellbook.pdf b/Entire_Spellbook.pdf index 3e1ce9d..dbfb32a 100644 Binary files a/Entire_Spellbook.pdf and b/Entire_Spellbook.pdf differ diff --git a/SaveSpells.ipynb b/SaveSpells.ipynb index 722b273..a11b8f6 100644 --- a/SaveSpells.ipynb +++ b/SaveSpells.ipynb @@ -12,6 +12,13 @@ "import os" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# scrape and save all spells" + ] + }, { "cell_type": "code", "execution_count": 2, @@ -128,32 +135,11 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] + "source": [ + "# Check no errors on import" + ] }, { "cell_type": "code", @@ -175,34 +161,11 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ - "tests = {}\n", - "for k, v in dungeonsheets.spells.__dict__.items():\n", - " if isinstance(v, type) and issubclass(v, dungeonsheets.spells.Spell):\n", - " tests[k] = v()" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\"Unknown spell\"" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "tests.pop('Spell')" + "from dungeonsheets.make_sheets import create_spellbook_pdf" ] }, { @@ -211,16 +174,21 @@ "metadata": {}, "outputs": [], "source": [ - "test_char = dungeonsheets.Character()" + "tests = {}\n", + "for k, v in dungeonsheets.spells.__dict__.items():\n", + " if k == 'Spell':\n", + " continue\n", + " if isinstance(v, type) and issubclass(v, dungeonsheets.spells.Spell):\n", + " tests[k] = v()" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ - "test_char._spells = test_char._spells_prepared = list(tests.values())" + "test_char = dungeonsheets.Character()" ] }, { @@ -229,58 +197,17 @@ "metadata": {}, "outputs": [], "source": [ - "create_spellbook_pdf(test_char, 'Entire_Spellbook')" + "test_char._spells = test_char._spells_prepared = list(tests.values())" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": 10, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ - "test_char.wield_weapon('Spear +1')" + "create_spellbook_pdf(test_char, 'Entire_Spellbook') # Create a test Entire_Spellbook.pdf to check for printing issues" ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[\"Spear+1\"]" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "test_char.weapons" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {