[csw-maintainers] Catalog generation date information in catalog/pkgutil?

James Lee james at opencsw.org
Thu Apr 14 10:44:10 CEST 2011


On 13/04/11, 21:34:39, Philip Brown <phil at bolthole.com> wrote regarding Re:
[csw-maintainers] Catalog generation date information in
catalog/pkgutil?:

> > Can it have a standard label?  Like:
> >
> > # CreationDate: $(date -u '+%Y/%m/%d-%H:%M:%S')
> >

> Is the only thing you changed there, to add  "CreationDate:" ?
> Looks like it, but I want to make sure.

> Is this some kind of actual documented external standard label?

We should create/extend the standard.  As it's a comment line it is
already accepted by the standard.  Its use will be experimental until
we are happy with its format.


> Otherwise, I dont see the value of "CreationDate:"  over what I shoved
> in there, of
> "..blah blah... generated on $(date....)"

To ease mechanical extraction.  Simplistic shell commands but work as
examples:

date=$(grep '^# CreationDate:' catalog)
echo ${date#*:}

echo $(sed -n -e '/^# CreationDate: /s///p' catalog)




The token "CreationDate" is the same token used by PDF and Postscript
DSC [1] [2].  PS DSC is a similar example of how to use comments to
embed data in the catalog.


$ grep '^/CreationDate' file.pdf
/CreationDate(D:20101216165641+00'00')

$ grep '^%%CreationDate' file.ps
%%CreationDate: 2011/03/24 14:07:25




James.


1. http://en.wikipedia.org/wiki/Document_Structuring_Conventions
2. http://partners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf


More information about the maintainers mailing list