{"id":15683674,"url":"https://github.com/joscha/indexifier","last_synced_at":"2025-10-16T19:47:48.517Z","repository":{"id":11406619,"uuid":"69575297","full_name":"joscha/indexifier","owner":"joscha","description":"Generate an index from a directory","archived":false,"fork":false,"pushed_at":"2024-08-08T12:49:52.000Z","size":1970,"stargazers_count":11,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T21:07:11.736Z","etag":null,"topics":["html","index","index-generator","indexer","indexing","listing","tree"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joscha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-29T14:25:58.000Z","updated_at":"2024-12-22T15:47:12.000Z","dependencies_parsed_at":"2023-02-18T16:32:17.302Z","dependency_job_id":null,"html_url":"https://github.com/joscha/indexifier","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joscha%2Findexifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joscha%2Findexifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joscha%2Findexifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joscha%2Findexifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joscha","download_url":"https://codeload.github.com/joscha/indexifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252769420,"owners_count":21801378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html","index","index-generator","indexer","indexing","listing","tree"],"created_at":"2024-10-03T17:08:09.879Z","updated_at":"2025-10-16T19:47:43.471Z","avatar_url":"https://github.com/joscha.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Generate an index for a given directory\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/joscha/indexifier.svg)](https://greenkeeper.io/)\n\n[![Build status](https://img.shields.io/travis/joscha/indexifier/master.svg)](https://travis-ci.org/joscha/indexifier)\n[![npm](https://img.shields.io/npm/v/indexifier.svg)](https://www.npmjs.com/package/indexifier)\n![npm](https://img.shields.io/npm/l/indexifier.svg)\n![node](https://img.shields.io/node/v/indexifier.svg)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\nThis module generates a tree view of a given directory.\n\n## Usage\n\n### CLI API\n\n```\nUsage: indexifier [options] \u003cdir\u003e\n\nOptions:\n\n  -h, --help                  output usage information\n  -V, --version               output the version number\n  -e, --extensions \u003clist\u003e     The extensions to take into account (defaults to .htm,.html)\n  -I, --include \u003cregexp\u003e      Include files and directories that are matched by this regular expression (defaults to all)\n  -E, --exclude \u003cregexp\u003e      Exclude files and directories that are matched by this regular expression (defaults to none)\n  -H, --html                  Enable to generate HTML output\n  -L, --no-link-folders       Do not link folders when in HTML output mode\n  -F, --no-empty-directories  Do not include empty directories\n  -D, --max-depth             Limit results to a maximum sub-directory depth\n```\n\n#### Install\n\n```console\nnpm install -g indexifier\n```\n\n#### Examples\n\n```console\nindexifier ./ --extensions .html,.htm\n```\nwould generate something like this:\n\n```\nA\n├─┬ B\n│ └── c.html\n├── d.html\n└── e.html\n```\n\nThere is also an HTML flag that would generate the above output as linked HTML:\n\n```console\nindexifier --extensions .html --html .\n```\n\n```html\n\u003c!-- ... --\u003e\n\u003ca href=\"./\"\u003eA\u003c/a\u003e\u003cbr/\u003e\n├─┬ \u003ca href=\"./B\"\u003eB\u003c/a\u003e\u003cbr/\u003e\n│ └── \u003ca href=\"./B/c.html\"\u003ec.html\u003c/a\u003e\u003cbr/\u003e\n├── \u003ca href=\"./d.html\"\u003ea.html\u003c/a\u003e\u003cbr/\u003e\n└── \u003ca href=\"./e.html\"\u003eb.html\u003c/a\u003e\u003cbr/\u003e\n\u003c!-- ... --\u003e\n```\n\u003e The links are always relative to the given directory.\n\n### Node API\n\n```\nindexifier(String directory [, opts={\n                                     fileTypes: Array.\u003cString\u003e,\n                                     include=undefined: Regexp,\n                                     exclude=undefined: Regexp,\n                                     isHtml=false: Boolean,\n                                     linkFolders=true: Boolean,\n                                     emptyFolders=true: Boolean,\n                                     maxDepth=Infinity: Number,\n                                    }]);\n```\n\n#### Install\n\n```console\nnpm install indexifier --save\n```\n\n#### Examples\n\nTree of files:\n\n```js\nconst indexifier = require('indexifier');\n\nconst treeOfFiles = indexifier(__dirname);\n```\n\nTree of HTML files:\n\n```js\nconst indexifier = require('indexifier');\n\nconst treeOfHtmlFiles = indexifier(__dirname, { fileTypes: ['.html'] });\n```\n\nor for HTML output:\n\n```js\nconst indexifier = require('indexifier');\n\nconst treeOfJpegFiles = indexifier(__dirname, {\n    fileTypes: ['.jpg', '.jpeg'],\n    isHtml: true\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoscha%2Findexifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoscha%2Findexifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoscha%2Findexifier/lists"}