Re: Cannot replace source text using GREP

2020-01-03 Thread Marek Stepanek
Sorry Howard!

I was in a hurry on the way to my work. You have of course capture the numbers 
like follows:

^(\d)\n

Replace with 

\01,

Please read the BBEdit manual of GREP. This are really fundamental questions 
you are asking. 

Have a nice evening


marek



> On 3. Jan 2020, at 16:00, Howard Rosenberg  wrote:
> 
> Hi Marek.
> 
> When I ran your expression in BBEdit I got this result:
> 
> 5
> 
> Howard
> On Jan 3, 2020, 9:40 AM -0500, bbedit@googlegroups.com, wrote:
>> 
>> ^\d\n
> 
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/a3f94f1e-0965-4bb8-b4b5-92f3257a667f%40Spark
>  
> .

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/356AE559-8BF8-4F21-9F66-5205C8831E0E%40podiuminternational.org.


Re: Cannot replace source text using GREP

2020-01-03 Thread Marek Stepanek

Happy New Year 2020!

Search with grep: 

^\d\n

Replace with:

\01,

Hope this helps!




> On 3. Jan 2020, at 05:07, anotherhoward  wrote:
> 
> Here is my input:
> 1
> 2
> 3
> 4
> 5
> 
> Here is my search pattern:
> \d\n
> 
> It finds all the source text.
> 
> Here is how I want my output to appear:
> 1,2,3,4,5
> 
> What replace pattern do I need to convert my input to my output?
> 
> Thanks,
> Howard
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/e88823d3-79c5-4daf-aea6-4ef566285951%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 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/A517F072-3DB5-4791-BA3F-32E0EED9C711%40podiuminternational.org.


Re: not able to install the Command Line Tools (BBEdit version 12.6.6 (412112, 64-bit, sandboxed), macOS Mojave 10.14.6)

2019-08-12 Thread Marek Stepanek


Hi Vlad!

I am not sure, but has your /usr/local the right permissions? It’s only a 
guess! To illustrate: 

ls -l 
drwxr-xr-x@  9 root  wheel   288B Oct 24  2018 usr/
drwxr-xr-x   19 root  wheel   608B Jul 21 17:53 local/

And in /usr/local/ I get: 

drwxrwxr-x6 mstep  admin192 Aug 10 19:14 Caskroom/
drwxrwxr-x  105 mstep  admin   3360 Aug  2 12:39 Cellar/
drwxrwxr-x3 mstep  admin 96 Jul 12 07:18 Frameworks/
drwxrwxr-x   20 mstep  admin640 Jul 12 07:18 Homebrew/
drwxrwxr-x  430 mstep  admin  13760 Aug 11 11:12 bin/
drwxrwxr-x   14 mstep  admin448 Aug  5 15:35 etc/
drwxrwxr-x  176 mstep  admin   5632 Aug  8 10:34 include/
drwxrwxr-x  378 mstep  admin  12096 Aug 10 19:10 lib/
lrwxr-xr-x1 root   wheel 30 Mar 23 10:58 mysql@ -> 
mysql-8.0.15-macos10.14-x86_64
drwxr-xr-x4 root   wheel128 Mar 23 10:58 mysql-8.0.13-macos10.14-x86_64/
drwxr-xr-x   17 root   wheel544 Mar 23 10:59 mysql-8.0.15-macos10.14-x86_64/
drwxrwxr-x  121 mstep  admin   3872 Aug 10 19:10 opt/
drwxrwxr-x   15 mstep  admin480 Aug  8 10:34 sbin/
drwxrwxr-x   39 mstep  admin   1248 Aug  8 10:34 share/
drwxr-xr-x4 root   wheel128 May 11 09:37 texlive/
drwxrwxr-x6 mstep  admin192 May 19 16:14 var/

Has your local folder perhaps an “@“ or “+” restriction (ACR)? I don’t remember 
exactly how to remove it, but if you look into 

man chflags 

you will find a solution. 


Best greetings from rainy Munich


marek



> On 12. Aug 2019, at 17:24, Vlad Ghitulescu  wrote:
> 
> Hello!
> 
> I have installed from scratch Mojave and shortly after BBEdit.
> 
> I was remembered that I didn’t installed the Command Line Tools:
> 
> 
> 
> I tried from within BBEdit but…
> 
> 
> 
> So I opened the Terminal and navigate to /usr/local but there’s no directory 
> „share“ already there and I also don’t have the permission to create it (I am 
> logged in as a normal user):
> 
> 
> 
> I can’t do this not even as admin:
> 
> 
> 
> What do I do wrong?
> 
> Thanks!
> 
> Regards,
> Vlad
> 
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/04CF54EB-5E22-4B8B-8433-3700C3CE05BF%40Ghitulescu.de.
>  17.03.04.png> 2019-08-12 um 17.20.48.png>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/8CA9A814-4A95-4482-8957-2EAF99DAE27B%40podiuminternational.org.


Re: problem with grep replacing selected text

2019-03-04 Thread Marek Stepanek
Hello all!


I did not read all in this thread, but here a little remark: 

Since 15 Years the shortcut of replace in selection: 

ctrl+command+= 

