Joined: Oct 2007
Posts: 4,582
Thanks:
0
So let's say there is a series of web pages or other text you can view in Firefox. Each of these has a different text. But these sections of text are formatted similarly, that is to say, they each begin with the same phrase and end with the same phrase. I say 'phrase', not 'html code'. If I wanted to copy the text in these sections (as it's presented in Firefox), the only way I know to do this is manually, i.e. open each page and manually copy/paste. Is there a way to, say, open them all in multiple tabs, and tell Firefox to copy all the text between the identical beginning/end phrases?
I mean a plugin, I suppose. I'm not sure a clipboard utility would be able to ignore the html code, but if it can, then that too.
Edited: 2010-04-04, 3:23 pm
Joined: Feb 2008
Posts: 1,322
Thanks:
0
There is (was?) a program I had a while ago, where you would tell it to perform certain "routines," and I'm pretty sure that you could do this.
You hit "record," and it would remember everything you did, and then you could just run the script, and it would do it. You could set more commands in the code (which, IIRC, were specific to the program), so I can't imagine it would be too hard to make it do something like:
while (Firefox's window has open tabs) {
find("Identical Beginning Phrase")
copy(text until "Identical Ending Phrase")
close(current tab)
}
Keep in mind, that is NOT anything near to the code you will probably be using. Just an example of what I think you'd be able to use.
Give me a few minutes, and I'll see if I can find the program again.
Joined: Oct 2007
Posts: 4,582
Thanks:
0
Your example script looks great! Too bad the actual stuff is too complex for my wee n00b brain.
Joined: Feb 2008
Posts: 1,322
Thanks:
0
Unfortunately, I'm on a Mac, and have long since gotten rid of my virtual machine with Windows installed on it..
I'm pretty sure it could do what you want, because what I was using it for before was copying text that appeared in programs into notepad, and then refreshing Firefox every time the notepad file, so I could follow along, using Rikaichan as I needed.
I'll look into it and see if I can help you from the mac-side of things, anyway...
Joined: May 2007
Posts: 68
Thanks:
4
It would probably be simpler to just make an extension.
Joined: Sep 2008
Posts: 641
Thanks:
6
I think that your best option for now is an autocopy extension + a clipboard manager.
Joined: May 2007
Posts: 68
Thanks:
4
Yeah, it's just applying a regular expression. Not sure about the cache problems.
Joined: Oct 2007
Posts: 4,582
Thanks:
0
Ah, the cache thing was just me making a spurious correlation! ;p
So far, swaths of text from 50 tabs at a time has been no problem. Between that and this SendTo trick for Firefox that allows me to open multiple local .html files at a time...
Edited: 2010-04-08, 11:48 am
Joined: Oct 2007
Posts: 4,582
Thanks:
0
By the way, know how to get this to work for the View Source stuff? I have a plugin that lets me view source/view source selection in tabs, but the copier thingy gets befuddled by newlines or something.
If it takes more than 5 seconds to think of a solution, don't worry about it, it's not a big deal, just a random thought that popped into my head and I couldn't resist commenting about.
Edited: 2010-04-08, 9:23 pm