@@ -8,18 +8,19 @@ doc = PRDocument new.
88
99"
1010Class {
11- #name : # PRDocumentListTransformer ,
12- #superclass : # PRNodeTransformer ,
11+ #name : ' PRDocumentListTransformer' ,
12+ #superclass : ' PRNodeTransformer' ,
1313 #instVars : [
1414 ' workingDirectory' ,
1515 ' currentFile' ,
1616 ' filesDirectory' ,
1717 ' availableTemplates'
1818 ],
19- #category : #' Pillar-ExporterHTML'
19+ #category : ' Pillar-ExporterHTML' ,
20+ #package : ' Pillar-ExporterHTML'
2021}
2122
22- { #category : # ' instance-creation' }
23+ { #category : ' instance-creation' }
2324PRDocumentListTransformer class >> withContext: aContext [
2425
2526 | inst |
@@ -28,7 +29,7 @@ PRDocumentListTransformer class >> withContext: aContext [
2829 ^ inst
2930]
3031
31- { #category : # adding }
32+ { #category : ' adding' }
3233PRDocumentListTransformer >> addAbstractOfCurrentFileToDocument: aDocument inAnnotation: aPRDocListAnnotation [
3334 | abstractOfCurrentFile |
3435 abstractOfCurrentFile := PRPillarParserMain parse: self currentFile contents.
@@ -44,7 +45,7 @@ PRDocumentListTransformer >> addAbstractOfCurrentFileToDocument: aDocument inAnn
4445 self addLinkToDocument: aDocument ]
4546]
4647
47- { #category : # adding }
48+ { #category : ' adding' }
4849PRDocumentListTransformer >> addLinkToDocument: aDocument [
4950 aDocument
5051 add:
@@ -53,12 +54,12 @@ PRDocumentListTransformer >> addLinkToDocument: aDocument [
5354 yourself )
5455]
5556
56- { #category : # accessing }
57+ { #category : ' accessing' }
5758PRDocumentListTransformer >> availableTemplates [
5859 ^ availableTemplates
5960]
6061
61- { #category : # transforming }
62+ { #category : ' transforming' }
6263PRDocumentListTransformer >> createDocList: aPRDocListAnnotation [
6364 | files document sortedFiles |
6465 " Check if the specified path exist and get pillar files from it.
@@ -84,23 +85,23 @@ PRDocumentListTransformer >> createDocList: aPRDocListAnnotation [
8485 ^ document
8586]
8687
87- { #category : # adding }
88+ { #category : ' adding' }
8889PRDocumentListTransformer >> currentDocumentInternalLink [
8990
9091 ^ PRInternalLink reference: self filesDirectory , ' /' , self currentFile basename
9192]
9293
93- { #category : # visiting }
94+ { #category : ' visiting' }
9495PRDocumentListTransformer >> currentFile [
9596 ^ currentFile
9697]
9798
98- { #category : # accessing }
99+ { #category : ' accessing' }
99100PRDocumentListTransformer >> filesDirectory [
100101 ^ filesDirectory
101102]
102103
103- { #category : # parsing }
104+ { #category : ' parsing' }
104105PRDocumentListTransformer >> generateFileUsingTemplateFromDocument: aDocument [
105106 | conf htmlDoc |
106107 " Read configurations"
@@ -117,12 +118,12 @@ PRDocumentListTransformer >> generateFileUsingTemplateFromDocument: aDocument [
117118 ^ htmlDoc
118119]
119120
120- { #category : # accessing }
121+ { #category : ' accessing' }
121122PRDocumentListTransformer >> lookForAvailableTemplates: aCollection [
122123 ^ (aCollection select: [ :each | (self workingDirectory resolve: each) exists and : [ each asFileReference extension = ' mustache' ] ]) asOrderedCollection
123124]
124125
125- { #category : # sorting }
126+ { #category : ' sorting' }
126127PRDocumentListTransformer >> sort: aCollectionOfReferences limit: anInteger by: aString [
127128 | references |
128129 references := aCollectionOfReferences first: anInteger.
@@ -133,18 +134,18 @@ PRDocumentListTransformer >> sort: aCollectionOfReferences limit: anInteger by:
133134 ^ references
134135]
135136
136- { #category : # visiting }
137+ { #category : ' visiting' }
137138PRDocumentListTransformer >> visitDocListAnnotation: aPRDocListAnnotation [
138139
139140 self replace: { (self createDocList: aPRDocListAnnotation) }
140141]
141142
142- { #category : # accessing }
143+ { #category : ' accessing' }
143144PRDocumentListTransformer >> workingDirectory [
144145 ^ workingDirectory
145146]
146147
147- { #category : # accessing }
148+ { #category : ' accessing' }
148149PRDocumentListTransformer >> workingDirectory: aFileReference [
149150 workingDirectory := aFileReference
150151]
0 commit comments