Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Moving .html files while preserving hyperlink integrity? Post 654 by Buddy123 on Thursday 21st of December 2000 01:44:26 PM
Old 12-21-2000
Question

Hi,

I use a Windows-based program called <a href="http://www.coast.com">Coast Webmaster</a> for moving large numbers of HTML files in one directory to another directory. As you drag and drop each file or entire directory of files to new locations in the web root directory tree, this utility will find every <b>a href=</b> and <b>img src=</b> hyperlink in every HTML page and re-write it so the paths are correct. Very handy, but it does require you to do all your changes locally and then upload the pages into their new directories on your web server.

My question is this: Since I use BSDI Unix ISS4 for my web server, does anyone here know of a Unix-based program or Perl script that will allow me to move individual .html pages, or entire directories containing .html pages, to a new directory AND that will re-write all the local page and image links contained in those .html pages?


Buddy123
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Create Hyperlink

Hi Everybody, I am new to this forum. I need help. Here is the details: I have a .csv file in unix server which is 2MB size I am attaching this file and sending to all users who are in my team thru Microsoft outlook. All users requested me to send the link where we can click and open... (1 Reply)
Discussion started by: utham1
1 Replies

2. Shell Programming and Scripting

Using Perl to add hyperlink to html files

Hi , I have written a csh script which will output file named " myoutput.html " displayed below. I am tried to ftp this html file into a local web server so that it can be displayed to public sharing this server and i would want to add a hyperlink to " XX " , " YY " , " ZZ ". Can this be done... (17 Replies)
Discussion started by: Raynon
17 Replies

3. AIX

hyperlink settings

Does anyone know the hyperlink settings to look at an AIX5L box? (1 Reply)
Discussion started by: vbagwell
1 Replies

4. Shell Programming and Scripting

shell script preserving last 2 versions of files

I need some help with the logic and syntax for a shell script (ksh) that will search a directory and look for similar files and save only the last two versions. The version number is in the file name. However, the files are of varying name lengths and may have 1 or many files, with no limit to... (6 Replies)
Discussion started by: synergy_texas
6 Replies

5. UNIX for Dummies Questions & Answers

Moving Multiple files to destination files

I am running a code like this foreach list ($tmp) mv *_${list}.txt ${chart}_${list}.txt #mv: when moving multiple files, last argument must be a directory mv *_${list}.doc ${chart}_${list}.doc #mv: when moving multiple files, last argument must be a... (3 Replies)
Discussion started by: animesharma
3 Replies

6. Web Development

Dynamic Hyperlink

Hi Guys/ Gals, I am trying to create a link based on the current date however it doesnt seem to work. Could someone please point me in the right direction. Here is what i have so far.. <html> <head> <script type="text/javascript" language="JavaScript"> function... (2 Replies)
Discussion started by: robfwauk
2 Replies

7. Shell Programming and Scripting

Finding files with wc -l results = 1 then moving the files to another folder

Hi guys can you please help me with a script to find files with one row/1 line of content then move the file to another directory my script below runs but nothing happens to the files....Alternatively Ca I get a script to find the *.csv files with "wc -1" results = 1 then create a list of those... (5 Replies)
Discussion started by: Dj Moi
5 Replies

8. AIX

Moving Hidden files to normal files

I have a bunch of hidden files in a directory in AIX. I would like to move these hidden files as regular files to another directory. Say i have the following files in directory /x .test~1234~567 .report~5678~123 .find~9876~576 i would like to move them to directory /y as test~1234~567... (10 Replies)
Discussion started by: umesh.narain
10 Replies

9. Shell Programming and Scripting

Space moving to next column (awk HTML)

Hi I have create a report and have converted the text output to HTML but in the output there is a sentence "The transaction was aborted by the user.", the spaces between this sentence is considered as separate column. How can I overcome the same? I am providing my code, text output and... (7 Replies)
Discussion started by: Dumpi16
7 Replies

10. UNIX for Beginners Questions & Answers

Help with moving list of data to 2nd column of HTML file

Hi Team, Can you help me with writing shell script to printing the list output to 2nd column in HTML file. (2 Replies)
Discussion started by: veereshshenoy
2 Replies
WEB2PNG(1)							     Graphics								WEB2PNG(1)

NAME
web2png - convert a web tree from using GIFs to using PNGs SYNOPSIS
web2png [-adnrtv] [directory...] DESCRIPTION
Web2png is a front end for gif2png(1) that automatically converts entire web page hierarchies from using GIFs to using PNGs. It does image conversion and patches IMG SRC references in web pages. The arguments to web2png must be directories; if none are given, the current directory is assumed. In each directory, web2png tries to convert every GIF to a PNG. It leaves alone GIFs that have multiple images, because these will not display properly in all current browsers. It also does not reconvert GIFs that already have corresponding PNGs (e.g. the same name except for the .gif file extension). The original GIFs are left in place. Web2png tracks successful conversions. It then looks at each HTML, secure HTML, HTML inclusion, PHP page, JavaScript program or Cascading Style Sheet under the argument directories (extensions html, shtml, .inc, .php, .js, .css). In these pages, it fixes each reference to each successful converted GIF to point at the PNG. References in relative HREF and BACKGROUND tags are recognized by filename and fixed (any base directory declared by a BASE tag will be be prepended to the relative URL). References that are HTTP URLs are matched against the list of convertible GIFs by basename; if there is such a match, the contents of the URL is retrieved and compared to the convertible GIF. If both basename and data match, the HTTP reference is fixed. If the pages are under RCS version control, they're checked out for modification before being altered; otherwise, a copy of the original of each modified web page is left in the same directory, with the additional extension .bak. The following options change the behavior of the program: -a Convert all GIF files, including those with multiple images. -d Delete originals. Removes all GIFs with corresponding PNGs, and all .bak files. -n Make no changes. With this option, web2png reports on what needs to be done (and on GIFs that have multiple images), but neither converts GIFs nor touches web pages. -r Reverse. Restore all HTML/SHTML/PHP pages from the .bak files created by a previous run (or, if the files were under version control, revert them). Remove PNGs with corresponding GIFs. -v Verbose. Utter more trace information about the conversion process. Web2png can be run on a directory that has already been partly converted by previous runs; it will do the minimum necessary amount of work. The changes it makes will be fully reversible with -r until you run it in -d mode. Web2png is written in Python. Python 1.5.2 or better must be installed and accessible on your system in order for web2png to run. NOTE
Sometimes it's possible to convert transparent GIFs without altering the appearance of the page, by knowing from context that they will always place within an area of fixed and solid color. Web2png can't deduce when this will be, so it doesn't try; but it may be useful to apply gif2png with the -b option by hand. KNOWN PROBLEMS
The algorithm for fixing HTTP URLs is not foolproof. It could be confused into incorrectly patching an HTTP URL reference to a GIF into an invalid reference to a PNG if the GIF matches a local target GIF by both basename and binary content, but actually lives on another host. This program does not automatically convert CGIs; you'll have to do that by hand. Other dynamic-content methods (such as server-side inclusions) may also require hand-hacking. The program cannot tell converted from preexisting PNGs; if you have PNGs with the same stem name as corresponding GIFs but carrying different information, the -r mode will clobber them. SEE ALSO
gif2png(1) AUTHORS
Eric S. Raymond <esr@thyrsus.com>, October 1999. Slightly modified for Debian by Aaron Isotton <aaron@isotton.com>. web2png 03/08/2012 WEB2PNG(1)
All times are GMT -4. The time now is 06:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy