NeXT Computers Forum Index NeXT Computers
www.NeXTComputers.org
 
Log in to check your private messagesLog in to check your private messages

Log inLog in  RegisterRegister


Profile  Search  Memberlist  FAQ  Usergroups
Script to generate html and pdf versions of Next docs

 
Post new topic   Reply to topic    NeXT Computers Forum Index -> The Lounge
View previous topic :: View next topic  
Author Message
barcher174



Joined: 07 Dec 2012
Posts: 548

PostPosted: Tue Jan 06, 2015 8:57 pm    Post subject: Script to generate html and pdf versions of Next docs Reply with quote

All,

I've been experimenting with dumping out the Next developer documentation in other formats and thought I would share since a lot of these commands were new to me and seemingly pretty useful. I am copying over the .rtf files and then post processing them on the Mac. This will take a list of .rtf(d) files, convert the images (tiff and eps) to .png, and then dump both html and pdf formats.

Bash Script:

# Function to convert rtf to html & PDF
function convert {

mkdir $working_dir
cd $working_dir

#convert from rtf to html
textutil -convert html ../$current_file
mv ../*.html .
cp ../$current_file/*.eps .
cp ../$current_file/*.tiff .

#convert image files
echo ./*.eps | xargs -n1 pstopdf
sips -s format png ./*.pdf --out ./
sips -s format png ./*.tiff --out ./

#point to new image files in html
perl -p -i -e 's/\.eps/\.png/g' *
perl -p -i -e 's/\.tiff/\.png/g' *
perl -p -i -e 's/file:\/\/\///g' *

#clean up
rm -rf *.eps
rm -rf *.tiff
rm -rf *.pdf

#Save as PDF
cupsfilter *.html > $current_file.pdf

cd ../
rm -rf *.tiff
}

## Put your document info here

current_file=01_Planning.rtf
working_dir=01_html
convert

current_file=02_QuickStart.rtfd
working_dir=02_html
convert

etc....

#Combine the PDF files
"/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" -o test.pdf */*.pdf

--
Brian
Back to top
View user's profile Send private message
gaspar



Joined: 20 Jan 2006
Posts: 58

PostPosted: Tue Jan 06, 2015 9:40 pm    Post subject: Reply with quote

Are you planning to convert the document library then load them to here for future consumption?
I'm one of the (probably many) users that have no Mac nor can't afford a Mac.

Thanks
Back to top
View user's profile Send private message
barcher174



Joined: 07 Dec 2012
Posts: 548

PostPosted: Tue Jan 06, 2015 10:28 pm    Post subject: Reply with quote

Yes, my intent is to make these web accessable in the near future.
Back to top
View user's profile Send private message
gtnicol



Joined: 27 Dec 2005
Posts: 524
Location: Rhode Island, USA

PostPosted: Wed Jan 07, 2015 10:15 pm    Post subject: Reply with quote

Might be nice to produce an epub out of them as well?
Back to top
View user's profile Send private message
cuby



Joined: 12 Jan 2006
Posts: 160
Location: Coburg, Germany

PostPosted: Thu Jan 08, 2015 10:21 am    Post subject: Reply with quote

Some of the original NeXT manuals were converted to HTML and were available on channelu.com for quite some time, e.g. (mirror at cilinder.be):

http://www.cilinder.be/docs/next/NeXTStep/3.3/

I have no idea if these were converted by NeXT or somebody else. Would be nice to obtain the software used to do the conversion.

-- Michael
Back to top
View user's profile Send private message Visit poster's website
Rob Blessin Black Hole
Site Admin


Joined: 05 Sep 2006
Posts: 561
Location: Ft. Collins, Colorado

PostPosted: Wed Jan 14, 2015 12:59 am    Post subject: Reply with quote

cuby wrote:
Some of the original NeXT manuals were converted to HTML and were available on channelu.com for quite some time, e.g. (mirror at cilinder.be):

http://www.cilinder.be/docs/next/NeXTStep/3.3/

I have no idea if these were converted by NeXT or somebody else. Would be nice to obtain the software used to do the conversion.

-- Michael


Hello: Yes I did contact both Randy and they guy hosting them as he is a forum member, I have permission to upload them here and will back up at Black hole but last conversation was on November 11 , 2014 . I'll ping him again ! Best regards Rob Blessin
_________________
Rob Blessin President computerpowwow ebay sales@blackholeinc.com http://www.blackholeinc.com
303-741-9998 Serving the NeXT Community since 2/9/93
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    NeXT Computers Forum Index -> The Lounge All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2017 phpBB Group