[ANN] ETag include for On-Rev (was Re: Compare files between on-rev and local versions)
stephenREVOLUTION2 at barncard.com
Mon Jun 22 13:08:04 CDT 2009
Andre, I notice that you use the .inc suffix for on-rev includes. I know
that's the convention for PHP includes, unfortunately, that suffix will not
allow the on-rev client to read or edit the file, even though it contains
code. I'm assuming you are using your own tools for on-rev development.
I currently use the on-rev client for in situ debugging. Helps a lot. I use
coda too, but it currently doesn't format rev code (yet). It has an
intuitive css editor as well as an assisted text mode. BBEdit is good for
This is yet another reason why I really would request the on-rev client to
allow plug-ins, some kind of API or better yet, open up the code so we can
work with it. I think what the on-rev coders have done is fantastic, but
there will always bee a need for "one more thing".
syncing (or at least compare)
work on any text file (or at least allow .inc files as editable)
search and replace
I'm guessing that Jerry or Andre are working on some kind of alternative
editor for on-rev right now.
Where do I sign up?
2009/6/22 Andre Garzia <andre at andregarzia.com>
> Hello Folks,
> I've just created a minimal ETag include file for On-Rev. For those not
> familiar with ETags, they are unique identifiers that are sent as HTTP
> Headers. When your file change, your ETag for that file also changes. So a
> browser or any http client may sent a web request like, give me that file
> the ETag is different from this one, or if it still the same.
> For more information on ETags consult Dr. Wik E. Pedia at
> What my include does is set the ETag header for the file that includes it.
> So if you have a helloworld.irev file and include "etag.inc" then, an ETag
> http header will be set when helloworld.irev is requested, if the file
> changes, the ETag changes too.
> Another thing it does is expose an ETag function that will comput an ETag
> for a given file path.
> And there's one more thing: sometimes, you just want to know if
> helloworld.irev changed but you don't want to execute it, for this cases,
> just pass a url parameter op=etag, like helloworld.irev?op=etag this way
> include will set the ETag and force the engine to exit without running any
> further. This of course just works up to the point where the etag is
> included, so include it as the first line.
> you can check the etag.inc by going to:
> (Karma bonus, my script viewer
> generates links for downloading compressed copies of the viewed files)
> If you're on a unix like system or any system with CURL, you can do a:
> curl -v http://andregarzia.on-rev.com/etagtest.irev
> and see the ETag header being
> sent. So if you want to compare two files, assuming it's a local and a
> remote copy, you can simply store the ETag every time you
> cache the file, then you just query for it later.
> Hope this is useful
More information about the use-livecode