'From etoys3.0 of 18 March 2008 [latest update: #1958] on 7 April 2008 at 3:09:55 pm'! "Change Set: QGuide-web2-tk Date: 7 April 2008 Author: Ted Kaehler Enhancements to the code that writes QuickGuides out as web pages. This is only used by Ted, and is not needed by normal EToys users. See web pages of the guides at: http://wiki.laptop.org/go/Etoys_QuickGuides_Index Add the text in each page of the guide to the 'alt=' field of each image in the web page, and also add the text to the bottom of the page. This is so that search engines will find it. Users will be able to search for a QuickGuide topic on Google and find the guide page. "! !QuickGuideMorph methodsFor: 'write web pages' stamp: 'tk 3/17/2008 14:49'! allTextIn: aPage "Return a string of all the text in all the textMorphs on this page. separated by period space space." | tt | ^ String streamContents: [:strm | aPage allMorphsDo: [:mm | (mm isKindOf: TextMorph) ifTrue: [ tt _ mm contents string withBlanksTrimmed. strm nextPutAll: tt. (tt size > 0 and: [tt last ~= $.]) ifTrue: [strm nextPut: $.]. strm space; space]]].! ! !QuickGuideMorph methodsFor: 'write web pages' stamp: 'tk 3/15/2008 16:27'! guideToWeb "Write all the info in this guide to a web page. Pages are images (jPEGs). Create a page to hold them." self guideToWebWithJPEGs: true.! ! !QuickGuideMorph methodsFor: 'write web pages' stamp: 'tk 3/18/2008 00:10'! guideToWebWithJPEGs: withPics "Write all the info in this guide to a web page. Pages are images (jPEGs). Create a page to hold them." | dir qgh bk strm ff allText thisText | dir _ FileDirectory default directoryNamed: 'QG-web'. "picutres of guide pages" qgh _ self submorphOfClass: QuickGuideHolderMorph. bk _ qgh submorphOfClass: BookMorph. strm _ WriteStream on: (String new: 500). strm nextPutAll: (self htmlPreamble: qgh guideNameInWords). "includes index side bar" allText _ ''. 1 to: bk pages size do: [:ii | withPics ifTrue: [ "Make images of pages" bk goToPage: ii. "show it" self jPegOutDir: dir]. thisText _ self allTextIn: (bk pages at: ii). strm nextPutAll: '
Jump to Top
Squeak Etoys is a "media authoring tool"-- software that you can download to your computer
and then use to create your own media. You can write out your project and share it with others.
Etoys runs on any Mac or Windows machine, as well as on the OLPC XO machine.
It is free. Find out about Etoys.
Text of this guide (for searching): ', allText, '