POV-Ray : Newsgroups : povray.newusers : Shell out from .pov? Server Time
28 Jul 2024 16:15:11 EDT (-0400)
  Shell out from .pov? (Message 1 to 5 of 5)  
From: Mathuin
Subject: Shell out from .pov?
Date: 4 Oct 2008 14:15:00
Message: <web.48e7b24847ab2629d8a103ef0@news.povray.org>
I have a number of small .pov files representing collections of objects.  I just
realized that I cannot rely upon the name of the file to represent the order --
but I can rely on the *timestamp* of the file.

Listing the files is easy -- "dir /b /od *.pov" for Windows, "ls -rt *.pov" for
Unix.  The real question is how do I get that information into POV-Ray elegantly
as a list of strings over which I can iterate?  Alternatively, I will have to
hand-build a list in my master .pov file and that just seems so ugly.

Thank you so much for all your help so far!


Post a reply to this message

From: jan dvorak
Subject: Re: Shell out from .pov?
Date: 4 Oct 2008 15:11:23
Message: <48e7bfdb@news.povray.org>
Mathuin napsal(a):
> I have a number of small .pov files representing collections of objects.  I just
> realized that I cannot rely upon the name of the file to represent the order --
> but I can rely on the *timestamp* of the file.
> 
> Listing the files is easy -- "dir /b /od *.pov" for Windows, "ls -rt *.pov" for
> Unix.  The real question is how do I get that information into POV-Ray elegantly
> as a list of strings over which I can iterate?  Alternatively, I will have to
> hand-build a list in my master .pov file and that just seems so ugly.
> 
> Thank you so much for all your help so far!
> 
> 
> 
Hello,
You can generate the list externally (it must be comma separated!) and 
then use file reading routines to parse it. See #fopen and #read.


Post a reply to this message

From: Mathuin
Subject: Re: Shell out from .pov?
Date: 4 Oct 2008 16:20:00
Message: <web.48e7cf27d6807236d8a103ef0@news.povray.org>
jan dvorak <jan### [at] centrumcz> wrote:
> Hello,
> You can generate the list externally (it must be comma separated!) and
> then use file reading routines to parse it. See #fopen and #read.

I was hoping to do something Perlish like this:

#fopen list "|dir /b /od *.pov" read

Any chance of this working?


Post a reply to this message

From: Alain
Subject: Re: Shell out from .pov?
Date: 9 Oct 2008 13:07:22
Message: <48ee3a4a$1@news.povray.org>
Mathuin nous illumina en ce 2008-10-04 16:17 -->
> jan dvorak <jan### [at] centrumcz> wrote:
>> Hello,
>> You can generate the list externally (it must be comma separated!) and
>> then use file reading routines to parse it. See #fopen and #read.
> 
> I was hoping to do something Perlish like this:
> 
> #fopen list "|dir /b /od *.pov" read
> 
> Any chance of this working?
> 
> 
> 
In some external parser, yes.
Inside of POR-Ray SDL, no.

-- 
Alain
-------------------------------------------------
You know you've been raytracing too long when you have ever said "I don't need 
no steenking modellers!!!"
Stephan Ahonen


Post a reply to this message

From: Mathuin
Subject: Re: Shell out from .pov?
Date: 9 Oct 2008 16:35:01
Message: <web.48ee6a79d6807236d8a103ef0@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> Mathuin nous illumina en ce 2008-10-04 16:17 -->
> > jan dvorak <jan### [at] centrumcz> wrote:
> >> Hello,
> >> You can generate the list externally (it must be comma separated!) and
> >> then use file reading routines to parse it. See #fopen and #read.
> >
> > I was hoping to do something Perlish like this:
> >
> > #fopen list "|dir /b /od *.pov" read
> >
> > Any chance of this working?
> >
> >
> >
> In some external parser, yes.
> Inside of POR-Ray SDL, no.

Yeah, I could write a Windows batch file or Unix shell script that could
construct this list, wrap it with SDL syntax, and dump it to a .inc file.  I
could then stick the batch file or shell script in Pre_Scene_Command and get
the job done.  Didn't know about that until just a few minutes ago while
searching for a solution to a similar problem I posted in povray.general.

>
> --
> Alain
> -------------------------------------------------
> You know you've been raytracing too long when you have ever said "I don't need
> no steenking modellers!!!"
> Stephan Ahonen


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.