{"id":13706905,"url":"https://github.com/knjcode/autometa","last_synced_at":"2026-01-10T19:59:44.039Z","repository":{"id":19081141,"uuid":"22308597","full_name":"knjcode/autometa","owner":"knjcode","description":"Generate various data from Excel spreadsheet","archived":false,"fork":false,"pushed_at":"2016-10-20T15:40:23.000Z","size":113,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-26T06:40:59.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/knjcode.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":"2014-07-27T10:37:39.000Z","updated_at":"2023-01-13T14:27:47.000Z","dependencies_parsed_at":"2022-09-26T22:10:23.389Z","dependency_job_id":null,"html_url":"https://github.com/knjcode/autometa","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/knjcode%2Fautometa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knjcode%2Fautometa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knjcode%2Fautometa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knjcode%2Fautometa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knjcode","download_url":"https://codeload.github.com/knjcode/autometa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252593169,"owners_count":21773421,"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":[],"created_at":"2024-08-02T22:01:12.003Z","updated_at":"2025-05-05T23:31:48.700Z","avatar_url":"https://github.com/knjcode.png","language":"CoffeeScript","readme":"# autometa [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]\n\nGenerate various data from Excel spreadsheet.\n\n## Overview\n\n![overview](images/overview.png)\n\n1. Extract \"A1\" cell value as \"Template ID\" from each Excel worksheet\n2. Extract all cells value according to [Template ID].csv\n3. Embed these values into [Template ID].ejs\n4. Save as FileName specified in an Excel worksheet\n\n## Installation\n\nvia [npm (node package manager)](http://github.com/isaacs/npm)\n\n    $ npm install -g autometa\n\n## Examples\n\n### Basic example\n\nGenerate data from note-example.xlsx as mentioned in the overview above.\n\n    $ autometa note-example.xlsx\n\n### Horizontal repetitive elements example\n\nGenerate data from Excel spreadsheet includes an element repeated horizontally.\n\n    $ autometa test-repeat.xlsx\n\ntest-repeat.xlsx\n\n![test-repeat.xlsx](images/test-repeat.png)\n\ncatalog.csv\n\n    FileName,B2\n    Title,B3\n    Artist,B4\n    Country,B5\n    Company,B6\n    Price,B7\n    Year,B8\n\ncatalog.ejs\n\n    \u003cCATALOG\u003e\n    \u003c% for (i=0; i\u003cTitle.length; i++) { -%\u003e\n      \u003cCD\u003e\n        \u003cTITLE\u003e\u003c%- Title[i] %\u003e\u003c/TITLE\u003e\n        \u003cARTIST\u003e\u003c%- Artist[i] %\u003e\u003c/ARTIST\u003e\n        \u003cCOUNTRY\u003e\u003c%- Country[i] %\u003e\u003c/COUNTRY\u003e\n        \u003cCOMPANY\u003e\u003c%- Company[i] %\u003e\u003c/COMPANY\u003e\n        \u003cPRICE\u003e\u003c%- Price[i] %\u003e\u003c/PRICE\u003e\n        \u003cYEAR\u003e\u003c%- Year[i] %\u003e\u003c/YEAR\u003e\n      \u003c/CD\u003e\n    \u003c% } -%\u003e\n    \u003c/CATALOG\u003e\n\n### Vertical repetitive elements example\n\nGenerate data from Excel spreadsheet includes an element repeated vertically.\n\ntest-repeat2.xlsx\n\n![test-repeat2.xlsx](images/test-repeat2.png)\n\ncatalog-v.csv\n\n    FileName,A2\n    Title,A4\n    Artist,B4\n    Country,C4\n    Company,D4\n    Price,E4\n    Year,F4\n\ncatalog-v.ejs (same as catalog.ejs)\n\n    \u003cCATALOG\u003e\n    \u003c% for (i=0; i\u003cTitle.length; i++) { -%\u003e\n      \u003cCD\u003e\n        \u003cTITLE\u003e\u003c%- Title[i] %\u003e\u003c/TITLE\u003e\n        \u003cARTIST\u003e\u003c%- Artist[i] %\u003e\u003c/ARTIST\u003e\n        \u003cCOUNTRY\u003e\u003c%- Country[i] %\u003e\u003c/COUNTRY\u003e\n        \u003cCOMPANY\u003e\u003c%- Company[i] %\u003e\u003c/COMPANY\u003e\n        \u003cPRICE\u003e\u003c%- Price[i] %\u003e\u003c/PRICE\u003e\n        \u003cYEAR\u003e\u003c%- Year[i] %\u003e\u003c/YEAR\u003e\n      \u003c/CD\u003e\n    \u003c% } -%\u003e\n    \u003c/CATALOG\u003e\n\n### Horizontal and vertical repetitive elements\n\nOf course, you can generate data from Excel spreadsheet includes elements repeated horizontally and vertically.\n\n## Multiple worksheets\n\nYou can get data from each worksheet of Excel spreadsheets.\n\n## Templates directory\n\nAutometa search templates ([Template ID].csv and [Template ID].ejs) in the current directory of input file first.  \nIf templates not found, search default templates directory ([autometa package directory]/templates).  \nIf you want to add templates directory, set AUTOMETA_TEMPLATES environment variable.\n\n    $ export AUTOMETA_TEMPLATES=\"/path/to/your/templates\"\n\n## Original Templates\n\nIf you want to define original templates, create [Template ID].csv, [Template ID].ejs and place these files in the templates directory.  \nYou can use ect templates ([Template ID].ect) instead of ejs templates. If both ejs and ect templates exist, autometa will use ejs.\n\nYou can also place templates by register option (-r or --register-templates).\n\n    $ autometa -r [Template ID].ejs [Template ID].csv\n    $ Register success: [Template ID].ejs placed on [templates directory]\n    $ Register success: [Template ID].csv placed on [templates directory]\n\n## Set a filename manually\n\nIf you want to set a filename of first sheet manually, use `-o, --output` option.\n\n    $ autometa -o /path/to/your/filename note-example.xlsx\n\nIf specified filename is \"/dev/stdout\" or \"-\", autometa place output on stdout.\n\n    $ autometa -o /dev/stdout note-example.xlsx\n\nWhen you use this option, Excel worksheet's FileName is ignored.\n\n## Set a Template ID manually\n\nIf you want to set a Template ID manually, use `-t, --set-template-id` option.\n\n    $ autometa -t your-template-id note-example.xlsx\n\nWhen you set this option, Excel worksheet's Template ID is ignored.\n\n## Usage manual\n\n    $ autometa -h\n      Usage: autometa [options] \u003cExcel spreadsheet\u003e\n\n      Options:\n\n        -h, --help                           output usage information\n        -v, --version                        output the version number\n        -f, --force                          overwrite existing files\n        -p, --print-templates-dirs           print templates directories\n        -o, --output                         set output file name of first\n                                             sheet manually\n        -r, --register-templates \u003cfiles\u003e     register template files\n        -t, --set-template-id \u003cTemplate ID\u003e  set a Template ID manually\n\n    Environment variable:\n    AUTOMETA_TEMPLATES         Set \":\"-separated list of directories,\n                               if you want to change templates directory.\n\n## Dependencies\n\ncommander, ect, ejs, xlsjs, xlsx, readline-sync\n\n## References\n\nExample data in reference to [XML Examples]\n\n## License\n\nCopyright \u0026copy; 2014-2016 [Kenji Doi (knjcode)](https://github.com/knjcode)  \nLicensed under the [Apache License, Version 2.0][Apache]\n\n[npm-url]: https://npmjs.org/package/autometa\n[npm-image]: https://badge.fury.io/js/autometa.svg\n[travis-url]: https://travis-ci.org/knjcode/autometa\n[travis-image]: https://travis-ci.org/knjcode/autometa.svg?branch=master\n[Apache]: http://www.apache.org/licenses/LICENSE-2.0\n[XML Examples]: http://www.w3schools.com/xml/xml_examples.asp\n","funding_links":[],"categories":["CoffeeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknjcode%2Fautometa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknjcode%2Fautometa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknjcode%2Fautometa/lists"}