Questions tagged [html]

HyperText Markup Language (HTML) is the main markup language for displaying web pages and other information that can be displayed in a web browser.

Filter by
Sorted by
Tagged with
121
votes
19answers
142k views

Simple command line HTTP server

I have a script which generates a daily report which I want to serve to the so called general public. The problem is I don't want to add to my headaches maintance of a HTTP server (e.g. Apache) with ...
66
votes
8answers
168k views

How do I send HTML email using linux 'mail' command?

mail -s "subject" xxxxx@gmail.com <test.html works, but only for plain text email. What is the correct way to send HTML email using the Linux command mail?
38
votes
4answers
17k views

Is there a simple Bash tool which can quickly render basic HTML?

From time to time I need to do a simple task where I output basic HTML into the console. I'd like to have it minimally rendered, to make it easier to read at a glance. Is there a utility which can ...
23
votes
4answers
24k views

How to parse hundred html source code files in shell?

I have a couple of hundred html source code files. I need to extract the contents of a particular <div> element from each of these file so I'm going to write a script to loop through each file. ...
23
votes
7answers
67k views

Text between two tags

I want to retrieve whatever is between these two tags – <tr> </tr> – from an html doc. Now I don't have any specific html requirements that would warrant for an html parser. I just plain ...
19
votes
1answer
9k views

Open html attachments externally in mutt

I recently managed to set up my mailcap so that mutt can show HTML e-mails in the message window: # ~/.mailcap text/html; lynx -dump '%s' | more; nametemplate=%s.html; copiousoutput; which is ...
18
votes
6answers
3k views

Is there a command-line tool for converting html files to pdf? [duplicate]

I would like to install a command line tool within a Docker image in order to quickly convert *html files into *pdf files. I am surprised there is not a Unix tool to do something like this.
9
votes
1answer
4k views

How to pipe html into lynx?

I am testing some ajax call from the console. I like get rid of the meta-information noise that is html markup and just read the content, hence I like to pipe it into a terminal browser, e.g. lynx. ...
9
votes
1answer
2k views

Save HTML from clipboard as markdown text

I want to be able to highlight a section of a web page and copy it to the clipboard then save it to my local disk as markdown. I need an efficient way to do that. My current cumbersome method is: ...
8
votes
5answers
8k views

How do I convert Linux man pages to HTML without using groff?

