Refactoring TiddlyWiki and fossil repo interactions.

This commit is contained in:
ruidajo 2022-03-03 16:05:14 -05:00
parent cdd89138d4
commit bfba0fe43d

View File

@ -73,22 +73,6 @@ FossilRepo >> addFiles: aCollection [
aCollection do: [ :each | self add: each ]. aCollection do: [ :each | self add: each ].
] ]
{ #category : #accessing }
FossilRepo >> addRecentChangesFromSelfWiki [
| docsSton docsStonSanitized recentTiddlers |
self tiddlywiki
exportJSONFile;
importJSONFile.
recentTiddlers := self tiddlywiki changesAfter: self checkoutDateAndTime.
docsSton := recentTiddlers collect: [:each | each exportSTONFile].
"Collecting tiddlers file reference as string and adding to the repo"
docsStonSanitized := docsSton collect: [ :each |
(each fullName removePrefix: self localRoot) allButFirst ].
docsStonSanitized do: [ :each | self add: each ].
^ self status
]
{ #category : #accessing } { #category : #accessing }
FossilRepo >> addRecentChangesFromWiki: aTiddlywiki [ FossilRepo >> addRecentChangesFromWiki: aTiddlywiki [
@ -419,18 +403,6 @@ FossilRepo >> status [
^ self command: 'status' ^ self command: 'status'
] ]
{ #category : #accessing }
FossilRepo >> tiddlywiki [
^ tiddlywiki
]
{ #category : #accessing }
FossilRepo >> tiddlywiki: aTiddlyWiki [
tiddlywiki := aTiddlyWiki
]
{ #category : #accessing } { #category : #accessing }
FossilRepo >> update [ FossilRepo >> update [
@ -438,10 +410,10 @@ FossilRepo >> update [
] ]
{ #category : #accessing } { #category : #accessing }
FossilRepo >> updateAndRebuildTiddlersJSON [ FossilRepo >> updateAndRebuildTiddlersJSONFromWiki: aTiddlywiki [
self update; uvExportSTON. self update; uvExportSTON.
^ self tiddlywiki rebuildTiddlersJSON. ^ aTiddlywiki rebuildTiddlersJSON.
] ]
{ #category : #accessing } { #category : #accessing }
@ -452,10 +424,10 @@ FossilRepo >> uvAdd: aFileRelativePathFullname [
] ]
{ #category : #accessing } { #category : #accessing }
FossilRepo >> uvAddLargeTiddlers [ FossilRepo >> uvAddLargeTiddlersFromWiki: aTiddlywiki [
| stonfiles largeTiddlersFileReference | | stonfiles largeTiddlersFileReference |
stonfiles := (self tiddlywiki file parent / 'largeTiddlers') files stonfiles := (aTiddlywiki file parent / 'largeTiddlers') files
select: [ :each | each fullName endsWith: '.ston' ]. select: [ :each | each fullName endsWith: '.ston' ].
largeTiddlersFileReference := stonfiles largeTiddlersFileReference := stonfiles
collect: [ :each | each fullName withoutPrefix: (self local fullName, '/') ]. collect: [ :each | each fullName withoutPrefix: (self local fullName, '/') ].