Wikipedia:Reference desk/Archives/Computing/2015 June 3

= June 3 =

How can i effectively print ONLY the body of an email in GMail?
Hello,

I am working customer service at a business. We have a customer who sends their purchase orders as embedded HTML, and can not change this in their system for a while. I am receiving this into a GMail account, and just want to print the contents of the message. So the general layout looks like this vertically:

Senders info, time sent, who sent to, the little arrow on the top that lets you do things to the message, print icon Body of message (This is the section i want) Horizontal Rule Quick reply box

By pressing F12 in firefox, i was able to find via the inspector that there is a div tag happily containing everything i want to print! This div tag looks like this:

I wanted to maybe somehow write a java program to take the raw HTML and delete all except this div tag and its child nodes, but when i right click in gmail and do view source, the HTML is TOTALLY DIFFERENT! I search for the above tag and it is not there! Isnt inspector from FireFox just a more complicated view of the raw HTML, in that it organizes the nodes beyond raw text, and allows edits etc?

I also realize that this might not work well, depending on if the styling of the message itself is inline or elsewise. What is the best way to print ONLY THE MESSAGE? I do not want to use GMail's standard print feature, as print/print-all adds a header with GMail logo, and also preserves the To: and From: fields, which i dont want to be shown for important reasons.

Thanks in advance for any tips/help! :)

216.173.144.188 (talk) 15:39, 3 June 2015 (UTC)


 * The web pages often (including Gmail) contain elements inserted dynamically by javascript (in fact the whole page can be generated by js scripts). The "view source" tool only shows html that was loaded from the server before any modifications to it were done by javascript. I think, you can try copy/paste from the browser to some text editor like Microsoft Word. Ruslik_ Zero 19:50, 3 June 2015 (UTC)


 * Yes, a text cut and paste works, provided the Gmail content is text. An image cut and paste (Print Screen) would be needed if the Gmail contained graphics.  Of course there the limitation is that only one screen's worth can be cut and pasted at a time. StuRat (talk) 03:25, 4 June 2015 (UTC)


 * FYI: JavaScript is different from Java. I think you want JavaScript.


 * Here are some ideas:


 * Copy and paste in the Inspector
 * In the message information header, click the printer icon. This opens a new tab with the printable view of the message and also opens the Print dialog box. Cancel the Print dialog box so you can work with the printable view page.
 * Open the Inspector and find the element you are interested in. Right click on that element and choose "Copy Inner HTML".
 * In the Inspector, go to the top  element, right click on it and choose "Paste Inner HTML".


 * Example JavaScript
 * You might be able to do the same kind of thing in JavaScript. If you can find an element that has an id and it's always the same id every time, it will be easier. For example, if the body of the message is always in a div like this:
 * Then the the following line of JavaScript will move the contents of that div element to the top body element:
 * Notes:
 * gives you an array of elements.
 * gives you the first thing in that array.
 * returns just one element.
 * --Bavi H (talk) 03:10, 4 June 2015 (UTC)
 * returns just one element.
 * --Bavi H (talk) 03:10, 4 June 2015 (UTC)

No, i did not confuse Java with JavaScript, and i know they are different. My intent was to do parsing of the raw HTML using a Java Application. However, since JS alters the raw HTML in this case, it seems like a less viable solution. I was looking for something quick that didnt involve manually deleting nodes from inspector, but that method may have to do in this case. 216.173.144.188 (talk) 13:55, 4 June 2015 (UTC)
 * You can look at Google api. Ruslik_ Zero 20:56, 4 June 2015 (UTC)

Name of type of graph and tools to produce it
How do you can a graph that let's a user go through options? It is quite common in troubleshooting. For example, you have a lozenge with a question that you answers as yes/no, and then you follow one route or the other. --Llaanngg (talk) 17:29, 3 June 2015 (UTC)


 * Do you mean a Flowchart--Aspro (talk) 17:44, 3 June 2015 (UTC)


 * Yes, thanks, I was missing this word.--Llaanngg (talk) 17:51, 3 June 2015 (UTC)
 * Diagramming_software has some options, I think Dia_(software) is the only option that is multi-platform and open source. If you don't need to make very many, or if you want extra control over the graphics (shading, gradients, etc.), then Inkscape is also a viable option. SemanticMantis (talk) 18:50, 3 June 2015 (UTC)


 * I came along these two solutions, which seemed decent. But I went with GraphViz and installed it 2 minutes ago. It appears to be well developed and easy to use for the basic tasks.--Llaanngg (talk) 19:15, 3 June 2015 (UTC)

Server Games
Hello friends,

I got something for you lot:

192.168.70.20server-2/Games-Collection/Hands-PC

If you know what to do, then you know what to do!

Mr. Prophet (talk) 19:32, 3 June 2015 (UTC)


 * IP addresses that start 192.168. are private network addresses. Whatever you see there, we can't see it. -- BenRG (talk) 20:09, 3 June 2015 (UTC)
 * I didn't know. I'm on payg 'kbs' internet price plan (a system that runs in this country), otherwise, I would've sought help in order to download the games. I thought it would be useful for some of you; got this only for you guys to be honest...since I'm always here and you guys always help me... -- Mr. Prophet (talk) 19:11, 4 June 2015 (UTC)


 * This is inappropriate for Wiki Reference Desk. Is this not removable by some policy? 216.173.144.188 (talk) 20:25, 3 June 2015 (UTC)
 * I didn't know -- Mr. Prophet (talk) 04:58, 4 June 2015 (UTC)


 * In the future if you'd like to share links with the ref desk group, the talk page is a better place. SemanticMantis (talk) 21:20, 3 June 2015 (UTC)
 * Okay! -- Mr. Prophet (talk) 04:58, 4 June 2015 (UTC)

