Re: How to Undo Multi-File Find and Replace

2017-02-27 Thread Bill Kochman
Thank you for your response David. However, as I noted yesterday — my local 
time — I already took care of the problem by starting all over. It took me 
about an hour to get things right, and even better than before.

Kind regards,

Bill K.


> On Feb 27, 2017, at 5:26 PM, David Wagner  wrote:
> 
> You would need to know the last chapter number of the book you are in Nd the 
> next chapter name. I have a script I use for my daily reading that I do using 
> Perl and it works well. Once you have the naming convention, it should be 
> pretty easy to accomplish...

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: How to Undo Multi-File Find and Replace

2017-02-26 Thread Bill Kochman
Hello folks,

I apologize for the delay in getting back to you, but I have been very sick and 
had to go to bed.

At any rate, I just bit the bullet and redid everything from scratch using 
backup copies of the original 1256 files.

To provide more details, the link that I broke in each of those files, pointed 
to the next chapter in a book in the Bible.

In other words, each HTML document had previous and next links. I broke the 
next links with that one small oversight while performing the final multi-file 
find and replace.

If the link had pointed to the same page, it would have been very easy to fix 
using the #BASENAME# placeholder, and a nifty little shell script that my 
friend Jim Derry wrote for me.

So the fact that the contents of the broken link varied from file to file, made 
it seem impossible to fix.

I wonder if there is some “magical” #BASENAME# +1 script that would look at the 
actual number in the file name of the file it was working on, and then replace 
the #BASENAME# placeholder with the name of the next file in sequence.

Of course, in that case, even this would not work, because sometimes going to 
the next chapter means going to the opening chapter of a different book 
entirely.

Thank you to those of you who took the time to respond to my inquiry. I 
appreciate it.

Kind regards,

Bill K.


> On Feb 27, 2017, at 9:13 AM, Bruce Linde  wrote:
> 
> got backups?
> 
> 
> 
> 
> 
> 
> On Sunday, February 26, 2017 at 2:09:35 PM UTC-8, Tom Robinson wrote:
> That was my thought, but looks like OP managed to change text which varied 
> for each link, to a fixed string in all the files :[ 
> 
> 
> > On 2017-02-27, at 10:39, Jean-Christophe Helary  > > wrote: 
> > 
> > You can use a regex to fix the broken links :) There's plenty of hope. 
> > 
> > Now what it the pattern of those broken links ? 
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter:  >
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to bbedit@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/bbedit 
> .

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: How to Undo Multi-File Find and Replace

2017-02-26 Thread Bruce Linde
got backups?






On Sunday, February 26, 2017 at 2:09:35 PM UTC-8, Tom Robinson wrote:
>
> That was my thought, but looks like OP managed to change text which varied 
> for each link, to a fixed string in all the files :[ 
>
>
> > On 2017-02-27, at 10:39, Jean-Christophe Helary <
> jean.christ...@gmail.com > wrote: 
> > 
> > You can use a regex to fix the broken links :) There's plenty of hope. 
> > 
> > Now what it the pattern of those broken links ? 
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: How to Undo Multi-File Find and Replace

2017-02-26 Thread Tom Robinson
That was my thought, but looks like OP managed to change text which varied for 
each link, to a fixed string in all the files :[


> On 2017-02-27, at 10:39, Jean-Christophe Helary 
>  wrote:
> 
> You can use a regex to fix the broken links :) There's plenty of hope.
> 
> Now what it the pattern of those broken links ?

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: How to Undo Multi-File Find and Replace

2017-02-26 Thread Jean-Christophe Helary
> So go ahead and tell me that I just have to go back and start all over again 
> with a fresh copy of the files, because there is no way to undo a multi-file 
> find and replace.

You can use a regex to fix the broken links :) There's plenty of hope.

Now what it the pattern of those broken links ?

Jean-Christophe 

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


How to Undo Multi-File Find and Replace

2017-02-26 Thread Bill Kochman
I kind of suspect what I am going to be told, but let me ask anyway with a 
glimmer of hope.

I have just spent a few hours cleaning up the HTML code in about 1256 docs in 
one of my virtual host’s directories.

I just did a final multi-file find and replace, and then realized when I got a 
broken link, that I had forgotten to change “(.+)” in the find string, to “\1\” 
in the replace string.

You guessed it.

I now have 1256 files with broken links, because they have (.+) in them instead 
of the proper file name. :(

So go ahead and tell me that I just have to go back and start all over again 
with a fresh copy of the files, because there is no way to undo a multi-file 
find and replace.

Is there even a teeny tiny glimmer of hope? :)

Kind regards,

Bill K.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.