From 9e696aee3034c3ad651893d96af1e98ea155a900 Mon Sep 17 00:00:00 2001 From: Ivan Pulido Date: Sat, 6 Jun 2015 19:50:20 +0000 Subject: [PATCH] Updated method for updating docs. --- .../Grafoscopio/GrafoscopioBrowser.class.st | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index d88e43d..5e9dac5 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -223,7 +223,7 @@ GrafoscopioBrowser class >> startDockingBar [ updateMenu := MenuMorph new. updateMenu - add: 'Documentación' target: GrafoscopioBrowser selector: #updateDocumentation; + add: 'Documentación' target: GrafoscopioBrowser selector: #updateDocumentationNew; add: 'Grafoscopio' target: GrafoscopioBrowser selector: #updateGrafoscopio; add: 'Prerrequisitos' target: GrafoscopioBrowser selector: #updatePrerrequisites; add: 'Herramientas externas' target: GrafoscopioBrowser selector: #messageNotImplementedYet; @@ -273,6 +273,25 @@ localRepository exists ] ] +{ #category : #'as yet unclassified' } +GrafoscopioBrowser class >> updateDocumentationNew [ + +"Updates documentation/manual from official repository" + +| fileLocation filePath client | + fileLocation := './Docs/Es/Manual/'. + fileLocation asFileReference ensureCreateDirectory. + filePath := fileLocation,'manual-grafoscopio.ston'. + client := ZnClient new. + client get: 'http://mutabit.com/deltas/repos.fossil/grafoscopio/doc/tip/Docs/Es/Manual/manual-grafoscopio.ston'. + client isSuccess + ifTrue: [ filePath asFileReference + writeStreamDo: [ :stream | + stream write: client contents ]. + self inform: 'La actualización de la documentación ha terminado'. ] + ifFalse: [ self inform: 'Algo salió mal. Verifique su conexión a Internet.' ] +] + { #category : #'as yet unclassified' } GrafoscopioBrowser class >> updateGrafoscopio [ "Updates Grafoscopio with new versions of itself take from the source code repository and the User Interface"