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)
|
^ 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 }
|
{ #category : #accessing }
|
||||||
TiddlyWiki >> changesAfter: aDateString [
|
TiddlyWiki >> changesAfter: aDateString [
|
||||||
|
|
||||||
@ -96,14 +107,16 @@ TiddlyWiki >> contentTiddlersWithoutLargeTiddlers [
|
|||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
TiddlyWiki >> detectRepository [
|
TiddlyWiki >> detectRepositoryLocal [
|
||||||
|
|
||||||
| folder folderItems |
|
| folder folderItems |
|
||||||
folder := self file parent.
|
folder := self file parent.
|
||||||
folderItems := folder children.
|
folderItems := folder children.
|
||||||
[(folderItems select: [ :path | path basename beginsWith: '.fossil' ]) isEmpty]
|
[(folderItems select: [ :path | path basename beginsWith: '.fossil' ]) isEmpty
|
||||||
whileTrue: [folder := folder parent.
|
and:[ (folder = FileLocator root) not ]]
|
||||||
folderItems := folder children.].
|
whileTrue: [folder := folder parent.
|
||||||
|
folderItems := folder children.].
|
||||||
|
folder = FileLocator root ifTrue: [ ^ nil ].
|
||||||
^ folder
|
^ folder
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -402,6 +415,17 @@ TiddlyWiki >> remote: aUrlString [
|
|||||||
remote := aUrlString asZnUrl
|
remote := aUrlString asZnUrl
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
TiddlyWiki >> repository [
|
||||||
|
|
||||||
|
| repo |
|
||||||
|
self belongsToLocalRepository ifFalse: [ ^ self ].
|
||||||
|
repo := FossilRepo new
|
||||||
|
local: self detectRepositoryLocal.
|
||||||
|
repo repository.
|
||||||
|
^ repo
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
TiddlyWiki >> selectContentType: mimeType [
|
TiddlyWiki >> selectContentType: mimeType [
|
||||||
|
|
||||||
@ -458,6 +482,13 @@ TiddlyWiki >> tiddlersJSONUrl [
|
|||||||
self remote ifNil: [^ nil].
|
self remote ifNil: [^ nil].
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
TiddlyWiki >> updateAndRebuildTiddlersJSONWithFossilRepo [
|
||||||
|
|
||||||
|
self repository update; uvExportSTON.
|
||||||
|
^ self rebuildTiddlersJSON
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
TiddlyWiki >> withoutContentType: application [
|
TiddlyWiki >> withoutContentType: application [
|
||||||
| filteredTiddlers tempWiki |
|
| filteredTiddlers tempWiki |
|
||||||
|
Loading…
Reference in New Issue
Block a user