diff --git a/markdown2canvas/__init__.py b/markdown2canvas/__init__.py index 9e53524..97294dc 100644 --- a/markdown2canvas/__init__.py +++ b/markdown2canvas/__init__.py @@ -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 diff --git a/markdown2canvas/canvas_objects.py b/markdown2canvas/canvas_objects.py index 8dfabe9..cd8f09a 100644 --- a/markdown2canvas/canvas_objects.py +++ b/markdown2canvas/canvas_objects.py @@ -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 @@ -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 @@ -248,7 +250,7 @@ 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 @@ -256,9 +258,9 @@ def _construct_dict_of_props(self): 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: