elizagamedev / android-textbender

Bend Android text to your whim.
GNU General Public License v3.0
39 stars 4 forks source link

Is there a way to perform an action with all available text? #1

Open KerfuffleV2 opened 1 year ago

KerfuffleV2 commented 1 year ago

I was excited when I first saw this, but it seems like you can select one and only one word from the overlay.

What I really want to do is just copy all text from the current app to the clipboard. Not even just what's actually visible, everything.

My use case is copying stories out of a language learning app I'm using, because their formatting is less than ideal. Pleco can "copy all to clipboard", but only catches the visible text, even though I know it's processing more. I was hoping to use Textbender to cover that deficiency.

elizagamedev commented 1 year ago

I see. Currently there's no mechanism in Textbender for this, but it's mostly possible to implement pretty easily. I say "mostly" here because there are some nuances to being able to grab all the text. For example, a RecyclerView or a web view probably wouldn't give you good results, and you might end up picking up a lot of invisible text hidden behind other views and such. For example, my email client always has the various labels/mailbox buttons in a view, just hidden behind other views when not in use.

It sounds like in your specific case though these probably wouldn't matter too much, and it does seem like a generally useful to just grab all text possible even if it's a poorly formatted mess most of the time. I'll include a feature like this for v0.3.0 :slightly_smiling_face:

KerfuffleV2 commented 1 year ago

It sounds like in your specific case though these probably wouldn't matter too much, and it does seem like a generally useful to just grab all text possible even if it's a poorly formatted mess most of the time.

I agree, it's better to have to clean up some unnecessary stuff than not to be able to grab what you need.

In my specific case, what I want to grab is in a scrolling text box where some of it isn't in view. I believe the whole app is just a web-front end so it probably actually is a webview.

I'm not asking for this as a feature, I'd be perfectly happy to grab everything and clean up it up afterwards but just thinking:

There are probably three options that would cover most use cases:

  1. Grab literally everything.
  2. Grab what's visible (so basically act as if every button that current pops up when TB is activated was touched in sequence).
  3. Grab everything in the same container (or its descendants?) as what the user selects.

I don't know Kotlin or Android app development but I did look at the source. It seems like option 3 would be the most pain to implement based on how it's currently set up. The first two would probably be pretty easy though.

I'll include a feature like this for v0.3.0

That would be amazing. Thank you!

Wjxfi commented 1 year ago

Hi, I really need this function! Please make it! 😔