assets | ||
machines | ||
utils | ||
.gitignore | ||
.htaccess | ||
colorcode.php | ||
fill_undefined.php | ||
footer.php | ||
get_basepath.php | ||
index.php | ||
legend.php | ||
machine.php | ||
properties.php | ||
README.md | ||
router.php |
DCFT
Try a hosted version at https://dodoid.com/dcft
DCFT is an interactive web tool for browsing template-generated comparison tables. It is intended to allow detailed comparisons of the freedom/blob status of multiple pieces of computer hardware, which may share some characteristics and differ in others, while not requiring every model documented to be defined in its entirety. Templates allow hardware and other templates alike to be defined "sparsely", specifying only how they differ from the templates they reference. If freedom status similarity between two pieces of hardware is understood, in many cases this allows detailed, accurate pages for new models to be added with only a handful of lines of code in the actual machine file.
DCFT can be hosted in two formats, which are, to the user, ideally identical. Whichever you choose, you must set dcft_basepath at the top of properties.php to the path you have chosen to host your copy of DCFT at (e.g. to /dcft/ if hosting DCFT at https://example.com/dcft/).
The "live", dynamically-generated version is useful for maintainers or developers, or where the performance or possible security penalties of hosting DCFT
dynamically is not an issue. To use "live" DCFT, copy these source files directly into a directory on an Apache+PHP webserver (ensure htaccess is allowed, and
mod_rewrite are enabled). Alternatively, you can run utils/serve.sh
to host DCFT using PHP's integrated development webserver (PHP does not recommend this for
production uses). In this case, URL rewriting is achieved by a simple PHP-dev-server-friendly implementation in router.php, rather than mod_rewrite and the
.htaccess file.
The "static", pre-generated version is useful if you are looking to host DCFT efficiently and securely, pushing changes from a live development copy as you see fit.
This is how the public copy of DCFT on dodoid.com is generated. To generate the static version, run utils/build.sh
. The development webserver will be started, and
a static HTML copy of the site will be generated using wget. This version can then be hosted anywhere static HTML can be (provided it was generated for the correct
dcft_basepath it is being hosted at). The .gitignore files in this repo are configured to ignore a user-specific file at utils/deploy.sh
- you can create this
script to handle the specifics of deploying DCFT to your web server.