User:P999/Toggle VF
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.
Toggle VF may also be of interest to those users who prefer to read uncluttered versions of Wikipedia articles on the screen.
Usage
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 the voice-friendly format and the regular 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 regular Wikipedia format, click on the Toggle VF button in the Navigation Bar (or use the SHIFT+ALT+4 access key) 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+p access key). After a few seconds, the voice-friendly printable version of the article you have chosen should be displayed in a new window.
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 and Safari.
In the "File" dropdown menu, click on the "Print" option, then select "Adobe PDF" as your printer. (Note: It is critically important to 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. 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-voice application listed, click on it and it should immediately begin reading your voice-friendly PDF. If you don't see your text-to-voice 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 Reader and then use the Adobe text-to-voice function to have it read aloud.
Examples
Installation
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:
{{subst:iusc|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
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).
It may be convenient to install Toggle VF in the .js file of a skin that is not your preferred one. For example, if your favorite skin is "Vector", you might choose to install Toggle VF in the "Monobook" skin by adding it to your User:----/monobook.js file, where ---- will be filled in with your own username. Then you can switch to that particular skin (ie, "Monobook" in this example) only when you want to use Toggle VF to create voice-friendly PDF files. Another possibility is to set up a dedicated user account for the exclusive purpose of creating voice-friendly PDF files with Toggle VF.
Source code
The source code is available at User:P999/Toggle VF.js.
Notes
Toggle VF has been created specifically for articles in the English-language Wikipedia.
User feedback
Please post any comments, suggestions, bug reports etc about Toggle VF on its Talk page.
See also
External Links