Skip to content

Commit

Permalink
Merge pull request #59 from gisce/imp_p5d_add_zip_filename
Browse files Browse the repository at this point in the history
Añadir la propiedad "zip_filename" a los P5D
  • Loading branch information
davidmunoznovoa authored Feb 13, 2024
2 parents 0949446 + c060f2c commit d3a4a2f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mesures/p5d.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ def filename(self):
filename += '.{compression}'.format(compression=self.default_compression)
return filename

@property
def zip_filename(self):
return "{prefix}_{distributor}_{comer}_{timestamp}.zip".format(
prefix=self.prefix, distributor=self.distributor,
comer=self.comer,
timestamp=self.generation_date.strftime(SIMPLE_DATE_MASK)
)

@property
def total(self):
return int(self.file['ai'].sum())
Expand Down

0 comments on commit d3a4a2f

Please sign in to comment.