diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index f69c560..44b81f9 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [8.x, 9.x, 10.x, 11.x, 12.x, 13.x] + node-version: [12.x, 13.x] steps: - uses: actions/checkout@v2 @@ -24,7 +24,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run: npm install + - run: npm install - run: npm run build --if-present env: CI: true diff --git a/blog/welcome.md b/blog/welcome.md index 36ece18..a553af1 100755 --- a/blog/welcome.md +++ b/blog/welcome.md @@ -2,8 +2,8 @@ id: welcome title: Welcome author: Ashish Patel -authorTitle: Software Engineer at Deutsche Bank -authorURL: https://github.com/ashishpatel0720 +authorTitle: Software Engineer +authorURL: https://github.com/pateash authorImageURL: https://avatars0.githubusercontent.com/u/16856802?s=460&v=4 authorTwitter: ashishpatel0720 tags: [CodingTools, Welcome, Cdt] diff --git a/docs/cdt/commands/avro.md b/docs/cdt/commands/avro.md new file mode 100755 index 0000000..1d7b8b3 --- /dev/null +++ b/docs/cdt/commands/avro.md @@ -0,0 +1,94 @@ +--- +id: avro +title: avro +sidebar_label: avro +--- +### `cdt avro [COMMAND]` + +avro functionality, allows user to generate and inspect Avro files. + +``` bash +USAGE +cdt avro [COMMAND] +Avro Utility command + +USAGE + $ cdt avro [COMMAND] + +OPTIONS + -c, --command=command commands supported: get_schema,to_json,to_avro,to_csv + -f, --file=file input file path + -h, --help show CLI help + -o, --output=output output file path + -t, --schemaType=schemaType schema type file path### Finding avro of a given string for default type ( SHA1 ) +``` + +------ + +### Finding Schema for an Avro file +> We can use -f or --file flag to pass input file + +``` bash +$ cdt avro get_schema -f 'test/resources/avro/person.avro' +✔ success Avro Schema +{ + "name": "Person", + "type": "record", + "fields": [ + { + "name": "ID", + "type": "long" + }, + { + "name": "First", + "type": "string" + }, + { + "name": "Last", + "type": "string" + }, + { + "name": "Phone", + "type": "string" + }, + { + "name": "Age", + "type": "int" + } + ] +} +``` + +> We can also use -o or --output flag to pass output file ( optional ), if you want output in some file. + +``` bash +$ cdt avro get_schema -f 'test/resources/avro/person.avro' -o 'schema.avsc' +ℹ info Could not find file: schema.avsc, creating new one +✔ success output written to file: schema.avsc +``` +------ + +### Extracting data from an Avro file +> Supported Output types - CSV and JSON +> use to_json and to_csv command to extract data in JSON and CSV format respectively. + +``` bash +$ cdt avro to_json -f 'test/resources/avro/person.avro' -o 'test/resources/avro/output/person.json' +✔ Converting Avro To Json +⚠ warning File already exists: test/resources/avro/output/person.json, overriding content +✔ success Json written to file: test/resources/avro/output/person.json +``` +> If file already exists, it will be overridden in the process. + +------ + +### Generating Avro file +> for generating Avro file, you must provide Schema ( -t or --type flag ) along with Input and Output file paths. +> schema file(.avsc) can be created manually or generated using **get_schema** command + +``` bash +$ cdt avro to_avro -f 'test/resources/avro/twitter.json' -o 'test/resources/avro/output/twitter.avro' -t 'test/resources/avro/twitter.avsc' +✔ Generating Avro +ℹ info reading file: test/resources/avro/twitter.json +✔ success Avro written to file: test/resources/avro/output/twitter.avro +``` diff --git a/docs/cdt/commands/hash.md b/docs/cdt/commands/hash.md index a8c74d7..60b8de4 100755 --- a/docs/cdt/commands/hash.md +++ b/docs/cdt/commands/hash.md @@ -1,11 +1,11 @@ --- id: hash -title: Hash -sidebar_label: Hash +title: hash +sidebar_label: hash --- ### `cdt hash [STRING]` -Hashing functionality for a string/file +Hashing functionality, allows user to Hash String/File for all supported types. ``` bash USAGE diff --git a/docs/cdt/commands/minify.md b/docs/cdt/commands/minify.md index 5e5d252..846d04c 100755 --- a/docs/cdt/commands/minify.md +++ b/docs/cdt/commands/minify.md @@ -1,11 +1,11 @@ --- id: minify -title: Minify -sidebar_label: Minify +title: minify +sidebar_label: minify --- ### `cdt minify [FILE]` -Minify functionality for a string/file +Minify functionality, Allows user to minify supported file. ``` bash USAGE diff --git a/docusaurus.config.js b/docusaurus.config.js index 4bdc23d..efcad87 100755 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -6,11 +6,11 @@ */ module.exports = { - title: 'CodingTools Documentation', - tagline: 'Documentation for Coding Tools Utility', + title: 'CodingTools', + tagline: 'Documentation @codingtools/cdt', url: 'https://codingtools.github.io', baseUrl: '/', - favicon: 'img/favicon.ico', + favicon: 'img/favicon/favicon.ico', organizationName: 'codingtools', // Usually your GitHub org/user name. projectName: 'codingtools.github.io', // Usually your repo name. themeConfig: { @@ -18,11 +18,14 @@ module.exports = { title: 'CodingTools', logo: { alt: 'CodingTools', - src: 'img/logo.svg', + src: 'img/cdt_docs_website.png', + }, links: [ - {to: 'docs/cdt/installation', label: 'Cdt Docs', position: 'left'}, + {to: 'docs/cdt/commands/avro', label: 'Docs', position: 'left'}, + {to: 'docs/cdt/installation', label: 'Installation', position: 'left'}, {to: 'blog', label: 'Blog', position: 'left'}, + {to: 'Slack', label: 'Join Slack', position: 'right'}, { href: 'https://github.com/codingtools/', label: 'GitHub', @@ -38,7 +41,7 @@ module.exports = { items: [ { label: 'Docs', - to: 'docs/doc1', + to: 'docs/cdt/installation', }, ], }, @@ -46,8 +49,8 @@ module.exports = { title: 'Community', items: [ { - label: 'Discord', - href: 'https://discordapp.com/invite/docusaurus', + label: 'Slack', + href: 'https://join.slack.com/t/codingtools/shared_invite/zt-qbls6zzm-ZN8VvlVTg3enPLUdw6yluA', }, ], }, @@ -62,10 +65,10 @@ module.exports = { }, ], logo: { - alt: 'Facebook Open Source Logo', - src: 'https://docusaurus.io/img/oss_logo.png', + alt: 'CodingTools', + // src: 'img/LogoMakr_logo2.png', }, - copyright: `Copyright © ${new Date().getFullYear()} CodingTools`, + copyright: `Copyright ©CodingTools, 2019-${new Date().getFullYear()}.`, }, }, presets: [ diff --git a/sidebars.js b/sidebars.js index 4137c92..4cfdd6e 100755 --- a/sidebars.js +++ b/sidebars.js @@ -13,7 +13,11 @@ module.exports = { cdt: { 'Getting Started': ['cdt/installation'], - 'Commands': ['cdt/commands/hash','cdt/commands/minify'], + 'Commands': [ + 'cdt/commands/avro', + 'cdt/commands/hash', + 'cdt/commands/minify' + ], }, }; diff --git a/src/pages/index.js b/src/pages/index.js index a925478..b821870 100755 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -16,27 +16,27 @@ import styles from './styles.module.css'; const features = [ { title: <>Easy to Use, - imageUrl: 'img/undraw_docusaurus_mountain.svg', + imageUrl: 'img/LogoMakr_logo.png', description: ( <> - Docusaurus was designed from the ground up to be easily installed and - used to get your website up and running quickly. + CodingTools Allows Users to install and start using @codingtools/cdt very quickly, + Just install via npm or yarn and you are good to go. ), }, { - title: <>Focus on What Matters, - imageUrl: 'img/undraw_docusaurus_tree.svg', + title: <>Fully Customizable, + imageUrl: "img/LogoMakr_logo.png", description: ( - <> - Docusaurus lets you focus on your docs, and we'll do the chores. Go - ahead and move your docs into the docs directory. - + <> + Feel free to add or change anything as per your need, as @codingtools/cdt is powered by MIT license. + + ), }, { - title: <>Powered by React, - imageUrl: 'img/undraw_docusaurus_react.svg', + title: <>Powered by OClif Framework, + imageUrl: 'https://avatars.githubusercontent.com/u/35625753?s=460&u=8fb36e7eb3a1ae53d9fddc4ae4e2d40c6597e2b9&v=1', description: ( <> Extend or customize your website layout by reusing React. Docusaurus can @@ -53,6 +53,7 @@ function Feature({imageUrl, title, description}) { {imgUrl && (
{title} + {/*{title}*/}
)}