is not working on German keyboard (The = is on German keyboard over the 0 zero 
that means the shift is involved). This feature I am missing, I have to use 
command f to open the search and replace window, to replace in selection :-( 

Also the change in the search dialogue towards the end, or towards the top of 
document I am missing. This was a change long long time ago, which I was 
regretting until today. This pushed me towards MacVim. Only if I have things to 
do by drag and drop I fire up BBEdit …

I have had a conversation about the (German) keyboard issue with 
BBEdit-support; but until today, nobody was caring about it. 


Best greetings


marek


> On 1. Mar 2019, at 17:40, Vlad Ghitulescu  wrote:
> 
> Hey!
> 
> I have an inconsistent behavior when replacing (grep) with the find/replace 
> window active or not.
> 
> Please take a look at this 1 minute long screen-recording:
> 
> https://www.dropbox.com/s/tls9freno1tpf8i/20190301%20BBEdit%20-%20problem%20with%20grep%20replace%20selected.mp4?dl=0
>  
> 
> I want to prepend an asterisk and a space (for Markdown-lists) in a plain 
> .TXT-file that looks like this:
> 
> ListItem 001
> ListItem 002
> ListItem 003
> 
> ListItem 101
> ListItem 102
> ListItem 103
> 
> ListItem 201
> ListItem 202
> ListItem 203
> (I attach the file).
> 
> So the desired text would look like this:
> 
> * ListItem 001
> * ListItem 002
> * ListItem 003
> 
> * ListItem 101
> * ListItem 102
> * ListItem 103
> 
> * ListItem 201
> * ListItem 202
> * ListItem 203
> I select the first block, press CMD-F and have this Find/Replace-options:
> 
> 
> 
> Pressing the button for "Replace All" does the job, my text looks now like 
> this:
> 
> —
> 
> * ListItem 001
> * ListItem 002
> * ListItem 003
> 
> ListItem 101
> ListItem 102
> ListItem 103
> 
> ListItem 201
> ListItem 202
> ListItem 203
> —
> 
> However, after clicking in the TXT-file (the Find/Replace-window remains 
> visible but is not active anymore) pressing CMD - ALT - = postpones the 
> asterisk and the space to all lines and not only to the selected ones… my 
> text looks now like this:
> 
> —
> 
> * * ListItem 001
> * * ListItem 002
> * * ListItem 003
> * 
> * ListItem 101
> * ListItem 102
> * ListItem 103
> * 
> * ListItem 201
> * ListItem 202
> * ListItem 203
> —
> 
> When the Find/Replace-window is again active the replacing functions just 
> like it should even when I don't press the button but use the shortcut CMD - 
> ALT - = instead.
> 
> I don't understand what am I doing wrong.
> 
> Could you please help?
> 
> Thanks!
> 
> Regards,
> Vlad
> 
> 
> -- 
> 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: Tricky regex question

2019-02-02 Thread Marek Stepanek
^\s*([A-Z\dm♭#bdimsu]+\s+)+

Good night folx 


ps: how to put “dim” or “sus" into a character class as a string?


> On 2. Feb 2019, at 19:56, bruce linde  wrote:
> 
> yes, but… what about Eb7#9 or C#7#9 or A9sus?

-- 
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: Tricky regex question

2019-02-02 Thread Marek Stepanek

So try this:

^\s*([A-Z\dm♭#dim]+\s+)+

it’s working on this example:


E   B7   E  A  Am  E  
This is a line of a song
   E
This is a line of a song
  B7  E  E7
This is a line of a song
 A
This is a line of a song
  E
This is a line of a song
 B7
This is a line of a song
  EA Am  E  
This is a line of a song
   A#  EA Am  E  
This is a line of a song
   A♭ Adim  EA Am  E  
This is a line of a song





> On 2. Feb 2019, at 18:45, jgill  wrote:
> 
> I need to identify chord lines and non-chord lines so that I can style them 
> differently on a web page. Remember, I'm not just looking for [A-G] but A7, 
> Am, A#, A♭dim etc
> 
> On Saturday, February 2, 2019 at 5:36:42 PM UTC, Marek wrote:
> Hello jgill!
> 
> 
> You forgot to tell us, what you exactly want to achieve. Do you want to 
> extract the lines with the chords? 
> 
> Try with regex: search with grep case sensitive: 
> 
> \s*([A-Z\dm]+\s+)+
> 
> 
> Best greetings from Munich
> 
> 
> marek
> 
> 
> 
>> On 2. Feb 2019, at 17:59, jgill gmail.com 
>> > wrote:
>> 
>> I've been banging my head all afternoon trying to derive a regex the will 
>> identify lines (of a song) that contains chords.
>> 
>> eg
>> 
>> E   B7   E  A  Am  E  
>> This is a line of a song
>>E
>> This is a line of a song
>>   B7  E  E7
>> This is a line of a song
>>  A
>> This is a line of a song
>>   E
>> This is a line of a song
>>  B7
>> This is a line of a song
>>   EA Am  E  
>> This is a line of a song
>> 
>> There could be spaces before or after the chord names and the only way I can 
>> think to distinguish chords from regular words is that chords are likely to 
>> have more than one space after them - or a newline
>> 
>> I've got as far as [A-G][6|7|9|m|#|♯|b|♭|aug|dim]
>> 
>> but the spaces and newlines have me flumoxed.
>> 
>> Can anyone help?
>> 
>> -- 
>> 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: One-liner to replace multiple spaces between words (only words) with one space isn't working

2019-01-13 Thread Marek Stepanek

I did not know \h = horizontal white space. And it is even working with BBEdit. 
Is it mentioned in the User Manual BBEdit? Suggesting a little correction:

Your search and replace is not doing what Dj was asking for: replace 
+ with  :

> s/\h+/ /g; 

1. Replaces *one*  or  with one space. That’s too much work. 

2. Replaces  one or more with  what was probably not intended. 

So I suggest:

s/+//g;

I am wondering, why you want to put it into a perl-script and not directly in 
search and replace of BBEdit. 

Best greetings to all


marek 


> On 13. Jan 2019, at 09:20, Christopher Stone  
> wrote:
> 
> On 01/12/2019, at 19:32, Dj  > wrote:
>> I'm only trying to change space between words and not carriage returns and 
>> all that. So far I've tried placing this in the scripts folder:
>> 
>> perl -pe 's/ +/ /g'
> 
> 
> Hey Dj,
> 
> The code you have above is the sort of thing that would normally be embedded 
> in a shell script or used directly from the command line.
> 
> Here's a more normal Perl script that would be used as a text-filter in 
> BBEdit, and it does exactly what your code above does.
> 
> * Lines 2-5 are optional depending upon what you're doing, but I'm allowing 
> for UTF8 text requiring that the Perl used be at least v5.010 (which is 
> pretty old by now)
> 
> 
> #!/usr/bin/env perl -sw
> use v5.010;
> use utf8;
> binmode(STDIN, ":utf8");
> binmode(STDOUT, ":utf8"); 
> 
> while (<>) {
>   s/\h+/ /g;
>   print;
> }
> 
> 
> The -p switch in your script above stands in for this while structure, and it 
> provides for the script to die quietly when it runs out of data to process.
> 
> That exact structure looks like this:
> 
> 
> #!/usr/bin/env perl -sw
> 
> while (<>) {
>   # your program goes here
> } continue {
>   print or die "-p destination: $!\n";
> }
> 
> 
> The -e switch in your script above stands for execute, so Perl knows to 
> execute the quoted text.
> 
> You can find all of the command line switches by pasting “perldoc run” into 
> the Terminal and typing Return.
> 
> You can also paste “perldoc run” into a BBEdit Shell Worksheet, make sure the 
> cursor is on that line, and hit Enter.
> 
> This will give you the same text as in the Terminal, but you'll have access 
> to BBEdit's search functions.
> 
> --
> Best Regards,
> Chris
> 
> 
> -- 
> 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: How to get rid of "Dark Mode"

2018-12-14 Thread 'Marek Stepanek' via BBEdit Talk

Thank you Rich! You saved my day :-)


marek

On Friday, 14 December 2018 15:25:10 UTC+1, Rich Siegel wrote:
>
> On 12/14/18 at 5:19 AM, ms...@podiuminternational.org  
> (Marek) wrote: 
>
> >New to Mojave and a new MacBook Pro (much too expensive!) 
> > 
> >How I can rid of this terrible dark mode? Preferences > 
> >Appearance ? I don't find it here! Sorry for this silly 
> >question ... 
>
> By default, BBEdit's appearance tracks the selected color scheme 
> in the "Text Colors" preferences. 
>
> R. 
> -- 
> Rich Siegel Bare Bones Software, Inc. 
> >  <
> http://www.barebones.com/> 
>
> Someday I'll look back on all this and laugh... until they 
> sedate me. 
>
>

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


Changed grep engine after update?

2018-09-23 Thread Marek Stepanek


Hello all!


A strange phenomenon happened:

In my Perl Script the pattern

$_ =~ m!/([\w]+?)

does not matches Umlauts. For example:

"Jürgen".

Was this always like that? Or is there a change somewhere in MacOS
(there was a recent update to 10.13.6)? BBEdit Version is 12.1.5

$_ =~ m!/([\wüäö]+?)

is working. Also

$_ =~ m!/([a-züäö]+?)


Best greetings to all


marek




-- 
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: Encoding question

2018-09-17 Thread Marek Stepanek


Oh, I knew this already! But using more and more Vim I forgot this
procedure over the Menu File > Reopen Using Encoding - Western ISO 1

This was working. Thank you Tom and Herbert


marek



On 17.09.18 01:18, Tom Robinson wrote:
> Hi Marek, the encoding at the bottom of the window changes the document after 
> it’s already been read into memory (using the wrong encoding).
> 
> You want to click Options in the open dialog, or use File > Reopen Using 
> Encoding.
> 
> Cheers
> 
> 
>> On 2018-09-17, at 01:51, Marek Stepanek  
>> wrote:
>>
>>
>> Hello all BBEditors!
>>
>>
>> I thought that we have no encoding problems, since everybody moved to UTF-8.
>>
>> But opening the file:
>>
>> /usr/local/texlive/2018/texmf-dist/doc/latex/koma-script-examples/Kapitel-11/source/scrjuraexample.tex
>>
>> there is crap in the file:
>>
>> ‰ for ä
>> ¸ for ü
>>
>>
>> etc
>>
>> Everybody having installed the full LaTeX with TexLive may reproduce it
>> and open this file.
>>
>> The command "file scrjuraexample.tex" in the shell gives for this file:
>>
>> LaTeX 2e document text, ISO-8859 text
>>
>> BBEdit opens this file automatically with "Western (Mac OS Roman)". So I
>> try to change the encoding to :
>>
>> ISO latin 1
>> Western Windows
>>
>> etc in the window bottom.
>>
>> Nothing works. Any ideas?
>>
>>
>>
>> best greetings
>>
>>
>> marek
> 


-- 
___

the embassy for talented young musicians
   Podium International | Marek Stepanek | ms...@podiuminternational.org
http://www.PodiumInternational.org
___

-- 
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: <https://www.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 post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Encoding question

2018-09-16 Thread Marek Stepanek


Hello all BBEditors!


I thought that we have no encoding problems, since everybody moved to UTF-8.

But opening the file:

/usr/local/texlive/2018/texmf-dist/doc/latex/koma-script-examples/Kapitel-11/source/scrjuraexample.tex

there is crap in the file:

‰ for ä
¸ for ü


etc

Everybody having installed the full LaTeX with TexLive may reproduce it
and open this file.

The command "file scrjuraexample.tex" in the shell gives for this file:

LaTeX 2e document text, ISO-8859 text

BBEdit opens this file automatically with "Western (Mac OS Roman)". So I
try to change the encoding to :

ISO latin 1
Western Windows

etc in the window bottom.

Nothing works. Any ideas?



best greetings


marek

-- 
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: Search for unicode character

2018-07-19 Thread 'Marek Stepanek' via BBEdit Talk

Thank you all for your insight and the answers!

In the BBEdit help, if I am searching for "unicode", there are no results. 


Best greetings 


marek


On Wednesday, 18 July 2018 18:15:01 UTC+2, Maarten Sneep wrote:
>
>
>
> > On 18 Jul 2018, at 17:49, Marek Stepanek  > wrote: 
> > 
> > Thank you Patrick for your detailed answer! Unfortunately I did not get 
> > it. In my memory far away, I thought in BBEdit it is possible to search 
> > directly for a Unicode, something like: \u{0x0308} ??? 
>
> I already gave that answer: \x{0308} 
>
> Maarten 
>
>

-- 
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: <http://www.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 post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Search for unicode character

2018-07-18 Thread Marek Stepanek


Thank you Patrick for your detailed answer! Unfortunately I did not get
it. In my memory far away, I thought in BBEdit it is possible to search
directly for a Unicode, something like: \u{0x0308} ???

I discovered in my text filters an old filter, which I put up long time
ago and I called it "pdf_to_text.pl" If you are running it over the
text, which you copy and pasted from a pdf to your txt file, it replaces
the "wrong" Umlauts with the right ones.

In this script all special characters out of the range of ASCII are
replaced with the real ones (I can't explain it better). I only don't
know whether my email client will not transform it; so probably this
little perl-script will not work any more. In any case; here it was
working, and my special character is away! Uff!

#!/usr/bin/perl

# this filter are looking a bit strange.
# but copying from a pdf file text with
# German Umlauts gives you double? letters
# and not unicode letters. Don't know
# how to explain it more precisely.
# So the letter in the search and replace
# here are not the same.

use warnings;
use strict;


while (<>) {
s/- //g;
s/’/'/g;
s/„/"/g;
s/“/"/g;
s/­ //g;
s/- (?!Euro)//ig;
s/–/-/g;
s/ü/ü/g;
s/Ü/Ü/g;
s/ö/ö/g;
s/Ö/Ö/g;
s/ß/ß/g;
s/ä/ä/g;
s/ç/ç/g;
s/„/„/g;
s/“/“<\/em>/g;
s/è/è/g;
s/é/é/g;
print;
}







On 18.07.2018 15:42, Patrick Woolsey wrote:
> On 7/18/18 at 4:40 AM, ms...@podiuminternational.org (Marek Stepanek)
> wrote:
> 
>> I pasted a text from a open Office into BBEdit TeX file. But the
>> compiling stops with:
>>
>> ! Package inputenc Error: Unicode character ̈ (U+308)
>> (inputenc)    not set up for use with LaTeX.
>>
>> I switched on "show invisibles". I zapped gremlins. But nothing helps.
>> Looking through the help files, nowhere is a hint, how to look for a
>> Unicode character ... But I was pretty sure, this was possible in BBEdit.
>>
> 
> For future reference, if you apply Zap Gremlins with the "Replace with
> code" option, BBEdit will replace all characters within the current
> document that meet the chosen "Search for:" criteria with hex escapes --
> which you can then find by searching and/or visual inspection.
> 
> By way of example, this operation will transform:
> 
> u (U+0075 LATIN SMALL LETTER U) + ̈ (U+0308 COMBINING DIAERESIS)
> 
> into
> 
> u\0x0308
> 
> Alternatively, if you want to identify any character(s) which are
> visible within a document, you need only select it (them) and bring up
> the Character Inspector palette (Window -> Palettes -> Character
> Inspector), as per the attached screenshot.
> 
> Hope this helps. :-)
> 
> 
> Regards,
> 
>  Patrick Woolsey
> ==
> Bare Bones Software, Inc. <http://www.barebones.com/>
> 


-- 
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: <http://www.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 post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Search for unicode character

2018-07-18 Thread Marek Stepanek
On 18.07.2018 12:09, Kjetil Rå Hauge wrote:
> On 18/07/2018, 10:41, "bbedit@googlegroups.com on behalf of Marek Stepanek" 
>  wrote:
> ...  
>> I pasted a text from a open Office into BBEdit TeX file. But the
> >compiling stops with:
> 
> > ! Package inputenc Error: Unicode character ̈ (U+308)
> > (inputenc)not set up for use with LaTeX.
> 
> Check in System Preferences>Keyboard that you have selected "Show 
> keyboard and emoji viewers in menu bar" - you will then have a little flag in 
> the menu bar, and the full character viewer can be found there, hiding under 
> the playful title "Show Emoji and Symbols". When the viewer appears, select 
> "Unicode" at bottom, scroll down to "0300 Combining Diacritical Marks". 
> Bring up the "Find" window in BBEdit and click in it then, then click on 0308 
> "Combining diaeresis", and it will appear in the "Find" window. This should 
> work - I don’t see any reason why it would - er, why it wouldn’t, I mean.
> 
> -- Kjetil Rå Hauge, ILOS, Oslo University
>  
>
> 


Thank you for your prompt and detailed answer! Unfortunately this is not
working. I insert the screen shot of the error code.

I was hoping for a direct solution, like for example U+308 directly in
the find dialogue of BBEdit.


Best greetings from Munich


marek

-- 
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: <http://www.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 post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Search for unicode character

2018-07-18 Thread Marek Stepanek


Hello all!


I pasted a text from a open Office into BBEdit TeX file. But the
compiling stops with:

! Package inputenc Error: Unicode character ̈ (U+308)
(inputenc)not set up for use with LaTeX.

I switched on "show invisibles". I zapped gremlins. But nothing helps.
Looking through the help files, nowhere is a hint, how to look for a
Unicode character ... But I was pretty sure, this was possible in BBEdit.


Thank you for your help!



marek

-- 
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: grep help coordinates

2018-03-05 Thread Marek Stepanek
On 05.03.18 22:49, Steve Wilson wrote:
> Need help trying to figure out how to do a grep search and replace in BBEdit 
> of a couple of coordinates into KML. 
> Unfortunately the order of the lat/long needs to be flipped.
> Here is what it looks like:
> 
> (32.839098817184, -97.303764761793)
> 
> And I need it to look like this:
> 
> -97.303764761793,32.839098817184,0.0
> 
> Thanks for any help
> 


Hello Steve!


I don't know, whether there are some more characters around your data.

If the coordinates are pure one per line, this should work with grep:

search:
^(-?\d\d\.\d{12}),\s*(-?\d\d\.\d{12})\s*$

replace:
\02,\01,0.0


best greetings


marek


-- 
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: BBEdit iCloud LaTeX - How to compile the file?

2017-12-04 Thread Marek Stepanek
On 03.12.2017 21:13, Tom Robinson wrote:

...

> 
> A workaround is to turn on iCloud Drive for Desktop & Documents folders, and 
> store your file there, and you’ll have a standard path :]
> 
> 


Thank you Tom!


I activated iCloud Drive already. From there I am opening the TeX-file.
Probably I did not understand, what you meant with "for Desktop &
Documents" ...

I installed the latex package for BBEdit from github.com
(https://github.com/nathangrigg/Latex.bbpackage), which is unfortunately
not supported any more. But the applescript "Typeset" seems to cope with
the path to a TeX.file on iCloud Drive (mind the line breaks):

-- by Nathan Grigg

on main()
set typeset_lib_file to path_to_contents() & 
"Resources/typeset-lib.scpt"
set typeset_lib to load script POSIX file typeset_lib_file
tell typeset_lib to typeset without synctex and gitinfo
end main


-- Catch and display custom errors; exit silently on cancelled dialogs
try
main()
on error eStr number eNum partial result rList from badObj to exptectedType
if eNum = 5033 then
display dialog eStr buttons {"OK"} with title "Error" default 
button 1
else if eNum = 5088 then
beep
else if eNum is not -128 then
error eStr number eNum partial result rList from badObj to 
exptectedType
end if
end try

on path_to_contents()
--- Returns path to "Contents" folder containing the current script
local delims, split_string
set delims to AppleScript's text item delimiters
set AppleScript's text item delimiters to "/Contents/"
set split_string to text items of POSIX path of (path to me)
set AppleScript's text item delimiters to delims
if length of split_string = 1 then error "This script must remain
inside the Latex BBEdit package because it depends on other scripts in
that package." number 5033
return (item 1 of split_string) & "/Contents/"
end path_to_contents


But the Preview of the script "Open pdf" is not working.

1. My question to this mailing list again: How to typeset
   TeX-files on iCloud in BBEdit? Open the pdf with Preview
   automaticly.

2. How to typeset in Terminal (Path!) the TeX-file from iCloud?
   What is doing this Apple Script with the path to reproduce it
   with the Terminal?

Finally I will stick with MacVim, if you are not suggesting a working
solution for BBEdit.


Best greetings



marek

-- 
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: BBEdit iCloud LaTeX - How to compile the file?

2017-12-01 Thread Marek Stepanek
On 01.12.2017 17:23, Bruce Van Allen wrote:

> 
> In a BBEdit shell worksheet, you can cancel a process with Command-dot
> (dot = period/full stop).
> 
> I'm unfamiliar with the use of tilde ('~') in file paths. Maybe try
> com.apple.CloudDocs in that portion of the path?
> 
> HTH


Thank you Bruce for this hint! Unfortunately your suggestion for the
path to the file on iCloud is not working.

Greetings

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


Filter to reverse order of lines

2017-11-17 Thread Marek Stepanek

Hello all!


I would like to reverse the order of a selected lines with a BBEdit
filter. Best with Perl.

My approach is something like follows:

#!/usr/bin/local/perl

use File::ReadBackwards;
use warnings;
use strict;

tie *BW, 'File::ReadBackwards', (<>) or
   die "can't read selected text $!" ;

   while(  ) {
   print ;
   }


Is there somebody who could help me with this?


Best greetings to all from Munich


marek

-- 
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 edit config files in root folder?

2015-01-19 Thread Marek Stepanek
On 19/01/15 02:33, Miers David wrote:
 congrats…cool green drool and slobber…happy now? lol
 
 I had occasion to chase a similar bird at /private/etc/hosts
 
 terminal gave me nothing…it occurred to me that I’d never installed command 
 line tools, interesting note in the dialog that followed the word helper 
 installed happened along with some other stuff…kind of a match for you maybe
 
 After that everything worked a treat no muss no fuss. Didn’t use sudu…admin 
 password asked and given..business as usual
 
 On Jan 18, 2015, at 10:59 AM, Marek Stepanek ms...@podiuminternational.org 
 wrote:

 I have a new 5K iMac - and expect many jealous congratulations from this
 list ;-)

 The new Yosemite does not allow me to edit the Apache httpd.conf file in
 /etc/apache2/

 I am opening the files in my shell with sudo bbedit /etc/apache2/httpd.conf

 But while saving I get error 20004 and a save window with Install
 Helper. What's that?


 Any ideas?
 



Thank you for your replies!


To open files with Yosemite over the Terminal is possible, but no saving
possible. It's annoying. The permissions are root:staff if I remember
well (I am just now with my laptop). And yes, I checked: the command
line tools are installed.

I think I will ask over support. Thank you again!


marek

-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


How to edit config files in root folder?

2015-01-18 Thread Marek Stepanek

Hello all!


I have a new 5K iMac - and expect many jealous congratulations from this
list ;-)

The new Yosemite does not allow me to edit the Apache httpd.conf file in
/etc/apache2/

I am opening the files in my shell with sudo bbedit /etc/apache2/httpd.conf

But while saving I get error 20004 and a save window with Install
Helper. What's that?


Any ideas?


marek

-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Re: Search for hexcode

2014-12-19 Thread Marek Stepanek


To finish this thread:

in your shell you enter following command:

./replace_emoticon.pl emoticon_file.txt

#!/usr/bin/perl

use strict;
use warnings;
# use utf8;
# use charnames ':full';
use open qw( :encoding(utf-8) :std );

while() {
# foreach (/\x{1f618}/g) {print hurray! And Here Is Your Emoticon!\n};
# This Is Working!!!
# foreach (/\x{1f695}/g) {print hurray! And Here Is Your Emoticon!\n};
# This Is Working!!! This Is For The Taxi

s!\x{1f618}!\\includegraphics[height=15pt]{/Users/mstep/Documents/private_txt/anette/pix/emo01.png}!g;
s/this/that/g;
print $_;
}


I wish all members of this list happy holidays and a fulfilled new year 2015


marek

-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Re: Search for hexcode

2014-12-19 Thread Marek Stepanek

Thank you Charlie and Ronald!

Your knowledge is amazing!


Best greetings from Munich


marek



On 19/12/14 23:29, Charlie Garrison wrote:
 Good morning,
 
 On 19/12/14 at 9:07 PM +0100, Marek Stepanek
 ms...@podiuminternational.org wrote:
 
 To finish this thread:
 
 I should have read ahead...
 
 
 #!/usr/bin/perl

 use strict;
 use warnings;
 # use utf8;
 
 If you keep the 'use utf8' line then you can use literal unicode
 characters in your script.
 
 s!\x{1f618}!\\includegraphics[height=15pt]{/Users/mstep/Documents/
 private_txt/anette/pix/emo01.png}!g;
 
 You can then use the literal (pasted) unicode character in the script.
 It will be easier to maintain, and also potentially easier to write.
 
 
 Charlie
 



-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Search for hexcode

2014-12-17 Thread Marek Stepanek


Hello all!


I need to replace many emoticons in a large xelatex-file. I have had the
intention to make a perl-filter like follows

while(){
s/\x3DD818DE/pix/emo01.jpg/g
etc etc
}

but already the search in BBEdit for the hexcode did not succeeded.

I made a file with two emoticons:

  

Separated by spaces. The hexdump gave:

: 20 00 3D D8 18 DE 20 00 3D D8 95 DE 20 00  .=... .=... .

I searched for the icons first. No success. Then I tried to find the
space. Apparently the space is 20 00. I searched for \x{2000} grep
turned on. Right? No success! There is something obvious I missed.

The code points of the icons I found with Special Characters under the
Menu Edit:

Kiss: U+1F618 (U+D83D U+DE18) UTF-8: F0 9F 98 98
Taxi: U+1F695 (U+D83D U+DE95) UTF-8: F0 9F 9A 95

My Question: how to find with hexcode in general and these icons in
special.

An other question: Am I right, that these emoticons are replaced in
BBEdit with an other font? The default font is set to Lucida Grande in
my BBEdit. But this font does not have these icons. What is going on
behind the scenes? (Probably too complicate this question)


Thank you for any hints


marek

-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Re: Search for hexcode

2014-12-17 Thread Marek Stepanek

Thank you Rich, everything is working now as intended and I have learned
a lot :-)

marek


On 17/12/14 15:51, Rich Siegel wrote:
 On Wednesday, December 17, 2014, Marek Stepanek
 ms...@podiuminternational.org wrote:
 

 Hello all!


 I need to replace many emoticons in a large xelatex-file. I have had the
 intention to make a perl-filter like follows

 while(){
 s/\x3DD818DE/pix/emo01.jpg/g
 etc etc
 }

 but already the search in BBEdit for the hexcode did not succeeded.

 I made a file with two emoticons:

  

 Separated by spaces. The hexdump gave:

 : 20 00 3D D8 18 DE 20 00 3D D8 95 DE 20 00.=... .=... .
 
 When you hex dump an open document from memory, you are seeing the
 actual byte order as it is used by the computer. On Intel machines, this
 is reversed from Unicode, so a space U+0020 will dump as 20 00 as you
 see there.
 
 I searched for the icons first. No success. Then I tried to find the
 space. Apparently the space is 20 00. I searched for \x{2000} grep
 turned on. Right? No success! There is something obvious I missed.
 
 When using escapes in the Find window, use the actual Unicode code
 point. So, search for \x{0020} and you will get your desired result.
 
 The code points of the icons I found with Special Characters under the
 Menu Edit:

 Kiss: U+1F618 (U+D83D U+DE18) UTF-8: F0 9F 98 98
 Taxi: U+1F695 (U+D83D U+DE95) UTF-8: F0 9F 9A 95

 My Question: how to find with hexcode in general and these icons in
 special.
 
 BBEdit stores everything as UTF-16, so you won't be able to find what
 you're searching for by using U+1F618. Instead, try searching for the
 combining code points and see if that works: \x{D83D}\x{DE18}, for example.
 
 R.


-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Re: Search for hexcode

2014-12-17 Thread Marek Stepanek

There is one question again: I am unable to put the hexcode into a
perl-filter (In BBEdit it is working). Could be somebody be so kind to
help me once again?

marek

#!/usr/bin/perl

use strict;
use warnings;

# while() {
#   s!\x{D83D}\x{DE18}!\\includegraphics[height=15pt]{emo01.png}!g
# }

# while() {
#   if (/\x{0020}/) {print hurray!\n}; # this is working! (Searches for
a space!)
# }

