Skip to content

Screen scraping API #85

Description

@migueldeicaza

Now that I made HeadlessTerminal public, as I need it for fuzzing, perhaps I should surface more information about the contents of the screen and make a handful of internal classes public.

APIs to surface:

Saving:

  • save (to: URL, format: SaveFormat = .txt)

Accessing content"

  • cols/rows
  • cursorLeft/cursorTop
  • scrollRegion/marginRegion
  • getCell (line: Int, col: Int) -> CharData
  • getText (line: Int)
  • getAttributedText (line: Int) -> [CharData]

Writing to the screen, some basic operations, could surface more:

  • clear ()
  • setColor (...)
  • setCursorPosition (...)
  • write (str)
  • getRegionText (...) -> [String]

Record input/output:

  • setOutputRecorder (...)
  • setInputRecorder (...)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions