Re: Text Factory Equivalent for BBEdit: Text: Remove Line Breaks?

2023-05-24 Thread Christopher Stone
> On May 24, 2023, at 07:16, Mark Mayberry  wrote:
> 
> However, I cannot figure out which Text Factory command is the equivalent of 
> simply pressing  BBEdit Text (Menu) >> Remove Line Breaks.

Hey Mark,

Surprisingly there isn't one...

You have to roll-your-own via a RegEx, AppleScript-filter, or text-filter.

I tend to turn to AppleScript for this sort of thing.

Note how you can mix and match AppleScript and Text Factories. In this instance 
it's easy enough to employ BBEdit's own 'remove line breaks' command.

Glad you're enjoying the Mac and BBEdit ( and Keyboard Maestro :).

-Chris



# Auth: Christopher Stone 
# dCre: 2023/05/24 18:30
# dMod: 2023/05/24 18:30 
# Appl: BBEdit, System Events
# Task: Run a Specific Text Factory and ‘remove line breaks’ on the Front 
Document.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @System_Events, @Text-Factory, 
@Remove_Line_Breaks


set textFactoryFile to "~/Library/Application Support/BBEdit/Text Filters/Text 
Factories/TEST.textfactory"
tell application "System Events" to set textFactoryFile to (POSIX path of disk 
item textFactoryFile)

tell application "BBEdit"
set frontDoc to front text document
apply text factory textFactoryFile to frontDoc
tell frontDoc's text
remove line breaks
end tell
end tell



-- 
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/72A11FB2-C6FC-4D56-9431-B5DC03DCEBAE%40gmail.com.


Re: Text Factory Equivalent for BBEdit: Text: Remove Line Breaks?

2023-05-24 Thread Mark Mayberry
Dear Rich,

Thank you so much for the assistance. With some trial and error, I was able to 
implement your advice, and now the Text Factory (which performs hundreds of 
changes via the GREP commands and the CANONIZE command) can be applied to any 
open document window by pressing the assigned shortcut (CTRL-V).

I love BBEdit. Around 1980, I started using computers (Kaypro (CP/M) > Vic-20 & 
Commodore 64 > followed by a succession of homebuilt and purchased Windows 
computers).

With the arrival of Apple Silicon, I jumped ship from Windows to macOS, and 
have rediscovered the joy of computing—after wandering in the Windows 
wilderness for forty years.

Working with BBEdit is a huge part of the delight! I started with WordStar and 
other CMP based word-processing programs, but then came Microsoft Word. . . 
SIGH. Now, with BBEdit, markdown, and Pandoc, the process of working with text 
is a pleasant experience once again.

Thanks for a great product. I’m sorry it took me so long to discover BBEdit. 
Happy 30th anniversary!

Yours,

Mark


On 24 May 2023, at 16:09, Rich Siegel wrote:

> On 24 May 2023, at 17:06, Mark Mayberry wrote:
>
>> I know this is a DUMB question, but how do you get a Text Factory to work 
>> ONLY on the file that is currently open and visible in BBEdit?
>
> Place it in BBEdit's "Text Filters" folder, which you can get to by choosing 
> "Text Filters" from the Folder submenu on the BBEdit application menu.
>
> More on this in the user manual, but to summarize: filters run on the 
> selection of the active text document, or on the entire document if there is 
> no selection.
>
> Enjoy,
>
> R.
>
> -- 
> 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/592A84AE-D752-4FC0-B0B9-62E9963B89A9%40barebones.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/CA302031-5C5C-4803-B019-34B6459C8A20%40gmail.com.


Re: Text Factory Equivalent for BBEdit: Text: Remove Line Breaks?

2023-05-24 Thread Rich Siegel
On 24 May 2023, at 17:06, Mark Mayberry wrote:

> I know this is a DUMB question, but how do you get a Text Factory to work 
> ONLY on the file that is currently open and visible in BBEdit?

Place it in BBEdit's "Text Filters" folder, which you can get to by choosing 
"Text Filters" from the Folder submenu on the BBEdit application menu.

More on this in the user manual, but to summarize: filters run on the selection 
of the active text document, or on the entire document if there is no selection.

Enjoy,

R.

-- 
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/592A84AE-D752-4FC0-B0B9-62E9963B89A9%40barebones.com.


Re: Markdown processor settings for project

2023-05-24 Thread Mark Mayberry

Kevin,

I hope you are successful in streamlining the process because what you 
describe would be helpful to me also!


Yours,

Mark

On 24 May 2023, at 14:43, KevinC wrote:


Mark,

Thank you very much for your helpful script. I've been using a similar
setup with a makefile that I call from the terminal, which produces 
pretty

good results as well.

I was just hoping to be able to take advantage of BBEdit's build-in 
preview
if possible. Or if not, at least find an easy way to call the makefile 
from

BBEdit instead of always needing to switch to the terminal.

Thanks again!

Kevin

On Wednesday, May 24, 2023 at 6:37:20 AM UTC-6 Mark Mayberry wrote:


Kevin,

I know this is not exactly what you are asking, but I regularly 
create