while() {
if (/\x{D83D}\x{DE18}/) {print hurray! And here is your emoticon!\n};
# this is not working! (Searches for the emoticon  !)
}



On 17/12/14 22:40, Marek Stepanek wrote:
 
 Thank you Rich, everything is working now as intended and I have learned
 a lot :-)
 
 marek
 
 


-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Help with Perl Filter to increment an element

2014-11-01 Thread Marek Stepanek


Hello all!


I try to transform this LaTeX (MusiXTEX) snipped

from


\NOtes\qu{ABCD}\enotes\barre %   6. Takt
\NOtes\qu{EFGH}\enotes\barre %   7. Takt
\NOtes\ql{IJKL}\enotes\barre %   8. Takt
\NOtes\ql{MNOP}\enotes\barre %   9. Takt
\NOtes\ql{QRST}\enotes\barre %  10. Takt
\setclef1{\treble}\changeclefs%
\NOtes\qu{abcd}\enotes\barre %   1. Takt
\NOtes\qu{efgh}\enotes\barre %   2. Takt
\NOtes\ql{ijkl}\enotes\barre %   3. Takt
\NOtes\ql{mnop}\enotes\barre %   4. Takt
\NOtes\sk\ql{qrst}\enotes\barre %5. Takt

to

\NOtes\qu{ABCD}\enotes\barre %1. Takt
\NOtes\qu{EFGH}\enotes\barre %2. Takt
\NOtes\ql{IJKL}\enotes\barre %3. Takt
\NOtes\ql{MNOP}\enotes\barre %4. Takt
\NOtes\ql{QRST}\enotes\barre %5. Takt
\setclef1{\treble}\changeclefs%
\NOtes\qu{abcd}\enotes\barre %6. Takt
\NOtes\qu{efgh}\enotes\barre %7. Takt
\NOtes\ql{ijkl}\enotes\barre %8. Takt
\NOtes\ql{mnop}\enotes\barre %9. Takt
\NOtes\sk\ql{qrst}\enotes\barre %10. Takt


