Code Monkey home page Code Monkey logo

openframeworks-documentation-shortcut's Introduction

OpenFrameworks Documentation shortcut

Synopsis

This python 2.7 script can help you to jump directly from your text editor to the OF documentation.




Usage example ( Qt Creator / Windows 7 )

  • Select an OF keyword (a global function name, a class name, or a method of a class)

Qt Creator Example Image 1

  • Call the script, with the menu or a keyboard shortcut ( Ctrl-Alt-O in this case )

Qt Creator Example Image 2

This lead you to the right documentation entry in your web browser:

Documentation view Image

  • If the keyword is a method of a class, and if many classes have a method with this name, a window popup to choose the class:

Qt Creator Example Image 3

Selection Popup Image

Choose the class, and press Enter (or Escape to cancel). This will display the documentation for the method of this class.




Requirement

You need to have Python 2.7 installed.

Tested with OF 0.10.0 - Windows 7




Installation

Copy these files somewhere, for example C:\Users\username\Documents\of\Doc shortcut\0.9.3

  • of.ico
  • of.xbm
  • generate-index.py
  • open-documentation.py
  • and the index folder

Files installation Image

You should be able to use the tool with a command line to find an OF keyword in the online documentation:

Command line Usage Image

This should open your web browser pointed to the right place, the ofSetColor documentation.

Documentation view Image

  • If this doesn't work, read the documentation at the beginning of open-documentation.py
  • If the command output is "Item not found in the documentation", perhaps you need to generate the index for your current OF version. In this case read the beginning of generate-index.py, and use it to generate the index.

You can manually change the base URL for the documentation, for example to use a local copy of the documentation rather than the online documentation. Just edit open-documentation.py to set the OF documentation URL:

Paths setup Image




Editor configuration

You can now configure your code editor to use the script and be able to show you the documentation for a selected keyword.

Here's an example for Qt Creator 3.6.1, but this should work with any editor which allow to run shell commands.

First, add the script in the Tools menu:

Qt Creator Setup 1 Image

Qt Creator Setup 2 Image

Qt Creator Setup 3 Image

You can if you want assign a keyboard shortcut to this new tool:

Qt Creator Setup 4 Image

Qt Creator Setup 5 Image

You can now select an OF keyword (a global function or a class name), and see its documentation with this tool.

Qt Creator Example Image 1

Invoque the tool either by the menu or its keyboard shortcut:

Qt Creator Example Image 2

This lead you to the right documentation entry in your web browser:

Documentation view Image

openframeworks-documentation-shortcut's People

Stargazers

Shmalzfinger avatar Yi donghoon avatar Zack Lee avatar

Watchers

James Cloos avatar lilive avatar Zack Lee avatar

openframeworks-documentation-shortcut's Issues

generate-index.py script generates different classesAndGlobalFunctions.txt file

Hi, I just tried running the generate-index.py script to generate the index folder myself.

After running the script, it generated index/classesAndGlobalFunctions.txt file and index/html folder.

However, when I opened the classesAndGlobalFunctions.txt file, the content was different from the file that is contained in master.

For example, my generated file looks like the following:
ofDrawArrow documentation/3d/of3dUtils show_ofDrawArrow

whereas the master version looks like this:
ofDrawArrow 3d/of3dUtils show_ofDrawArrow

Why are they different and how to generate files like it is contained in the master?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.