User:P999/Toggle VF

Jump to navigation Jump to search

The primary purpose of the script Toggle VF is to create a voice-friendly (VF) version of any Wikipedia article that will be suitable for seamless reading aloud by text-to-voice applications such as "Voice Dream"[1], "Text Aloud"[2], Microsoft's "Narrator", Apple's "VoiceOver", etc. This voice-friendly version is produced by suppressing those parts of a Wikipedia article that cannot be correctly or meaningfully rendered by a text-to-voice application; depending on the article in question, these non-renderable items may include images, tables, in-line references, various templates and user interface elements, as well as metadata.

The Toggle VF display of an article may also be of interest to those users who prefer to read an uncluttered version of Wikipedia articles on the screen.

Toggle VF has been designed so as not to interfere with the normal reading and printing operations of Wikipedia. It will reside 'silently' on your computer and only be activated when you click on either the "Toggle VF" button or the "Printable VF" button.

Usage[edit]

You must have the "Adobe PDF" virtual printer [3] or some other virtual PDF printer installed as a printer on your computer or mobile device in order to follow the instructions that will be provided in this documentation. Additionally, it is very convenient, although by no means necessary, to store the PDF files created by Toggle VF on a cloud drive, ideally in a folder/directory labeled 'WPVF' since doing this will make your voice-friendly Wikipedia files easy to locate when you want your text-to-speech application to read them aloud. (Note: "Google Drive" [4] has been found to work best if you are going to be transferring multiple files.)

Follow the instructions for installation in the section below. After you have done so, check to make certain that the option "Toggle VF" appears in the "Tools" section of the Navigation Bar. If you do not see this option it means that the script Toggle VF is not active, so please check your installation.

Once Toggle VF has been successfully installed, by clicking on the button labeled Toggle VF when in screen display mode, the user can toggle between viewing the voice-friendly format and the normal Wikipedia format. In the Mozilla browser, and possibly some other browsers, you can also use the access key SHIFT+ALT+4 for the same purpose.

Navigate to a Wikipedia article that you want to convert to VF format. If you are viewing it in normal Wikipedia format, click on the Toggle VF button in the Navigation Bar (or use the SHIFT+ALT+4 access key) if you wish to preview it in VF format. (Depending on the length of the article, there may be a delay of a few seconds for processing before it re-appears in VF format.) To indicate that the VF format is being displayed, the main title of the article will have been shifted from its normal left-aligned position to a center-aligned position.

Next, select the "Printable VF" option in the "Print/export" section (or use the SHIFT+ALT+v access key). After a few seconds, the voice-friendly printable version of the article you have chosen should be displayed.

Note: Instructions from here on will be provided for the Mozilla browser, but Toggle VF has also been found to work successfully in Internet Explorer, Opera, Chrome, Safari and SeaMonkey.

In Mozilla's "File" dropdown menu, click on the "Print" option, then select "Adobe PDF" as your printer. (Note: It is critically important that you choose the "Print" option here rather than the "Save as PDF" option since only the "Print" option will save the VF version.)

When the next window opens, you must decide whether to save the voice-friendly PDF to a cloud drive or to a local one. Having chosen which drive to use, accept the name suggested for the PDF file, or type in a different one; then, click "Save". Within a few seconds, your PDF file should have been saved to the drive of your choice.

The voice-friendly PDF file you have just saved can now be read aloud by your text-to-speech application. Simply open the folder (directory) where you have saved it, locate your new PDF file and hover over its name. If you are running Windows, you can click on your right mouse button and look at the dropdown menu that appears. If you see your text-to-speech application listed, click on it and it should immediately begin reading your voice-friendly PDF. If you don't see your text-to-speech application listed, you can choose "Open with" and navigate to it.

It is also the case that you can open your voice-friendly PDF with "Adobe Acrobat Reader"[5] and then use the Adobe text-to-speech function that is available under the "View | Read Out Loud" option to have it read aloud.

Please note that the normal printable version of a Wikipedia article (including the Table of Contents, images, infoboxes, inline references, etc) can be generated at any time by clicking on the "Printable version" button or by using the the access key SHIFT+ALT+p.

Also, it is not necessary to view an article in VF format prior to printing it in VF format. You can move directly from the normal view of an article to the Printable VF format simply by clicking on the "Printable VF" button or by using the the access key SHIFT+ALT+v.

Examples[edit]

Screen capture of the normal printable format of the first page of the Wikipedia article James Madison.


Screen capture showing the voice-friendly format of the same page created by Toggle VF.


 

Installation[edit]

First, make sure you are registered and logged in. Only logged-in users can install scripts.

To install Toggle VF, add the code shown below to your common.js file or to the .js file associated with any skin you may prefer:

importScript('User:P999/Toggle VF.js');.

After you have copied the necessary code to the common.js file (or the .js file of the skin you have selected), save the page and then bypass your cache (by holding down the Shift key while clicking Reload in Mozilla) to make sure the changes take effect. A link titled Toggle VF will appear in the Tools sidebar.

De-Activation[edit]

If a user wishes to de-activate Toggle VF, he can do this by editing the .js file where he originally saved it. To suspend it temporarily, he can 'comment out' the line that he had added when installing it by enclosing it between /* and */ symbols. If he wishes to de-activate it permanently, he can delete the line of code that was added when it was installed. After either suspending or deleting the script, he should bypass his browser's cache (by holding down the Shift key while clicking Reload in Mozilla).

Source code[edit]

The source code is available at User:P999/Toggle VF.js.

Notes[edit]

Toggle VF has been created specifically for articles in the English-language Wikipedia.

User feedback[edit]

Please post any comments, suggestions, bug reports etc about Toggle VF on its Talk page.

See also[edit]

External Links[edit]