Parser for SAUCE or Standard Architecture for Universal Comment Extensions.
Parser for SAUCE or Standard Architecture for Universal Comment Extensions.
Parser for SAUCE or Standard Architecture for Universal Comment Extensions, as defined in http://www.acid.org/info/sauce/s_spec.htm.
Parameter: | filename – file name or file handle |
---|---|
Property author: | |
Name or ‘handle’ of the creator of the file | |
Property datatype: | |
Type of data | |
Property date: | Date the file was created |
Property filesize: | |
Original filesize NOT including any information of SAUCE | |
Property group: | Name of the group/company the creator is employed by |
Property title: | Title of the file |
Example:
>>> art = open('31337.ANS', 'rb')
>>> nfo = sauce.SAUCE(art)
>>> nfo.author
'maze'
...
>>> nfo.group
''
>>> nfo.group = 'mononoke'
>>> raw = str(nfo)
Saving the new file:
>>> sav = open('31337.NEW', 'wb')
>>> nfo.write(sav)
>>> # OR you can do:
>>> sav = nfo.write('31337.NEW')