Re: 0template feature suggestion: Infer template from feed

Thomas Leonard <[email protected]>
Newsgroups gmane.comp.file-systems.zero-install.devel
Message-ID <CAG4opy89+HhavQiDWB1u5OXbbbnjqBrsCGnXhi84Uf54_+Jihg@mail.gmail.com>
That would be consistent with the current interface (where it guesses
what you want to do based on the extension and whether the file
already exists or not).

Or perhaps it would be clearer with a new option, e.g.

  0template foo.xml.template --from-feed foo.xml

or (default if the template name is missing)

  0template --from-feed foo.xml

On 11 June 2015 at 13:04, Bastian Eicher <[email protected]> wrote:
> I'll give implementing this a shot. Wondering what the command-line
> interface should look like.
>
> Perhaps have calling "0template somefeed.xml" for an existing somefeed.xml
> cause somefeed.xml.template to be generated in the same directory, allowing
> an override with -o?
>
> -----Original Message-----
> From: Thomas Leonard [mailto:[email protected]]
> Sent: Samstag, 6. Juni 2015 13:13
> To: The Zero Install system
> Subject: Re: [Zero-install-devel] 0template feature suggestion: Infer
> template from feed
>
> On 2 June 2015 at 19:19, Bastian Eicher <[email protected]> wrote:
>> It would be nice if 0template could "infer" a template from an
>> existing feed.
>>
>> The algorithm could look roughly like this:
>> * Copy metadata like <name>, <summary>, <homepage> from the feed to
>> the template unchanged
>> * Use <interface uri="..."> in the feed to fill in <feed-for> in the
>> template
>> * Find the latest <implementation> in the feed (resolving any <group>
>> nesting along the way) and copy it to the template
>>    * Replace the values for version= and released= with {version} and
>> {released} respectively
>>    * Search all other attributes (especially <arhive href="...">) for
>> occurrences of the version= and released= values from the feed and
>> also replace them with {version} and {released}
>>
>> Thoughts?
>
> Sounds useful!
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Zero-install-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/zero-install-devel



-- 
Dr Thomas Leonard        http://roscidus.com/blog/
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.