slide shows in a variety of formats using the following
"Create-Slideshow.sh" file.  I proof examine the output by reviewing 
the
HTML files in Safari, and then making needed changes in BBEdit. It's 
a
"back-n-forth" process but I usually get a properly formatted slide 
show
after a few attempts.  After each needed change, I saved the MD files 
in
BBEdit, and re-run the terminal command, and then hit reload page in 
Safari.


Yours,

Mark

#!/bin/bash
echo "Starting Create Slideshow script."
cd 
/Users/markmayberry/Documents/Pandoc-Processing/Conversions-Slideshows

pandoc Slideshow.md -f markdown -t html -s -o Slideshow-html.html
pandoc Slideshow.md -f markdown -t pdf
--pdf-engine=/Library/TeX/texbin/pdflatex -s -o Slideshow-pdf.pdf
pandoc Slideshow.md -f markdown -t pptx -s -o Slideshow-pptx.pptx
pandoc Slideshow.md -f markdown -t s5 -s -o Slideshow-s5.html
pandoc Slideshow.md -f markdown -t slidy -s -o Slideshow-slidy.html
pandoc Slideshow.md -f markdown -t dzslides -s -o 
Slideshow-dzslides.html
pandoc Slideshow.md -f markdown -t revealjs -s -o 
Slideshow-revealjs.html

pandoc Slideshow.md -f markdown -t beamer
--pdf-engine=/Library/TeX/texbin/pdflatex -s -o Slideshow-beamer.pdf
echo "Ending Create Slideshow script."



On Tuesday, May 23, 2023 at 3:20:36 PM UTC-5 KevinC wrote:


Hello,

I understand how to customize default Markdown processor settings.

However, I was wondering if it is possible to configure a specific
Markdown processor and specific command line arguments to use for a
specific project?

As a use case, I'm currently working on a project that uses Pandoc 
to
create a slide show, and I would like to be able to adjust the 
preview
BBEdit creates without having to change the settings for other 
Markdown

files/projects that aren't slide shows.

Any ideas?

Thanks, Kevin





--
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/8230e208-7360-4da7-a430-84ce185442c1n%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/87E99792-94DF-4370-924B-288447C639CB%40gmail.com.


Re: Markdown processor settings for project

2023-05-24 Thread KevinC
Mark,

Thank you very much for your helpful script. I've been using a similar 
setup with a makefile that I call from the terminal, which produces pretty 
good results as well.

I was just hoping to be able to take advantage of BBEdit's build-in preview 
if possible. Or if not, at least find an easy way to call the makefile from 
BBEdit instead of always needing to switch to the terminal.

Thanks again!

Kevin

On Wednesday, May 24, 2023 at 6:37:20 AM UTC-6 Mark Mayberry wrote:

> Kevin,
>
> I know this is not exactly what you are asking, but I regularly create 
> slide shows in a variety of formats using the following 
> "Create-Slideshow.sh" file.  I proof examine the output by reviewing the 
> HTML files in Safari, and then making needed changes in BBEdit. It's a 
> "back-n-forth" process but I usually get a properly formatted slide show 
> after a few attempts.  After each needed change, I saved the MD files in 
> BBEdit, and re-run the terminal command, and then hit reload page in Safari.
>
> Yours,
>
> Mark
>
> #!/bin/bash
> echo "Starting Create Slideshow script."
> cd /Users/markmayberry/Documents/Pandoc-Processing/Conversions-Slideshows
> pandoc Slideshow.md -f markdown -t html -s -o Slideshow-html.html
> pandoc Slideshow.md -f markdown -t pdf 
> --pdf-engine=/Library/TeX/texbin/pdflatex -s -o Slideshow-pdf.pdf
> pandoc Slideshow.md -f markdown -t pptx -s -o Slideshow-pptx.pptx
> pandoc Slideshow.md -f markdown -t s5 -s -o Slideshow-s5.html
> pandoc Slideshow.md -f markdown -t slidy -s -o Slideshow-slidy.html
> pandoc Slideshow.md -f markdown -t dzslides -s -o Slideshow-dzslides.html
> pandoc Slideshow.md -f markdown -t revealjs -s -o Slideshow-revealjs.html
> pandoc Slideshow.md -f markdown -t beamer 
> --pdf-engine=/Library/TeX/texbin/pdflatex -s -o Slideshow-beamer.pdf
> echo "Ending Create Slideshow script."
>
>
>
> On Tuesday, May 23, 2023 at 3:20:36 PM UTC-5 KevinC wrote:
>
>> Hello,
>>
>> I understand how to customize default Markdown processor settings.
>>
>> However, I was wondering if it is possible to configure a specific 
>> Markdown processor and specific command line arguments to use for a 
>> specific project?
>>
>> As a use case, I'm currently working on a project that uses Pandoc to 
>> create a slide show, and I would like to be able to adjust the preview 
>> BBEdit creates without having to change the settings for other Markdown 
>> files/projects that aren't slide shows.
>>
>> Any ideas?
>>
>> Thanks, Kevin
>>
>

