Creating installation for template.
This commit is contained in:
parent
1f081f58cf
commit
c9d9ec9620
@ -0,0 +1,18 @@
|
|||||||
|
accessing
|
||||||
|
installTemplate
|
||||||
|
|
||||||
|
| templateFiles folder |
|
||||||
|
templateFiles := #(
|
||||||
|
'https://mutabit.com/repos.fossil/mutabit/raw?name=plantillas/TwentySecondsCV/twentysecondcvMod.cls&ci=tip' 'https://mutabit.com/repos.fossil/mutabit/raw?name=plantillas/TwentySecondsCV/template.mus.tex&ci=tip').
|
||||||
|
folder := TweetsCollection dataStore / 'templates'.
|
||||||
|
folder exists
|
||||||
|
ifTrue: [ folder ensureDeleteAllChildren ]
|
||||||
|
ifFalse: [ folder ensureCreateDirectory].
|
||||||
|
templateFiles do: [ :fileUrl |
|
||||||
|
ZnClient new
|
||||||
|
url: fileUrl;
|
||||||
|
downloadTo: folder.
|
||||||
|
(folder children detect: [ :file | file basename includesSubstring: 'raw' ])
|
||||||
|
renameTo: (((fileUrl splitOn: 'raw?') second splitOn: '/') last removeSuffix: '&ci=tip')
|
||||||
|
].
|
||||||
|
^ folder
|
Loading…
Reference in New Issue
Block a user