Skip to content

Commit

Permalink
Merge branch 'feature/summer2024' of https://github.com/ofloveandhate…
Browse files Browse the repository at this point in the history
…/markdown2canvas into feature/summer2024
  • Loading branch information
anbeemer committed Jul 19, 2024
2 parents d14f5b7 + 1d1e658 commit a43604d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
9 changes: 5 additions & 4 deletions markdown2canvas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,22 @@

__version__ = '0.'
__author__ = 'silviana amethyst, Mckenzie West, Allison Beemer'

__all__ = ['logging','exception','translation_functions','canvas2markdown','tool']

import markdown2canvas.logging

import markdown2canvas.exception

from markdown2canvas.setup_functions import *
from .setup_functions import *


import markdown2canvas.translation_functions

from markdown2canvas.course_interaction_functions import *
from .course_interaction_functions import *

################## classes

from markdown2canvas.canvas_objects import CanvasObject, Document, Page, Assignment, Image, File, BareFile, Link
from .canvas_objects import CanvasObject, Document, Page, Assignment, Image, File, BareFile, Link


import markdown2canvas.canvas2markdown
Expand Down
12 changes: 7 additions & 5 deletions markdown2canvas/canvas_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@

def find_local_images(html):
"""
constructs a map of local url's : Images
returns a dictionary of local url's to markdown2canvas.Images
works by assuming that local url's don't start with http or https, as those should be online.
"""
from bs4 import BeautifulSoup

Expand All @@ -56,7 +58,7 @@ def find_local_images(html):

def find_local_files(html):
"""
constructs a list of BareFiles, so that they can later be replaced with a url to a canvas thing
constructs a dictionary of markdown2canvas.BareFiles, so that they can later be replaced with a url to a canvas thing after upload
"""
from bs4 import BeautifulSoup

Expand Down Expand Up @@ -248,17 +250,17 @@ def publish_linked_content_and_adjust_html(self,course,overwrite=False):

def _construct_dict_of_props(self):
"""
construct a dictionary of properties, such that it can be used to `edit` a canvas object.
construct an empty dictionary of properties, such that it can be used to `edit` a canvas object.
"""
d = {}
return d


def ensure_in_modules(self, course):
"""
makes sure this item is listed in the Module on Canvas. If it's not, it's added to the bottom. There's not currently any way to control order.
makes sure this item is listed in the Modules listed (by name) in self.modules, on Canvas. If it's not, it's added to the bottom. There's not currently any way to control order.
If the item doesn't already exist, this function will raise. Be sure to actually publish the content first.
If the item doesn't already exist, this function will raise `DoesntExist`. Be sure to actually publish the content first.
"""

if not self.canvas_obj:
Expand Down

0 comments on commit a43604d

Please sign in to comment.