# `dirlistozxa`\r
-A simple directory lister script in PHP that will show the files and directories in a directory, along with their modification date and size.\r
+A simple directory lister script in PHP that will show the files and directories in a directory, along with their modification date and size. Image thumbnail previews are also supported.\r
\r
+## Setting up\r
To set up, set the PHP file to be the index file, if no `index.html` or `index.php` exists in the directory. An example for nginx would be:\r
\r
```nginx\r
index index.html index.php /dirlistozxa.php;\r
```\r
+\r
+You need to also move the `.dirlistozxa/` folder into the root of the site, such that it is accessible at `/.dirlistozxa/`.\r
+\r
+To optionally generate image thumbnails, use the `gen-thumbs` script. Requires Imagemagick to be installed, it will generate thumbnail files into `/.thumbs/`. If the script can't find any thumbnail for an image in `/.thumbs/`, it will just fall back to the generic file image.\r
+\r
+## License\r
+`dirlistozxa` is licensed under the AGPLv3 license.\r
<?php
+/* dirlistozxa - Basic directory lister script written in PHP
+ * Copyright (C) 2023 ROllerozxa
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This software is best enjoyed with soused herring!
+ */
+
// Configuration:
// List of filenames (and folder names) that should be ignored.