|
|
Text Edit - Converting all files to HTML at once?
|
|
|
|
Junior Member
Join Date: Nov 2006
Status:
Offline
|
|
I have about 150 text documents in 'documents' in the finder which are html. I want to be able to open them in a 'preview the html' type mode. I understand that in order to do this, I have to open them and "save as" with ".html" extension. Then I can open them as they would appear, then still have access to the html code by 'view source'. Like I can automatically do without jumpting through such hoops in MS Word.
Would anyone know of any way I can gang-label these so I don't have to go through this process for each and every individual file? To add the html extension at the end?
Fingers crossed. Thanks!
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status:
Offline
|
|
They don't necessarily have to have a .html suffix to be read by whatever app you want. Why not just open the files in that app?
If you want to batch-change the default app they open with, select them all, get info, then change the selection under Open with...
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
With regard to batch-renaming files, create a Finder plug-in for it with instructions from here:
Automator - Examples
With regard to previewing HTM files, why not simply drag them onto the Safari icon in the Dock?
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2006
Status:
Offline
|
|
Wataru - I just switched to Mac from PC and didn't buy extra programs. I'm used to Word (or notepad?) where I can toggle between seeing my html code and a preview (pretty) version of the results of that code. On my new Mac, I only see "TextEdit" for word processing. I transferred my HTML text files and can't seem to find a way to see them without copying the html file and dumping it into a free online "html tester" page.
So I looked in TextEdit's help menu and it says to do this, I must open the file - save as - then type dot html on the end of each filename - save. Then when I open it, I get the preview/pretty view and can right click - view source on each to see & work on the html.
So unless there's another cool app in the system that I'm missing, TextEdit IS the app I need.
Tetenal - Dragging the file into Safari just gives me another view of my html file. Same thing. I don't see anything in Safari's menu to tweak. I'll try your link.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
Originally Posted by meagain
Tetenal - Dragging the file into Safari just gives me another view of my html file.
And what do you expect TextEdit to give you? You will just see your page as parsed HTML too, only worse since TextEdit's HTML display capabilities are not as advanced as Safari's.
Though you can edit a web page with text edit (enable "ignore richt text commands" in the TextEdit preferences or the open dialog) it is not intended as an HTML editor. For web page creation you are supposed to use iWeb (came with your Mac) or something like DreamWeaver if you do it professionally. I think closest to what you want might be PageSpinner.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2006
Status:
Offline
|
|
OK - Bad idea. I can't edit it now. At least I learned how to use Automator and can change it back to .txt.
My html files are already created. All I want to do is be able to tweak them a tiny bit here & there.
In Word and/or Notepad, I was able to tweak the html code, then hit a button to view what I just did. Very simple stuff. It seems Macs don't come with this ability and unless I purchase some package - have to copy my html code and dump it into some type of online html viewer page.
Would that be correct?
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
You can open the file in Safari and TextEdit at the same time. Tweak it in TextEdit, save it, then press the Reload button in Safari to view your changes.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2006
Status:
Offline
|
|
That sounds nice. I'm going to spend some time to figure out how to get it to show up in something other than html code. It will only open files with a .html extension.
Are you suggesting creating 2 separate folders and duplicating each file? One in .txt and one in .html? No, I don't think you are. LOL I've been thru the help menus and can't find how to do your trick.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Aug 2004
Location: FFM
Status:
Offline
|
|
No, I did not suggest you duplicate each file. You are editing HTML documents, so their extension should be .html. I already told you how to open HTML in TextEdit in the "text"mode without it rendering it: Go into TextEdit->Preferences->Open and Save and enable "Ignore rich text formats in HTML files". You then open the HTML as text in TextEdit and at the same file at same time in Safari. Once you make changes in TextEdit you save it (press ⌘S) and click the reload button in Safari to see the changes.
That's the free version of doing it. If you do this a lot you might want to have a look at PageSpinner or similar tools.
(
Last edited by TETENAL; Nov 13, 2006 at 01:28 PM.
)
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2006
Status:
Offline
|
|
My TextEdit died. Has a blank textedit page that I've not been able to get rid of no red button and the rest are dead, can't quit the program from the dock, have no menu items for preferences, etc. in the upper right menu bar. I'm going to restart the computer to see if it fixes it.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2006
Status:
Offline
|
|
I just learned about "force quit"
OK - I'll reconvert all the files to have an HTML extension again with the automator. I tested one and it worked. A bit clumsy, compared to a pc, but..... Thanks
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2001
Location: Toronto
Status:
Offline
|
|
Just get yourself a copy of Tag or any other application that's actually designed for html editing and previewing.
Using Word for html is an... interesting solution.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: May 2001
Location: NYC
Status:
Offline
|
|
TextEdit isn't ideal for coding, really, esp HTML (though doable, if you set the pref to ignore rich text).
For text editors, check out Bare Bones' TextWrangler (free) or TextMate ($50).
edit: mmm! Tag looks nice too.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2006
Status:
Offline
|
|
Thanks guys. I got my project done and familiarized myself with the system at the same time.
Awesome! I'll likely buy a web design software in the future, but I'm up and running.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2006
Location: Here
Status:
Offline
|
|
Originally Posted by meagain
Thanks guys. I got my project done and familiarized myself with the system at the same time.
Awesome! I'll likely buy a web design software in the future, but I'm up and running.
It doesn't sound like you have actually heeded their suggestion. I will show you.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status:
Offline
|
|
There are two freeware apps that you can try which will improve your life no-end as they will colour code the html syntax for you:
Smultron by Peter Borg
or
Bare Bones Software : PRODUCTS : TEXTWRANGLER
Under the Tools menu in Smultron is a Preview option which will show you the html rendered using WebKit:
Textwrangler doesn't have this but has more powerful text editing features.
(
Last edited by JKT; Nov 17, 2006 at 11:42 AM.
)
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2006
Status:
Offline
|
|
OMG - Perfect!!!!!!!!!!!! Thank you!
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Nov 2006
Status:
Offline
|
|
I have no idea why things don't work for me as they do others. I dumped my html in there then did 'preview' but it's a blank page. Will play around more.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|