Integrating the Testing branch.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2015-01-29 10:14:44 +00:00
parent cc867e0065
commit 87afabc093
2 changed files with 18 additions and 18 deletions

View File

@ -344,10 +344,11 @@ GrafoscopioBrowser >> configureInitialTags [
tagsAvailable := OrderedCollection new.
tagsAvailable
add: 'código';
add: 'invisible';
add: 'obra';
add: 'original';
add: 'transmediado';
add: 'código'.
add: 'transmediado'.
]
{ #category : #'system-support' }
@ -959,15 +960,13 @@ GrafoscopioBrowser >> treeOn: constructor [
act: [self addToTagsAvailable] entitled: 'Agregar a disponibles' categorized: 'Etiquetas';
"For projects"
act: [self enableRepository] entitled: 'Activar' categorized: 'Proyecto';
act: [self enableRepository] entitled: 'Activar proyecto local' categorized: 'Proyecto';
act: [self messageNotImplementedYet] entitled: 'Activar proyecto remoto' categorized: 'Proyecto';
act: [self addFileToRepository] entitled: 'Agregar archivo' categorized: 'Proyecto';
act: [self messageNotImplementedYet] entitled: 'Eliminar archivo' categorized: 'Proyecto';
act: [self repositoryCommit] entitled: 'Enviar al histórico' categorized: 'Proyecto';
act: [self repositoryCredentials] entitled: 'Acreditarse' categorized: 'Proyecto';
"For modes"
act: [GrafoscopioBrowser new openFromFile: workingFile fullName asFileReference] entitled: 'Predeterminado' categorized: 'Modos';
act: [self buildBrowserNamed: workingFile inMode: 'transmedia'] entitled: 'Transmedia' categorized: 'Modos';
act: [self repositoryCredentials] entitled: 'Sincronizar local y remoto' categorized: 'Proyecto';
"For help"
act: [self messageNotImplementedYet] entitled: 'Ver como html en línea' categorized: 'Ayuda';
@ -975,9 +974,10 @@ GrafoscopioBrowser >> treeOn: constructor [
act: [self messageNotImplementedYet] entitled: 'Ver como árbol en grafoscopio' categorized: 'Ayuda';
"For external tools"
act: [self messageNotImplementedYet] entitled: 'Instalar' categorized: 'Herramientas externas';
act: [self messageNotImplementedYet] entitled: 'Actualizar' categorized: 'Herramientas externas';
act: [self configurePandoc] entitled: 'Definir ruta a pandoc' categorized: 'Herramientas externas';
act: [self messageNotImplementedYet] entitled: 'Definir ruta a fossil' categorized: 'Herramientas externas';
act: [self configureFossil] entitled: 'Definir ruta a fossil' categorized: 'Herramientas externas';
"For grafoscopio"
act: [self updateGrafoscopio] entitled: 'Actualizar' categorized: 'Grafoscopio';

View File

@ -89,8 +89,8 @@ GrafoscopioNode >> ancestors [
currentNode := self.
ancestors := OrderedCollection new.
(self level - 1)
timesRepeat: [
[currentNode level > 0]
whileTrue: [
ancestors add: currentNode parent.
currentNode := currentNode parent.].
ancestors := ancestors reversed.
@ -119,14 +119,14 @@ GrafoscopioNode >> ancestorsHeaders [
{ #category : #exporting }
GrafoscopioNode >> asMarkdown [
"Exports children of the curren node as pandoc markdown, using special nodes for config options and bibliography."
"Exports children of the current node as pandoc markdown, using special nodes accoding to tags"
| markdownOutput |
markdownOutput := '' writeStream.
(self preorderTraversal) do: [ :eachNode |
(eachNode level > 0) & (eachNode header notNil) ifTrue: [
(eachNode hasAncestorHeaderWith: '%invisible') not
ifTrue: [ markdownOutput nextPutAll: (eachNode markdownContent) ]]].
(eachNode level > 0)
ifTrue: [(eachNode hasAncestorTaggedAs: 'invisible') | (eachNode tags = 'invisible')
ifFalse: [ markdownOutput nextPutAll: (eachNode markdownContent) ]]].
^markdownOutput contents
@ -211,9 +211,9 @@ GrafoscopioNode >> hasAncestorHeaderWith: aSpecialWord [
{ #category : #exporting }
GrafoscopioNode >> hasAncestorTaggedAs: aSpecialWord [
"Looks if the receptor node has an ancestor with a header with 'aSpecialWord' as the only or the first word"
"Looks if the receptor node has an ancestor with a header with 'aSpecialWord' in its tags"
^ self ancestors detect: [:eachAncestor | eachAncestor tags = aSpecialWord ]
self ancestors detect: [:eachAncestor | eachAncestor tags = aSpecialWord ] ifFound: [^true ] ifNone: [^false ].
]
@ -341,7 +341,7 @@ GrafoscopioNode >> markdownContent [
markdown nextPutAll: (self body contents withInternetLineEndings); lf; lf. ].
((self header findString: '%embed') = 1)
ifTrue: [ ].
((self header findString: '%invisible') = 1) | (self header = '%invisible')
(self tags = 'invisible')
ifTrue: [
invisibleChildren := self children.
invisibleChildren ifNotNil: [ ] ].