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 := MenuMorph new.
|
||||||
updateMenu
|
updateMenu
|
||||||
add: 'Documentación' target: GrafoscopioBrowser selector: #updateDocumentation;
|
|
||||||
add: 'Grafoscopio' target: GrafoscopioBrowser selector: #updateGrafoscopio;
|
add: 'Grafoscopio' target: GrafoscopioBrowser selector: #updateGrafoscopio;
|
||||||
add: 'Prerrequisitos' target: GrafoscopioBrowser selector: #updatePrerrequisites;
|
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: 'Herramientas externas' target: GrafoscopioBrowser selector: #messageNotImplementedYet;
|
||||||
add: 'Ruta a pandoc' target: GrafoscopioBrowser selector: #configurePandoc;
|
add: 'Ruta a pandoc' target: GrafoscopioBrowser selector: #configurePandoc;
|
||||||
add: 'Ruta a fossil' target: GrafoscopioBrowser selector: #configureFossil;
|
add: 'Ruta a fossil' target: GrafoscopioBrowser selector: #configureFossil;
|
||||||
@ -255,28 +256,39 @@ GrafoscopioBrowser class >> startDockingBar [
|
|||||||
|
|
||||||
{ #category : #'as yet unclassified' }
|
{ #category : #'as yet unclassified' }
|
||||||
GrafoscopioBrowser class >> updateDocumentation [
|
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
|
update := (UIManager default
|
||||||
question: '¿Desea actualizar la documentación?'
|
confirm: '¿Desea actualizar la documentación?'
|
||||||
title: '¿Actualizar documentación?').
|
label: 'Actualizar documentación').
|
||||||
update ifNotNil: [
|
update
|
||||||
docs := Dictionary new.
|
ifTrue: [
|
||||||
update
|
docs := Dictionary
|
||||||
ifTrue: [
|
with: 'manual' -> ( Dictionary
|
||||||
fileLocation := './Docs/Es/Manual/'.
|
with: 'remote' -> 'http://mutabit.com/repos.fossil/grafoscopio/doc/tip/Docs/Es/Manual/manual-grafoscopio.ston'
|
||||||
fileLocation asFileReference ensureCreateDirectory.
|
with: 'local' -> './Docs/Es/Manual/'
|
||||||
filePath := fileLocation,'manual-grafoscopio.ston'.
|
)
|
||||||
|
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 := 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
|
client isSuccess
|
||||||
ifTrue: [ filePath asFileReference
|
ifFalse: [ self inform: 'Algo salió mal. Verifique su conexión a Internet.' ]
|
||||||
writeStreamDo: [ :stream |
|
ifTrue: [
|
||||||
stream write: client contents asString].
|
filePath := each at: 'local'.
|
||||||
self inform: 'Actualización de la documentación terminada'. ]
|
filePath asFileReference ensureCreateDirectory.
|
||||||
ifFalse: [ self inform: 'Algo salió mal. Verifique su conexión a Internet.' ] ]
|
fileLocation := filePath, ((each at: 'remote') splitOn: '/') last.
|
||||||
ifFalse: [self inform: 'Actualización de la documentación cancelada'. ]]
|
fileLocation asFileReference
|
||||||
|
writeStreamDo: [:stream |
|
||||||
|
stream write: client contents asString].
|
||||||
|
].
|
||||||
|
self inform: 'Actualización de la documentación terminada'.
|
||||||
|
]
|
||||||
|
].
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'as yet unclassified' }
|
{ #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' }
|
{ #category : #'as yet unclassified' }
|
||||||
GrafoscopioBrowser class >> updateGrafoscopio [
|
GrafoscopioBrowser class >> updateGrafoscopio [
|
||||||
"Updates Grafoscopio with new versions of itself take from the source code repository and
|
"Updates Grafoscopio with new versions of itself take from the source code repository and
|
||||||
|
Loading…
Reference in New Issue
Block a user