Re: bbclient/bbserver

2018-01-18 Thread Charlie Garrison

Good evening,

On 18 Jan 2018, at 13:40, Steve Witten wrote:


I really like bbedit.


Me too.  :-)

And I wrote `rbbedit` a few years ago for similar reasons that you 
mention.


- https://github.com/cngarrison/rbbedit

“rbbedit - Edit local (server) files on remote (users) workstation 
using BBEdit.”


Also, `rbbedit` has the advantage of not needing a custom daemon to be 
running on the BBEdit workstation (it does require sshd though). And 
`rbbedit` has a reasonable README/Help.  ;-)


That being said, is there a way I can make bbedit start/terminate 
bbserver automatically when bbedit starts/terminates (like gnuemacs 
does with the ‘(server-start)’ LISP form).  Perhaps some 
AppleScript hook?  As I’m not very familiar with AppleScript, I 
would appreciate an example.


There’s heaps of (AppleScript) hooks in BBEdit, check the manual.

But also check out `rbbedit`; it doesn’t need a custom daemon.  :-D

-cng

--

   Charlie Garrison  
   github.com/cngarrison   metacpan.org/author/CNG

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


bbclient/bbserver

2018-01-17 Thread Steve Witten


I really like bbedit.

However, having cut my teeth in a gnuclient/gnuserver environment on *nix, 
I miss that a lot. I often edit files on a local-LAN Linux system and the 
the bbedit sftp server windows just don’t compare to what I was used to 
with gnuclient/gnuserver.  To that end, I invented the attached:

- bbserver receives an sftp url of the form described in the bbedit man 
page and runs */usr/local/bin/bbedit* on it (bbserver runs as a daemon on 
your Mac).

- bbclient takes a file path and forms an sftp url to send to bbserver. 
 bbclient is designed to run on a remote (*nix) machine but works correctly 
on the local machine as well.  This program is meant to be invoked on the 
machine where the files you want to edit are located.

They are both written in Ruby so enjoy!  The 'lib' directory that is part 
of the attached tarball is all you need...no gems or weird 'bundler' setups 
are required.  You may have to edit the source to change the location of 
the support classes in 'lib'...experienced Ruby programmers will understand 
this.  I use Ruby 2.5.0 but it should run with the Ruby that comes with 
macOS (2.3.3 p222 on High Sierra). Slight mods may be required on earlier 
versions of macOS.

I wrote these for my own use and they work well for me.  This code is 
offered free of charge and encumbrance but there is no support expressed or 
implied.  There are no guarantees or warranties of any kind expressed or 
implied.  You use this stuff at your own risk.  I usually start bbserver 
like this 

*bbserver -d -l /Users/stevewi/var/log/bbserver.log -p 
/Users/stevewi/var/run/bbserver.pid   *

It runs forever until I restart the system.  After a restart, I have to 
restart bbserver manually.

That being said, is there a way I can make bbedit start/terminate bbserver 
automatically when bbedit starts/terminates (like gnuemacs does with the 
‘(server-start)’ LISP form).  Perhaps some AppleScript hook?  As I’m not 
very familiar with AppleScript, I would appreciate an example.   

Thanks in advance...

--
==
Steve Wittencaponecic...@gmail.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: 
--- 
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.


bbc.tar.gz
Description: Binary data