{title}

diff --git a/static/img/LogoMakr_logo.png b/static/img/LogoMakr_logo.png new file mode 100644 index 0000000..e2da062 Binary files /dev/null and b/static/img/LogoMakr_logo.png differ diff --git a/static/img/LogoMakr_logo2.png b/static/img/LogoMakr_logo2.png new file mode 100644 index 0000000..0727239 Binary files /dev/null and b/static/img/LogoMakr_logo2.png differ diff --git a/static/img/cdt_docs_website.png b/static/img/cdt_docs_website.png new file mode 100644 index 0000000..a2d7a09 Binary files /dev/null and b/static/img/cdt_docs_website.png differ diff --git a/static/img/favicon/android-chrome-192x192.png b/static/img/favicon/android-chrome-192x192.png new file mode 100644 index 0000000..394a377 Binary files /dev/null and b/static/img/favicon/android-chrome-192x192.png differ diff --git a/static/img/favicon/android-chrome-512x512.png b/static/img/favicon/android-chrome-512x512.png new file mode 100644 index 0000000..0e24468 Binary files /dev/null and b/static/img/favicon/android-chrome-512x512.png differ diff --git a/static/img/favicon/apple-touch-icon.png b/static/img/favicon/apple-touch-icon.png new file mode 100644 index 0000000..42d314c Binary files /dev/null and b/static/img/favicon/apple-touch-icon.png differ diff --git a/static/img/favicon/favicon-16x16.png b/static/img/favicon/favicon-16x16.png new file mode 100644 index 0000000..a879d95 Binary files /dev/null and b/static/img/favicon/favicon-16x16.png differ diff --git a/static/img/favicon/favicon-32x32.png b/static/img/favicon/favicon-32x32.png new file mode 100644 index 0000000..3c79f39 Binary files /dev/null and b/static/img/favicon/favicon-32x32.png differ diff --git a/static/img/favicon/favicon.ico b/static/img/favicon/favicon.ico new file mode 100644 index 0000000..2e646c4 Binary files /dev/null and b/static/img/favicon/favicon.ico differ diff --git a/static/img/favicon/favicon_io.zip b/static/img/favicon/favicon_io.zip new file mode 100644 index 0000000..c3d5297 Binary files /dev/null and b/static/img/favicon/favicon_io.zip differ diff --git a/static/img/favicon/site.webmanifest b/static/img/favicon/site.webmanifest new file mode 100644 index 0000000..45dc8a2 --- /dev/null +++ b/static/img/favicon/site.webmanifest @@ -0,0 +1 @@ +{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/static/img/logo.svg b/static/img/logo.svg deleted file mode 100755 index 9db6d0d..0000000 --- a/static/img/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file