Re: insert word page next to page #s

2018-10-30 Thread bo
RE:

If they always come at the beginning of the line, you could try:

Find: ^(\d+)
Replace: Paragraph \1. (note the space at the end
Grep: on


This appears to works well! Thanks so much! I'll write in again after next 
mp3 listening. I have a lot of PDFs to process and see how it all flows 
together.


bo Atkinson

-- 
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 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: insert word page next to page #s

2018-10-30 Thread Sam Hathaway

If they always come at the beginning of the line, you could try:

Find: `^(\d+)`
Replace: `Paragraph \1. ` (note the space at the end
Grep: `on`

Good luck!
-sam

On 30 Oct 2018, at 9:22, bo wrote:


Wow, thanks so much! This:
Find: [\r ](\d+)\r
Replace: \rPage \1\r
Grep: on
This seems to have done it very well!  After that i was able to do the 
\n
for periods… I’ll try this in TTS (text to speech) next, to 
improve

listening.

If there is an easy  way to modify paragraph numbers, preceded with 
the
 word paragraph, that might super charge the work flow i’m 
attempting.

~bo

--
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 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 need technical support, 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: insert word page next to page #s

2018-10-30 Thread bo
Wow, thanks so much! This:
Find: [\r ](\d+)\r
Replace: \rPage \1\r
Grep: on
This seems to have done it very well!  After that i was able to do the \n 
for periods… I’ll try this in TTS (text to speech) next, to improve 
listening.

If there is an easy  way to modify paragraph numbers, preceded with the 
 word paragraph, that might super charge the work flow i’m attempting.
~bo

-- 
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 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: insert word page next to page #s

2018-10-30 Thread Sam Hathaway
Thanks for the sample. It looks sometimes the page number is on its own 
line, and sometimes it’s at the end of a line of text. There’s only 
one newline after it (not two as in your previous sample) and either a 
newline or a space before it. So try this:


Find: `[\r ](\d+)\r`
Replace: `\rPage \1\r`
Grep: `on`

PDFs are pretty hard to convert to plain text reliably because PDF is a 
display language and doesn’t really separate content from layout. If 
you can get your material in TEXT or HTML format you might have more 
luck.


Hope this helps!
-sam

On 30 Oct 2018, at 8:36, bo wrote:

I’m surprised that OSX or  OSX-TextEdit or Preview  -copy pasted 
unusable
plain text… Yet this sort of format stuff is actually much more 
prevalent
in geometry apps, so it should be understandable to me. So i learn 
and

thanks for this.

Here then is another sample, brought through the attachment function:



~bo

--
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 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 need technical support, 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: insert word page next to page #s

2018-10-29 Thread bo
New Effort Oct 29, Please: 

It so happens that there are multiple varieties of “plain text”.  Some 
versions remove all line breaks, from pasted text. Some versions remove the 
line break preceding a page break but retain the line break following the 
page break.

I (just now) installed an AppStore  PDF-to-PlainText App which keeps both 
line breaks. It places  line breaks before the page numbers as well as 
after the page numbers. Could this work better? Line breaks before and 
after being more distinctive. 

I tried your suggest BBEdit inputs:
Find: \r\r(\d+)\r\r
Replace: \r\rpage \1\r\r

With the new, trial, plain-text, this input gives the BBEdit-message:
Not Found

Can this input please be modified to handle line breaks before and aft?

Thanks for your consideration. ~bo

-- 
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 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: insert word page next to page #s

2018-10-26 Thread bo
PS-2

I tried unchecking the box: Grep an then clicking Replace And find.

The result was this:


(Three line breaks followed by:)
page \1

 

-- 
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 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: insert word page next to page #s

2018-10-26 Thread bo


"...However, once you have extracted content from a PDF file, you 
can then transfer that content to another app. 
For instance, if you have a PDF which contains text, you can 
open that PDF in Preview.app, then select & copy some (or all) 
of its contents, and paste the copied text into a BBEdit document. .."


I generally use Preview with select-all, copy and then paste into other 
apps. I notice your use of the word 'extract'. I only know of copy-paste 
unless there is a "save as" or "export" option in an app.  I also tried 
paste into Mac's Text Editor, normally in Plain Text mode which strips RFT, 
etc.,..   I also tried Acrobat without expected results and scanned the 
menus and Help to see if the word "extract" .was a special method. 

I'm on OS X 10.12.3. using a 2011 MacBook.  IK also tried re-starting, as 
that helps sometimes with my other apps.

Thanks for your efforts.

-- 
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 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: insert word page next to page #s

2018-10-26 Thread bo
PS-  Does this help? I just tried Selecting All, inside the BBEdit entry 
window and then got this... 


"The replacement string couldn’t be computed, because the previous Grep 
search did not succeed (application error code: 12003)."

-- 
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 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: insert word page next to page #s

2018-10-26 Thread Patrick Woolsey

On 10/26/18 at 1:55 PM, boatkin...@fairpoint.net (bo) wrote:

I also tried to see if BBEdi would open or import the PDF file 
more natively, but thePDF files all looked greyed out, (not selectable).




Since PDF is a binary file format, you must use an application 
which understands that format (such as Preview.app or Adobe 
Reader) to display and/or extract the contents of any PDF file, 
as BBEdit is not capable of doing so on its own.


  [Short take: BBEdit is a text editor, not a PDF viewer. :-) ]

However, once you have extracted content from a PDF file, you 
can then transfer that content to another app.


For instance, if you have a PDF which contains text, you can 
open that PDF in Preview.app, then select & copy some (or all) 
of its contents, and paste the copied text into a BBEdit document.



Regards,

 Patrick Woolsey
==
Bare Bones Software, Inc. 


[PS: If memory serves me correctly, there used to be a system 
service one could invoke via AppleScript or Automator to extract 
text from PDF files but I'm not sure whether that's still the case.]





--
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 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: insert word page next to page #s

2018-10-26 Thread bo
Thanks, I tried copy-pasting your inputs into the Find windows, along with 
my copy-pasted text from the PDF, in the main window, but it would not 
process.

I also tried to see if BBEdi would open or import the PDF file more 
natively, but thePDF files all looked greyed out, (not selectable).

-- 
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 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: insert word page next to page #s

2018-10-26 Thread Sam Hathaway
I assume you’ve already converted the PDF to plain text in order to 
get it into BBEdit. (If not you have bigger problems.)


Would this work?

Find: `\r\r(\d+)\r\r`
Replace: `\r\rpage \1\r\r`

Thanks.
-sam

On 26 Oct 2018, at 10:54, bo wrote:

Here are 2 paragraphs with a page break and it's number, past from a 
PDF



7Esoteric life views satisfy legitimate demands of intellectuality and
ideality. Everybody has to decide for himself. Nobody who knows what
responsibility means will take on him the responsibility for 
prescribing to
others. You can always say: This is my view of the matter. Sooner or 
later
the individual must form his own view, one suited to his understanding 
of

life. Everybody is responsible himself for his own vision of life.
Responsibility means the individual’s settling up with the laws of 
life,
and has consequences in future incarnations. The individual must 
himself
develop his concepts of right, must himself seek his ideals. The wise 
man

refrains from constructing concepts of right for others. Everybody is
somewhere on the gamut of development,

1

and has the conception of right that corresponds to his level.
8The life view of another can be of interest as a synthesis of 
individual

experience. Its value for

others can possibly be that it shows an individual vision of life 
liberated
from paralysing traditional ways of looking at things, and is able to 
give
impulses to other people to form their own attitudes to life. Of 
course,
there is nothing to prevent you from accepting the life view of 
another

person. Most people will probably lack the necessary possibilities or
opportunities of forming their own ones. But this is a temporal 
emergency.
That day will come in some life when the individual is brought face to 
face

with the necessity of making his own view clear to himself.

On Friday, October 26, 2018 at 9:29:50 AM UTC-4, Sam Hathaway wrote:


If you could give us an example input and desire output that would be
helpful.
-sam

On 26 Oct 2018, at 8:45, bo atkinson wrote:


Can anyone show me, (new to code editing),  how to insert the plain
word
“page” before each page number, of a PDF file? The output from
BBEdit can
be plain text.

I have many PDFs from one- same source to  export to a
text-to-speech,
read-to-me software. Text to speech software tends to verbally 
smudge

the
page breaks, disrupting the vocal flow.

I have already solved the needed pause-codes after PDF-periods and
PDF-paragraph breaks. Only inserting the word “page” before each
page-number is currently asked for. BBEdit would preferably 
recognize

page
breaks in contrast to paragraphs which end with numerals.

Respectfully, Bo Atkinson

--
This is the BBEdit Talk public discussion group. If you have a
feature request or need technical support, please email
"sup...@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+un...@googlegroups.com .
To post to this group, send email to bbe...@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 need technical support, 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 need technical support, 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: insert word page next to page #s

2018-10-26 Thread bo
 

Here are 2 paragraphs with a page break and it's number, past from a PDF


7Esoteric life views satisfy legitimate demands of intellectuality and 
ideality. Everybody has to decide for himself. Nobody who knows what 
responsibility means will take on him the responsibility for prescribing to 
others. You can always say: This is my view of the matter. Sooner or later 
the individual must form his own view, one suited to his understanding of 
life. Everybody is responsible himself for his own vision of life. 
Responsibility means the individual’s settling up with the laws of life, 
and has consequences in future incarnations. The individual must himself 
develop his concepts of right, must himself seek his ideals. The wise man 
refrains from constructing concepts of right for others. Everybody is 
somewhere on the gamut of development, 

1 

and has the conception of right that corresponds to his level.
8The life view of another can be of interest as a synthesis of individual 
experience. Its value for 

others can possibly be that it shows an individual vision of life liberated 
from paralysing traditional ways of looking at things, and is able to give 
impulses to other people to form their own attitudes to life. Of course, 
there is nothing to prevent you from accepting the life view of another 
person. Most people will probably lack the necessary possibilities or 
opportunities of forming their own ones. But this is a temporal emergency. 
That day will come in some life when the individual is brought face to face 
with the necessity of making his own view clear to himself. 

On Friday, October 26, 2018 at 9:29:50 AM UTC-4, Sam Hathaway wrote:
>
> If you could give us an example input and desire output that would be 
> helpful. 
> -sam 
>
> On 26 Oct 2018, at 8:45, bo atkinson wrote: 
>
> > Can anyone show me, (new to code editing),  how to insert the plain 
> > word 
> > “page” before each page number, of a PDF file? The output from 
> > BBEdit can 
> > be plain text. 
> > 
> > I have many PDFs from one- same source to  export to a   
> > text-to-speech, 
> > read-to-me software. Text to speech software tends to verbally smudge 
> > the 
> > page breaks, disrupting the vocal flow. 
> > 
> > I have already solved the needed pause-codes after PDF-periods and 
> > PDF-paragraph breaks. Only inserting the word “page” before each 
> > page-number is currently asked for. BBEdit would preferably recognize 
> > page 
> > breaks in contrast to paragraphs which end with numerals. 
> > 
> > Respectfully, Bo Atkinson 
> > 
> > -- 
> > This is the BBEdit Talk public discussion group. If you have a 
> > feature request or need technical support, please email 
> > "sup...@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+un...@googlegroups.com . 
> > To post to this group, send email to bbe...@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 need technical support, 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: insert word page next to page #s

2018-10-26 Thread Sam Hathaway
If you could give us an example input and desire output that would be 
helpful.

-sam

On 26 Oct 2018, at 8:45, bo atkinson wrote:

Can anyone show me, (new to code editing),  how to insert the plain 
word
“page” before each page number, of a PDF file? The output from 
BBEdit can

be plain text.

I have many PDFs from one- same source to  export to a  
text-to-speech,
read-to-me software. Text to speech software tends to verbally smudge 
the

page breaks, disrupting the vocal flow.

I have already solved the needed pause-codes after PDF-periods and
PDF-paragraph breaks. Only inserting the word “page” before each
page-number is currently asked for. BBEdit would preferably recognize 
page

breaks in contrast to paragraphs which end with numerals.

Respectfully, Bo Atkinson

--
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 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 need technical support, 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.


insert word page next to page #s

2018-10-26 Thread bo atkinson
Can anyone show me, (new to code editing),  how to insert the plain word 
“page” before each page number, of a PDF file? The output from BBEdit can 
be plain text.

I have many PDFs from one- same source to  export to a  text-to-speech, 
read-to-me software. Text to speech software tends to verbally smudge the 
page breaks, disrupting the vocal flow. 

I have already solved the needed pause-codes after PDF-periods and 
PDF-paragraph breaks. Only inserting the word “page” before each 
page-number is currently asked for. BBEdit would preferably recognize page 
breaks in contrast to paragraphs which end with numerals.
 
Respectfully, Bo Atkinson

-- 
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 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.