1- # _ Json unique fields_
1+ # _ Json fields_
22
3- > GitHub Action to generate json with unique fields
3+ > GitHub Action to process JSON file by provided fields
44
5- [ ![ GitHub marketplace] ( https://img.shields.io/badge/marketplacegithub-json--fields-unique- blue?logo=github )] ( https://github.com/marketplace/actions/json-fields )
5+ [ ![ GitHub marketplace] ( https://img.shields.io/badge/marketplacegithub-json--fields-blue?logo=github )] ( https://github.com/marketplace/actions/json-fields )
66
77[ ![ management: perfekt👌] ( https://img.shields.io/badge/management-perfekt👌-red.svg )] ( https://github.com/lekterable/perfekt )
88[ ![ code style: prettier] ( https://img.shields.io/badge/code_style-prettier-ff69b4.svg )] ( https://github.com/prettier/prettier )
7272
7373<p align =" center " style =" text-align :center ;" >
7474 <a href="https://www.typescriptlang.org/">
75- <img src="https://img.shields.io/badge/javascript%20-%23323330.svg?&logo=javascript &logoColor=%23F7DF1E" alt="JavaScript " />
75+ <img src="https://img.shields.io/badge/javascript%20-%23323330.svg?&logo=typescript &logoColor=%23F7DF1E" alt="Typescript " />
7676 </a>
7777 <a href="https://www.repostatus.org/#active">
7878 <img src="https://img.shields.io/badge/Project%20Status-Active-brightgreen" alt="Project Status: Active – The project has reached a stable, usable state and is being actively developed." />
8585 </a>
8686</p >
8787
88- Creates _ ** Json Unique Fields ** _ by language and input color parameters.
88+ Processes JSON file by provided list of fields and file source parameters.
8989
9090## _ Inputs_
9191
92- ### ` language `
92+ ### ` jsonMode `
9393
94- ** Optional ** Proverb's language (default ** random ** )
94+ ** Required ** JSON operation mode
9595
96- ### ` pattern `
96+ #### ` unique `
9797
98- ** Optional ** Proverb's image background pattern (default ** random ** )
98+ Only unique fields to be filtered
9999
100- ### ` width `
100+ #### ` duplicate `
101101
102- ** Optional ** Proverb's image width (default ** 100% ** )
102+ Only duplicate fields to be filtered
103103
104- ### ` height `
104+ ### ` sourceFile `
105105
106- ** Optional ** Proverb's image height (default ** 100% ** )
106+ ** Required ** JSON source file to operate by
107107
108- ### ` backgroundColor `
108+ ### ` targetPath `
109109
110- ** Optional ** Proverb's image background color (default ** %23FFFFFF ** )
110+ ** Required ** Target path to store filtered JSON file
111111
112- ### ` fontColor `
112+ ### ` destFile `
113113
114- ** Optional ** Proverb's image font color (default ** %230A83DC ** )
114+ ** Required ** JSON destination file name
115115
116- ### ` opacity `
116+ ### ` targetProperty `
117117
118- ** Optional ** Proverb's image background opacity (default ** 0.3 ** )
118+ ** Required ** String representing slash-separated list of properties hierarchy to operate by ( ** property1/property2/.../propertyN ** )
119119
120- ### ` colorPattern `
120+ ### ` fields `
121121
122- ** Optional** Proverb's image text color (default ** %23FFE0E9 ** )
122+ ** Optional** String representing comma-separated list of fields to operate by ( ** field1,field2,...,fieldN ** )
123123
124- ### ` name `
124+ ## _ Outputs _
125125
126- ** Optional ** Proverb's image name (default ** proverb ** )
126+ ### ` status `
127127
128- ### ` path `
128+ JSON operation status
129129
130- ** Optional ** Proverb's image path (default ** images ** )
130+ #### ` true `
131131
132- ## _ Outputs _
132+ When file successfully processed and stored to destination folder
133133
134- ### ` image `
134+ #### ` false `
135135
136- Generated proverb image (stored in the ` path ` directory)
136+ When errors occurred while processing source file
137137
138138## _ Examples_
139139
140140``` yml
141- - name : Create json with unique fields
141+ - name : Process JSON file by fields
142142 uses : alexrogalskiy/github-action-json-fields@master
143143 with :
144- language : ' french'
145- pattern : ' wiggle'
146- name : ' proverb'
147- path : ' images'
144+ jsonMode : ' unique'
145+ sourceFile : ./data/african_proverbs.json
146+ targetPath : ./data
147+ destFile : african_proverbs_unique.json
148+ targetProperty : ' african'
149+ fields : ' text'
148150` ` `
149151
150152Running locally:
151153
152- - ` npm run start:action --action github-action-json-fields --language 'french ' --pattern 'wiggle ' --name proverb --path images `
154+ - ` npm run start:action --action github-action-json-fields --jsonMode 'unique ' --sourceFile './data/african_proverbs.json ' --targetPath './data' --destFile 'african_proverbs_unique.json' --targetProperty 'african' --fields 'text' `
153155
154156# # _Visitor stats_
155157
@@ -161,15 +163,15 @@ Running locally:
161163
162164# # _Licensing_
163165
164- _**Json Unique Fields**_ is distributed under LGPL version 3 or later,
166+ _**Json Fields**_ is distributed under LGPL version 3 or later,
165167[[License](https://github.com/AlexRogalskiy/github-action-json-fields/blob/master/LICENSE)]. LGPLv3 is additional
166168permissions on top of GPLv3.
167169
168170
169171
170172# # _Authors_
171173
172- _**Json Unique Fields**_ is maintained by the following GitHub team-members :
174+ _**Json Fields**_ is maintained by the following GitHub team-members :
173175
174176- [](https://github.com/AlexRogalskiy)
175177
@@ -207,7 +209,7 @@ See also the list of [contributors][contributors] who participated in this proje
207209
208210# # _Development Support_
209211
210- Like _**Json Unique Fields**_ ? Consider buying me a coffee :\)
212+ Like _**Json Fields**_ ? Consider buying me a coffee :\)
211213
212214[](https://www.patreon.com/alexrogalskiy)
213215[](https://www.buymeacoffee.com/AlexRogalskiy)
0 commit comments