gstomd package — GsuiteToMd 0.99 documentation

# gstomd package

## gstomd.__main__ module

`gstomd.__main__.` `main`()

## gstomd.convert module

class `gstomd.convert.` `GsuiteToMd`(pydrive_settings='pydrive_settings.yaml', dest_folder='gstomd_extract')

  Bases: `object`

  `Folder`(folder_id)
  `Gdoc`(doc_id, dest_folder)

## gstomd.node module

class `gstomd.node.` `Node`(googleDriveFile, path='', depth=1, drive_connector='')

  Bases: `object`

  class for Google Drive item

  `basename`()

    pass accesses to googleDriveFile

  `id`()

    pass accesses to googleDriveFile

  `parent`()

    pass accesses to googleDriveFile

  `unix_name`()

    Generate Unix name (no special caracters) from Node name.

## gstomd.gfolder module

class `gstomd.gfolder.` `Gfolder`(googleDriveFile='', path='', depth=1, drive_connector='', dest_folder='', root_folder_id='')

  Bases: `gstomd.node.Node`

  Folder instance. Inherits Node.

  `all_subfolders`()

    list all subfolders under self

  `complement_children_path_depth`()

    generate children’s path and depth information from basename

  `fetch`()

    Generate folder structure with files

  `to_disk`()

    Create folder and all his subfolders and google documents on the disk

## gstomd.gdoc module

class `gstomd.gdoc.` `Gdoc`(googleDriveFile, path='', depth=1, drive_connector='')

  Bases: `gstomd.node.Node`

  Google Document instance. Inherits Node.

  `fetch`()

    Fetch document content from drive

  `to_disk`()

    Download document to disk as markdown + images in a subfolder

## gstomd.utils module

`gstomd.utils.` `mime_to_filetype`(mime_string)

  convert mimi type in simple string

  Args:

    mime_string (string)

  Returns:

    string : [description]

`gstomd.utils.` `slugify`(value, allow_unicode=False)

  Convert to ASCII if ‘allow_unicode’ is False. Convert spaces or repeated dashes to single dashes. Remove characters that aren’t alphanumerics, underscores, or hyphens. Convert to lowercase. Also strip leading and trailing whitespace, dashes, and underscores.