{"id":16119520,"url":"https://github.com/downgoon/cpmd","last_synced_at":"2026-01-19T06:33:47.052Z","repository":{"id":57210226,"uuid":"193064737","full_name":"downgoon/cpmd","owner":"downgoon","description":"copy or move markdown files (supporting wildcard characters) to the destination directory **with their attached images** usually located on sub dir named 'assets' or 'images'.","archived":false,"fork":false,"pushed_at":"2019-07-10T05:56:07.000Z","size":383,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-25T17:14:33.627Z","etag":null,"topics":["copy-markdown-file-and-images","cpmd","markdown-images"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/downgoon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-21T08:51:24.000Z","updated_at":"2024-02-04T13:45:32.000Z","dependencies_parsed_at":"2022-08-31T05:02:02.005Z","dependency_job_id":null,"html_url":"https://github.com/downgoon/cpmd","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/downgoon/cpmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fcpmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fcpmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fcpmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fcpmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/downgoon","download_url":"https://codeload.github.com/downgoon/cpmd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fcpmd/sbom","scorecard":{"id":353949,"data":{"date":"2025-08-11","repo":{"name":"github.com/downgoon/cpmd","commit":"083f1b9f2650371494b3a91f24ee3486a6b067d0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.2.0 not signed: https://api.github.com/repos/downgoon/cpmd/releases/18210044","Warn: release artifact 0.2.0 does not have provenance: https://api.github.com/repos/downgoon/cpmd/releases/18210044"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T09:02:39.938Z","repository_id":57210226,"created_at":"2025-08-18T09:02:39.938Z","updated_at":"2025-08-18T09:02:39.938Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28562405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["copy-markdown-file-and-images","cpmd","markdown-images"],"created_at":"2024-10-09T20:54:22.421Z","updated_at":"2026-01-19T06:33:47.030Z","avatar_url":"https://github.com/downgoon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![HitCount](http://hits.dwyl.io/downgoon/cpmd.svg)](http://hits.dwyl.io/downgoon/cpmd)\n\n# cpmd\n\n\n\ncopy or move markdown files (supporting wildcard characters) to the destination directory **with their attached images** usually located on sub dir named 'assets', 'images' or '$filename'. the application has been published into https://www.npmjs.com/package/cpmd. By the way, An awesome editor [Typora](https://typora.io/) is recommended, if you also like writing in markdown.\n\n\n\n## Quick Start\n\n\n\n- **Install**: install command line tool 'cpmd' (copy markdown)\n\n``` bash\n$ npm install cpmd -g\n```\n\n\n\n- **Single Copy**: copy a single file named 'README.md' with its referenced image 'assets/image-20190625115442118.png' into the existed dir 'backup' in long term format.\n\n``` bash\n$ cpmd --src README.md --dst backup/\n\nsrc file wildcard: README.md\nsrc file list: README.md\ncp assets/image-20190625115442118.png to /Users/downgoon/Documents/backup\ncp README.md to /Users/downgoon/Documents/backup\n```\n\n\n\n- **Single Move**: move a single file in short term format. the additional argument '-m' or `--move` indicates a moving operation rather than copying.\n\n``` bash\n$ cpmd -s README.md -d backup/ -m\nsrc file wildcard: README.md\nsrc file list: README.md\nmv assets/image-20190625115442118.png to /Users/downgoon/Documents/backup/\nmv README.md to /Users/downgoon/Documents/backup/\n```\n\n\n\n- **Multi Copy/Move**: copy two files named 'README.md' and 'REMORE.md'.\n\n``` bash\n$ cpmd -s 'RE*.md' -d backup/  \nsrc file wildcard: RE*.md\nsrc file list: README.md,REMORE.md\ncp assets/image-20190625115442118.png to /Users/downgoon/Documents/backup/\ncp README.md to /Users/downgoon/Documents/backup/\ncp REMORE.md to /Users/downgoon/Documents/backup/\n\n$ tree .   # the two files' layout\n.\n├── README.md\n├── REMORE.md\n└── assets\n    └── image-20190625115442118.png\n```\n\n\n\n\u003e **NOTE**: wildcard src fie name like 'RE*.md' **MUST** be quoted by single quotation marks ``'``.\n\n\n\n- **hexo-style copy**: in [hexo](https://hexo.io/docs/asset-folders), Asset folder will have the same name as the markdown file associated with the post. Place all assets related to your post into the associated folder, and you will be able to reference them using a relative path, making for an easier and more convenient workflow. For example: \n\n  - before coping, source layout of the markdown file and its attached images\n\n  ``` bash\n  $ tree .\n  ├── README.md\n  ├── assets\n  │   ├── image-20190708204512742.png\n  ```\n\n  - after copying, destination layout\n\n  ``` bash\n  $ cpmd -s README.md -d hexo-blog/source/_post/ --hexo\n  \n  $ tree hexo-blog/source/_post/ \n  ├── README\n  │   └── image-20190708204512742.png\n  ├── README.md\n  ```\n\n\n\n- **Help Info**: for help information, please type ``cpmd -h`` or ``cpmd`` directly\n\n\n\n``` bash\n$ cpmd\ncopy/move markdown files supporting wildcard characters to the destination directory **with its/their attached images** on local file paths\nUsage(Long Term): cpmd --src \u003c$src.md\u003e --dst \u003c$dstdir\u003e [--move]\nUsage(Short Term): cpmd -s \u003c$src.md\u003e -d \u003c$dstdir\u003e [-m]\nMulti Copy Example: cpmd -s 'RE*.md' -d backup/\n\n$ cpmd -h\nOptions:\n  -V, --version    output the version number\n  -s, --src \u003csrc\u003e  src markdown files (supporting wildcard characters)\n  -d, --dst \u003cdst\u003e  dst directory\n  -m, --move       move flag, default value is false\n  -h, --help       output usage information\n```\n\n\n\n----\n\n\n\n\n\n## Developer Guide\n\n### Quick Start\n\n``` bash\n$ git clone git@github.com:downgoon/cpmd.git\n$ cd cpmd\n$ npm install   # download dependencies and save them into 'node_modules'\n$ node cpmd.js  # debug\n$ mkdir backup  # create a directory at which markdown files will be placed\n$ node cpmd.js -s './test/REMORE.md' -d backup/ --hexo # test hexo-style copy\n```\n\n\n### local install\n\n- ``package.json`` introduction\n\n``` json\n\n{\n  \"name\": \"cpmd\",\n  \"version\": \"0.1.0\", // version number, default is 1.0.0\n  \"description\": \"copy markdown file to the destination directory with its attached images on local file paths\",\n  \"main\": \"cpmd.js\",   // entry point of the application, default is 'Index.js'\n  \"dependencies\": { // auto added on 'npm install $module_name --save' executed\n    \"command-line-args\": \"^5.1.1\",\n    \"commander\": \"^2.20.0\",\n    \"fs-extra\": \"^8.0.1\",\n    \"markdown-parser\": \"0.0.8\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git://github.com/downgoon/cpmd.git\"\n  },\n  \"bin\": {  // cmd line name for 'npm install . -g'\n    \"cpmd\": \"cpmd.js\" // cmd line name -\u003e js reference\n  },\n  \"devDependencies\": {},\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" \u0026\u0026 exit 1\"\n  },\n  \"author\": \"downgoon@qq.com\",\n  \"license\": \"MIT\"\n}\n\n```\n\n\n\n\u003e the ``bin`` section is required for local installation in which the command like ``npm install . -g`` will be executed.\n\n\n\n- **directive head line**: ``#!/usr/bin/env node``\n\n Add the following directive, which is also required, at the first line of \"cpmd.js\" file whose content is just like this:\n\n``` javascript\n#!/usr/bin/env node\n\nvar fs = require('fs');\nvar fse = require(\"fs-extra\");\nvar Parser = require('markdown-parser');\nconst path = require(\"path\");\n\n```\n\n- **locally install**\n\n``` bash\n$ sudo npm uninstall . -g  # uninstall previous version\n$ sudo npm install . -g  # install local new version\n/usr/local/bin/cpmd -\u003e /usr/local/lib/node_modules/cpmd/cpmd.js\n+ cpmd@0.1.0\nupdated 1 package in 0.161s\n$ which cpmd\n/usr/local/bin/cpmd\n$ ll /usr/local/bin/ | grep cpmd\ncpmd -\u003e ../lib/node_modules/cpmd/cpmd.js\n```\n\n\n\n- **cmd line testing**\n\n``` bash\n$ cpmd\nUsage: mdcp --src $src.md --dst $dstdir\n```\n\n\n\n### remote install\n\n\n\n- **publish firstly**:  publish the application to the official site [www.npmjs.com]([https://www.npmjs.com](https://www.npmjs.com/))\n\n``` bash\n\n$ npm login   # please signup an account firstly\nUsername: downgoon\nPassword:  # input your password hear\nEmail: (this IS public) downgoon@qq.com\nLogged in as downgoon on https://registry.npmjs.org/.\n\n\n$ npm publish   # publish to registry.npmjs.org\n\nnpm publish\nnpm notice\nnpm notice 📦  cpmd@0.1.0\nnpm notice === Tarball Contents ===\nnpm notice 686B  package.json\nnpm notice 2.0kB cpmd.js\nnpm notice 2.9kB README.md\nnpm notice === Tarball Details ===\nnpm notice name:          cpmd\nnpm notice version:       0.1.0\nnpm notice package size:  2.1 kB\nnpm notice unpacked size: 5.6 kB\nnpm notice shasum:        7cc7dc6378216e3bb4ad6fc15d4a2511f18aecf7\nnpm notice integrity:     sha512-Lki/LCZBB7sp8[...]OCYpIyhyDtB+A==\nnpm notice total files:   3\nnpm notice\n+ cpmd@0.1.0\n\n$ npm view cpmd  # view the published detail info\n\ncpmd@0.1.0 | MIT | deps: 4 | versions: 1\ncopy markdown file to the destination directory with its attached images on local file paths\nhttps://github.com/downgoon/cpmd#readme\n\nbin: cpmd\n\ndist\n.tarball: https://registry.npmjs.org/cpmd/-/cpmd-0.1.0.tgz\n.shasum: 7cc7dc6378216e3bb4ad6fc15d4a2511f18aecf7\n.integrity: sha512-Lki/LCZBB7sp8aOt8wTHtJ8sgMmEt25WgRXM4iQmytNSEbBF0dkL9+aomsvgIrGuCXtkyR2GJOCYpIyhyDtB+A==\n.unpackedSize: 5.6 kB\n\ndependencies:\ncommand-line-args: ^5.1.1 commander: ^2.20.0        fs-extra: ^8.0.1          markdown-parser: 0.0.8\n\nmaintainers:\n- downgoon \u003cdowngoon@qq.com\u003e\n\ndist-tags:\nlatest: 0.1.0\n\npublished 39 seconds ago by downgoon \u003cdowngoon@qq.com\u003e\n```\n\n\n\n- **remotely install**: download from 'registry.npmjs.org' and install\n\n``` bash\n$ npm install cpmd -g\n/usr/local/bin/cpmd -\u003e /usr/local/lib/node_modules/cpmd/cpmd.js\n+ cpmd@0.1.0\nupdated 12 packages in 3.2s\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdowngoon%2Fcpmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdowngoon%2Fcpmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdowngoon%2Fcpmd/lists"}