Support for aproximating Grafoscopio notebook's creation timestamps from the commits in the Fossil repository where they're published.
This commit is contained in:
parent
006b8c6663
commit
298601dbc5
@ -19,7 +19,7 @@ BaselineOfMiniDocs >> baseline: spec [
|
||||
loads: #('Minimal' 'Core' 'Tests' 'Islands');
|
||||
repository: 'github://moosetechnology/PetitParser:v3.x.x/src'
|
||||
].
|
||||
"self xmlParserHTML: spec."
|
||||
self fossil: spec.
|
||||
"Packages"
|
||||
spec
|
||||
package: 'MiniDocs' with: [ spec requires: #('Mustache' 'Tealight' "'XMLParserHTML'") ];
|
||||
@ -29,6 +29,15 @@ BaselineOfMiniDocs >> baseline: spec [
|
||||
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
BaselineOfMiniDocs >> fossil: spec [
|
||||
| repo |
|
||||
repo := ExoRepo new
|
||||
repository: 'https://code.tupale.co/Offray/Fossil'.
|
||||
repo load.
|
||||
spec baseline: 'Fossil' with: [ spec repository: 'gitlocal://', repo local fullName ]
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
BaselineOfMiniDocs >> semanticVersion [
|
||||
^ '0.2.0'
|
||||
|
@ -121,7 +121,7 @@ GrafoscopioNode >> earliestCreationDate [
|
||||
|
||||
self nodesWithCreationDates ifNotEmpty: [
|
||||
earliest := self nodesWithCreationDates first created]
|
||||
ifEmpty: [ earliest := self earliestRepositoryTimestamp].
|
||||
ifEmpty: [ earliest := self earliestRepositoryTimestamp - 3 hours].
|
||||
self nodesWithCreationDates do: [:node |
|
||||
node created <= earliest ifTrue: [ earliest := node created ] ].
|
||||
^ earliest
|
||||
@ -129,15 +129,15 @@ GrafoscopioNode >> earliestCreationDate [
|
||||
|
||||
{ #category : #accessing }
|
||||
GrafoscopioNode >> earliestRepositoryTimestamp [
|
||||
| remote fossilHost docSegments repo |
|
||||
| remote fossilHost docSegments repo checkinInfo |
|
||||
remote := self remoteLocations first asUrl.
|
||||
fossilHost := 'https://mutabit.com/repos.fossil'.
|
||||
(remote asString includesSubstring: fossilHost) ifFalse: [ ^ false ].
|
||||
docSegments := remote segments copyFrom: 5 to: remote segments size.
|
||||
repo := FossilRepo new
|
||||
remote: (remote scheme, '://', remote host, '/', remote segments first, '/', remote segments second).
|
||||
^ repo
|
||||
firstCheckinFor: ('/' join: docSegments)
|
||||
checkinInfo := repo firstCheckinFor: ('/' join: docSegments).
|
||||
^ DateAndTime fromUnixTime: (checkinInfo at: 'timestamp')
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
|
Loading…
Reference in New Issue
Block a user