I would like to convert some Linux man pages to HTML without using groff. My prejudice against groff is due to some PNG rendering issues it is giving me that seems to be localized to Sabayon (as these ...
8
votes
4answers
29k views

Convert csv to HTML table

I have a Medical.csv file with rows of following format, field: 'participation.type', displayName: 'program_type', type: 'String',path:'participation' field: 'participation.program', ...
8
votes
2answers
1k views

Are there any good tools besides SeleniumRC that can fetch webpages including content post-painted by JavaScript?

One major shortcoming of curl is that more and more wepages are having their main piece of content painted by a JavaScript AJAX response that occurs after the initial HTTP response. curl never picks ...
7
votes
4answers
8k views

How to convert html entities to readable text?

I want html number entities like &#x119; and want to convert it to real character. I have emails mostly from linkedin that look like this: chcia&#x142;abym zapyta&#x107;, czy rozwa&#...
7
votes
1answer
2k views

Copy markdown input to the clipboard as rich text

I'm about to get involved in some collaborative prose writing with a friend of mine via email. As a regular person, he will of course be using MS Word document formats; as a massive nerd, I prefer to ...
7
votes
3answers
217 views

sed/awk subscript numbers in chemical formulas using markup tags

I have hundreds of text files that include chemical formulas together with narrative including numerical values. The formulas are always preceded by white spaces but can be followed by white spaces, ...
7
votes
5answers
12k views

How to convert to HTML code?

Are there any scripts that can convert between text (e.g. <hi>) and the html entities version (&lt;hi&gt;) like this website does? Or at least a PHP file?
6
votes
2answers
15k views

How can I use awk to extract URL's from a HTML file?

I have an HTML file with javascript and CSS in the source. Listed in the JS is a series of URLs' embedded with other meta-data. I want to use awk to extract the URLs (all enclosed in double quotes ...
6
votes
1answer
7k views

How do get an html file to open in preferred html application from command line on linux?

How do get an html file to open in preferred application from command line on linux? I have an xterm window open and an html file I want to do something like open test.html and that will start my ...
6
votes
1answer
975 views

Is there any way to get an HTML page rendered through Chrome/Chromium from a console?

Is there any way to get (into a file, for example) a rendered HTML page from Google Chrome/Chromium, but from a console. For example, SSHed into a machine that has Chrome/Chromium installed on Debian/...
6
votes
1answer
290 views

how to massage or format html in order to parse with xmstarlet?

Do I first need to run html in the wild through something like jsoup? Not to make it valid in a human sense, might turn it to gibberish, but at least so that xmlstarlet can process the file? ...
6
votes
2answers
4k views

Privoxy: blocking twitter, facebook and google outside of their domainslr

Related subject: blocking facebook.com outside facebook.com domain This is from default.filter ################################################################################# # # shockwave-flash: ...
5
votes
4answers
3k views

Get Apache to serve Markdown as HTML

Like many people, I prefer writing in Markdown - is there a mod_markdown or similar that will let Apache serve Markdown content but render as HTML ?
5
votes
1answer
3k views

How to download all html files from a URL's directory with wget?

I'd like to use wget to download a tutorial in a website, but this tutorial is in a specific directory. Suppose the URL is the tutorial main page http://www.abc.com/aaa/bbb/ccc/index.html. But the ...
5
votes
3answers
2k views

How to change the pair of a changed HTML tag in Vim?

How can I configure Vim so that when I change one member of a matching pair of HTML tags, the other is automatically changed to match? For example: given <span>content</span>, I want to ...
5
votes
1answer
117 views

The right tool to reverse the sorting order of thousands of elements in HTML file [closed]

I have a HTML file containing thousands of <div class='date'></div><ul>...</ul> blocks of code like below: <!DOCTYPE html> <html> <head> </head&...
5
votes
2answers
587 views

Can emacs render downloaded html files?

From Firefox, I downloaded a .html file, with a directory with name ended in _files, by specifying "Webpage, Complete". When open the .html in emacs, even under html-mode, only the source of the html ...
5
votes
1answer
348 views

What tools allow me to present man pages as formatted HTML on a web server?

What tools exist to make man pages available on a system available via HTTP and link topics together such that references in the SEE ALSO sections and elsewhere will become hyperlinks in the HTML ...
5
votes
1answer
4k views

HTML email from heirloom mailx on linux

I've been trying to work through sending a html email from mailx on a linux server. Few Notes: I have to specify a smtp server so therefore I cannot use sendmail (This is not something I can change ...
5
votes
1answer
4k views

mutt: rendering html emails using w3m

I occasionally receive html messages and I would like to see whether text has been formatted or colored by the sender. I can simply navigate to the attachment list and open the text/html MIME type ...
4
votes
3answers
2k views

bash - extract filenames from html file containing multiple links

I have downloaded an html file autogenerated by a script on a webpage. The file contains multiple links, including links to images I am trying to extract the full names of the images, for example <...
4
votes
4answers
647 views

Use sed to encapsulate the first word of each paragraph with <i> </i>?

So obviously I am trying italicize the first word of each paragraph in a huge document. I think its relatively easy to add the prefix but how do I delineate just the first word for the postfix instead ...
4
votes
2answers
2k views

How to convert a PowerPoint ppt file into HTML files?

I have to find a free, gratis command line solution to convert primary Microsoft PowerPoint presentations into HTML files (1 HTML file per foil) on Linux (Debian, OpenSuse). It would be nice if the ...
4
votes
2answers
835 views

Bash script to extract some information from Ebay HTML pages

I would like to filter the output of a search on ebay which I've exported to a text file. There are a number of results in the search but I've included just one example at the bottom of this post as ...
4
votes
4answers
1k views

Extracting strings from between special characters

I have a large text file created from combining lots of html files. cat *.html > all_html_files.txt Inside the text file are specfic strings that I want to extract to another text file. For ...
4
votes
2answers
1k views

Run shell scripts through a website

I have been reading and searching on what is the best way to run my shell scripts through a website. My goals are as follows: Browse a folder Select folder or contents onclick will run script ...
3
votes
3answers
14k views

Display hostname in static HTML page on uhttpd

I have a docker container running uhttpd and serving a static HTML page. How can I dynamically insert the hostname of the container into the static HTML page? I want to keep the container as ...
3
votes
2answers
83 views

Parsing CSV with AWK to Produce HTML Output

I have a data file with rows of comma-separated fields like this: United Kingdom, GB, +44 and I want to produce the following output for each line in the file: <option value="GB">United ...
3
votes
1answer
11k views

send html using mailx

I'd like to send a html file from a host using mailx but instead of interpreting it as html it would send it out as text (html codes). Is there a way to send it as html? (cat <<EOCAT Subject: ...
3
votes
3answers
1k views

basic webscraping from the CLI

I'm trying to fetch html tags and their attributes from a webpage with linux command line tools. Here's the concrete case: Here's the task: Get all 'src' attributes of all 'script' tags of the ...
3
votes
1answer
698 views

Force lynx or elinks to interpret spaces and line breaks

Consider the following commands, and their results : $ echo "<br/> <br/>a<br/>b<br/>c<br/><br/> <br/>"|lynx -dump -stdin a b c $ echo "<br/> &...
3
votes
1answer
106 views

How to correctly remove a footer with hxremove?

I try to remove a footer section in multiple html files. For simplicity I started with just one file. The file contains: <footer id="footer"> ... </footer> I tried hxremove footer foo....
3
votes
1answer
301 views

Can I add the Twig file type to Linux?

I generally give Twig files a "twig" extension. As I understand it these Twig files are usually recognised as HTML like files by Linux using some sort of scan algorithm. So Nemo for example ...
3
votes
1answer
2k views

ability to view browser view for html file from vim

Is there a plugin / program / key binding that will let me preview html files that I am editing in vim in a browser? Background: I have abandoned traditional full-feature editors and IDE's (of which ...
3
votes
1answer
2k views

CutyCapt seems to ignore the Xvfb screen size parameters

I have a problem using CutyCapt to create images rendered for a particular screen size. For example, if I do these: xvfb-run --server-args="-screen 0, 800x600x24" \ ~/bin/CutyCapt/CutyCapt --url='...
3
votes
1answer
333 views

Using wget or another command, how to download now but convert links later?

The useful option wget --convert-links or wget -k makes "links in downloaded HTML or CSS point to local files." It makes two passes: Pass 1: download files. Pass 2: convert links. I want to do pass ...
3
votes
1answer
1k views

How do I run webm video file in firefox using HTML5 on linux?

I am using apache server on linux and want to run a .webm video file. I have .webm video file which i am trying to run in firefox (V 12.0) using HTML5 but the browser is showing as "no video with ...
2
votes
4answers
17k views

Simple way to extract value from HTML

I have a very simple html file with a value inside. Value is 57 in this case. <eta version="1.0"><value uri="/user/var/48/10391/0/0/12528" strValue="57" unit="%" decPlaces="0" scaleFactor="...
2
votes
1answer
20k views

500:Internal Server Error from CGI program

I am trying to write a CGI Program which is invoked from a HTML page . The CGI code snippet is as follows: #!/bin/bash echo "Content-type: text/html" echo "<html>" echo "<body>" ...
2
votes
3answers
2k views

Trying to remove all ids from an HTML file with grep

I'm trying to remove all id=" "s from an .html file but I'm not sure where I am going wrong. I tried using regular expressions but all I am getting is the .html file rendering in my Ubuntu terminal. ...
2
votes
3answers
1k views

Shellscript to remove particular tags in HTML file

Can anyone please guide me with writing Shell Script command for following scenario. I have an html file with all tags in a single line like this, <html><head></head><body>&...