LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-28-2011, 12:31 AM   #1
white stone
LQ Newbie
 
Registered: Nov 2011
Posts: 6

Rep: Reputation: Disabled
Question How to work with HTML files off line in Linux Mint11


The problem I am having is this: I have a large group of HTML pages with one Directory page. In Windows as long as the directory and the other pages were in the same folder, I could open the Directory in any browser and navigate through all the pages. It did not matter if it was on the Root Drive or on a CD, as long as all the pages were in the same folder it worked like a charm.

Now, running Mint 11, I can open the Directory page from Nautilus but I can not navigate to any other page from there.

It must be possible but I am approaching it from the wrong direction. Please, someone, help me.

Thank You,
white stone
 
Old 11-28-2011, 04:33 AM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
Both Chrome and Firefox support browsing of local files and webpages, using the file:// directive.

For example, if you want to look at your home directory, you would use file://, plus the path of /home/username. So you would type this into the url bar: file:///home/username . (Three consecutive slashes are intended, two for directive, one is part of the path.)

Last edited by jhwilliams; 11-28-2011 at 04:34 AM.
 
Old 11-28-2011, 09:49 PM   #3
white stone
LQ Newbie
 
Registered: Nov 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thumbs up

Hello jhwilliams,

Your reply is appreciated. I love such clear illustrations. That should get me going - after I edit 1,000's of pages with multiple links. Gulp!

I imagine one of the text editing programs in Linux will have a 'find/replace/replace all' function. When I finally get everything all setup as I like I will look for one and the spare time to do all that editing.

Thanks for the quick reply,
White Stone
_________________________________________________
Quote:
Originally Posted by jhwilliams View Post
Both Chrome and Firefox support browsing of local files and webpages, using the file:// directive.

For example, if you want to look at your home directory, you would use file://, plus the path of /home/username. So you would type this into the url bar: file:///home/username . (Three consecutive slashes are intended, two for directive, one is part of the path.)
 
Old 11-28-2011, 11:53 PM   #4
white stone
LQ Newbie
 
Registered: Nov 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Smile Found a solution

As long as the file folder is on a Fat32 drive it behaves as it always did. It is only when it is on a ext4 partition that it acted touchy.

I have no problem keeping the folder on another partition. Just thought I would pass this along.

white stone
 
Old 11-28-2011, 11:54 PM   #5
kindofabuzz
Member
 
Registered: Mar 2010
Location: There
Distribution: Linux Mint 17.1
Posts: 237

Rep: Reputation: 46
use gedit
 
0 members found this post helpful.
Old 11-29-2011, 07:32 AM   #6
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
Quote:
Originally Posted by white stone View Post
after I edit 1,000's of pages with multiple links. Gulp!

I imagine one of the text editing programs in Linux will have a 'find/replace/replace all' function.
In the directory with your webpages, you can:

Code:
for webpage in $(find . -name "*.html"); do
    sed -i 's http://www.domain.com/ file:/// g' $webpage;
done
What that does:

For every document I find ending in .html, name it $webpage, and replace $webpage's remote path with a local file path.

Note: I am using a space as a delimiter in the sed expression, since those are not allowed (? well, at least not common) in URLs.

Actually, don't use that if any of your html files have names like "Page Two.html", with spaces.

Last edited by jhwilliams; 11-29-2011 at 07:34 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
converting .html files to pdf from the command line jason7 Linux - General 6 01-24-2009 08:46 AM
does files with .html extension work on linux server? prasanth_kumar Linux - Newbie 7 12-26-2008 12:27 AM
wget does not work because of no html files? ufmale Linux - Newbie 1 07-02-2008 11:45 PM
converting a doc/ppt Windows files in html files under linux env agrosu Programming 7 02-23-2006 03:07 PM
print files in PDF or html format from the linux command line IBKnobel Linux - Software 3 07-12-2004 09:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration