Possible to duplicate one paragraph after another throughout a doc?

2023-06-01 Thread Michael Heth
I have a long document that I now want to revise extensively. But I would 
like to have the original paragraphs inline with the new as a reference for 
what I was up to originally.

Each paragraph starts with an equals sin and a space

=(sp)my text

Is there a way to do this?

Original Outline

= Para 1

= Para 2

= Para 3

= Para 4

Ready for the revisions.

= Para 1

= Para 1

= Para 2

= Para 2

= Para 3

= Para 3

= Para 4

= Para 4

Thanks for any tips/advice/info.

M./

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/f379bcc5-041f-47ad-b606-60350e93b39an%40googlegroups.com.


Re: Match newlines that exist only after a line of text (but not between paragraphs)

2023-06-01 Thread Johnny Ragadoo
This appears to be what Text->Remove Line Breaks does in a single click.

But how's this for shorter and sweeter grep-ness. 

In grep mode, search for:
[^$]\n
or shorter yet:
.\n

Either one seems to find newlines at the end of text, but not on a line by 
themselves. Replacing with a space finishes the task.

But will Text->Remove Line Breaks do the job?

On Wednesday, May 31, 2023 at 11:27:27 AM UTC-5 Neil Faiman wrote:

>
> On May 30, 2023, at 10:47 PM, ProjectGuru  wrote:
>
> I'm looking for a GREP pattern that can delete the newlines that exist 
> ONLY after some text and NOT newline characters that exist between 
> paragraphs For example:
>
> =
>
> ORIGINAL TEXT:
>
> [Ms. Rowling] This is Ms.
> Rowling, author
> of the Harry Potter
> collection.
> And now onto the show.
>
> [intro music]
>
> [John] Hi everyone.
> Welcome back to the
> Harry Potter podcast.
> I'm your co-host John Doe.
>
> DESIRED RESULT:
>
> [Ms. Rowling] This is Ms. Rowling, author of the Harry Potter collection. 
> And now onto the show.
>
> [intro music]
>
> [John] Hi everyone. Welcome back to the Harry Potter podcast. I'm your 
> co-host John Doe.
>
> =
>
>
> This search pattern will do the trick.
>
> (?s)(?<=\S)\n(?=\S)
>
>
> Command-F; put it in the Find: box, put a single space in the Replace: 
> box, check Grep, and click Replace All.
>
> Explanation:
>
>
>- (?s) — the string being searched is the entire document, not 
>individual lines.
>- (?<=\S)) — match the search string only when it is preceded by a 
>non-white-space character
>- \n — the actual search string: a single newline
>- (?=\S) — match the search string only when it is followed by a 
>non-white-space character
>
>
> When I apply this to your original text, I get:
>
> [Ms. Rowling] This is Ms. Rowling, author of the Harry Potter collection. 
> And now onto the show.
>
>
> [intro music]
>
>
> [John] Hi everyone. Welcome back to the Harry Potter podcast. I'm your 
> co-host John Doe.
>
> Cheers,
> Neil Faiman
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/9687fb7b-d116-487d-a626-24af14c25cffn%40googlegroups.com.


Re: Match newlines that exist only after a line of text (but not between paragraphs)

2023-06-01 Thread Johnny Ragadoo
My post seems to have evaporated. If this turns out to be a duplicate, 
apologies!

Text->Remove Line Breaks appears to be a built in feature to do what you 
want. Basically, blocks of text with single line breaks become one long 
line. Two newlines separate paragraphs. View->Text Display->Soft Wrap Text 
will then give a pleasant visual layout without modifying the text.

In my first post I suggested some regex patterns that on second glance do 
not seem to work. Once again, apologies!

On Wednesday, May 31, 2023 at 11:27:27 AM UTC-5 Neil Faiman wrote:

