Using WIT

From Audacity Wiki
Revision as of 20:56, 30 September 2018 by James (talk | contribs) (Rearrange.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
The 'What is That?' audacity web page is an interactive help page. It ALSO can be used to generate images and templates for the manual.

Data Entry

Data is in the orange boxes in top left of diagram

To update data, enter it in this wiki, using these pages:

  • WIT Audacity Menus - You have a choice between editing the menus directly in wiki, or going to Audacity and using GetInfo to get the current menu information.
  • WIT Audacity Tooltips - The short descriptions are used as tooltips. The long descriptions are used as descriptions in the auto generated tables. If a long description starts with '+' that's a shorthand for saying it starts with the short description.
  • WIT Audacity Extra Shortcuts - These are the optional extra shortcuts.


WIT for Users

Users of WIT:

  • Click on on-screen items in WIT to highlight them and see descriptions of them.
  • Click on menu items in WIT to explore the menus and get help on them.


The Shift+Special trick in WIT

WIT produces the contents of the green boxes in the diagram below.

There previously was a lot of repetitive work in generating the contents of the green boxes, which ultimately end up in the Audacity manual. To get into the mode of WIT that does this work,

  1. Go to WIT using Chrome browser, and hold down shift and press the Special   button at top right.
  2. Tick 'Enable annotation-capture mode'

Now click about on the menus in the image of Audacity to get to the menu you want, and then click Current   to download it. If you want all menu images at once, click All .

Other buttons generate the tables and templates. The downloaded results will all appear in your Chrome download folder.


From Data to Manual

MagickeUpdates.png

How image maps, images and tables in the alphamanual are updated.


Bulb icon We now have a dynamic preview of the big tables and menu image maps that does not require a mandraulic step to update wiki (purple circle at top right). Changes to tooltips will be made immediately in these previews.

This is a step towards reducing the manual 'purple' work.
At this stage it provides a quick way to check work done.


Automation in Audacity

Audacity can produce some of the other things (blue)

  • The Screenshot Tool produces all the Preference Images and EGA images.
  • The menu item Extra->Scriptables II->GetInfo with 'Commands' selected generates the (orange) WIT menu page directly from data about menus held within Audacity.
  • Audacity scripts in Python can produce many track Images. You can see them here


Wiki bot

Wiki bot can ease upload of many files

  • Wiki bot is the 'have a cup of coffee' python script that uploads images to the manual.

Automated Purple

The manual steps in purple could be automated

I'm working on automating the purple steps. At this stage we have a dynamic preview of updates. You can see some work in progress here:

  • Widget:Tabular has the three tables, scripting, keybinding and prefs.
    • Done.png They are dynamic. Updating the orange source files and these will update.
  • Widget:MenuTest has all the menus image mapped.
    • Done.png The image map is dynamic too, so tooltips will update, if you update the tooltip text.
    • ToDo.png The images themselves though are not dynamic yet. They are though stored in WIT.

When this addition is completed, the menu images will be easier to handle than via wiki uploads. There will be no need for the go-and-have-a-coffee script to update the menus. I will be able to update them all at once locally (using the WIT get-all-menu-images button) and then copy the lot over to WIT website with a single 'push'. They will then update at the next 11 am after the push.

I am working on making the images easier still. I plan to use the menu javascript drawing code in WIT to draw these images dynamically rather than fetching already drawn copies from WIT.


WIT uses Javascript

WIT uses javascript

Pros:

  • Can bypass the cloudflare cache.
    • For example, updates to WIT Audacity Menus immediately affect the menus shown in the main image.
  • Flexible and responsive.
    • Javascript is required for the mouse over effects.
    • Javascript is required for the dynamic bug list.
  • Faster
    • We can fetch all 57 menu images from WIT fast, clicking on the browser button. The same images require 57 requests to wiki to fetch using the mw2html script.


Cons:

  • No good for within the local manual. It can't use javascript to draw those images.
    • Local manual needs already created images as pngs. It can't draw them on demand.
  • Bad for SEO
    • Google understands ordinary wiki, but javascript content can be 'invisible' for indexing.
  • Javascript varies slightly on different browsers, so may not work correctly on less used browsers.


Avoiding the Cons

Method 1

We could adjust the python mw2html script so that it fetches menu images and tables from WIT, and places those into the local menu. This would:

  • Be faster than fetching the images one by one.
  • Solve the problem of no javascript in local copies of the manual.

Method 2

We could re-write mw2html in javascript and host it at WIT. This would:

  • Make fetching a copy of the manual, including images, very easy and very fast.
    • This removes the need for the python script.
  • Solve the problem of no javascript in local copies of the manual.

Method 3

We could use the new dynamic pages to check our work. We could then have a single textual page created by WIT to update all tables and images in manual wiki. This would:

  • Turn the purple updates into a single step of mandraulically updating ONE special page in the manual.
  • Give us previews of the changes, immediately, even when the mandraulic step has not been done.
  • Solve the SEO problem (methods 1 and 2 do not)
  • Require no change in mw2html.
  • Solve the problem of no javascript in local copies of the manual.

Choice

Method 3 is what we go for. We could later add method 2 as well, as that makes collecting the manual a little easier/faster.