Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen scraping API #85

Open
14 tasks
migueldeicaza opened this issue May 25, 2020 · 0 comments
Open
14 tasks

Screen scraping API #85

migueldeicaza opened this issue May 25, 2020 · 0 comments

Comments

@migueldeicaza
Copy link
Owner

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 (...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant