{"id":16184630,"url":"https://github.com/rmariuzzo/mkdir-date","last_synced_at":"2025-03-19T02:31:30.851Z","repository":{"id":38401013,"uuid":"292461556","full_name":"rmariuzzo/mkdir-date","owner":"rmariuzzo","description":"A tool to create directories for each days in a period of time.","archived":false,"fork":false,"pushed_at":"2020-10-04T11:57:39.000Z","size":358,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-11T07:10:42.393Z","etag":null,"topics":["cli","mkdir","npx"],"latest_commit_sha":null,"homepage":"","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/rmariuzzo.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":"2020-09-03T04:00:33.000Z","updated_at":"2023-08-27T00:59:44.000Z","dependencies_parsed_at":"2022-08-18T13:21:33.855Z","dependency_job_id":null,"html_url":"https://github.com/rmariuzzo/mkdir-date","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmariuzzo%2Fmkdir-date","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmariuzzo%2Fmkdir-date/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmariuzzo%2Fmkdir-date/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmariuzzo%2Fmkdir-date/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmariuzzo","download_url":"https://codeload.github.com/rmariuzzo/mkdir-date/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221720424,"owners_count":16869483,"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":["cli","mkdir","npx"],"created_at":"2024-10-10T07:10:52.678Z","updated_at":"2024-10-27T19:09:06.843Z","avatar_url":"https://github.com/rmariuzzo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\u003ccenter\u003e\n\u003ch1\u003emkdir-date\u003c/h1\u003e\n\u003cp\u003eA tool to create directories for each days in a period of time.\u003c/p\u003e\n\u003c/center\u003e\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n## Installation\n```shell\nnpm i mkdir-date\n```\n\n## Usage\n```\nnpx mkdir-date --help\n```\n```\nUsage:\n  mkdir-date [from] [to] [target]\n\nExample: create a directory for each day for a year quarter\n  mkdir-date 2020-01-01 2020-03-31 ./period/q1\n\nArguments:\n  from         The start of the date period in ISO format (YYYY-MM-DD).\n  to           The end of the date period in ISO format (YYYY-MM-DD).\n  target       The target directory where directories will be created.\n\nOptions:\n  --skip-day   Indicates a day in a week to skip. Starting on Sunday as 0 and Saturday as 6.\n               It can be used more than once.\n               Example: skip weekend\n                 --skip-day=0 --skip-day=6\n  --pattern    The pattern to use when creating directories.\n               Default: yyyy/LL/dd\n               See https://date-fns.org/v2.16.1/docs/format for more information.\n  --locale     The local to use when applying the pattern when creating directories\n               Default: enUS\n               See https://date-fns.org/v2.16.1/docs/I18n for more information.\n```\n### Arguments\n\n#### `from`\nThe start of the date period in ISO format (YYYY-MM-DD).\n\n#### `to`\nThe end of the date period in ISO format (YYYY-MM-DD).\n\n#### `target`\nThe target directory where directories will be created.\n\n**Note:** If the target doesn't exist then it will be created.\n\n### Options\n\n#### `--skip-day`\nIndicates a day in a week to skip. Starting on Sunday as 0 and Saturday as 6. It can be used more than once.\n\nExample to skip weekend days: `--skip-day=0 --skip-day=6` or `--skip-day=0,6`\n\n#### `--pattern`\nThe pattern to use when creating directories. [View more information on tokens](https://date-fns.org/v2.16.1/docs/format).\n\n**Default:** `yyyy/LL/dd`.\n\n#### `--locale`\nThe local to use when applying the pattern when creating directories. [View more information on locales](https://date-fns.org/v2.16.1/docs/I18n).\n\n**Default:** `enUS`.\n\n## Examples\n\n### Create directories for each weekend days in a month\n```shell\nnpx mkdir-date 2021-01-01 2021-01-31 ./january-weekends --skip-day=1,2,3,4,5\n```\n\n**Output:**\n![](.github/assets/example-option-skip-day.png)\n\n### Create directories using a different pattern\n```shell\nnpx mkdir-date 2021-01-01 2021-01-07 ./week --pattern=\"yyyy/LLLL/dd\"\n```\n\n**Output:**\n![](.github/assets/example-option-pattern.png)\n\n### Create directories using a different locale\n```shell\nnpx mkdir-date 2021-01-01 2021-01-07 ./week --pattern=\"yyyy/LLLL/dd\" --locale=es\n```\n\n**Output:**\n![](.github/assets/example-option-locale.png)\n\n## Development\n\n 1. Clone this repository.\n 2. Install dependencies: `npm i`.\n 3. Run it locally: `npm start` or `./src/bin.js`\n\n### Tests\n\u003csmall\u003eHalp! We still don't have them...\u003c/small\u003e\n\n### Releases\nReleases are triggered by `npm version` and handled by [GitHub Actions](https://github.com/rmariuzzo/mkdir-date/actions?query=workflow%3Apublish).\n\n\u003ccenter\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\nMade with ♥ by [@rmariuzzo](https://github.com/rmariuzzo)\n\u003c/center\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmariuzzo%2Fmkdir-date","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmariuzzo%2Fmkdir-date","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmariuzzo%2Fmkdir-date/lists"}