>
> On May 30, 2023, at 10:47 PM, ProjectGuru  wrote:
>
> I'm looking for a GREP pattern that can delete the newlines that exist 
> ONLY after some text and NOT newline characters that exist between 
> paragraphs For example:
>
> =
>
> ORIGINAL TEXT:
>
> [Ms. Rowling] This is Ms.
> Rowling, author
> of the Harry Potter
> collection.
> And now onto the show.
>
> [intro music]
>
> [John] Hi everyone.
> Welcome back to the
> Harry Potter podcast.
> I'm your co-host John Doe.
>
> DESIRED RESULT:
>
> [Ms. Rowling] This is Ms. Rowling, author of the Harry Potter collection. 
> And now onto the show.
>
> [intro music]
>
> [John] Hi everyone. Welcome back to the Harry Potter podcast. I'm your 
> co-host John Doe.
>
> =
>
>
> This search pattern will do the trick.
>
> (?s)(?<=\S)\n(?=\S)
>
>
> Command-F; put it in the Find: box, put a single space in the Replace: 
> box, check Grep, and click Replace All.
>
> Explanation:
>
>
>- (?s) — the string being searched is the entire document, not 
>individual lines.
>- (?<=\S)) — match the search string only when it is preceded by a 
>non-white-space character
>- \n — the actual search string: a single newline
>- (?=\S) — match the search string only when it is followed by a 
>non-white-space character
>
>
> When I apply this to your original text, I get:
>
> [Ms. Rowling] This is Ms. Rowling, author of the Harry Potter collection. 
> And now onto the show.
>
>
> [intro music]
>
>
> [John] Hi everyone. Welcome back to the Harry Potter podcast. I'm your 
> co-host John Doe.
>
> Cheers,
> Neil Faiman
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/6fd67435-bf29-40e8-8b8e-70b83ff325c8n%40googlegroups.com.


Re: Possible to duplicate one paragraph after another throughout a doc?

2023-06-01 Thread Bucky Junior
What about just making a copy of all the text and appending it to the end? Then 
use a split screen (top/bottom) to see the original and make your edits. That 
way you will have an easier time removing the original (1/2 of the text) and 
keeping the edited version.
Original
= Para 1
= Para 2
= Para 3
 Split in screen 
Editing version
= Para 1
= Para 2
= Para 3

> On Jun 1, 2023, at 5:40 AM, Michael Heth  wrote:
> 
> I have a long document that I now want to revise extensively. But I would 
> like to have the original paragraphs inline with the new as a reference for 
> what I was up to originally.
> 
> Each paragraph starts with an equals sin and a space
> 
> =(sp)my text
> 
> Is there a way to do this?
> 
> Original Outline
> 
> = Para 1
> 
> = Para 2
> 
> = Para 3
> 
> = Para 4
> 
> Ready for the revisions.
> 
> = Para 1
> 
> = Para 1
> 
> = Para 2
> 
> = Para 2
> 
> = Para 3
> 
> = Para 3
> 
> = Para 4
> 
> = Para 4
> 
> Thanks for any tips/advice/info.
> 
> M./
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "supp...@barebones.com" 
> rather than posting here. 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/f379bcc5-041f-47ad-b606-60350e93b39an%40googlegroups.com
>  
> .

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/2C8D724D-1623-4A81-BC82-24DAC8D3EAFA%40gmail.com.


Re: AppleScript: Use Numbers.app to create PDF files from a BBEdit TSV file

2023-06-01 Thread Johnny Ragadoo
Unless you have a specific need for your output to be in Numbers, try the 
mail merge feature in Pages.

I think you can use your tsv file directly in Pages. If not, Numbers will 
open tsv files as if they were spreadsheet files.

On Monday, May 29, 2023 at 8:43:41 PM UTC-5 Alfredo wrote:

> Greetings, AppleScript Gurus:
>
> I would like to producea a batch of PDF files, each customized for a given 
> addressee.
>
> I can create a TSV file with BBEdit that contains one customized line per 
> addresee.
>
> I would assume I can use an AppleScript to feed each line of this TSV file 
> to a template in Numbers.app to produce the batch of PDF documents.
>
> I have no idea about creating such an AppleScript and I'm eager to learn.
>
> Thanks very much for any guidance.
>
> Alfredo
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/a59a3daf-c9b0-40a5-883c-951b0966f3a4n%40googlegroups.com.