dictation-toolbox / Caster

Dragonfly-Based Voice Programming and Accessibility Toolkit
https://dictation-toolbox.github.io/Caster/
Other
340 stars 121 forks source link

Are the App / CCR language quick references generated automatically? #542

Closed kendonB closed 4 years ago

kendonB commented 5 years ago

If so, how? If not, how might we?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/74649948-are-the-app-ccr-language-quick-references-generated-automatically?utm_campaign=plugin&utm_content=tracker%2F1825907&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1825907&utm_medium=issues&utm_source=github).
LexiconCode commented 5 years ago
  1. Use dragonflys RPC server to pull grammars from the engine once Caster is loaded. The grammars represented in engine should be representative of a what's available for dictation taking into account filter rules, words.txt and manual edits to source code.

This is already been implemented and you can experiment with the following file printing out to the natlike status window. configdebug.txt

Instructions to use configdebug.txt on the latest version of Caster Development branch.

Edit or replace configdebug.txt in C:\Users\%USERNAME%\.caster\data
Then say refresh debug file to load the debug grammar.

Note: After enabling say "generate token" then replace the token in configdebug.txt for security purposes.

  1. pytablewriter or PyLaTeX to programmatically generate PDF files. A trim down of a PyLaTeX example. PyLaTeX.zip

python PyLaTeX.py to generate PDF.

miktex MiKTeX is a distribution of the TeX/LaTeX typesetting system for Microsoft Windows. This might need to be installed to generate the PDF. Someone might have to test that as I already have it installed for generating the PDF using CasterQuickReference.tex through Texmaker.

We can use CasterQuickReference.tex as a guide to re-create the structure in PyLaTeX.

Most of the CasterQuickReference.tex outside of formatting subsections consists of \command{Command Name}{printed result}

We delineated each subsection by grammar name from rpc. Then for each grammar name store in variables the rules in the grammar along with any special formatting for that section like a footer and so forth.

Some groundwork may need to be laid within Caster such as consistent grammar names and so forth.

kendonB commented 5 years ago

Is it necessary to continue using the .tex file? That approach is nice for printing stuff out on paper but a simple .md is much easier to deal with. Given we have "bring me" now, pulling up an arbitrary doc page is fast and easy ("bring me python docs", for example).

LexiconCode commented 5 years ago

Is it necessary to continue using the .tex file? That approach is nice for printing stuff out on paper but a simple .md is much easier to deal with. Given we have "bring me" now, pulling up an arbitrary doc page is fast and easy ("bring me python docs", for example).

Yes it is much easier to utilize .md, However is very limited in terms of actual formatting. Markdown doesn't have no header or footer with notations that help us explain complex commands. In addition .tex allows for clean customizable tables.

All that being said if you can create .md documentation that's capable of displaying complex commands and looks decent I would be interested! Then we could try formulating this automation with .md instead.

kendonB commented 5 years ago

So footnotes are a bit awkward to code up but are possible:

https://github.com/kendonB/Caster/blob/what_i_use/castervoice/doc/readthedocs/Application_Commands_Quick_Reference.md#myfootnote1

LexiconCode commented 5 years ago

It looks like a start ! I'll have to give it a closer look in a couple weeks when I'm finished up with my program. We will have to see if it scales to quick reference versus the application quick reference.

LexiconCode commented 4 years ago

closing this in favor of https://github.com/dictation-toolbox/Caster/issues/234