Difference between revisions of "Directory Structure"

From Dreamwidth Notes
Jump to: navigation, search
(cgi-bin)
(clearing up some of the directory structure)
Line 1: Line 1:
 +
[[Category: Code documentation]]
 +
 
This documents the development folder checked out by <code>bootstrap.pl</code>.
 
This documents the development folder checked out by <code>bootstrap.pl</code>.
 +
 +
=Directories you will use a lot=
  
 
== [[Main development folder/bin|bin]] ==
 
== [[Main development folder/bin|bin]] ==
  
This looks to contain administrative code, run for maintenance and other tasks.
+
This directory contains backend utilities for maintaining and upgrading the site.  
  
 
== [[Main development folder/cgi-bin|cgi-bin]] ==
 
== [[Main development folder/cgi-bin|cgi-bin]] ==
  
Contains the code that runs the site.  This is the base of the library path--that is <code>use Net::OpenID::Consumer;</code> refers to the code in <code>cgi-bin/Net/OpenID/Consumer.pm</code>.
+
This directory contains the code that runs the site.  This is the base of the library path--that is <code>use Net::OpenID::Consumer;</code> refers to the code in <code>cgi-bin/Net/OpenID/Consumer.pm</code>. It contains all the custom Perl functions that the code references.
 +
 
 +
== [[Main development folder/htdocs|htdocs]] ==
 +
 
 +
This directory contains most of the user-facing pages, with the directory structure used on the main website. That is to say, anything that appears at <code>http://www.dreamwidth.org/filename.bml</code> will be here, as <code>htdocs/filename.bml</code>; anything at <code>http://www.dreamwidth.org/directory/filename.bml</code> will be here as <code>htdocs/directory/filename.bml</code>, etc. To see your changes on your development site, you need to make the changes to the appropriate file in this directory.
 +
 
 +
== [[Main development folder/ssldocs|ssldocs]] ==
 +
 
 +
This contains pages that are transmitted over SSL instead of being unencrypted. Regular files live in <code>htdocs</code>.
 +
 
 +
=Special directory=
  
 
== [[Main development folder/cvs|cvs]] ==
 
== [[Main development folder/cvs|cvs]] ==
  
Looks to contain code for packages used.  Also contains folders for <code>dw-free</code> and <code>dw-nonfree</code>. <code>dw-free</code> looks to pretty much contain the a copy of much of the entire main directory.
+
The cvs folder contains a local checkout of the [http://hg.dwscoalition.org Mercurial repositories]. To generate a patch for your changes that can be applied, you need to make the changes to the appropriate changes in this directory, <em>after</em> you have verified that the changes work, testing them by putting them in <code>htdocs</code>, <code>cgi-bin</code>, or <code>ssldocs</code> and viewing them (and testing them) on your development site. Once you've done that, you can use the automatic tools to sync your "live" directories and your cvs directory. More information can be found at [[http://wiki.dwscoalition.org/notes/Dev_Initial_Programming_Notes]].
 +
 
 +
The two Mercurial source branches you'll be using most often are <code>dw-free</code> [http://hg.dwscoalition.org/dw-free/ dw-free] and <code>dw-nonfree</code> [http://hg.dwscoalition.org/dw-nonfree/ dw-nonfree]. (When viewing the Mercurial page for each repo, the 'Manifest' link in the top menu bar will allow you to browse the source tree.)
 +
 
 +
 
 +
=Directories you will not need to change often=
 +
 
 +
These are directories you won't need to change often, unless you're working on some specific task related to them.
  
 
== doc ==
 
== doc ==
Line 20: Line 41:
  
 
Empty in a clean checkup.  Your site's <code>ljconfig.pl</code> will go here, to make sure the original <code>ljconfig.pl</code> can be updated without ill effects on a running installation.
 
Empty in a clean checkup.  Your site's <code>ljconfig.pl</code> will go here, to make sure the original <code>ljconfig.pl</code> can be updated without ill effects on a running installation.
 
== [[Main development folder/htdocs|htdocs]] ==
 
 
Contains the BML templates for pages and organization of the site, as well as js files.
 
  
 
== logs ==
 
== logs ==
Line 32: Line 49:
  
 
Confusingly enough, contains source for some of the packages the code uses.  Perhaps this is the folder that comes with the distribution and <code>cvs</code> is checked out from the other repositories?  Does not contain all of the ones in <code>cvs</code> though.
 
Confusingly enough, contains source for some of the packages the code uses.  Perhaps this is the folder that comes with the distribution and <code>cvs</code> is checked out from the other repositories?  Does not contain all of the ones in <code>cvs</code> though.
 
== [[Main development folder/ssldocs|ssldocs]] ==
 
 
This contains pages that are transmitted over SSL instead of being unencrypted. Regular files in <code>htdocs</code>.
 
  
 
== [[Main development folder/t|t]] ==
 
== [[Main development folder/t|t]] ==
Line 51: Line 64:
 
== var ==
 
== var ==
  
A clean install of this only includes devdata/evillaugh.wav.  Purpose unknown.
+
A clean install of this only includes devdata/evillaugh.wav.  Nobody remembers what this is for.
 
+
[[Category: Code documentation]]
+

Revision as of 04:59, 3 March 2009


This documents the development folder checked out by bootstrap.pl.

Directories you will use a lot

bin

This directory contains backend utilities for maintaining and upgrading the site.

cgi-bin

This directory contains the code that runs the site. This is the base of the library path--that is use Net::OpenID::Consumer; refers to the code in cgi-bin/Net/OpenID/Consumer.pm. It contains all the custom Perl functions that the code references.

htdocs

This directory contains most of the user-facing pages, with the directory structure used on the main website. That is to say, anything that appears at http://www.dreamwidth.org/filename.bml will be here, as htdocs/filename.bml; anything at http://www.dreamwidth.org/directory/filename.bml will be here as htdocs/directory/filename.bml, etc. To see your changes on your development site, you need to make the changes to the appropriate file in this directory.

ssldocs

This contains pages that are transmitted over SSL instead of being unencrypted. Regular files live in htdocs.

Special directory

cvs

The cvs folder contains a local checkout of the Mercurial repositories. To generate a patch for your changes that can be applied, you need to make the changes to the appropriate changes in this directory, after you have verified that the changes work, testing them by putting them in htdocs, cgi-bin, or ssldocs and viewing them (and testing them) on your development site. Once you've done that, you can use the automatic tools to sync your "live" directories and your cvs directory. More information can be found at [[1]].

The two Mercurial source branches you'll be using most often are dw-free dw-free and dw-nonfree dw-nonfree. (When viewing the Mercurial page for each repo, the 'Manifest' link in the top menu bar will allow you to browse the source tree.)


Directories you will not need to change often

These are directories you won't need to change often, unless you're working on some specific task related to them.

doc

Most notable thing in here is the docbook code for the server and LJ programming guides.

etc

Empty in a clean checkup. Your site's ljconfig.pl will go here, to make sure the original ljconfig.pl can be updated without ill effects on a running installation.

logs

Looks to be an empty folder to store logs during running the code.

src

Confusingly enough, contains source for some of the packages the code uses. Perhaps this is the folder that comes with the distribution and cvs is checked out from the other repositories? Does not contain all of the ones in cvs though.

t

Looks like this contains the tests that use the testing framework in main/test. See Dev Testing for how to use them.

temp

Empty in a clean install. Probably used for temporary file storage.

test

Very sparse directory; really not much here.

var

A clean install of this only includes devdata/evillaugh.wav. Nobody remembers what this is for.