Code Monkey home page Code Monkey logo

docblox's Introduction

README
======

What is DocBlox?
----------------
DocBlox is a documentation generator, just like phpDocumentor. Though the big difference is that it was written
with certain goals in mind:
- Performance
- Low memory usage
- PHP 5.3 compatible
- Integrates nicely with Continuous integration environments (incremental parsing)

The reason I am building this application is actually because the company which I work for currently
has a project which cannot be parsed by phpDocumentor (due to memory constraints) and I wanted to generate API docs.

I could write quite bit more about this project but will stick to this text for the moment.

Please keep in mind: this is _ALPHA_ software. It has been tested against Zend Framework, Symfony and even larger
projects but it does not yet contain the full featureset of phpDocumentor.

Requirements
------------
DocBlox requires the following:
- PHP 5.2.1 or higher
- Graphviz (optional, used for generating Class diagrams)
- The XSL extension, http://www.php.net/manual/en/book.xsl.php

How to use DocBlox?
-------------------
DocBlox takes a two step approach to generating documentation:
1. parse the source files and create a XML file (structure.xml) containing all metadata
2. transform the XML file to human readable output (currently only static HTML is supported)

Parsing
-------
The parsing is accomplished by executing the file parse.php in the bin directory.
This file takes several arguments (see './bin/parse.php -h' for a full list) and with it you can select which files
or directories to parse and which to ignore.

Example:
./bin/parse.php -d /home/me/project
The example above parses the /home/me/project directory for any file suffixed with .php and write a structure.xml file
to the output directory.

By executing this command you construct the building block for the transformation process, the meta data store a.k.a.
structure.xml.

Please note: if an existing structure.xml is found on the target location it will attempt to check every target file
if it has changed. If not, it will not re-parse and thus it will reuse the existing definition. Speeding up the process.

Transformation
--------------
The transformation process is responsible for creating human-readable output from the generated XML file.

You can start the transformation process by running ./bin/transform.php; by default it will look in the output subfolder
of your DocBlox installation root for the structure.xml file.
During the transformation the structure.xml file will be interpreted and (static) XHTML files will be created in the
same folder, additionally a search index and class diagram will be generated.

That is all, now you have the API documentation of your project.
If you want to see which options are available for transformation, see './bin/transform.php -h' for a full list.

Documentation
-------------
Along the way I will be creating more elaborate documentation, even this file will be improved. But for now I have
to admit that this is it. (yes, even the docblocks in the code are lacking, this is a Work In Progress and are used
for testing purposes ;))

docblox's People

Contributors

mvriel avatar weierophinney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

xert jbusby

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.