Skip to content

Commit

Permalink
Real modified date/time
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Aug 2, 2024
1 parent 1634ae9 commit a34074a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
4 changes: 2 additions & 2 deletions fdp.template
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
dct:accessRights <https://fdp.wikipathways.org/#accessRights> ;
dct:language <http://id.loc.gov/vocabulary/iso639-1/en>;
fdpo:metadataIssued "2023-03-10T07:42:08.000Z"^^xsd:dateTime;
fdpo:metadataModified "%%DATE2%%T13:06:00.000Z"^^xsd:dateTime;
fdpo:metadataModified "%%ISOTIME%%"^^xsd:dateTime;
dct:issued "2023-03-10T07:42:08.000Z"^^xsd:dateTime;
dct:modified "%%DATE2%%T13:06:00.000Z"^^xsd:dateTime;
dct:modified "%%ISOTIME%%"^^xsd:dateTime;
dcat:contactPoint <https://fdp.wikipathways.org/contact/>;
fdpo:metadataCatalog
<https://fdp.wikipathways.org/catalog/index.ttl> .
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
dct:accessRights <https://fdp.wikipathways.org/#accessRights> ;
dct:language <http://id.loc.gov/vocabulary/iso639-1/en>;
fdpo:metadataIssued "2023-03-10T07:42:08.000Z"^^xsd:dateTime;
fdpo:metadataModified "2024-07-10T13:06:00.000Z"^^xsd:dateTime;
fdpo:metadataModified "2024-08-02T08:05:08.326986185Z"^^xsd:dateTime;
dct:issued "2023-03-10T07:42:08.000Z"^^xsd:dateTime;
dct:modified "2024-07-10T13:06:00.000Z"^^xsd:dateTime;
dct:modified "2024-08-02T08:05:08.326986185Z"^^xsd:dateTime;
dcat:contactPoint <https://fdp.wikipathways.org/contact/>;
fdpo:metadataCatalog
<https://fdp.wikipathways.org/catalog/index.ttl> .
Expand Down
4 changes: 2 additions & 2 deletions index.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
dct:accessRights <https://fdp.wikipathways.org/#accessRights> ;
dct:language <http://id.loc.gov/vocabulary/iso639-1/en>;
fdpo:metadataIssued "2023-03-10T07:42:08.000Z"^^xsd:dateTime;
fdpo:metadataModified "2024-07-10T13:06:00.000Z"^^xsd:dateTime;
fdpo:metadataModified "2024-08-02T08:05:08.326986185Z"^^xsd:dateTime;
dct:issued "2023-03-10T07:42:08.000Z"^^xsd:dateTime;
dct:modified "2024-07-10T13:06:00.000Z"^^xsd:dateTime;
dct:modified "2024-08-02T08:05:08.326986185Z"^^xsd:dateTime;
dcat:contactPoint <https://fdp.wikipathways.org/contact/>;
fdpo:metadataCatalog
<https://fdp.wikipathways.org/catalog/index.ttl> .
Expand Down
18 changes: 17 additions & 1 deletion update.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
date2 = "2024-07-10"
import java.time.LocalDateTime
import java.time.ZoneId
import java.time.format.DateTimeFormatter
import java.util.Calendar

calendar = Calendar.getInstance();
year = calendar.get(Calendar.YEAR)
month = calendar.get(Calendar.MONTH) + 1 // January = 0
day = calendar.get(Calendar.MONTH)
if (day < 10) month += -1
if (month < 10) month = "0" + month
date2 = "${year}-${month}-10"
date = date2.replaceAll("-", "")
localTime = LocalDateTime.now()
isotime = localTime.atZone(ZoneId.systemDefault()).format(
DateTimeFormatter.ISO_INSTANT
)

prefixTemplate = new File("prefixes.template").text
rdfTemplate = new File("rdf.template").text
Expand All @@ -14,6 +29,7 @@ catalogTemplate = new File("catalog.template").text
.replaceAll("%%DATE%%", date).replaceAll("%%DATE2%%", date2)
fdpTemplate = new File("fdp.template").text
.replaceAll("%%DATE%%", date).replaceAll("%%DATE2%%", date2)
.replaceAll("%%ISOTIME%%", isotime)

datasetFolder = new File("dataset/${date}")
if (!datasetFolder.exists()) datasetFolder.mkdir()
Expand Down

0 comments on commit a34074a

Please sign in to comment.