Extract URL from a string

Post your questions and help other users.

Moderator: Martin

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Extract URL from a string

Post by anuraag » 01 Apr 2020 23:56

@desmanto are you extracting text from image? If yes how? By using a plugin?

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Extract URL from a string

Post by Desmanto » 02 Apr 2020 01:36

@anuraag : No, it just extract patterns from clipboard or the text we send to it (called the flow with variable)
Desmanto wrote:
06 Jan 2020 17:56
A kind of text extracting flow, where you pass the text and extract out the url, phone number, ip and email. Later we can use various activity to link to it, example visit the url, call/sms phone number, ping ip or email the address.
I do have another flow, CUI based flow which extract text from current screen, not from image though. But it is very useful when I have label which can't be copied by regular method. Using getTextInActiveWindows(), I get all the text and then select the text to copy using input dialog - multiple choice.

I haven't share both flows yet, still continuing other covid19 flow for my own country statistic.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Extract URL from a string

Post by anuraag » 02 Apr 2020 02:29

Ok. Got it. I'm thinking of using TouchTask plugin to capture texts from image.

Yeah I'm also using getTextInActiveWindows() to copy text from screen since Google app removed option to copy text from screen. I'm using assist button as trigger with option to take screenshot, record screen, copy text from screen, split screen (android 10). Will add OCR over there.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Extract URL from a string

Post by Desmanto » 02 Apr 2020 06:01

With touchtask apk so small, I think it must be using external API thru internet to do the OCR. Which I would avoid if possible. Currently most app that can do offline OCR, mostly use tesseract. And I find at many times of my usage, the extraction still have error more than 5%, render it not so reliable for my usage cases (if I need it).

I populated my smartbar (navigation bar) mostly with Automagic flow shortcut. They are very handy, as you can access it anywhere on any app. Splitscreen AFAIK can be done already since android 7.0. Is there any difference in android 10? I saw some ROM has the full desktop mode, but can't find it when I try android 10 for a week.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Extract URL from a string

Post by anuraag » 02 Apr 2020 07:17

TouchTask doesn't use any online api. It is using some java library i think.

On Android 10 long tap recent doesn't activates split screen. I think same for Android 9. But some custom rom allow doing this. I don't want to try other roms as i want to stay with that rom where real development/fixes goes for device.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Extract URL from a string

Post by Desmanto » 03 Apr 2020 01:26

That's right. I just try the OCR without any internet at all, and it still able to extract the text. But there is no language choice, so it seems to be limited to english only. Still considered OK, since the size is very small for its feature. I wonder if we can replicate the function using java in Automagic. But I still prefer if we can use tesseract, since it has external trained data set we can use. Can't find any android binary for tesseract yet.

I have scanned all the trigger and action function, most of them are redundant to Automagic Control UI, UI Event, widget overlay, screenshot and several others. Even split screen can be done with a single function toggleSplitScreen() in Control UI. There is compare image function, but only return true false, which I think simply a hash compare after removing the metadata. The only feature I think is unique is the OCR alone. Autotools also has this function AFAIR. But of course Touchtask is free.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply