Have a standard inline persistent include in an HTML doc;
The include file is a simple txt doc with 20 or so lines, each of them
a date;
Instead of including the *whole* txt file in the HTML doc, have it
*only* include some defined portion of the txt file-- i.e. certain
line numbers, or mark them with identifiers (Date1, Date2, etc.).
Is this possible? I know it could be done with 20 different include
files (1 per date), but I was hoping it might be possible with just 1?
I imagine with some Perl or Python chops, maybe? I have no skills
there, just basic unix shell scripting.
Many thanks,
Brian
Brian,
This would be fairly straight-forward to with php, if you have some sample text, I might be able to help.
Best Regards,
Bill Hernandez
Plano, Texas
But I'd only do that if I had to include the whole file for some
reason. I'd much rather put each line in a different file. In general,
you should make everything as atomic as possible so you can reuse
resources with a minimum of redundancy.
Thanks again,
Brian
On 29/12/09 at 12:01 AM -0800, Brian <br...@whattheheller.com> wrote:
>Thanks Guys...I think in this case 20 individual files might be a
>little harder to manage than would be ideal, but I see the point and
>it's well-taken. I wanted to know if it was possible without outside
>scripting, and since it's not, I'll deal with the 20 files rather than
>introduce that potential racket of issues.
I could be done easily enough with BB Includes; I don't think
you've had any applicable suggestions since anyone with specific
ideas on how to help is having to guess at what you really want
to do. You've already received a couple of 'generic' answers. If
you want more than that then supply some *specific* examples of
what you're trying to do. Any number of scripting languages can
do what you want quite easily; give us some examples and I'm
sure someone will give some solutions.
My quick/generic solution is something like this in AppleScript:
set theLine to item j of { <lines from your simple txt doc> }
return theLine
Also, you say you have basic unix shell scripting skills; I see
no reason why you couldn't do this in a bash script as well.
BBEdit is great that way; use the tools that make most sense to you.
Charlie
--
Ꮚ Charlie Garrison ♊ <garr...@zeta.org.au>
〠 PO Box 141, Windsor, NSW 2756, Australia
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt