Re: Text factory unix script arguments

2019-08-30 Thread Oliver Boermans
Yeah plain strings in the (Run Unix Filter | Options… | Arguments:) field
such as Hello world pass in as expected.

On Thu, 29 Aug 2019 at 21:04, Charlie Garrison <
charlie-goo...@garrison.com.au> wrote:

> On 29 Aug 2019, at 21:17, Oliver Boermans wrote:
>
> Only arguments that come through are those that are there even if I don’t
> explicitly pass through any additional arguments:
>
> ["/usr/local/Cellar/node@8
> /8.12.0/bin/node","/Users/ollie/Scripts/bin/js/extract-post/index.js"]
>
> Even when you hardcode arguments in the Run Script step? If you've
> hardcoded the values and you're still not seeing them in the script then
> something else is wrong. Maybe node scripts have different methods of
> checking passed in args. I'd be surprised if BBEdit failed to pass any
> args.
>
> -cng
>
> --
>
> Charlie Garrison   
> Garrison Computer Services  
> PO Box 380
> Tumbarumba NSW 2653  Australia
>
> --
> 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/78DD6FF6-AEAB-4F84-9926-9AEF3D99F84D%40garrison.com.au
> 
> .
>

-- 
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/CAC_e8vGBLeNBgTnOmtJcUCW1OJfodVxrZR-D9yBBOFa9hQksWg%40mail.gmail.com.


Re: Text factory unix script arguments

2019-08-29 Thread Charlie Garrison

On 29 Aug 2019, at 21:17, Oliver Boermans wrote:

Only arguments that come through are those that are there even if I 
don’t explicitly pass through any additional arguments:


["/usr/local/Cellar/node@8/8.12.0/bin/node","/Users/ollie/Scripts/bin/js/extract-post/index.js"]


Even when you hardcode arguments in the Run Script step? If you've 
hardcoded the values and you're still not seeing them in the script then 
something else is wrong. Maybe node scripts have different methods of 
checking passed in args. I'd be surprised if BBEdit failed to pass any 
args.


-cng

--

Charlie Garrison   
Garrison Computer Services  
PO Box 380
Tumbarumba NSW 2653  Australia

--
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/78DD6FF6-AEAB-4F84-9926-9AEF3D99F84D%40garrison.com.au.


Re: Text factory unix script arguments

2019-08-29 Thread Oliver Boermans
Thanks Charlie,

I tried including a couple of those BBEdit ENV vars in the arguments field:
$BB_DOC_NAME $BB_DOC_PATH

These arguments don’t come through so I suppose that meant they resolved to
null.

Only arguments that come through are those that are there even if I don’t
explicitly pass through any additional arguments:
["/usr/local/Cellar/node@8
/8.12.0/bin/node","/Users/ollie/Scripts/bin/js/extract-post/index.js"]

Which are paths to the executable running my script, and the script itself.

I wondering if the issue lies *between* BBEdit and Node.js. I’ll do some
experiments with shell scripts instead. Perhaps I can call out to my
Node.js script from bash or something.


On Thu, 29 Aug 2019 at 08:24, Charlie Garrison <
charlie-goo...@garrison.com.au> wrote:

> Gm
> On 28 Aug 2019, at 21:13, Oliver Boermans wrote:
>
> I can pass in strings (space separated splits them into separate args as
> you suggested). The manual is rather trim on details on this feature, no
> mention of placeholders working here. Although experimenting randomly I
> found strings starting with $ or # appear to be ignored, but I expect that
> is nothing to do with BBEdit.
>
> Strings starting with $ will be vars from the 'environment', so you can
> use things like $HOME as part of arguments. Search the BBEdit manual for
> environment vars; there are some custom ones supplied by BBEdit. The #
> character is also either a comment marker, or triggering a replacement I'm
> not familiar with.
>
> -cng
>
> --
>
> Charlie Garrison   
> Garrison Computer Services  
> PO Box 380
> Tumbarumba NSW 2653  Australia
>
> --
> 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/12211B95-E86A-4D82-ABCC-F7944161CE5B%40garrison.com.au
> 
> .
>

-- 
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/CAC_e8vE37pmZ7Dj3w9iCD0-bV7wpO47nradd6ss6QMX_Dte80w%40mail.gmail.com.


Re: Text factory unix script arguments

2019-08-28 Thread Charlie Garrison

Gm
On 28 Aug 2019, at 21:13, Oliver Boermans wrote:

I can pass in strings (space separated splits them into separate args 
as you suggested). The manual is rather trim on details on this 
feature, no mention of placeholders working here. Although 
experimenting randomly I found strings starting with $ or # appear to 
be ignored, but I expect that is nothing to do with BBEdit.


Strings starting with `$` will be vars from the 'environment', so you 
can use things like `$HOME` as part of arguments. Search the BBEdit 
manual for environment vars; there are some custom ones supplied by 
BBEdit. The `#` character is also either a comment marker, or triggering 
a replacement I'm not familiar with.


-cng

--

Charlie Garrison   
Garrison Computer Services  
PO Box 380
Tumbarumba NSW 2653  Australia

--
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/12211B95-E86A-4D82-ABCC-F7944161CE5B%40garrison.com.au.


Re: Text factory unix script arguments

2019-08-28 Thread Oliver Boermans
Thanks Charlie,
I can pass in strings (space separated splits them into separate args as
you suggested). The manual is rather trim on details on this feature, no
mention of placeholders working here. Although experimenting randomly I
found strings starting with $ or # appear to be ignored, but I expect that
is nothing to do with BBEdit.

On Mon, 26 Aug 2019 at 09:08, Charlie Garrison <
charlie-goo...@garrison.com.au> wrote:

> On 25 Aug 2019, at 11:21, Oliver Boermans wrote:
>
> What does one enter in the  **Arguments** : field in the options for the
> **Run Unix Filter**  Options dialog? And how are these arguments made
> available to the unix script?
>
> I would expect the Arguments to be space-separated (same as you would use
> on command line). Check the manual for more details; there may be
> placeholders you can use to grab ENV vars.
>
> -cng
>
> --
>
> Charlie Garrison   
> Garrison Computer Services  
> PO Box 380
> Tumbarumba NSW 2653  Australia
>
> --
> 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/A80A8015-FA83-40F6-94A9-BF1D96B31EE7%40garrison.com.au
> 
> .
>

-- 
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/CAC_e8vFQEcPKqcuftBajLsHYyuLM1t24gtmTN%3DtOONa5bz_rWw%40mail.gmail.com.


Re: Text factory unix script arguments

2019-08-25 Thread Charlie Garrison

On 25 Aug 2019, at 11:21, Oliver Boermans wrote:

What does one enter in the  **Arguments** : field in the options for 
the  **Run Unix Filter**  Options dialog? And how are these 
arguments made available to the unix script?


I would expect the Arguments to be space-separated (same as you would 
use on command line). Check the manual for more details; there may be 
placeholders you can use to grab ENV vars.


-cng

--

Charlie Garrison   
Garrison Computer Services  
PO Box 380
Tumbarumba NSW 2653  Australia

--
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/A80A8015-FA83-40F6-94A9-BF1D96B31EE7%40garrison.com.au.


Text factory unix script arguments

2019-08-24 Thread Oliver Boermans
Dear BBEditor,

What does one enter in the *Arguments*: field in the options for the *Run
Unix Filter* Options dialog? And how are these arguments made available to
the unix script?
[image: text-factory-unix-filter-arguments.png]
Why? you ask…

I’m hoping there is a means to pass the path/file name of the Text
factoried file to my Unix Filter (Node.js script).

These are the current env vars provided to my node script:
{
"SHELL": "/bin/zsh",
"TMPDIR": "/var/folders/nh/ztnj0gf16vj5vc4012pw1lrmgn/T/",
"Apple_PubSub_Socket_Render":
"/private/tmp/com.apple.launchd.fqgVlq7mRd/Render",
"SUDO_ASKPASS":
"/Applications/BBEdit.app/Contents/XPCServices/BBShellCommandXPCService.xpc/Contents/SharedSupport/sudoaskpass-helper",
"USER": "ollie",
"COMMAND_MODE": "unix2003",
"SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.bW5qk4zRJf/Listeners",
"__CF_USER_TEXT_ENCODING": "0x1F5:0x0:0x2",
"PATH": "/usr/bin:/bin:/usr/sbin:/sbin",
"PWD": "/",
"XPC_FLAGS": "0x0",
"XPC_SERVICE_NAME": "com.apple.xpc.launchd.oneshot.0x1007.BBEdit",
"SSH_ASKPASS":
"/Applications/BBEdit.app/Contents/XPCServices/BBShellCommandXPCService.xpc/Contents/SharedSupport/sshaskpass-helper",
"SHLVL": "1",
"HOME": "/Users/ollie",
"LOGNAME": "ollie",
"DISPLAY":
"/private/tmp/com.apple.launchd.mtxd7Q1mzv/org.macosforge.xquartz:0",
"SECURITYSESSIONID": "186a7",
"_": "/usr/local/opt/node@8/bin/node"
}

Having the path to the processed file will allow me to generate an
additional file in the same parent directory as the original. I want to
extract some text from the first file and place it in a second generated by
my js script.

A Text factory is useful for me here as these files are many and exist in a
deep tree of directories.

Thanks in advance for any pointers!
Cheers
Ollie

-- 
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/CAC_e8vFC43kXo84aSHiwvfzgJ1_gMuXoHxHoTYKnhZ%3DTGRZmSg%40mail.gmail.com.