Could someone be so kind, to help me out? There is a certainly a silly
syntax error in the following perl script (mind the line feeds of my
mail client):


#!/usr/bin/perl

use warnings;
use strict;

my $increment = 0;

while (DATA) {
if (/\s*\d+\.\sTakt/) {
next if /^\s+$/;
++$increment;
s/^([^%]+)%\s*\d+\.\sTakt$/$1 % .  
sprintf(%30.10s,$increment)
. Takt/eg;
}
print;
}

__DATA__

\NOtes\qu{ABCD}\enotes\barre %   6. Takt
\NOtes\qu{EFGH}\enotes\barre %   7. Takt
\NOtes\ql{IJKL}\enotes\barre %   8. Takt
\NOtes\ql{MNOP}\enotes\barre %   9. Takt
\NOtes\ql{QRST}\enotes\barre %  10. Takt
\setclef1{\treble}\changeclefs%
\NOtes\qu{abcd}\enotes\barre %   1. Takt
\NOtes\qu{efgh}\enotes\barre %   2. Takt
\NOtes\ql{ijkl}\enotes\barre %   3. Takt
\NOtes\ql{mnop}\enotes\barre %   4. Takt
\NOtes\sk\ql{qrst}\enotes\barre %5. Takt

-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Re: Help with Perl Filter to increment an element

2014-11-01 Thread Marek Stepanek
On 01/11/14 10:59, Marek Stepanek wrote:
 
 
 Hello all!
 
 
 I try to transform this LaTeX (MusiXTEX) snipped ...

Sorry! I found it: a point was missing:

... sprintf(%30.10s,$increment) -.- . Takt/eg;

But how to align  the last 10. Takt with sprintf()?

But I will certainly find out myself very soon.


Happy Halloween to all


marek

#!/usr/bin/perl

use warnings;
use strict;

my $increment = 0;

while (DATA) {
if (/\s*\d+\.\sTakt/) {
next if /^\s+$/;
# chomp;
++$increment;
# $increment=sprintf(%40.10s,$increment);
s/^([^%]+)%\s*\d+\.\sTakt$/$1 % .  
sprintf(%30.10s,$increment) .
. Takt/eg;
}
print;
}

__DATA__

\NOtes\qu{ABCD}\enotes\barre %   6. Takt
\NOtes\qu{EFGH}\enotes\barre %   7. Takt
\NOtes\ql{IJKL}\enotes\barre %   8. Takt
\NOtes\ql{MNOP}\enotes\barre %   9. Takt
\NOtes\ql{QRST}\enotes\barre %  10. Takt
\setclef1{\treble}\changeclefs%
\NOtes\qu{abcd}\enotes\barre %   1. Takt
\NOtes\qu{efgh}\enotes\barre %   2. Takt
\NOtes\ql{ijkl}\enotes\barre %   3. Takt
\NOtes\ql{mnop}\enotes\barre %   4. Takt
\NOtes\sk\ql{qrst}\enotes\barre %5. Takt

-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Re: Help with Perl Filter to increment an element

2014-11-01 Thread Marek Stepanek
On 02/11/14 02:03, Charlie Garrison wrote:
 Good morning,
 
 On 1/11/14 at 12:49 PM +0100, Marek Stepanek
 ms...@podiuminternational.org wrote:
 
 But how to align  the last 10. Takt with sprintf()?
 
 I don't recall specifics, but I'm pretty sure dash character will right
 align, so something like this:
 
 sprintf(%-30.10s,$increment)
 
 I doubt that is actually correct, maybe dash needs to go before the 's'.
 Anyway, there is some way to right align the string using sprintf, check
 perldoc.
 
 
 Charlie
 

Thank you Charlie!

I found meanwhile following solution. Probably too complicate approach,
but working nicely:

#!/usr/bin/perl

use warnings;
use strict;

my $increment = 0;

while (DATA) {
if (/\s*\d+\.\sTakt/) {
next if /^\s+$/;
++$increment;
s/^([^%]+)(%)\s*\d+\.\sTakt$/sprintf(%-33s %s %20s .
Takt,$1,$2,$increment)/eg; 
}
print;
}

__DATA__

\NOtes\qu{ABCD}\enotes\barre %   6. Takt
\NOtes\qu{EFGH}\enotes\barre %   7. Takt
\NOtes\ql{IJKL}\enotes\barre %   8. Takt
\NOtes\ql{MNOP}\enotes\barre %   9. Takt
\NOtes\ql{QRST}\enotes\barre %  10. Takt
\setclef1{\treble}\changeclefs%
\NOtes\qu{abcd}\enotes\barre %   1. Takt
\NOtes\qu{efgh}\enotes\barre %   2. Takt
\NOtes\ql{ijkl}\enotes\barre %   3. Takt
\NOtes\ql{mnop}\enotes\barre %   4. Takt
\NOtes\sk\ql{qrst}\enotes\barre %5. Takt




-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Where is gone the free half page on bottom?

2014-05-27 Thread Marek Stepanek

Hello all!


I am missing one preference, which I remember I used some years ago:
display a half page on the bottom (without line feeds). Is it a hidden
preference now? Which keyword I should grep doing:

defaults read com.barebones.bbedit | grep -i bottom

?

