• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Help to generate project documentation

#1
[eluser]John_Betong[/eluser]
Hi All,

I recently started a new project and tied myself in knots with file names, etc so sat back and devised the following aid to ongoing documentation.


Code:
application
     ...
     images/ /* new directory */
     ZZZ/    /* new directory */
     ...
     Get_dirs.bat /* the batch file to generate ZZZ_DIRS.PHP */
   ci_system
 
In my latest project I created the following Get_dirs.bat
Code:
cd controllers
  echo Controllers.dir >  ../ZZZ/ZZZ_DIRS.PHP
  echo =============== >> ../ZZZ/ZZZ_DIRS.PHP
  dir *.php /b         >> ../ZZZ/ZZZ_DIRS.PHP
  echo ...
cd..

cd images
  echo Images.jpg >> ../ZZZ/ZZZ_DIRS.PHP
  echo ========== >> ../ZZZ/ZZZ_DIRS.PHP
  dir *.jpg /b    >> ../ZZZ/ZZZ_DIRS.PHP
  echo ...
cd..

cd Views
  echo Views.dir >> ../ZZZ/ZZZ_DIRS.PHP
  echo ========= >> ../ZZZ/ZZZ_DIRS.PHP
  dir *.php /b   >> ../ZZZ/ZZZ_DIRS.PHP
  echo ...
cd..
 
The generated ./ZZZ/ZZZ_DIRS.PHP file:
Code:
Controllers.dir
===============
docs.php
hire.php
home.php

Images.jpg
==========
bg_300x60.jpg
bg_340x1.jpg
bg_600x200.jpg
bg_606x63.jpg
...
...

Views.dir
=========
hire.php
home.php
__com_analytics.php
__com_footer.php
__com_head.php
__com_menu_left.php
__com_pic_msg.php
__com_title.php
__hire_both.php
__hire_box.php
__hire_cyclecarrier.php
__hire_dates.php
__hire_delivery.php
__hire_form.php
__hire_roofrack.php
__home_products.php
 
This generated ZZZ_DIRS file helped me to produce the following layout
Code:
<?php /* layout.php */ ?>

<div style='width:800px; margin:3em auto'>
<pre>
hire.php                    // template with following included files
  // common files  
  __com_head.php            // &lt;head&gt;...&lt;/head&gt;
  __com_title.php           // top right hand title, logo, address
  __com_pic_msg.php         // picture & message changes

    // products - one of following selected from home.page
    __hire_both.php         //
    __hire_box.php          //
    __hire_cyclecarrier.php //
    __hire_roofrack.php     //
        __hire_dates.php    // Step 1: for all products
        __hire_delivery.php // Step 2: for all products
        
  __com_menu_left.php       // links to hire bixes, both, roof rack, etc
  __com_footer.php          // awaiting details
  __com_analytics.php       // to setup

      ======================//==================================
      
home.php                    //
  // common files  
  __com_head.php            // &lt;head&gt;...&lt;/head&gt;
  __com_title.php           // top right hand title, logo, address
  __com_pic_msg.php         // picture & message changes

  __home_products.php       // thumbnails and product details
  
  __com_menu_left.php       // links to hire bixes, both, roof rack, etc
  __com_footer.php          // awaiting details
  __com_analytics.php       // to setup

      ======================//==================================

docs.php
  // maybe an include file for each once info available
  __terms.php  
  __faqs.php  
  __privacy.php  
  __sitemap.php  
  __links.php  

      ======================//==================================

// ZZZ - Debug Development Stuff
    ../images/home.jpg
    ../images/rent.jpg
    ../views/ZZZ_DOCS.php
    ../ZZZ/KILL.PHP

</pre>
</div>
&nbsp;
and just to round it off I now have an anchor to the ZZZ_DIRS file on the home page which will hopefully aid in development.
&nbsp;
Any suggestions for improvement will be greatly appreciated.
&nbsp;
Cheers,
&nbsp;
John_Betong
&nbsp;
PS Any file or directory prefixed with ZZZ is for localhost usage only.
&nbsp;


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.