Utilities for downloading compressed repositories.
This commit is contained in:
parent
bb78aceda1
commit
6d90259387
@ -124,6 +124,23 @@ FossilRepo >> createPage: pageName [
|
|||||||
^ NeoJSONReader fromString: (self jsonWikiDataFor: 'create/', pageName)
|
^ NeoJSONReader fromString: (self jsonWikiDataFor: 'create/', pageName)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #operation }
|
||||||
|
FossilRepo >> downloadZippedInto: aFolder [
|
||||||
|
| zippedFileName zippedFile |
|
||||||
|
self remote ifNil: [ ^ self ].
|
||||||
|
zippedFileName := self remoteName , '.zip'.
|
||||||
|
zippedFile := FileLocator temp / zippedFileName.
|
||||||
|
GrafoscopioUtils
|
||||||
|
downloadingFrom: self remote / 'zip'
|
||||||
|
withMessage: 'Downloading zipped repository...'
|
||||||
|
into: aFolder.
|
||||||
|
aFolder / 'zip' renameTo: zippedFileName.
|
||||||
|
^ zippedFile
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #wiki }
|
{ #category : #wiki }
|
||||||
FossilRepo >> fetchPage: pageName [
|
FossilRepo >> fetchPage: pageName [
|
||||||
^ NeoJSONReader fromString: (self jsonWikiDataFor: 'get/', pageName)
|
^ NeoJSONReader fromString: (self jsonWikiDataFor: 'get/', pageName)
|
||||||
@ -275,6 +292,12 @@ FossilRepo >> remote: anUrlString [
|
|||||||
remote := anUrlString asUrl
|
remote := anUrlString asUrl
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #utilities }
|
||||||
|
FossilRepo >> remoteName [
|
||||||
|
self remote ifNil: [ ^ self ].
|
||||||
|
^ self remote asUrl segments last
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #utilities }
|
{ #category : #utilities }
|
||||||
FossilRepo >> sanitize: aFileNameWithRelativePath [
|
FossilRepo >> sanitize: aFileNameWithRelativePath [
|
||||||
"I dicern if my argument concerns to a versioned or an unversioned file,
|
"I dicern if my argument concerns to a versioned or an unversioned file,
|
||||||
|
Loading…
Reference in New Issue
Block a user