I have a html file called myfile. If I simply put "cat myfile.html" in UNIX, it shows all the html tags like <a href=r/26><img src="http://www>. But I want to extract only text part.
Same problem happens in "type" command in MS-DOS.
I know you can do it by opening it in Internet Explorer,... (4 Replies)
Because of permission issues, I need to link to images in my web page which are stored in /tmp which of course is located in the root directory but my actual html page is much further down in another directory. I thought the the following code should work, but the image comes up as a broken link:... (2 Replies)
I am trying to use shellinabox as a terminal emulator. Everything is working except there seems to be no way to simulate an F14 button press in shellinabox. I am already embedding shellinabox in an html page so Im am wondering if there is a way to make an html/js button that will pass F14 to the... (0 Replies)
Hi there..
I need a proper "mutt" command to send a mail with html body and html attachment at a time.
Also if possible let me know the other commands to do this task.
Please help me.. (2 Replies)
Here is what I have so far
#!/bin/bash
while
do
read image
jpegtopnm $image | pnmscale -height 200 | pnmtojpeg > $image-thumb
echo $image-thumb
shift
done
I sorta threw some pseudocode in there to demonstrate what I'm trying to do. . Where I am... (3 Replies)
I tried to find elegant (or at least simple) way to remove all but couple of html tags from html file, but all examples I found dealt with removing all the tags.
The logic of the script would be:
- if there is <li> or <ul> on the line, do nothing (=write same line to output)
- if there is:... (0 Replies)
Hi all:
Been racking my brain on this for the last couple of days and what has been most frustrating is that this is the last piece I need to complete a project.
There are numerous posts discussing mutt in this forum and others but I have been unable to find similar issues.
Running with... (1 Reply)
Hi,
I need to search and replace references to duplicated images in HTML code. There are several groups of duplicated images, which are visually the same, but with different filenames. I managed to find the duplicated files themselves, but now I need to clean the code too. I have a CSV file with... (9 Replies)
Ultimately, I'm looking to create a script that allows me to plug in a usb drive with lots of jpegs on it & copy them over to a folder on my hard drive. So in the process of copying I am looking to hash check them, record dupes to a file, copy only 1 of the identical files (if it doesn't exsist... (1 Reply)
Discussion started by: JonaQuinn
1 Replies
LEARN ABOUT FREEBSD
web2png
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)