What command would do a crawl?
When dinosaurs still roamed the Earth, I studied FORTRAN, COBOL, BASIC and a couple of other languages and, while the cable channel at the beach with beautiful music and community announcements looked like something which could be produced with simple computer programs in that era, it also had a crawl at the bottom of the screen, sort of like with TV weather bulletins. That's one thing we never did.— Vchimpanzee  •  talk  •  contributions  •  20:41, 3 June 2015 (UTC)


 * Have a look at the (very long) news ticker. At a skim, I see that the very first ones on TV in the USA in the 1950s used paper tapes superimposed. Of course now it's all digital compositing. If you spend some time there, you might be able to figure out the technology likely to have been used during the time you mention. I feel like there's a specific technology used ~1980s-1990s but I can't recall or find the name, you may have some luck browsing Glossary_of_video_terms. SemanticMantis (talk) 21:18, 3 June 2015 (UTC)


 * I did look at news ticker but it didn't say how a programming language would do that. And "news ticker" would be too specific. Any Google search seems to give me information about Web crawling. When I studied programming, the web was nothing more than Arpanet.— Vchimpanzee  •  talk  •  contributions  •  22:01, 3 June 2015 (UTC)


 * This is easy to do, as long as you move one character at a time. You just need to print the line of text shifted over one character each time, with a system call to clear the screen.  In an MSDOS command prompt window, "CLS" is the command.  So, your line of code, in FORTRAN, is:

call system("CLS")


 * In C it's just:

system("CLS");


 * Of course, if you also have other things displayed on the screen, this will also clear them, so you'd have to reprint everything, and that delay might ruin the apparent motion of the crawler. It would look a bit better if the crawler was at the top of the screen, though.


 * There are also extended DOS commands that let you do things like back up one line and reprint it. That solves the problem of CLS clearing the entire screen.  However, you may not have those extended DOS commands.


 * If you want to move one pixel at a time, this requires considerably more work. One method would be to save images shifted over 1 pixel each frame, and then display them, or create an animated GIF for later display from those frames. StuRat (talk) 00:28, 4 June 2015 (UTC)
 * Of course they did have other stuff on the screen. So from this, I can't really tell how they did this back in the dark ages.— Vchimpanzee  •  talk  •  contributions  •  13:57, 4 June 2015 (UTC)


 * In the latter days of analog TV (PAL, NTSC, SECAM) digital graphics were composited into analog signals for various purposes including sports scores, news tickers, weather info, and channel logos (digital on-screen graphics). A genlock was responsible for making sure the two signals were synchronised properly (which is necessary to keep the digital overlay stable on the analog field). Dedicated broadcast overlay software and hardware was produced by a number of companies including Quantel, Evans & Sutherland, and NewTek. NewTek's Video Toaster was a popular lower-cost option, as it was for a long time based on the Commodore Amiga home computer. All of these systems contained software designed for the broadcast playout industry, with customisable modules for the usual kinds of overlays that TV stations wanted to generate. -- Finlay McWalterᚠTalk 16:51, 4 June 2015 (UTC)
 * We never studied crawling in any of my classes, and no one is telling me about doing this specifically on a computer screen, which is what those community announcement channels would have been like, so I'm thinking maybe what i'm asking about couldn't be done.— Vchimpanzee  •  talk  •  contributions  •  17:23, 4 June 2015 (UTC)
 * Stu told you: just rewrite the whole line. Beyond that the specifics would depend on your screen display; for example, with a terminal supporting the ANSI escape codes. such as the VT100, to avoid the need to clear the whole screen you'd first write an escape sequence that would direct the cursor to the start of the specific line you wanted to rewrite. --174.88.135.200 (talk) 17:44, 4 June 2015 (UTC)


 * Tickers, like other kinds of graphical animation, are done using a graphics library, where you have exact control over the specific pixels that are being drawn, down to the per-pixel position of the text. Like other animations, you redraw the display tens of times per second, varying the position of objects to simulate motion. -- Finlay McWalterᚠTalk 18:56, 4 June 2015 (UTC)
 * I think that escape sequence must be how someone in one of my classes displayed an error message without the rest of the screen having to change. This was long before web pages, but it was the sort of thing that can be done fairly easily now, I guess. All this was theory. I'm not actually trying to do anything.— Vchimpanzee  •  talk  •  contributions  •  21:56, 5 June 2015 (UTC)
 * This is stretching my memory a bit, but I think I recall there being certain video modes on certain operating systems (sorry, don't remember specifics) which reserved one of the text mode lines as "special". That is, the screen was laid out in a 25x80(?) grid of characters, but only 24 of the lines were part of the "standard" display area. The 25th line was controlled independently. The text mode article does make mention of this 24+1 split, but doesn't say anything about independently controlling the 25th line. -- 162.238.240.55 (talk) 12:39, 6 June 2015 (UTC)