Documentation: Update tutorial. Temporal fix while looking for a more robust solution which takes into account SHA1 integrity codes for downloading only the changed material.
This commit is contained in:
parent
bbbc0ed07c
commit
4895f003d6
@ -227,9 +227,10 @@ GrafoscopioBrowser class >> startDockingBar [
|
||||
|
||||
updateMenu := MenuMorph new.
|
||||
updateMenu
|
||||
add: 'Documentación' target: GrafoscopioBrowser selector: #updateDocumentation;
|
||||
add: 'Grafoscopio' target: GrafoscopioBrowser selector: #updateGrafoscopio;
|
||||
add: 'Prerrequisitos' target: GrafoscopioBrowser selector: #updatePrerrequisites;
|
||||
add: 'Documentación > Tutorial' target: GrafoscopioBrowser selector: #updateDocumentationTemp;
|
||||
add: 'Documentación > Toda' target: GrafoscopioBrowser selector: #updateDocumentation;
|
||||
add: 'Herramientas externas' target: GrafoscopioBrowser selector: #messageNotImplementedYet;
|
||||
add: 'Ruta a pandoc' target: GrafoscopioBrowser selector: #configurePandoc;
|
||||
add: 'Ruta a fossil' target: GrafoscopioBrowser selector: #configureFossil;
|
||||
@ -255,28 +256,39 @@ GrafoscopioBrowser class >> startDockingBar [
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
GrafoscopioBrowser class >> updateDocumentation [
|
||||
"Updates documentation/manual from official repository"
|
||||
"Updates documentation (manual, tutorials) from official repository"
|
||||
|
||||
| update fileLocation filePath client docs |
|
||||
| update filePath fileLocation client docs |
|
||||
update := (UIManager default
|
||||
question: '¿Desea actualizar la documentación?'
|
||||
title: '¿Actualizar documentación?').
|
||||
update ifNotNil: [
|
||||
docs := Dictionary new.
|
||||
confirm: '¿Desea actualizar la documentación?'
|
||||
label: 'Actualizar documentación').
|
||||
update
|
||||
ifTrue: [
|
||||
fileLocation := './Docs/Es/Manual/'.
|
||||
fileLocation asFileReference ensureCreateDirectory.
|
||||
filePath := fileLocation,'manual-grafoscopio.ston'.
|
||||
docs := Dictionary
|
||||
with: 'manual' -> ( Dictionary
|
||||
with: 'remote' -> 'http://mutabit.com/repos.fossil/grafoscopio/doc/tip/Docs/Es/Manual/manual-grafoscopio.ston'
|
||||
with: 'local' -> './Docs/Es/Manual/'
|
||||
)
|
||||
with: 'tutorial' -> (Dictionary
|
||||
with: 'remote' -> 'http://mutabit.com/repos.fossil/grafoscopio/doc/tip/Docs/Es/Tutoriales/tutorial.ston'
|
||||
with: 'local' -> './Docs/Es/Tutoriales/'
|
||||
).
|
||||
docs do: [:each |
|
||||
client := ZnClient new.
|
||||
client get: 'http://mutabit.com/repos.fossil/grafoscopio/doc/tip/Docs/Es/Manual/manual-grafoscopio.ston'.
|
||||
client get: (each at: 'remote').
|
||||
client isSuccess
|
||||
ifTrue: [ filePath asFileReference
|
||||
ifFalse: [ self inform: 'Algo salió mal. Verifique su conexión a Internet.' ]
|
||||
ifTrue: [
|
||||
filePath := each at: 'local'.
|
||||
filePath asFileReference ensureCreateDirectory.
|
||||
fileLocation := filePath, ((each at: 'remote') splitOn: '/') last.
|
||||
fileLocation asFileReference
|
||||
writeStreamDo: [:stream |
|
||||
stream write: client contents asString].
|
||||
self inform: 'Actualización de la documentación terminada'. ]
|
||||
ifFalse: [ self inform: 'Algo salió mal. Verifique su conexión a Internet.' ] ]
|
||||
ifFalse: [self inform: 'Actualización de la documentación cancelada'. ]]
|
||||
].
|
||||
self inform: 'Actualización de la documentación terminada'.
|
||||
]
|
||||
].
|
||||
]
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
@ -303,6 +315,39 @@ localRepository exists
|
||||
]
|
||||
]
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
GrafoscopioBrowser class >> updateDocumentationTemp [
|
||||
"Updates documentation (manual, tutorials) from official repository"
|
||||
|
||||
| update filePath fileLocation client docs |
|
||||
update := (UIManager default
|
||||
confirm: '¿Desea actualizar la documentación?'
|
||||
label: 'Actualizar documentación').
|
||||
update
|
||||
ifTrue: [
|
||||
docs := Dictionary
|
||||
with: 'tutorial' -> (Dictionary
|
||||
with: 'remote' -> 'http://mutabit.com/repos.fossil/grafoscopio/doc/tip/Docs/Es/Tutoriales/tutorial.ston'
|
||||
with: 'local' -> './Docs/Es/Tutoriales/'
|
||||
).
|
||||
docs do: [:each |
|
||||
client := ZnClient new.
|
||||
client get: (each at: 'remote').
|
||||
client isSuccess
|
||||
ifFalse: [ self inform: 'Algo salió mal. Verifique su conexión a Internet.' ]
|
||||
ifTrue: [
|
||||
filePath := each at: 'local'.
|
||||
filePath asFileReference ensureCreateDirectory.
|
||||
fileLocation := filePath, ((each at: 'remote') splitOn: '/') last.
|
||||
fileLocation asFileReference
|
||||
writeStreamDo: [:stream |
|
||||
stream write: client contents asString].
|
||||
].
|
||||
self inform: 'Actualización de la documentación terminada'.
|
||||
]
|
||||
].
|
||||
]
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
GrafoscopioBrowser class >> updateGrafoscopio [
|
||||
"Updates Grafoscopio with new versions of itself take from the source code repository and
|
||||
|
Loading…
Reference in New Issue
Block a user