GRAPHIC: New Entity Operations™ Alpha Logo

EntityScript



core_seeker




# -*- coding: utf-8 -*-
"""
COPYRIGHT (C) 2020-2023 NEW ENTITY OPERATIONS INC. ALL RIGHTS RESERVED
INSTANCE: core_seeker
MODIFIED: 2023/05/26
OVERVIEW:

core_seeker gives a basic seek system for text-mode

"""
__version__ = "0.0.6"
__author__ = "Ryan McKenna"
__copyright__ = "Copyright (C) 2020-2023 New Entity Operations Inc."
__credits__ = [
 "Ryan McKenna",
 "New Entity Operations Inc.", "New Entity Operations, LLC"]
__email__ = "Operator@NewEntityOperations.com"
__license__ = "New Entity License"
__maintainer__ = "Ryan McKenna"
__status__ = "Production"

## MODE-> facilities
from MODE.facilities import (Cure, oFo, terms_seeker)

## core_middlelayer
from core_middlelayer import (DIRDATA, PATH_INSTANCE, PHASE_SERVER)

## MODE.debug_seeker
from MODE.debug_seeker import DEBUG_SEEKER

class Locate:
 """
 Locate, return, or filter a match in core.es
 based off of the prototype critera - here, a skeleton
 """
 def seek_by_date():
  """
  Filter the seeker to a specific date
  Function: incomplete, pass
  """
  Sought_In_Core = input(terms_seeker.question_date+Cure.terminate_line)

 def seek_by_time():
  """
  Filter the seeker to a specific time
  Function: incomplete, pass
  """
  Sought_In_Core = input(terms_seeker.question_name+Cure.terminate_line)

 def seek_by_member():
  """
  Filter the seeker to a specific member
  Function: incomplete, pass
  """
  Sought_In_Core = input(terms_seeker.question_member+Cure.line_break)

 def seek_by_text():
  """
  Filter the seeker to locate a specific text field
  Function: incomplete, pass
  """
  Sought_In_Core = input(terms_seeker.question_text+Cure.line_break)

 def seek_full_match():
  """
  Seek and return an exact line match
  """
  Sought_In_Core = input(terms_seeker.question_full+Cure.terminate_line)

  with open (PATH_INSTANCE+DIRDATA+PHASE_SERVER, oFo.read_text) as SEARCH_SLUG:
   for line in SEARCH_SLUG:
    if Sought_In_Core != line:
     DEBUG_SEEKER.seek_no_matches()
    elif Sought_In_Core == line:
     DEBUG_SEEKER.seek_match(MATCH=line)
    else:
     DEBUG_SEEKER.error_seek()
  SEARCH_SLUG.close()



Return HOME