bottom gives nothing - window many things, but nothing similar to
what I am looking for.

Thank you for your help


marek






-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Re: Editing httpd.conf file

2014-04-07 Thread Marek Stepanek

This has nothing to do with BBEdit, and probably nothing with your MAMP
installation. You have to edit the
/Applications/MAMP/conf/apache/httpd.conf file.

sudo apachectl -k restart

is restarting your server /usr/sbin/httpd not the MAMP server.


Greetings from Shanghai


marek


Starts the Apple server

On 07/04/14 21:18, François Schiettecatte wrote:
 What does this have to do with BBEdit?
 
 François
 
 On Apr 7, 2014, at 1:43 AM, David Blomstrom david.blomst...@gmail.com wrote:
 
 I need to edit a httpd.conf file that's apparently protected by some kind of 
 mysterious force field. I can open it, edit it and save it with a variety of 
 programs, but the changes vanish every time I restart the server. When I 
 click Get Info, it says I have Read  Write privileges. I changed it so that 
 EVERYBODY has Read  Write privileges.

 Someone suggested I restart the server by typing sudo apachectl -k restart 
 into Terminal. So I did, and I get the following error:
  
 /usr/sbin/apachectl: line 90: 17349 Bus error: 10   $HTTPD $ARGV

 I also copied the file onto my desktop, modified and saved it, then put it 
 back in its original folder. When I restarted my server, the changes 
 disappeared.

 Does anyone have any ideas? I'm using MAMP Pro on a MacBook Pro running OS X 
 Lion.

 Thanks!

 -- 
 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: http://www.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 post to this group, send email to bbedit@googlegroups.com.
 




-- 
___

the embassy for talented young musicians
   Podium International | Marek Stepanek | ms...@podiuminternational.org
http://www.PodiumInternational.org
___

-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


BBEdit request

2014-01-02 Thread Marek Stepanek

Hello all from BBEdit User Group!


Happy New year 2014 first!

This is a little bit off-topic:

Every new year I am cleaning up my Thunderbird email accounts and every
year I have the same problem cleaning up the BBEdit User Group. I would
kindly ask the group administrator, to put in front of each Thread
something like

[BBEdit Group]

as it is the use in other mailing lists too. So that a click on the
subject would make it easier to have all postings of the BBEdit Group
all together.

offtopci
Perhaps somebody could send me offline (mstep at podiuminternational dot
org) a tip, how to trash a mailing list like the BBEdit Group in
Thunderbird. I only found the following method: click on each thread,
and remove it. Or: how to archive mails in Thunderbird? I find it
cumbersome ... I am cleaning up everything and than copying the contents
from ~/Library/Thunderbird to a backup-folder in my ~/Documents
... Only problem with it: I cannot open it with Thunderbird any more. I
would like to have the possibility to start it with ALT and choose the
root-folder to open as in iPhoto or iTunes.
/offtopic


Best wishes to everybody - happiness curiosity inspiration



marek


-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Re: BBEdit request

2014-01-02 Thread Marek Stepanek

Thanks for the replies!


Of course, I can filter in Thunderbird for bbedit@googlegroups.com
triggering 2729 messages, with 10 messages per page. But I don't find
any means to delete them all together ... Sorry this is really off-topic
now.

All other mailing-lists I am subscribed too have something like:

[XeTeX]

in every subject line, which is a big help ...



marek





On 02/01/14 18:30, Fritz Anderson wrote:
 On 2 Jan 2014, at 10:30 AM, Marek Stepanek ms...@podiuminternational.org 
 wrote:
 
 Every new year I am cleaning up my Thunderbird email accounts and every
 year I have the same problem cleaning up the BBEdit User Group. I would
 kindly ask the group administrator, to put in front of each Thread
 something like

  [BBEdit Group]
 
 I'm glad that none of the dozen mailing lists I subscribe to do this, because 
 message lists with subject lines that are identical at first glance are hard 
 to use. People seem to manage without them.
 
 Every mail client I've seen this century can sort mail with a To: header of 
 bbedit@googlegroups.com into its own mailbox. Many mail servers will do it 
 for you on the server end. Clients can do cross-mailbox searches and hand you 
 a consolidated list. If the messages are all in one mailbox with others, you 
 can sort the header list on the To: field. Worse comes to worst, you can 
 write a script that edits the mailbox files for you.
 
 I'd be stunned to learn that none of these options are available to you. It's 
 been minimal functionality for years (I could do something at least 
 rudimentary in Eudora around 1992), and doing it on your end permits a better 
 experience for everyone else.
 
 I'd like to be constructive, but it's hard without understanding the 
 constraints you are laboring under.
 
   — F
 

-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Re: BBEdit request

2014-01-02 Thread Marek Stepanek

Thank you Chris!


This was really very helpful. Sorry for this noise to the group.



marek


On 03/01/14 02:17, Christopher Stone wrote:
 On Jan 02, 2014, at 13:35, Marek Stepanek ms...@podiuminternational.org
 mailto:ms...@podiuminternational.org wrote:
 Of course, I can filter in Thunderbird for bbedit@googlegroups.com
 mailto:bbedit@googlegroups.com triggering 2729 messages, with
 10 messages per page. But I don't find any means to delete them all
 together ... Sorry this is really off-topic now.
 __
 
 Hey Marek,
 
 In Thunderbird: Edit--Find--Search_Messages
 
 Or
 
 Cmd-Shift-F
 
 Choose 'Customize' in the search-criteria-list and add 'List-ID'.
 
 You can then search for messages where the List-ID contains
 /bbedit.googlegroups.com http://bbedit.googlegroups.com/, and delete
 (or otherwise process) them en masse.
 
 --
 Best Regards,
 Chris
 
 -- 
 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: http://www.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 post to this group, send email to bbedit@googlegroups.com.



-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.


Filter for Mail 7-Bit ASCII

2013-07-16 Thread Marek Stepanek


Hello all!


I have saved some files out of my Thunderbird in .eml format. They were
PGP translated but in the body are all these =20 =DE ... means '=' +
Hexcode characters.

I would like to make an Perl-Filter replacing all these letters. I
installed some Perl-Modules like MIME::Tools. But this looks really
complicate. Does somebody has already made up a filter?


Best greetings from Munich


marek

-- 
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: http://www.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 post to this group, send email to bbedit@googlegroups.com.




Re: Encoding question 'GREEK (DOS)'

2013-03-06 Thread Marek Stepanek
On 06.03.2013 1:46 PM, Aris Karatarakis wrote:
 I've been trying to convert some legacy sgml files and the only options
 that displays the text correctly is 'Greek(DOS)' 
 
 
 which  specific code page corresponds to the File  Reopen Using
 Encoding  Greek (DOS) menu item used in BBEdit, 
 is it one of the endoding listed as Greek in the following
 page: http://www-01.ibm.com/software/globalization/cp/cp_cpgid.html
 
 
 
 
 Thank you
 


Hello Aris!


I am not a Perl guru, but try with the module encoding something like
follows:

###

#!/usr/bin/perl

use warnings;
use strict;

use encoding;

my $greek_file = /path/to/original/greek/file.txt;
my $greek_file_transformed = /path/to/greek/tr_file.txt;

open( INPUT,  :raw, $greek_file )
  || die Can't open  $infile for reading: $!;
open( OUTPUT,  :raw, $greek_file_transformed )
  || die Can't open  $output for writing: $!;
while (INPUT) {
from_to( $_, cp737, utf-8, 1 );
print OUTPUT;
}
close(INPUT)  || die can't close $greek_file: $!;
close(OUTPUT) || die can't close $greek_file_transformed: $!;




Unfortunately I cannot test it, because I have no file in (old) Greek
encoding (Codepage 737). But something like that should work ...


best greetings from Munich



marek



-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Replace character in selection

2013-02-08 Thread Marek Stepanek
On 08.02.2013 7:37 AM, t...@luo.ma wrote:
 
 
 On Feb 7, 2013, at 9:38 PM, Zephyr Mays zephyr.m...@gmail.com wrote:
 
 Apologies for the newbie question; I'm just discovering the power of BBEdit.

 I'd like to change all instances of a character in a selection without 
 invoking the find/replace dialog (in this case the _ character).

 I hope to select/highlight this: These_Underscores_Should_Be_Spaces

 Hit a keyboard shortcut and have this: These Underscores Should Be Spaces

 Thanks in advance for any suggestions; I don't even know where to start.

 
 If you made a text filter using sed it would be as simple as:
 
  sed 's#_# #g'
 
 I'm on my iPad at the moment so I can't check out exactly how it's done but I 
 think it would be something like 
 
  #!/bin/sh
 
  cat $@ | sed 's#_# #g'
 
 
 Or perhaps the cat should be an echo. Anyway you get the idea hopefully.
 
 TjL 
 


In former times we were used to do this like follows: highlight the
space hit Apple ALT + E (now the space is in the replace of the find)
then highlight what you want to replace - in your case the _ and Apple +
E , and now highlight the part, where you want to search and replace and
then hit Apple Alt + =

