hob / README

.. -*- restructuredtext -*-

##############################
  Hob - Scope Code Generator
##############################

Introduction
------------

Hob is a multi-language code generator for the Opera Scope Protocol. It
generates code from `Google Protocol Buffer`_ files (.proto), which describes
the services, messages, commands and events.

The Scope Protocol is an RPC system used in the `Opera web browser`_. This allows
external and embedded clients to debug, inspect or perform other operations
on any running Opera instance.

Hob consists of the following components:

- The `hob` command line tool which is used to generate code and other output
  formats.
- A library for working with `Google Protocol Buffer`_ definitions. It can read
  .proto files and has classes and functions for working with protobuf
  elements.
- Support for third party extensions which can add additional commands.

.. _Google Protocol Buffer: http://code.google.com/p/protobuf/
.. _Opera web browser: http://www.opera.com

Dependencies
------------

argparse:
  http://code.google.com/p/argparse/

mako:
  http://www.makotemplates.org/

If you install `hob` using `easy_install` or `pip` these dependencies will be
installed automatically.

Usage
-----

::

    usage: hob [-h] [-v] [--verbose] [--quiet] [-c CONFIG_FILE] [-t TARGET]
               [--project PROJECT] [-w [WARNING [WARNING ...]]] [--pdb]
               [--profile FILE]
               command ...

    commands:
        xml                 Generate XML structures of protocol definitions
        proto               Generate Protocol Buffer definitions
        js                  Create service interfaces for JavaScript. If no files
                            are specified, the following files will be added in
                            the 'service' folder: console_logger.py,
                            http_logger.py, scope.py, window_manager.py,
                            ecmascript_debugger.py. Files can also be specified
                            with the service name, e.g. just ecmascript-debugger.
                            scope.py and window_manager.py will always be added.
        extensions          Lists all enabled extensions
        rst-doc             Create reST documentation of selected services. If no
                            files are specified all services are added.
        validate            Validates services, commands, events, messages and
                            fields according to the style guide
        config              Displays the current config. This is the result of all
                            loaded config and project files as well as overrides
                            from the command-line.

    options:
      -h, --help            show this help message and exit
      -v, --version         show program's version number and exit
      --verbose             increase verbosity
      --quiet               be silent
      -c CONFIG_FILE, --config-file CONFIG_FILE
                            use specific config file instead of system-wide/local
                            config files
      -t TARGET, --target TARGET
                            specify target configuration to use (overrides config
                            file).
      --project PROJECT     specifies project name or file to use (hob.project)
      -w [WARNING [WARNING ...]], --warning [WARNING [WARNING ...]]
                            enable a warning flag, pick from all, field-id-gap,
                            field-id-sequence
      --pdb                 start python debugger on exceptions
      --profile FILE        profile a command using the python profiler, writes
                            result to specified file

Changelog
---------

See http://bitbucket.org/scope/hob/wiki/Changelog or the ``CHANGELOG`` file in the top distribution directory.

Contact
-------

Hob is maintained by the Opera Dragonfly team. The authors are:

- Jan Borsodi <jborsodi@opera.com>
- Christian Krebs <chrisk@opera.com>

Additional help from:

- Johannes Hoff <jhoff@opera.com>
- Rune Halvorsen <runeh@opera.com>
- Anders Hartvoll Ruud <andersr@opera.com>

License
-------

See the ``LICENSE`` file in the top distribution directory.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.