fswatch as a productivity increaser
Sherwood Botsford <[email protected]> Thu, 22 Dec 2016 09:10:55 -0700
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <CAOX=2F8E-Qb51262+qMD3nSxK64pW10onWqTFUH5Y3QMPH-g=Q@mail.gmail.com> |
--===============8290527235202851455==
Content-Type: multipart/alternative; boundary=94eb2c0b69880fc96a054441863f
--94eb2c0b69880fc96a054441863f
Content-Type: text/plain; charset=UTF-8
I found myself in the following loop:
Repeat
Edit 1 or more files.
Run ttree
View changes in browser
Until (hellFreezesOver
fswatch is a small utility (linux, *bsd, unix, mac) that watches a
directory or list of files for changes.
So the following works:
fswatch -o tt2 | xargs -n1 -I{} ttree -f .ttreerc
The -o option just prints how many files changed. I don't care how many
changed. Whenever a file changes, it will run ttree.
I have not verified what ttree will do if it has overlapping executions.
Anyway, this eliminates one step of the loop, and makes it much easier to
edit remotely.
Regards
Sherwood
--94eb2c0b69880fc96a054441863f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:"ti=
mes new roman",serif"><br clear=3D"all"></div><div class=3D"gmail_defa=
ult" style=3D"font-family:"times new roman",serif">=C2=A0I found =
myself in the following loop:</div><div class=3D"gmail_default" style=3D"fo=
nt-family:"times new roman",serif"><br></div><div class=3D"gmail_=
default" style=3D"font-family:"times new roman",serif"><br></div>=
<div class=3D"gmail_default" style=3D"font-family:"times new roman&quo=
t;,serif">Repeat=C2=A0</div><div class=3D"gmail_default" style=3D"font-fami=
ly:"times new roman",serif">=C2=A0 =C2=A0 Edit 1 or more =C2=A0fi=
les.</div><div class=3D"gmail_default" style=3D"font-family:"times new=
roman",serif">=C2=A0 =C2=A0 Run ttree</div><div class=3D"gmail_defaul=
t" style=3D"font-family:"times new roman",serif">=C2=A0 =C2=A0 Vi=
ew changes in browser</div><div class=3D"gmail_default" style=3D"font-famil=
y:"times new roman",serif">Until (hellFreezesOver</div><div class=
=3D"gmail_default" style=3D"font-family:"times new roman",serif">=
<br></div><div class=3D"gmail_default" style=3D"font-family:"times new=
roman",serif">fswatch is a small utility (linux, *bsd, unix, mac) tha=
t watches a directory or list of files for changes.</div><div class=3D"gmai=
l_default" style=3D"font-family:"times new roman",serif"><br></di=
v><div class=3D"gmail_default" style=3D"font-family:"times new roman&q=
uot;,serif">So the following works:</div><div class=3D"gmail_default" style=
=3D"font-family:"times new roman",serif"><br></div><div class=3D"=
gmail_default" style=3D"font-family:"times new roman",serif">
<p class=3D"gmail-p1"><span class=3D"gmail-s1">=C2=A0fswatch -o tt2 | xargs=
-n1 -I{} ttree -f .ttreerc</span></p><p class=3D"gmail-p1"><span class=3D"=
gmail-s1">The -o option just prints how many files changed.=C2=A0 I don'=
;t care how many changed.=C2=A0 Whenever a file changes, it will run ttree.=
=C2=A0</span></p><p class=3D"gmail-p1"><span class=3D"gmail-s1">I have not =
verified what ttree will do =C2=A0if it has overlapping executions.</span><=
/p></div><div class=3D"gmail_default" style=3D"font-family:"times new =
roman",serif">Anyway, this eliminates one step of the loop, and makes =
it much easier to edit remotely.</div><div class=3D"gmail_default" style=3D=
"font-family:"times new roman",serif"><br></div><div class=3D"gma=
il_default" style=3D"font-family:"times new roman",serif"><br></d=
iv><div class=3D"gmail_default" style=3D"font-family:"times new roman&=
quot;,serif"><br></div><div><div class=3D"gmail_signature"><div dir=3D"ltr"=
><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div>Regards</div><div><br></d=
iv><div>Sherwood<br><br></div></div></div></div></div></div></div></div>
</div>
--94eb2c0b69880fc96a054441863f--
--===============8290527235202851455==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates
--===============8290527235202851455==--