class_docstr: Check, install, and call TLGU.
docstr: Look for imported TLG or PHI files and convert them all to
  ``~/cltk_data/grc/text/tlg/<plaintext>``.
  TODO: Add markup options to input.
  TODO: Add rm_newlines, divide_works, and extra_args
docstr_tok: ["Look","for","imported","TLG","or","PHI","files","and","convert","them","all","to","``","~\/cltk_data\/grc\/text\/tlg\/","<","plaintext",">","``",".","TODO",":","Add","markup","options","to","input",".","TODO",":","Add","rm_newlines",",","divide_works",",","and","extra_args"]
code: def convert_corpus(
      self, corpus, markup=None, lat=None
  ):  # pylint: disable=W0613
      """Look for imported TLG or PHI files and convert them all to
      ``~/cltk_data/grc/text/tlg/<plaintext>``.
      TODO: Add markup options to input.
      TODO: Add rm_newlines, divide_works, and extra_args
      """
      orig_path = make_cltk_path("originals")
      target_path = make_cltk_path()
      assert corpus in [
          "tlg",
          "phi5",
          "phi7",
      ], "Corpus must be 'tlg', 'phi5', or 'phi7'"
      if corpus in ["tlg", "phi5", "phi7"]:
          orig_path = os.path.join(orig_path, corpus)
          if corpus in ["tlg", "phi7"]:
              if "phi7" and lat is True:
                  lat = True
                  target_path = os.path.join(
                      target_path, "lat", "text", corpus
                  )
              else:
                  lat = None
                  target_path = os.path.join(
                      target_path, "grc", "text", corpus
                  )
          else:
              target_path = os.path.join(
                  target_path, "lat", "text", corpus
              )
              lat = True
      try:
          corpus_files = os.listdir(orig_path)
      except Exception as exception:
          logger.error("Failed to find TLG files: %s", exception)
          raise
      # make a list of files to be converted
      txts = [x for x in corpus_files if x.endswith("TXT")]
      # loop through list and convert one at a time
      for txt in txts:
          orig_txt_path = os.path.join(orig_path, txt)
          if markup is None:
              target_txt_dir = os.path.join(target_path, "plaintext")
          else:
              target_txt_dir = os.path.join(target_path, str(markup))
          if not os.path.isdir(target_txt_dir):
              os.makedirs(target_txt_dir)
          target_txt_path = os.path.join(target_txt_dir, txt)
          try:
              self.convert(
                  orig_txt_path,
                  target_txt_path,
                  markup=False,
                  rm_newlines=False,
                  divide_works=False,
                  lat=lat,
                  extra_args=None,
              )
          except Exception as exception:
              logger.error(
                  "Failed to convert file '%s' to '%s': %s",
                  orig_txt_path,
                  target_txt_path,
                  exception,
              )
  
file_path: cltk/src/cltk/corpora/grc/tlg/tlgu.py
imports: import os
  import subprocess
  from cltk.core.cltk_logger import logger
  from cltk.core.exceptions import CLTKException
  from cltk.data.fetch import FetchCorpus
  from cltk.utils.file_operations import make_cltk_path
  from cltk.utils.utils import query_yes_no
label_desc: Use image node_id 5 for calling the TLGU obj's underlying member method code with example usage: obj.convert_corpus(corpus, markup, lat) without return types