Creating FossilRepo and TiddlyWiki interactions.
This commit is contained in:
parent
d7ce1331f4
commit
2353ffb15f
@ -41,6 +41,17 @@ TiddlyWiki >> addToConfigFile [
|
||||
^ MarkupFile exportAsFileOn: self configFile containing:(STON toStringPretty: newConfig)
|
||||
]
|
||||
|
||||
{ #category : #testing }
|
||||
TiddlyWiki >> belongsToLocalRepository [
|
||||
|
||||
| localFolder tempRepo relativeName |
|
||||
localFolder := self detectRepositoryLocal ifNil: [ ^ false ].
|
||||
tempRepo := FossilRepo new
|
||||
local: localFolder.
|
||||
relativeName := self file fullName withoutPrefix: (tempRepo local fullName, '/').
|
||||
^ tempRepo listUnversioned hasLiteral: relativeName
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> changesAfter: aDateString [
|
||||
|
||||
@ -96,14 +107,16 @@ TiddlyWiki >> contentTiddlersWithoutLargeTiddlers [
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> detectRepository [
|
||||
TiddlyWiki >> detectRepositoryLocal [
|
||||
|
||||
| folder folderItems |
|
||||
folder := self file parent.
|
||||
folderItems := folder children.
|
||||
[(folderItems select: [ :path | path basename beginsWith: '.fossil' ]) isEmpty]
|
||||
[(folderItems select: [ :path | path basename beginsWith: '.fossil' ]) isEmpty
|
||||
and:[ (folder = FileLocator root) not ]]
|
||||
whileTrue: [folder := folder parent.
|
||||
folderItems := folder children.].
|
||||
folder = FileLocator root ifTrue: [ ^ nil ].
|
||||
^ folder
|
||||
]
|
||||
|
||||
@ -402,6 +415,17 @@ TiddlyWiki >> remote: aUrlString [
|
||||
remote := aUrlString asZnUrl
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> repository [
|
||||
|
||||
| repo |
|
||||
self belongsToLocalRepository ifFalse: [ ^ self ].
|
||||
repo := FossilRepo new
|
||||
local: self detectRepositoryLocal.
|
||||
repo repository.
|
||||
^ repo
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> selectContentType: mimeType [
|
||||
|
||||
@ -458,6 +482,13 @@ TiddlyWiki >> tiddlersJSONUrl [
|
||||
self remote ifNil: [^ nil].
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> updateAndRebuildTiddlersJSONWithFossilRepo [
|
||||
|
||||
self repository update; uvExportSTON.
|
||||
^ self rebuildTiddlersJSON
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> withoutContentType: application [
|
||||
| filteredTiddlers tempWiki |
|
||||
|
Loading…
Reference in New Issue
Block a user