-- 
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/8230e208-7360-4da7-a430-84ce185442c1n%40googlegroups.com.


Re: Text Factory Equivalent for BBEdit: Text: Remove Line Breaks?

2023-05-24 Thread Neil Faiman
> On May 24, 2023, at 8:16 AM, Mark Mayberry  wrote:
> 
> BBEdit Text (Menu) >> Remove Line Breaks strips away the line breaks from 
> within the paragraphs and leaves double line breaks at the end of each 
> paragraph.  
> 
> How can I reproduce this specific action using Text Factory?


I can’t give you a direct answer, but many of the BBEdit Text menu commands 
amount to commonly used grep replacements, packaged up in an easier-to-use 
form, and you can always use a search-and-replace in a Text Factory.

As best I can tell, the following grep replacement will give you the Remove 
Line Breaks behavior you are looking for.

Find: (?s)(?https://twitter.com/bbedit>
--- 
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/51E31324-9ED7-4E9D-8D5E-F5361041E0AC%40faiman.org.


[ANN] BBEdit 14.6.6

2023-05-24 Thread Rich Siegel
Good { morning, afternoon, evening },

For those of you who haven't noticed yet :-), we are pleased to announce the 
release and immediate availability of BBEdit 14.6.6. This is a free and 
recommended update for anyone using BBEdit 14 (please check your macOS version 
before updating, macOS 10.15.7 or later is required), and includes a number of 
fixes for reported issues, as well as all the new features and refinements 
previously released as part of the BBEdit 14.x upgrade cycle.

A complete digest of the changes is available here:

 

If you're already using BBEdit 14 (outside of the Mac App Store), you can 
choose "Check for Updates" from the BBEdit menu, or get the update from the 
BBEdit updates page:

 

Mac App Store customers of BBEdit will get the update automatically, and if you 
have an active subscription, all of the new advanced features are immediately 
available to you.

For those using an older version: if you would like to upgrade your paid BBEdit 
license, you are welcome to do so, starting here:

 .

If you purchased a BBEdit 13 license directly from us (or using our FastSpring 
web store) on or after January 1, 2021, you have been sent a free license 
upgrade, to the email address you used when purchasing. If you did not receive 
this, please check your spam traps.

Meanwhile, BBEdit offers a 30-day evaluation period. During that period, all of 
BBEdit’s features are available. When it ends, you can still use BBEdit — with 
no nag screens or unsolicited interruptions, for free, forever.

After the evaluation period, you may re-enable all of BBEdit’s exclusive 
features at any time by purchasing a license (at a discount, if you have a paid 
license for a previous version).

 

Enjoy,

R.

-- 
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/0B1A463B-9621-4D98-A190-4657716D8F21%40barebones.com.


Re: Markdown processor settings for project

2023-05-24 Thread Mark Mayberry
Kevin,

I know this is not exactly what you are asking, but I regularly create 
slide shows in a variety of formats using the following 
"Create-Slideshow.sh" file.  I proof examine the output by reviewing the 
HTML files in Safari, and then making needed changes in BBEdit. It's a 
"back-n-forth" process but I usually get a properly formatted slide show 
after a few attempts.  After each needed change, I saved the MD files in 
BBEdit, and re-run the terminal command, and then hit reload page in Safari.

Yours,

Mark

#!/bin/bash
echo "Starting Create Slideshow script."
cd /Users/markmayberry/Documents/Pandoc-Processing/Conversions-Slideshows
pandoc Slideshow.md -f markdown -t html -s -o Slideshow-html.html
pandoc Slideshow.md -f markdown -t pdf 
--pdf-engine=/Library/TeX/texbin/pdflatex -s -o Slideshow-pdf.pdf
pandoc Slideshow.md -f markdown -t pptx -s -o Slideshow-pptx.pptx
pandoc Slideshow.md -f markdown -t s5 -s -o Slideshow-s5.html
pandoc Slideshow.md -f markdown -t slidy -s -o Slideshow-slidy.html
pandoc Slideshow.md -f markdown -t dzslides -s -o Slideshow-dzslides.html
pandoc Slideshow.md -f markdown -t revealjs -s -o Slideshow-revealjs.html
pandoc Slideshow.md -f markdown -t beamer 
--pdf-engine=/Library/TeX/texbin/pdflatex -s -o Slideshow-beamer.pdf
echo "Ending Create Slideshow script."



On Tuesday, May 23, 2023 at 3:20:36 PM UTC-5 KevinC wrote:

> Hello,
>
> I understand how to customize default Markdown processor settings.
>
> However, I was wondering if it is possible to configure a specific 
> Markdown processor and specific command line arguments to use for a 
> specific project?
>
> As a use case, I'm currently working on a project that uses Pandoc to 
> create a slide show, and I would like to be able to adjust the preview 
> BBEdit creates without having to change the settings for other Markdown 
> files/projects that aren't slide shows.
>
> Any ideas?
>
> Thanks, Kevin
>

-- 
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/b8f0f7da-7f01-4e46-90d1-7f65e0ea64bbn%40googlegroups.com.