This is not working any more, because BBEdit is replace all occurrences
of the _ :-( BareBones decided one day, to remove some features from the
Find Dialog. Nobody understood why and I am regretting these features
until today ...


marek


-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Replace character in selection

2013-02-08 Thread Marek Stepanek
On 08.02.2013 5:27 PM, Patrick Woolsey wrote:
 At 10:24 +0100 02/08/2013, Marek Stepanek wrote:
 [...]
 In former times we were used to do this like follows: highlight the
 space hit Apple ALT + E (now the space is in the replace of the find)
 then highlight what you want to replace - in your case the _ and Apple +
 E , and now highlight the part, where you want to search and replace and
 then hit Apple Alt + =

 This is not working any more, because BBEdit is replace all occurrences
 of the _ :-(  [...]
 
 
 With my apologies for being contrary :-), for the record, that sequence of
 actions does *not* work as described in any version of BBEdit.
 
 
 [PS: It was however -- and still is -- possible to perform this operation
 from the keyboard only, by working through via the Find window (or Find
 dialog in old versions).]
 
 
 Regards,
 
  Patrick Woolsey
 ==
 Bare Bones Software, Inc. http://www.barebones.com/
 



My apologies too: I forgot to mention: you have had to check the radio
button for selection only first. This was sticky and you could
search and replace outside of the find dialogue: the command Apple Alt +
= was applying to the selection only. Short again: 1. Select the
characters to find 2. Apple + E 3. Select the characters of replace 4.
Apple Alt + E 5. Select the scope for change 6. Apple Alt =

This was working, you don't remember? I used it all the time. Since the
time you removed the old search and replace dialogue I am using BBEdit
not very often any more :-(

How to convince you to reprogram the old search and replace dialogue?
Send a box of Munich beer to Bare Bones?



marek



-- 
-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.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.
For more options, visit https://groups.google.com/groups/opt_out.




Extend selection with search

2011-11-18 Thread Marek Stepanek



Hello all!


Once upon a time there was a feature in the search window extend 
selection with search backwards or the other direction.


I have a long file with email sources. The attached files encoded with 
base64 are difficult to strip out. I have to scroll a long while to get 
to the end of these base64 blocks.


Is there any means to look for the next \r\r, extending the selection?


marek

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Use worksheet with LaTeX

2011-10-07 Thread Marek Stepanek




Hello all!


I am wondering, how to use a worksheet in BBEdit. I never used a 
worksheet and probably I misunderstood it. Could somebody help me to use 
it with LaTeX?


When using BBEdit for LaTeX, I am switching to the Terminal, to do the 
following commands:


pdflatex file
open file.pdf

and some others.

This is pretty fast, using the history (arrow key up). I am wondering, 
whether I could use a worksheet, which I save in the same folder, as my 
file.tex with all the commands I need. Would convenient, if only the 
switching to an other window would still exist in BBEdit: CMD+1, CMD+2 
etc this was really handy in old BBEdit times.


Only problem: the commands I need, are apparently unknown to my worksheet.

pdflatex file.tex
This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010)
 restricted \write18 enabled.
entering extended mode
! I can't find file `file.tex'.
* file.tex

(Press Enter to retry, or Control-D to exit)
Please type another input file name:

Because the command pdflatex command is unknown to the worksheet, I 
tried to export the PATH, with following commands, which are all not 
working (is a worksheet using bash dialect or tcsh?):


export PATH=${PATH}:/usr/local/texlive/2011/bin/
set PATH=($PATH /usr/local/texlive/2011/bin/)
setenv PATH /usr/local/texlive/2011/bin/


Any help? Thank you!


marek


--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Use worksheet with LaTeX

2011-10-07 Thread Marek Stepanek



Thank you for the quick answers. Herbert, Maarten you where right. It 
was pretty clear, that my worksheet was starting in my ~/ home folder. I 
changed the directory with cd to the folder, where my file.tex and 
file.worksheet are saved. And now it is compiling as it is intended. But 
you are right: the output is written to the worksheet and I have to make 
a CMD + Z and CMD + S to get rid of it. Is it like that it is intended 
to work?


Strange: the worksheet is staying now in the starting folder, also after 
a restart of BBEdit. Will it stay here also after a new start of the 
computer?


No I will stay with vim and my second terminal window to run my commands.

But I will look into the suggested ShellScripts which Maarten suggested.


Thank you once again



marek


--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Repeating a Grep Search Until It Fails

2011-09-24 Thread Marek Stepanek

On 05.01.2011 10:03 AM, Rick Gordon wrote:

How can I set up a grep search that will repeat looping through the document 
until all instances have been processed?

For instance, say I've set up markers (« and ») around target source strings, 
and want to process thos strings to remove any characters that are not ASCII, 
numeric, space, or hyphen. Something like:

FIND:
(?=«)(.*?)[^- A-Za-z0-9«»]+?(.*?)(?=»)

CHANGE TO:
\1\2

How can I keep it looping until no more instances are found?




I don't like the find and replace dialogue any more, which was changed a 
long while ago. First go on top of your open file (this is tricky and 
annoying, because we have had once a button: search backwards etc I 
never understood, why BareBones removed this). Enter your search 
patterns, enable grep, and click on replace  find.



marek


--
___

the embassy for talented young musicians
   Podium International | Marek Stepanek | ms...@podiuminternational.org
http://www.PodiumInternational.org
___

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Automatic TeX quotes?

2011-09-10 Thread Marek Stepanek

On 05.01.2011 12:57 PM, Andrew J wrote:

Hi,

I generate and edit quite a few LaTeX documents. Like many people, I am
considering the move over from TextMate to BBEdit, which has excellent
LaTeX support.

I have been very happy with Maarten Sneep's compilation scripts
http://msneep.home.xs4all.nl/latex/, but there is one glaring omission
in LaTeX support for BBEdit: LaTeX-style smart quotes: *``* and *''*
instead of ** or*“ *and*”* and similar for single quotes. (Yes, I am
aware that most modern TeX engines can in fact deal with unicode
quotes.) Is there any way to generate the LaTeX-style quotes
automatically (i.e., by pressing the standard ascii quotes and having it
auto-sense the correct insertion, in exactly the same way as the
smart/typographer's quote feature)? This is something I've become
completely used to after more than a decade of emacs and TextMate

While I'm here: any other LaTeX tips?

Andrew



Hello Andrew!


I have for this purpose a little filter, which you could also integrate 
into LateXTidy: http://bfc.sfsu.edu/cgi-bin/hsu.pl?LaTeX_Tidy


#!/usr/bin/perl -np

s/([^`]+)/``$1''/g;


If you want to surround a selection with LateX Quotes, here another filter:

#!/usr/bin/perl -np

# replaces the selected text with German Gaensefuss

s/([\w\s]+)/``$1''/g;


These snippets you save into your filter folder: Library/Application 
Support/BBEdit/Unix Support/Unix Filters/LaTeX



best greetings


marek

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Save question in Lion

2011-08-16 Thread Marek Stepanek


Hello all!


(I little bit off-topic!)

I just stumbled over a little problem, saving the ingenious 
paragraph-filter of John Delacour:


Being a two weeks user of Lion, and user of shell and vim, I did not 
realized, that the normal user is not able to save files into ~/Library 
any more ... What is this? How are we supposed to do it? Apple is 
putting us more and more under tutelage.


(I moved the filter from my home folder to the filter folder of BBEdit 
with my tcsh-Shell. Is this the solution, we have to use now?)




Best greetings from Munich


marek

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Save question in Lion

2011-08-16 Thread Marek Stepanek



Thank you all for these precious tips! I am loosing contact to my MacOS, 
being only in my shell ...



Best greetings to all


marek


--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Adding text to end of multiple files

2011-08-02 Thread Marek Stepanek

On 08.02.2011 7:14 AM, Charlie Garrison wrote:

Good afternoon,

I need to add text to the end of a bunch of files from a couple of
directories. It sounds easy but I'm having trouble finding the right
method. The tricky part is the text needs to include the file name.

That's easy enough to do with clippings, but I can't see a way to apply
a clipping to multiple files. And I can do it with a text filter and
apply to multiple files using a text factory, but the text filter
replaces all text rather than appending to it.

I know I'm missing an obvious solution but I can't see it. Can someone
point me in the right direction?

Thanks,
Charlie




Charlie, this would be an easy task for perl. I only need to know the 
some more informations about the structure of the files added to the 
other files.


Are the files to be added in one folder? Are the files, which need to be 
updated in one folder?



greetings marek

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Regex Find

2011-01-19 Thread Marek Stepanek
On 18.01.2011 22:02, Ronald J Kimball wrote:
 On Tue, Jan 18, 2011 at 01:29:50PM -0600, Christopher Stone wrote:
 Hey Folks,

 I've been looking at positive and negative assertions until my head is 
 spinning.  :)

 What I want to do is find the entirety of line 1 but *not* line 2:

 ./Address Book.app
 ./Address Book.app/Contents/CodeResources.app

 So I want to find a line that ends with .app but it cannot contain .app 
 except at the end.

 
 Here's the approach I usually take for this kind of task:
 
 ^(?(?:(?!\.app).)*)\.app$
 
 (?:(?!\.app).)* matches a substring that doesn't contain .app.  It does
 this by checking whether the next part of the string is .app; if it's
 not, it matches one character, and repeats.
 
 (?...) prevents the regex from backtracking into its subexpression once it
 matches.  We know that if the regex doesn't get to the end of the string,
 backtracking isn't going to help.
 
 
 But I also thought of a simpler approach in this case:
 
 ^(?!.*\.app.*\.app).*\.app$
 
 That one uses a negative lookahead to make sure the string doesn't contain
 .app twice, and then matches if it contains .app at the end of the string.
 
 Ronald
 


Hello all!


Did I oversaw something? This looks little bit like an overkill. Would
it not be sufficient, to search for an and of line with grep:

\./Address Book\.app$

Or if it is not at the end of line, probable with a word boundary:

\./Address Book\.app\b


Best greetings from Munich


marek

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Regex Find

2011-01-19 Thread Marek Stepanek
On 19.01.2011 14:40, Simdude wrote:
 You can't assume you're searching for Address Book.app. If you don't
 know what can be before the .app, the search has to be a little more
 clever.
 



Sorry I misunderstood the original posting.

The answer of Ronald is as ever ingenious.


Greetings marek

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Help to set up a filter!

2011-01-13 Thread Marek Stepanek
On 12.01.2011 23:15, Doug McNutt wrote:

 
 The $ may be referring to the last match as it occurs in a previous loop 
 operation instead of what you think.
 
 But why do you need the loop at all?  The g flag will repeat each substitute 
 over the whole text if the target is $_ instead of  $paragraf. In the loop 
 you probably don't want the g's at all.
 
 $/ = undef;
 $paragraf = ;
 $paragraf =~ s,/p,$p class=links_normal,g;
 $paragraf =~ s,\n\np$,/pp,g;
 $paragraf =~ s,\n,br,g;
 $paragraf =~ s!\s{2,}!!g;
 print $paragraf;
 
 I may well be missing something like being sure not to replace accidental 
 matches. Aren't those commas dangerous? You can use anything as the separator 
 but I prefer the pipe symbol when trying to avoid /\/ teepees.  You may also 
 need a ///s flag to allow matching of return characters. And come to think of 
 it are they \n or might they be \r in BBEdit tradition?
 



Hello Doug!



Thank you for your reply. Whether I did not understand your suggestion,
or you did not understand my problem :-)

The problem was iterating over many naked (with out any html-tags)
text in a large text file and tag these found occurrences, and replace
the line breaks with br. Meanwhile I found the solution, but I don't
know, why this is working with a while-loop, and not with a
foreach-loop. Since I am looking into Perl - this is now about 10 years
- I have had always this comprehension problem between while and foreach
constructs. Also if this is not on topic for this list, could somebody
explain me this difference?

When using the debugger with the following script and the following
example, it is working. Used as a filter in BBEdit, the last paragraph
is not tagged. Strange! That means, my filter is probably not right ...

#!/usr/bin/perl

use strict;
use warnings;

$/ = undef;
$_ = ;


while ($_ =~ m,(/p\s+[^]+?p),g) {
my $paragraf = $1;
my $orig  = $1;
$paragraf =~ s,(/p)\n?,$1p class=links_normal,;
$paragraf =~ s,\n\np$,/pp,;
$paragraf =~ s,\n,br\n,g;
$paragraf =~ s!\s{2,}!!g;
$paragraf =~ s!!\n!g;
s/$orig/$paragraf/;
}


print;


***test_file:

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;html
head
titleDeath at a Funeral Script/title
meta name=description content=Death at a Funeral script at the
Internet Movie Script Database.
meta name=keywords content=Death at a Funeral script, Death at a
Funeral movie script, Death at a Funeral film script
meta http-equiv=content-type content=text/html; charset=utf-8
meta http-equiv=Content-Language content=EN
style type=text/css media=all
body {
font-family: monospace;
}
h1
{
margin: 2em;
font-size: 1.4em;
text-align: center;
}
p.mitte{
font-size: 1em;
text-align: center;
}
p.mitte_bold
{
font-size: 1em;
margin-left: 15em;
font-weight: bold;
}
p.mitte_normal
{
font-size: 1em;
margin-left: 15em;
font-weight: normal;
}
p.rechts
{
font-size: 1em;
text-align: right;
font-weight: bold;
}
p.links_bold
{
font-size: 1em;
margin: 0 0 0 6em;
font-weight: bold;
}
p.links_normal
{
font-size: 1em;
margin: 0em 0em 4em 6em;
font-weight: normal;
}
p.new_page {
margin-bottom: 6em;
}

/style
/head

body

table width=100%
tr
td width=10%
/td
td width=200
h1DEATH AT A FUNERAL/h1
p class=mitte
Written by
/p
p class=mitte
 Chris Rock amp; Aeysha Carr
/p
p class=mitte
Based on Death at a Funeral by Dean Craig
/p
p class=rechts
02/6/09
/p
p class=mitte_bold
FADE IN:
/p
p class=mitte_normal
MUSIC CUE: DON'T WORRY, BE HAPPY by Bobby McFerrin plays as we
/p
p class=mitte_bold
BEGIN CREDITS
/p
p class=links_boldINT. FUNERAL HOME - DAY
/p
  We pan across a room filled with caskets.

p class=links_boldEXT. CHURCH - DAY
/p
  People somberly walk into a church.

p class=links_boldEXT. FUNERAL HOME - DAY
/p
  We see the signs outside of various funeral homes.

p class=links_boldEXT. CEMETERY - DAY
/p
  We close in on a HEADSTONE that reads: DEATH AT A FUNERAL.

p class=links_boldEXT. CHURCH - DAY
/p
  ASIAN PALL BEARERS carry a coffin into a church.

p class=links_boldEXT. CEMETERY - DAY
/p
  We push in on another headstone that reads: Starring Chris
  Rock. As we push through the cemetery, we see various co-
  stars' names chiseled on headstones.
  We see a fleet of hearses driving through a cemetery.

p class=links_boldINT. FLORIST - DAY
/p
  We see a FLORIST making a funeral arrangement.

p class=links_boldEXT. CEMETERY - DAY
/p
  CLOSE UP of another headstone that has the director's name
  chiseled on it.

p class=mitte_boldEND CREDITS
/p
p class=links_boldINT. LIVING ROOM - DAY
/p
  MUSIC CUE: The music fades out.
  TIGHT SHOT on AARON (CHRIS ROCK) thirties, dressed in a black
  

Help to set up a filter!

2011-01-12 Thread Marek Stepanek


Hello all!


I want to clean up a film script in a bad html shape. I have replaced
nearly every thing, which has been formatted by a pre /pre, many
white spaces and line breaks. Rest again the many actors texts which are
hanging between /p and p tags.

To give an example here the original:
...

/p
  Aaron is laying on the couch, looking drained. Ryan comes down
  the stairs. It looks like he's had some time to recover. He
  walks over and takes a seat.

p class=mitte_boldAARON
/p  How's Mom?

p class=mitte_boldRYAN
/p  She's resting.
  A beat.

p class=mitte_bold

...
Which has to become something like:
***

/p
p class=links_normal
  Aaron is laying on the couch, looking drained. Ryan comes down
  the stairs. It looks like he's had some time to recover. He
  walks over and takes a seat.
/p
p class=mitte_boldAARON
/p  How's Mom?

p class=mitte_boldRYAN
/p

p class=links_normalShe's resting.
  A beat.
/p
p class=mitte_bold

***

The format between the tags I don't mind. At the end BBEdit will care
about it.

I have set up a perl filter, but the problem is, that this filter is not
iterating over the many occurrences of /p\s+[^]+?p

Could somebody help me out?
Thank you in advance! marek


#!/usr/bin/perl


use strict;
use warnings;

$/ = undef;
$_ = ;


foreach ($_ =~ m,(/p\s+[^]+?p),g) {
my $paragraf = $1;
$paragraf =~ s,/p,$p class=links_normal,;
$paragraf =~ s,\n\np$,/pp,g;
$paragraf =~ s,\n,br,g;
$paragraf =~ s!\s{2,}!!g;
print $paragraf;
$paragraf = ();
}

print;






-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: A useful missing BBEdit's command

2010-12-15 Thread Marek Stepanek
On 15.12.2010 14:00, Mike wrote:
 I've been waiting for this feature for over 14 years.
 


Me too, since I started to work with BBEdit. Would be really neat to
have this command with a short cut.


marek

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Help using grep

2010-11-22 Thread Marek Stepanek
On 22.11.2010 11:24, Rene wrote:
 Works like a charm. Thanks, Roland!
 

But seems to me a bit cumbersome. Here a Perl script, which is printing
out the wished result to your shell in one run:


***
First File, on Desktop: example.pl
***

#!/usr/bin/perl

use strict;
use warnings;

my $file_name = example.txt;
my $folder =
  $ENV{HOME}/Desktop;
open IN, $folder/$file_name or die Error! $!\n;;

while (IN) {

if (/(.+?)(\d+)\.tif\n/i) {
my $tif_name = $2;
$tif_name=~tr/1234567890/ABCDEFGHIJ/;
print $1$tif_name.tif\n;
next;
}
print;
}

***
Second File, on Desktop: example.txt
***

001   V C00:02:19:18 00:02:25:07 00:02:19:18
00:02:25:07
* FROM CLIP NAME:  1234.tif
* FROM CLIP IS A STILL


001   V C00:02:19:18 00:02:25:07 00:02:19:18
00:02:25:07
* FROM CLIP NAME:  3456.tif
* FROM CLIP IS A STILL


001   V C00:02:19:18 00:02:25:07 00:02:19:18
00:02:25:07
* FROM CLIP NAME:  7890.tif
* FROM CLIP IS A STILL


001   V C00:02:19:18 00:02:25:07 00:02:19:18
00:02:25:07
* FROM CLIP NAME:  3657.tif
* FROM CLIP IS A STILL


001   V C00:02:19:18 00:02:25:07 00:02:19:18
00:02:25:07
* FROM CLIP NAME:  5860.tif
* FROM CLIP IS A STILL

-- 
___

the embassy for talented young musicians
   Podium International | Marek Stepanek | ms...@podiuminternational.org
http://www.PodiumInternational.org
___

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
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: http://www.twitter.com/bbedit


Re: Completion: Use a specific (natural language) dictionary?

2010-08-10 Thread Marek Stepanek
On 10.08.2010 08:43, David Winter wrote:
 Under Text Completion, the BBEdit manual says :
 
 Completions are derived from a variety of sources, including (in no
 particular order) [...] dictionary words provided by the system
 spelling service.
 
 I'm running OS X in English. However, I need/want autocompletion to
 show words from the German dictionary.
 
 Is this possible? How?
 
 Thanks!
 


Hello David!


This is simple: change the language with the window Show Spelling
Panel (Shift + Comm + ; - this short cut is not working on my German
keyboard, why?) to German, and the auto-completion is changed to
German too ...


Best greetings from Munich


marek

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email supp...@barebones.com rather than posting to the group.


Re: Am trying to extract all images in an HTML file and put them into another file

2010-07-11 Thread Marek Stepanek

On 02.07.2010 23:02, Jonah Lee Walker wrote:

So I want to either write an applescript to automate a search for
multiple files, or a search expression so that I can extract
everything between theimg src=  and  border=0  in the document and
have them all pasted into another document, skipping everything else
in the document.

Any help would be greatly appreciated.





Hello all!


And here comes a perl solution:

the following script extracts all image tags starting from a folder 
certain folder ... much more interesting to code would be the following 
questions: print the images only once for each file; or: does these 
images are existing? or: which superfluous images are populating my 
image folder ...


If one of these questions are your intention Jonah Lee Walker, then let 
me know! If you have doubts, how to run a perl-script, let me know 
privately ...



#!/usr/bin/perl

# This script extract_image_tags.pl extracts all image tags off all 
pages.html of a given folder and writes it into the file found_images.txt


use warnings;
use strict;
use File::Find;

my $start_dir = /Users/user/Documents/webpages/your_page;
# starting point of your web site folder
# please adapt to your needs!

my $images = $start_dir/found_images.txt;

open OUT, $images or die $!;

unless ( -d $start_dir ) {
die Your start directory \$start_dir\ is not a directory;
}

print OUT
\n\nYour script found following images in your web site 
directory\n\t\$start_dir\:\n\n;


find( \process, $start_dir );

sub process {

return unless /\.s?html?$/;

#   print \t$File::Find::name\n;
my $file = $File::Find::name;
unless ( open IN, $file ) {
warn can't open $file for reading: $!, continuing ...\n;
return;
}
my $data = join '', IN;
close IN;
return unless $data;
my @targets = ( $data =~ /img [^]+?/gi );
print OUT \n\nThe file \$file\ contains following image 
tags:\n\n\t;

print OUT join \n\t, @targets;
}


--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email supp...@barebones.com rather than posting to the group.


Re: Display number of characters in selection

2010-05-15 Thread Marek Stepanek

On 15.05.2010 19:41, Gabriel Roth wrote:

Partial answer to my own question:

On Sat, May 15, 2010 at 1:35 PM, Gabriel Rothgabe.r...@gmail.com  wrote:

Does anyone know of a way to make BBEdit display the number
of characters in the current selection?


Clicking on the document statistics in the Status Bar toggles to
selection statistics. So I amend the question: Does anyone know of a
way to either display both at once, or to assign this toggle to a
keyboard shortcut? (There's nothing relevant to the statistics display
in Preferences  Menus  Status Bar.)



Try with cmd + i


best greetings from Munich



marek

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email supp...@barebones.com rather than posting to the group.


Re: move to next blank line?

2010-05-12 Thread Marek Stepanek

On 12.05.2010 09:47, Roland Küffner wrote:

Am 12.05.2010 um 02:06 schrieb wallabadah:


I have not used AppleScript before - but it appears to be an ideal
solution in this case. I started by recording, then a little bit of
editing. I prefer to have the wrap around option turned off in this
case, and used a regular expression for finding whitespace-only lines.

Here's my version for the sake of completeness:

'next blank line' - assigned to control-option-down arrow
tell application BBEdit
find ^[[:space:]]*$ searching in (text 1 of window 1) options
{search mode:grep, starting at top:false, wrap around:false,
backwards:false, case sensitive:false, match words:false, extend
selection:false} with selecting match
end tell


Just to tinker a little further on this. I tried your pattern. It seems that it 
has problems catching the last line break on multiple empty lines (I have no 
idea why). I tried some variations of the pattern and found this to be more to 
my liking:

(?s)^\s+

Together with the
select insertion point after found object of result
line this takes me directly to column zero of the next block. Exactly what I 
wanted - of course YMMV on that.

Thanks for bringing this topic up. I already used this new custom shortcuts 
several times since yesterday :-)

Roland





Hello all!



I would not bother with an Apple script. My suggestion: do it with 
BBEdit short cuts (and BBEdit is famous for it, why not use it?):


1. select the line feed of a not empty line and drag your mouse to the 
beginning of the next empty line. Now the end of the full line and the 
empty line are selected.


2. Hit cmd + E (Now the search pattern is into the find field)

3. Hit cmd + G (for the next empty line)

4. Hit cmd + shift + G (for the previous empty line)


Greetings from Munich



marek

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email supp...@barebones.com rather than posting to the group.


Re: how to empty the clipboard?

2010-05-12 Thread Marek Stepanek

On 12.05.2010 15:43, stratboy wrote:

Hi! I like th cut/copy  append commands :) But one problem: how can I
empty the clipboard so that new copy  append calls will start
appending from nothing?




Hi stratboy!


Did I understand your question? Simply make cmd + C for the first copy. 
The clipboard restarts from zero. Then make shift + cmd C for the 
following copy and the clipboard adds the new selected text to the 
clipboard.



Greetings to all


marek

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email supp...@barebones.com rather than posting to the group.


Re: Use file name in replace pattern

2010-02-14 Thread Marek Stepanek



Here a Perl solution:


I am not very good in Perl and your question was too vague to make a 
script adapted for your needs.


I made several files in a certain folder containing this is file: This 
script adds to this the file name: this is file: filename.




#!/usr/bin/perl


use warnings;
use strict;
use File::Find;

my $start_dir = '/Users/path/to/start/folder';

find( \wanted, $start_dir );

sub wanted {
return unless /\.txt$/; # file extension you are searching for
my $file_path = $File::Find::name;
print $file_path\n;
$file_path =~ m~^.*?/([^/]+)$~;
my $file_name = $1;
open (IN, +, $file_path);
my $out = ;
while (IN) {
# s/$file_name//; # this is the way back, removes the file_names
s/this is file:\s*/$$file_name/ig;
$out .= $_;
}
seek(IN, 0, 0) or die can't seek to start of $file_path: $!;
print IN $out or die can't print to $file_path: $!;
truncate (IN, tell(IN)) or die can't truncate $file_path: $!;
close IN or die can't close $file_path: $!;
}

--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email supp...@barebones.com rather than posting to the group.


Re: LaTeX Clippings does not show up!

2009-09-07 Thread Marek Stepanek

Marek Stepanek wrote:
 
 
 Hello all!
 
 
 After new install on a new computer, my LaTeX-Clippings does not show up 
 in BBEdit. There is probably something wrong with the Resource Fork. In 
 the Finder this file is shown as a file, to open with Excalibur (! why 
 that? I'am never using it!). In my shell it appears normally as a folder:
 
 snip
 
 
 marek
 
 


To answer the question just for the archives: I dragged the folder on 
the desktop, selected it, Cmd + i and I removed the extension .tex ... 
Now it is a folder. And back into the Application 
Support/BBEdit/Clippings Folder. Now the folder is showing as folder in 
the Finder, and this folder is appearing in the clippings menu ...



Best greetings from Munich



marek

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email supp...@barebones.com rather than posting to the group.
-~--~~~~--~~--~--~---



LaTeX Clippings does not show up!

2009-09-05 Thread Marek Stepanek



Hello all!


After new install on a new computer, my LaTeX-Clippings does not show up 
in BBEdit. There is probably something wrong with the Resource Fork. In 
the Finder this file is shown as a file, to open with Excalibur (! why 
that? I'am never using it!). In my shell it appears normally as a folder:

[marek-stepaneks-macbook-pro:Application Support/BBEdit/Clippings] 
mstep% ls -l
total 0
0 drwxr-xr-x   8 mstep  staff  272 Jul  5 13:51 C Source.cp/
0 drwxr-xr-x   3 mstep  staff  102 Jul  5 13:51 Chess/
0 drwxr-xr-x  11 mstep  staff  374 Jul  5 13:51 HTML Glossary.html/
0 drwxr-xr-x  10 mstep  staff  340 Jul  5 13:51 LaTeX Glossary.tex/
0 drwxr-xr-x   4 mstep  staff  136 Jul  5 13:51 PropertyList Glossary.plist/
0 drwxr-xr-x   4 mstep  staff  136 Jul  5 13:51 RSS.rss/
0 drwxr-xr-x   3 mstep  staff  102 Jul  5 13:51 Universal Items/
0 drwxr-xr-x  11 mstep  staff  374 Jul  5 13:51 WML Glossary.wml/
0 drwxr-xr-x   4 mstep  staff  136 Jul  5 13:51 text/

How do I tell my Macintosh, that this LaTeX Glossary.tex/ is a folder?


Thanks and best greetings from Munich



marek




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email supp...@barebones.com rather than posting to the group.
-~--~~~~--~~--~--~---



Count table rows and insert the number in rowspan

2009-08-19 Thread Marek Stepanek


Hello all!


I have a question about a perl filter. I have a complicate table with a 
frame around, which consists of a td with a rowspan until the bottom of 
the table. Each time I insert new rows, I have to count the table rows 
tr again to adapt the rowspan to my table.

My idea of a perl filter is not working: first I am reading the selected 
table in my file counting the table rows. Second I want to insert the 
number I counted into the rowspan= ... 


#!/usr/bin/perl

use strict;
use warnings;

my $rowcount=0;

while (){
 if (/tr/g) {
 $rowcount++;
 }
}

while () {
 s/(rowspan=)\d*/$1$rowcount/g if $rowcount;
 print;
}

But apparently this is not working. Probably it is not possible to read 
in two times the lines with while () in Perl??? Now my idea would be 
to read in the lines backwards with a module like:

File::ReadBackwards

and at the end (on top) insert the counted tr lines ... Would this be 
possible? (: A real challenge to Ronald for example :)



thank you for your help



marek

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups BBEdit Talk group.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a specific feature request or would like to report a suspected (or 
confirmed) problem with the software, please email to supp...@barebones.com 
rather than posting to the group.
-~--~~~~--~~--~--~---



Re: Unix filter

2009-07-09 Thread Marek Stepanek

Simdude wrote:
 I have used the unix filters on BBedit where I have created a filter
 and run from the menu, but I'm wondering how to filter text through a
 quick and dirty unix filter. i.e., let's say I have a text file with
 tab delimited fields and just want to pull out a few columns. On the
 command line, I could pipe through a cut command. Is there any way to
 do this within BBedit without saving the cut command in a file first?
 


You should explain more precisely, which data type you need to filter. 
Here an example with tab delimited DATA. So this script is running 
alone, having included the DATA, and pulls out the second column ...


Does this help for your purposes?


Greetings marek

#!/usr/bin/perl

use strict;
use warnings;

while (DATA)
{

m/[\d,.]+\t([\d,.]+)\t/;
print $1\n;

}

__DATA__

27192,1 10882,6 591 16  6138,5
27476,3 10990,7 596 16  6298,8
27737,9 11146,8 301 16  6523,1
27775,2 11158,5 604 16  6553,4

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups BBEdit Talk group.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a specific feature request or would like to report a suspected (or 
confirmed) problem with the software, please email to supp...@barebones.com 
rather than posting to the group.
-~--~~~~--~~--~--~---



Re: Perl-Filter: Count tabs of each line

2009-06-04 Thread Marek Stepanek

Ronald J Kimball wrote:
 snip
 
 /[^\t]+?\t/ returns true or false depending on whether the regex matches.
 The foreach there is iterating over a single-item list containing either
 '1' or ''.
 
 
 Try this:
 
 #!perl
 
 use warnings;
 use strict;
 
 my $count;
 
 while () {
   $count = 1;
   s/([^\t]*\t)/$count++ . . $1/ge;
   print;
 }
 __END__
 
 
 The /e modifier for s/// evals the replacement string as Perl code.
 
 
 Ronald
 


Ohhh, of course, Ronald! You are so right - and so quick and so smart :-)


Greetings from Munich and great thx


marek



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups BBEdit Talk group.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a specific feature request or would like to report a suspected (or 
confirmed) problem with the software, please email to supp...@barebones.com 
rather than posting to the group.
-~--~~~~--~~--~--~---