From c6e41c605a7725768569ae8880f99ed8f318ab37 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Thu, 2 May 2019 19:16:38 -0400 Subject: [PATCH 01/31] added default example filename --- Makefile | 4 + cmd/generate_example.go | 9 +- mytest.json | 226 ++++++++++++++++++++++++++++++++++++++++ resume_example.json | 226 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 463 insertions(+), 2 deletions(-) create mode 100644 mytest.json create mode 100644 resume_example.json diff --git a/Makefile b/Makefile index fdeb0f8..5afa506 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,10 @@ release: pre-build @go build -ldflags "-s -w -X $(CODEPATH)/cmd.version=$(RESUMIC_VERSION) -X $(CODEPATH)/cmd.gitCommit=$(GITCOMMIT)" -o resumic @packr2 clean +nopackr: # Builds without installing packr. Useful if offline. + @go build -ldflags "-s -w -X $(CODEPATH)/cmd.version=$(RESUMIC_VERSION) -X $(CODEPATH)/cmd.gitCommit=$(GITCOMMIT)" -o resumic + + test: build go test -v ./... diff --git a/cmd/generate_example.go b/cmd/generate_example.go index e93eca2..fb928b0 100644 --- a/cmd/generate_example.go +++ b/cmd/generate_example.go @@ -10,7 +10,12 @@ import ( ) func generateExampleRun(cmd *cobra.Command, args []string) error { - examplePath := args[0] + var examplePath string + if len(args) == 0 { + examplePath = "resume_example.json" + } else { + examplePath = args[0] + } example, err := schema.GenerateExample() if err != nil { return fmt.Errorf("Couldn't generate the example: %s", err) @@ -30,7 +35,7 @@ func generateExampleRun(cmd *cobra.Command, args []string) error { var generateExampleCmd = &cobra.Command{ Use: "example PATH", Short: "Generate an example json resume", - Args: cobra.ExactArgs(1), + Args: cobra.MaximumNArgs(1), RunE: generateExampleRun, } diff --git a/mytest.json b/mytest.json new file mode 100644 index 0000000..3976826 --- /dev/null +++ b/mytest.json @@ -0,0 +1,226 @@ +{ + "core": { + "title": "Software Engineer", + "workArea": "Munich Citycenter + 20kms", + "livingArea": "Germany" + }, + "personal": { + "name": "John Doe", + "gender": "male", + "image": "example.com/Abcxyz", + "email": "lucas@example.com", + "phone": "912-217-7923", + "url": "http://www.example.com/", + "summary": "The man who sold the world!", + "currentLocation": { + "lat": 35.712758, + "long": 51.392114 + }, + "permanentLocation": { + "lat": 35.712758, + "long": 51.392114 + }, + "birthday": "1995-02-14", + "birthPlace": "Munich", + "profiles": [ + { + "network": "github", + "username": "john_doe", + "url": "https://github.com/john_doe" + } + ], + "relationshipStatus": "married", + "postalAddress": "John Doe, Wittekindshof, Schulstrasse 4, 32547 Bad Oyenhausen, Germany" + }, + "work": [ + { + "name": "XYZ Inc", + "description": "A social media company", + "position": "Software Engineer", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "url": "http://xyz.example.com", + "startDate": "2017-12-29", + "endDate": "2018-12-29", + "summary": "Developing and maintaining the company website using syna", + "highlights": [ + "Worked with mobile team at Twitter to develop remote debugging tools for mobile browsers" + ] + } + ], + "education": [ + { + "institution": "XYZ Institute of Technology", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "area": "Engineering", + "studyType": "Bachelor", + "startDate": "2017-06-28", + "endDate": "2013-06-28", + "score": { + "type": "GPA", + "value": "3.4", + "best": "4", + "worst": "0" + }, + "courses": [ + "CS302 - Introduction to Algorithms" + ], + "honors": [ + "Magna Cum Laude" + ], + "highlights": [ + "Live abroad within a new culture" + ] + } + ], + "volunteer": [ + { + "organization": "Xyz", + "position": "Open Source Contributor", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "url": "http://xyz.example.com", + "startDate": "2014-06-29", + "endDate": "2017-06-29", + "summary": "Frontend developer", + "highlights": [ + "Invited as a speaker in Xyzcon'17" + ] + } + ], + "publications": [ + { + "name": "Deep learning and Artificial Intelligence", + "publisher": "XYZ, Computer Magazine", + "releaseDate": "2015-08-01", + "resources": [ + { + "url": "http://www.example.com/my-example-slides/", + "label": "Slides" + } + ], + "url": "http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html", + "summary": "Discussion of the advent of deep learning and artificial intelligence" + } + ], + "legal": [ + { + "name": "XYZ's patent on LZW compression, a fundamental part of the widely used GIF graphics format", + "legalType": "Patent, Trademark, Copyright", + "description": "Some legal document!", + "applicationDate": "2015-08-01", + "grantDate": "2016-09-01", + "endDate": "2020-09-03", + "resources": [ + { + "url": "http://www.example.com/my-example-slides/", + "label": "Slides" + } + ], + "idNumber": "JP2004369746A", + "currentAssignee": "John Doe", + "previousAssignee": "John Doe", + "author": "John Doe", + "coAuthors": "John Doe" + } + ], + "skills": [ + { + "name": "Web Development", + "proficiency": "advanced", + "keywords": [ + "HTML" + ] + } + ], + "awards": [ + { + "title": "Awarded Software Process Achievement Award", + "date": "2016-06-12", + "awarder": "IEEE", + "summary": "Received for my work in Deep learning and AI" + } + ], + "projects": [ + { + "name": "File Transfer application", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "description": "Developed a client and server based application", + "highlights": [ + "used Java AWT and Swing for client side userinterface" + ], + "keywords": [ + "Java" + ], + "startDate": "2016-06-29", + "endDate": "2017-03-02", + "resources": [ + { + "url": "http://www.example.com/my-example-slides/", + "label": "Slides" + } + ], + "url": "http://www.example.org/csdl/mags/co/1996/10/rx069-abs.html", + "roles": [ + "Team Lead" + ], + "entity": "greenpeace", + "type": "volunteering" + } + ], + "certificate": [ + { + "code": "1Z0-062", + "name": "XYZ Certified Application Specialist (MCAS)", + "website": "http://www.example.org", + "verification": "http://www.example.org", + "grantDate": "2017-06-29", + "score": { + "type": "GPA", + "value": "3.4", + "best": "4", + "worst": "0" + }, + "endDate": "2017-06-29", + "doesNotExpire": true + } + ], + "references": [ + { + "name": "Stephan Mark", + "company": "Xyz", + "position": "Senior Software Engineer", + "reference": "Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing." + } + ], + "languages": [ + { + "language": "English", + "level": "fluent" + } + ], + "interests": [ + { + "name": "Machine Learning", + "keywords": [ + "Neural Networks" + ] + } + ], + "meta": { + "canonical": "", + "version": "v1.0.0", + "lastModified": "2017-06-29T15:53:01+01:00", + "uuid": "078c39ce-23ee-4970-9637-c07379132dce" + } +} \ No newline at end of file diff --git a/resume_example.json b/resume_example.json new file mode 100644 index 0000000..3976826 --- /dev/null +++ b/resume_example.json @@ -0,0 +1,226 @@ +{ + "core": { + "title": "Software Engineer", + "workArea": "Munich Citycenter + 20kms", + "livingArea": "Germany" + }, + "personal": { + "name": "John Doe", + "gender": "male", + "image": "example.com/Abcxyz", + "email": "lucas@example.com", + "phone": "912-217-7923", + "url": "http://www.example.com/", + "summary": "The man who sold the world!", + "currentLocation": { + "lat": 35.712758, + "long": 51.392114 + }, + "permanentLocation": { + "lat": 35.712758, + "long": 51.392114 + }, + "birthday": "1995-02-14", + "birthPlace": "Munich", + "profiles": [ + { + "network": "github", + "username": "john_doe", + "url": "https://github.com/john_doe" + } + ], + "relationshipStatus": "married", + "postalAddress": "John Doe, Wittekindshof, Schulstrasse 4, 32547 Bad Oyenhausen, Germany" + }, + "work": [ + { + "name": "XYZ Inc", + "description": "A social media company", + "position": "Software Engineer", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "url": "http://xyz.example.com", + "startDate": "2017-12-29", + "endDate": "2018-12-29", + "summary": "Developing and maintaining the company website using syna", + "highlights": [ + "Worked with mobile team at Twitter to develop remote debugging tools for mobile browsers" + ] + } + ], + "education": [ + { + "institution": "XYZ Institute of Technology", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "area": "Engineering", + "studyType": "Bachelor", + "startDate": "2017-06-28", + "endDate": "2013-06-28", + "score": { + "type": "GPA", + "value": "3.4", + "best": "4", + "worst": "0" + }, + "courses": [ + "CS302 - Introduction to Algorithms" + ], + "honors": [ + "Magna Cum Laude" + ], + "highlights": [ + "Live abroad within a new culture" + ] + } + ], + "volunteer": [ + { + "organization": "Xyz", + "position": "Open Source Contributor", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "url": "http://xyz.example.com", + "startDate": "2014-06-29", + "endDate": "2017-06-29", + "summary": "Frontend developer", + "highlights": [ + "Invited as a speaker in Xyzcon'17" + ] + } + ], + "publications": [ + { + "name": "Deep learning and Artificial Intelligence", + "publisher": "XYZ, Computer Magazine", + "releaseDate": "2015-08-01", + "resources": [ + { + "url": "http://www.example.com/my-example-slides/", + "label": "Slides" + } + ], + "url": "http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html", + "summary": "Discussion of the advent of deep learning and artificial intelligence" + } + ], + "legal": [ + { + "name": "XYZ's patent on LZW compression, a fundamental part of the widely used GIF graphics format", + "legalType": "Patent, Trademark, Copyright", + "description": "Some legal document!", + "applicationDate": "2015-08-01", + "grantDate": "2016-09-01", + "endDate": "2020-09-03", + "resources": [ + { + "url": "http://www.example.com/my-example-slides/", + "label": "Slides" + } + ], + "idNumber": "JP2004369746A", + "currentAssignee": "John Doe", + "previousAssignee": "John Doe", + "author": "John Doe", + "coAuthors": "John Doe" + } + ], + "skills": [ + { + "name": "Web Development", + "proficiency": "advanced", + "keywords": [ + "HTML" + ] + } + ], + "awards": [ + { + "title": "Awarded Software Process Achievement Award", + "date": "2016-06-12", + "awarder": "IEEE", + "summary": "Received for my work in Deep learning and AI" + } + ], + "projects": [ + { + "name": "File Transfer application", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "description": "Developed a client and server based application", + "highlights": [ + "used Java AWT and Swing for client side userinterface" + ], + "keywords": [ + "Java" + ], + "startDate": "2016-06-29", + "endDate": "2017-03-02", + "resources": [ + { + "url": "http://www.example.com/my-example-slides/", + "label": "Slides" + } + ], + "url": "http://www.example.org/csdl/mags/co/1996/10/rx069-abs.html", + "roles": [ + "Team Lead" + ], + "entity": "greenpeace", + "type": "volunteering" + } + ], + "certificate": [ + { + "code": "1Z0-062", + "name": "XYZ Certified Application Specialist (MCAS)", + "website": "http://www.example.org", + "verification": "http://www.example.org", + "grantDate": "2017-06-29", + "score": { + "type": "GPA", + "value": "3.4", + "best": "4", + "worst": "0" + }, + "endDate": "2017-06-29", + "doesNotExpire": true + } + ], + "references": [ + { + "name": "Stephan Mark", + "company": "Xyz", + "position": "Senior Software Engineer", + "reference": "Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing." + } + ], + "languages": [ + { + "language": "English", + "level": "fluent" + } + ], + "interests": [ + { + "name": "Machine Learning", + "keywords": [ + "Neural Networks" + ] + } + ], + "meta": { + "canonical": "", + "version": "v1.0.0", + "lastModified": "2017-06-29T15:53:01+01:00", + "uuid": "078c39ce-23ee-4970-9637-c07379132dce" + } +} \ No newline at end of file From 7224c6650111dd4005c383f256897745e93d5ceb Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Fri, 3 May 2019 11:57:08 -0400 Subject: [PATCH 02/31] got rid of sample output files --- mytest.json | 226 -------------------------------------------- resume_example.json | 226 -------------------------------------------- 2 files changed, 452 deletions(-) delete mode 100644 mytest.json delete mode 100644 resume_example.json diff --git a/mytest.json b/mytest.json deleted file mode 100644 index 3976826..0000000 --- a/mytest.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "core": { - "title": "Software Engineer", - "workArea": "Munich Citycenter + 20kms", - "livingArea": "Germany" - }, - "personal": { - "name": "John Doe", - "gender": "male", - "image": "example.com/Abcxyz", - "email": "lucas@example.com", - "phone": "912-217-7923", - "url": "http://www.example.com/", - "summary": "The man who sold the world!", - "currentLocation": { - "lat": 35.712758, - "long": 51.392114 - }, - "permanentLocation": { - "lat": 35.712758, - "long": 51.392114 - }, - "birthday": "1995-02-14", - "birthPlace": "Munich", - "profiles": [ - { - "network": "github", - "username": "john_doe", - "url": "https://github.com/john_doe" - } - ], - "relationshipStatus": "married", - "postalAddress": "John Doe, Wittekindshof, Schulstrasse 4, 32547 Bad Oyenhausen, Germany" - }, - "work": [ - { - "name": "XYZ Inc", - "description": "A social media company", - "position": "Software Engineer", - "location": { - "lat": 35.712758, - "long": 51.392114 - }, - "url": "http://xyz.example.com", - "startDate": "2017-12-29", - "endDate": "2018-12-29", - "summary": "Developing and maintaining the company website using syna", - "highlights": [ - "Worked with mobile team at Twitter to develop remote debugging tools for mobile browsers" - ] - } - ], - "education": [ - { - "institution": "XYZ Institute of Technology", - "location": { - "lat": 35.712758, - "long": 51.392114 - }, - "area": "Engineering", - "studyType": "Bachelor", - "startDate": "2017-06-28", - "endDate": "2013-06-28", - "score": { - "type": "GPA", - "value": "3.4", - "best": "4", - "worst": "0" - }, - "courses": [ - "CS302 - Introduction to Algorithms" - ], - "honors": [ - "Magna Cum Laude" - ], - "highlights": [ - "Live abroad within a new culture" - ] - } - ], - "volunteer": [ - { - "organization": "Xyz", - "position": "Open Source Contributor", - "location": { - "lat": 35.712758, - "long": 51.392114 - }, - "url": "http://xyz.example.com", - "startDate": "2014-06-29", - "endDate": "2017-06-29", - "summary": "Frontend developer", - "highlights": [ - "Invited as a speaker in Xyzcon'17" - ] - } - ], - "publications": [ - { - "name": "Deep learning and Artificial Intelligence", - "publisher": "XYZ, Computer Magazine", - "releaseDate": "2015-08-01", - "resources": [ - { - "url": "http://www.example.com/my-example-slides/", - "label": "Slides" - } - ], - "url": "http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html", - "summary": "Discussion of the advent of deep learning and artificial intelligence" - } - ], - "legal": [ - { - "name": "XYZ's patent on LZW compression, a fundamental part of the widely used GIF graphics format", - "legalType": "Patent, Trademark, Copyright", - "description": "Some legal document!", - "applicationDate": "2015-08-01", - "grantDate": "2016-09-01", - "endDate": "2020-09-03", - "resources": [ - { - "url": "http://www.example.com/my-example-slides/", - "label": "Slides" - } - ], - "idNumber": "JP2004369746A", - "currentAssignee": "John Doe", - "previousAssignee": "John Doe", - "author": "John Doe", - "coAuthors": "John Doe" - } - ], - "skills": [ - { - "name": "Web Development", - "proficiency": "advanced", - "keywords": [ - "HTML" - ] - } - ], - "awards": [ - { - "title": "Awarded Software Process Achievement Award", - "date": "2016-06-12", - "awarder": "IEEE", - "summary": "Received for my work in Deep learning and AI" - } - ], - "projects": [ - { - "name": "File Transfer application", - "location": { - "lat": 35.712758, - "long": 51.392114 - }, - "description": "Developed a client and server based application", - "highlights": [ - "used Java AWT and Swing for client side userinterface" - ], - "keywords": [ - "Java" - ], - "startDate": "2016-06-29", - "endDate": "2017-03-02", - "resources": [ - { - "url": "http://www.example.com/my-example-slides/", - "label": "Slides" - } - ], - "url": "http://www.example.org/csdl/mags/co/1996/10/rx069-abs.html", - "roles": [ - "Team Lead" - ], - "entity": "greenpeace", - "type": "volunteering" - } - ], - "certificate": [ - { - "code": "1Z0-062", - "name": "XYZ Certified Application Specialist (MCAS)", - "website": "http://www.example.org", - "verification": "http://www.example.org", - "grantDate": "2017-06-29", - "score": { - "type": "GPA", - "value": "3.4", - "best": "4", - "worst": "0" - }, - "endDate": "2017-06-29", - "doesNotExpire": true - } - ], - "references": [ - { - "name": "Stephan Mark", - "company": "Xyz", - "position": "Senior Software Engineer", - "reference": "Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing." - } - ], - "languages": [ - { - "language": "English", - "level": "fluent" - } - ], - "interests": [ - { - "name": "Machine Learning", - "keywords": [ - "Neural Networks" - ] - } - ], - "meta": { - "canonical": "", - "version": "v1.0.0", - "lastModified": "2017-06-29T15:53:01+01:00", - "uuid": "078c39ce-23ee-4970-9637-c07379132dce" - } -} \ No newline at end of file diff --git a/resume_example.json b/resume_example.json deleted file mode 100644 index 3976826..0000000 --- a/resume_example.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "core": { - "title": "Software Engineer", - "workArea": "Munich Citycenter + 20kms", - "livingArea": "Germany" - }, - "personal": { - "name": "John Doe", - "gender": "male", - "image": "example.com/Abcxyz", - "email": "lucas@example.com", - "phone": "912-217-7923", - "url": "http://www.example.com/", - "summary": "The man who sold the world!", - "currentLocation": { - "lat": 35.712758, - "long": 51.392114 - }, - "permanentLocation": { - "lat": 35.712758, - "long": 51.392114 - }, - "birthday": "1995-02-14", - "birthPlace": "Munich", - "profiles": [ - { - "network": "github", - "username": "john_doe", - "url": "https://github.com/john_doe" - } - ], - "relationshipStatus": "married", - "postalAddress": "John Doe, Wittekindshof, Schulstrasse 4, 32547 Bad Oyenhausen, Germany" - }, - "work": [ - { - "name": "XYZ Inc", - "description": "A social media company", - "position": "Software Engineer", - "location": { - "lat": 35.712758, - "long": 51.392114 - }, - "url": "http://xyz.example.com", - "startDate": "2017-12-29", - "endDate": "2018-12-29", - "summary": "Developing and maintaining the company website using syna", - "highlights": [ - "Worked with mobile team at Twitter to develop remote debugging tools for mobile browsers" - ] - } - ], - "education": [ - { - "institution": "XYZ Institute of Technology", - "location": { - "lat": 35.712758, - "long": 51.392114 - }, - "area": "Engineering", - "studyType": "Bachelor", - "startDate": "2017-06-28", - "endDate": "2013-06-28", - "score": { - "type": "GPA", - "value": "3.4", - "best": "4", - "worst": "0" - }, - "courses": [ - "CS302 - Introduction to Algorithms" - ], - "honors": [ - "Magna Cum Laude" - ], - "highlights": [ - "Live abroad within a new culture" - ] - } - ], - "volunteer": [ - { - "organization": "Xyz", - "position": "Open Source Contributor", - "location": { - "lat": 35.712758, - "long": 51.392114 - }, - "url": "http://xyz.example.com", - "startDate": "2014-06-29", - "endDate": "2017-06-29", - "summary": "Frontend developer", - "highlights": [ - "Invited as a speaker in Xyzcon'17" - ] - } - ], - "publications": [ - { - "name": "Deep learning and Artificial Intelligence", - "publisher": "XYZ, Computer Magazine", - "releaseDate": "2015-08-01", - "resources": [ - { - "url": "http://www.example.com/my-example-slides/", - "label": "Slides" - } - ], - "url": "http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html", - "summary": "Discussion of the advent of deep learning and artificial intelligence" - } - ], - "legal": [ - { - "name": "XYZ's patent on LZW compression, a fundamental part of the widely used GIF graphics format", - "legalType": "Patent, Trademark, Copyright", - "description": "Some legal document!", - "applicationDate": "2015-08-01", - "grantDate": "2016-09-01", - "endDate": "2020-09-03", - "resources": [ - { - "url": "http://www.example.com/my-example-slides/", - "label": "Slides" - } - ], - "idNumber": "JP2004369746A", - "currentAssignee": "John Doe", - "previousAssignee": "John Doe", - "author": "John Doe", - "coAuthors": "John Doe" - } - ], - "skills": [ - { - "name": "Web Development", - "proficiency": "advanced", - "keywords": [ - "HTML" - ] - } - ], - "awards": [ - { - "title": "Awarded Software Process Achievement Award", - "date": "2016-06-12", - "awarder": "IEEE", - "summary": "Received for my work in Deep learning and AI" - } - ], - "projects": [ - { - "name": "File Transfer application", - "location": { - "lat": 35.712758, - "long": 51.392114 - }, - "description": "Developed a client and server based application", - "highlights": [ - "used Java AWT and Swing for client side userinterface" - ], - "keywords": [ - "Java" - ], - "startDate": "2016-06-29", - "endDate": "2017-03-02", - "resources": [ - { - "url": "http://www.example.com/my-example-slides/", - "label": "Slides" - } - ], - "url": "http://www.example.org/csdl/mags/co/1996/10/rx069-abs.html", - "roles": [ - "Team Lead" - ], - "entity": "greenpeace", - "type": "volunteering" - } - ], - "certificate": [ - { - "code": "1Z0-062", - "name": "XYZ Certified Application Specialist (MCAS)", - "website": "http://www.example.org", - "verification": "http://www.example.org", - "grantDate": "2017-06-29", - "score": { - "type": "GPA", - "value": "3.4", - "best": "4", - "worst": "0" - }, - "endDate": "2017-06-29", - "doesNotExpire": true - } - ], - "references": [ - { - "name": "Stephan Mark", - "company": "Xyz", - "position": "Senior Software Engineer", - "reference": "Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing." - } - ], - "languages": [ - { - "language": "English", - "level": "fluent" - } - ], - "interests": [ - { - "name": "Machine Learning", - "keywords": [ - "Neural Networks" - ] - } - ], - "meta": { - "canonical": "", - "version": "v1.0.0", - "lastModified": "2017-06-29T15:53:01+01:00", - "uuid": "078c39ce-23ee-4970-9637-c07379132dce" - } -} \ No newline at end of file From 949aa567299269fe4bd9c08c9c17d50081b91466 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Fri, 3 May 2019 14:18:03 -0400 Subject: [PATCH 03/31] default values added for render cmd args --- cmd/render.go | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/cmd/render.go b/cmd/render.go index 49b65a3..f570501 100644 --- a/cmd/render.go +++ b/cmd/render.go @@ -3,15 +3,48 @@ package cmd import ( "fmt" "io/ioutil" + "strings" "github.com/resumic/schema/render" "github.com/resumic/schema/theme" "github.com/spf13/cobra" ) +// Added in case we change default filenames. +const ( + defaultHTML = "resume.html" + defaultResume = "resume.json" +) + func renderRun(cmd *cobra.Command, args []string) error { - resumePath := args[0] - htmlPath := args[1] + var ( + resumePath string + htmlPath string + ) + switch argLen := len(args); argLen { + // No args: use defaults for input file and output file. + case 0: + resumePath = defaultResume + htmlPath = defaultHTML + // 1 argument: check to see what the file type is. If JSON, use as input file. + // If HTML, use as output file. This doesn't permit using files with no extension. + case 1: + if strings.Contains(args[0], ".json") { + resumePath = args[0] + htmlPath = defaultHTML + } else if strings.Contains(args[0], ".html") { + resumePath = defaultResume + htmlPath = args[0] + } else { + return fmt.Errorf("Please provide argument(s) with a valid .json or .html extension") + } + // 2 args: use args for input and output files. + case 2: + resumePath = args[0] + htmlPath = args[1] + } + // resumePath := args[0] + // htmlPath := args[1] cacheDir, err := cmd.Flags().GetString("cacheDir") if err != nil { panic(err) @@ -49,9 +82,9 @@ func renderRun(cmd *cobra.Command, args []string) error { } var renderCmd = &cobra.Command{ - Use: "render JSON_PATH HTML_PATH", + Use: "render JSON_PATH (defaults to resume.json) HTML_PATH (defaults to resume.html)", Short: "Render json resume to html", - Args: cobra.ExactArgs(2), + Args: cobra.MaximumNArgs(2), RunE: renderRun, } From 55bb954303432804208207329a903861f2a6d95c Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Fri, 3 May 2019 14:33:48 -0400 Subject: [PATCH 04/31] added default input file value for validate --- cmd/validate.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/validate.go b/cmd/validate.go index 327f4fd..97ebb09 100644 --- a/cmd/validate.go +++ b/cmd/validate.go @@ -10,7 +10,12 @@ import ( ) func validateRun(cmd *cobra.Command, args []string) error { - resumePath := args[0] + var resumePath string + if len(args) == 0 { + resumePath = "resume.json" + } else { + resumePath = args[0] + } resume, err := ioutil.ReadFile(resumePath) if err != nil { @@ -23,14 +28,14 @@ func validateRun(cmd *cobra.Command, args []string) error { } return fmt.Errorf("Couldn't validate the resume: %s", err) } - fmt.Printf("%s is valid and conforming with the resumic schema", resumePath) + fmt.Printf("%s is valid and conforming with the resumic schema\n", resumePath) return nil } var validateCmd = &cobra.Command{ Use: "validate PATH", Short: "Validate a json resume", - Args: cobra.ExactArgs(1), + Args: cobra.MaximumNArgs(1), RunE: validateRun, } From 0f3b0241dec0d88fdf4ceb65f03381ccdcabdd9f Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Fri, 3 May 2019 15:29:00 -0400 Subject: [PATCH 05/31] added default output filename values to generate commands --- cmd/generate_jsonschema.go | 9 +++++++-- cmd/generate_uischema.go | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cmd/generate_jsonschema.go b/cmd/generate_jsonschema.go index 039ca67..a390620 100644 --- a/cmd/generate_jsonschema.go +++ b/cmd/generate_jsonschema.go @@ -9,7 +9,12 @@ import ( ) func generateJSONSchemaRun(cmd *cobra.Command, args []string) error { - schemaPath := args[0] + var schemaPath string + if len(args) == 0 { + schemaPath = "resume.json" + } else { + schemaPath = args[0] + } schema, err := schema.GenerateJSONSchema() if err != nil { return fmt.Errorf("Couldn't generate JSON schema: %s", err) @@ -25,7 +30,7 @@ func generateJSONSchemaRun(cmd *cobra.Command, args []string) error { var generateJSONSchemaCmd = &cobra.Command{ Use: "jsonschema PATH", Short: "Generate the jsonschema for the resumic schema", - Args: cobra.ExactArgs(1), + Args: cobra.MaximumNArgs(1), RunE: generateJSONSchemaRun, } diff --git a/cmd/generate_uischema.go b/cmd/generate_uischema.go index 71b00a1..59eee2c 100644 --- a/cmd/generate_uischema.go +++ b/cmd/generate_uischema.go @@ -9,7 +9,12 @@ import ( ) func generateUISchemaRun(cmd *cobra.Command, args []string) error { - schemaPath := args[0] + var schemaPath string + if len(args) == 0 { + schemaPath = "resume.json" + } else { + schemaPath = args[0] + } schema, err := schema.GenerateUISchema() if err != nil { return fmt.Errorf("Couldn't generate UI schema: %s", err) @@ -25,7 +30,7 @@ func generateUISchemaRun(cmd *cobra.Command, args []string) error { var generateUISchemaCmd = &cobra.Command{ Use: "uischema PATH", Short: "Generate the uischema for the resumic schema", - Args: cobra.ExactArgs(1), + Args: cobra.MaximumNArgs(1), RunE: generateUISchemaRun, } From a5daddce7b8aca31ecf1ad4abff2c4c65965a2a5 Mon Sep 17 00:00:00 2001 From: Arman Mazdaee Date: Sun, 12 May 2019 14:23:30 +0430 Subject: [PATCH 06/31] Fix bug with getJSONName --- schema/base.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/schema/base.go b/schema/base.go index 878c1a7..e854176 100644 --- a/schema/base.go +++ b/schema/base.go @@ -15,15 +15,11 @@ func (e *UnsupportedKindError) Error() string { func getJSONName(field reflect.StructField) string { tag := field.Tag.Get("json") - if tag == "" { - return field.Name - } - if tag == "-" { - return "" - } name := strings.Split(tag, ",")[0] if name == "" { return field.Name + } else if name == "-" { + return "" } return name } From caec989889f6e6588f9d666346b334ca78c03c67 Mon Sep 17 00:00:00 2001 From: Arman Mazdaee Date: Sun, 12 May 2019 14:59:56 +0430 Subject: [PATCH 07/31] add omitempty to some fields --- schema/schema.go | 142 +++++++++++++++++++++++------------------------ 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/schema/schema.go b/schema/schema.go index ed41eb2..632b346 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -25,148 +25,148 @@ type profileSchema struct { type coreSchema struct { Title string `json:"title" schema:"description:job title;example:Software Engineer"` - WorkArea string `json:"workArea" schema:"description:work area which could be city or country or even remote;example:Munich Citycenter + 20kms"` - LivingArea string `json:"livingArea" schema:"description:living area which could be city or country or even continent;example:Germany"` + WorkArea string `json:"workArea,omitempty" schema:"description:work area which could be city or country or even remote;example:Munich Citycenter + 20kms"` + LivingArea string `json:"livingArea,omitempty" schema:"description:living area which could be city or country or even continent;example:Germany"` } type personalSchema struct { - Name string `json:"name" schema:"description:full name;example:John Doe"` - Gender string `json:"gender" schema:"example:male"` - Image string `json:"image" schema:"description:url of the personal photo;example:example.com/Abcxyz"` - Email string `json:"email" schema:"description:email address;format:idn-email;example:lucas@example.com"` - Phone string `json:"phone" schema:"description:phone number;example:912-217-7923"` - URL string `json:"url" schema:"description:homepage url;format:uri;example:http://www.example.com/"` - Summary string `json:"summary" schema:"description:a short sentence about yourself;example:The man who sold the world!"` - CurrentLocation locationSchema `json:"currentLocation" schema:"description:living location"` - PermanentLocation locationSchema `json:"permanentLocation" schema:"description:permanently living location"` - Birthday string `json:"birthday" schema:"description:birthday date;format:date;example:1995-02-14"` - BirthPlace string `json:"birthPlace" schema:"description:place of birth;example:Munich"` - Profiles []profileSchema `json:"profiles" schema:"description:list of social networks"` - RelationshipStatus string `json:"relationshipStatus" schema:"description:civil status;example:married"` - PostalAddress string `json:"postalAddress" schema:"example:John Doe, Wittekindshof, Schulstrasse 4, 32547 Bad Oyenhausen, Germany"` + Name string `json:"name,omitempty" schema:"description:full name;example:John Doe"` + Gender string `json:"gender,omitempty" schema:"example:male"` + Image string `json:"image,omitempty" schema:"description:url of the personal photo;example:example.com/Abcxyz"` + Email string `json:"email,omitempty" schema:"description:email address;format:idn-email;example:lucas@example.com"` + Phone string `json:"phone,omitempty" schema:"description:phone number;example:912-217-7923"` + URL string `json:"url,omitempty" schema:"description:homepage url;format:uri;example:http://www.example.com/"` + Summary string `json:"summary,omitempty" schema:"description:a short sentence about yourself;example:The man who sold the world!"` + CurrentLocation locationSchema `json:"currentLocation,omitempty" schema:"description:living location"` + PermanentLocation locationSchema `json:"permanentLocation,omitempty" schema:"description:permanently living location"` + Birthday string `json:"birthday,omitempty" schema:"description:birthday date;format:date;example:1995-02-14"` + BirthPlace string `json:"birthPlace,omitempty" schema:"description:place of birth;example:Munich"` + Profiles []profileSchema `json:"profiles,omitempty" schema:"description:list of social networks"` + RelationshipStatus string `json:"relationshipStatus,omitempty" schema:"description:civil status;example:married"` + PostalAddress string `json:"postalAddress,omitempty" schema:"example:John Doe, Wittekindshof, Schulstrasse 4, 32547 Bad Oyenhausen, Germany"` } type workSchema struct { Name string `json:"name" schema:"description:name of company;example:XYZ Inc"` - Description string `json:"description" schema:"description:companies primary activity;example:A social media company"` + Description string `json:"description,omitempty" schema:"description:companies primary activity;example:A social media company"` Position string `json:"position" schema:"description:position at the company;example:Software Engineer"` - Location locationSchema `json:"location" schema:"description:location of the company"` - URL string `json:"url" schema:"description:url of the company website;format:uri;example:http://xyz.example.com"` + Location locationSchema `json:"location,omitempty" schema:"description:location of the company"` + URL string `json:"url,omitempty" schema:"description:url of the company website;format:uri;example:http://xyz.example.com"` StartDate string `json:"startDate" schema:"description:start date;format:date;example:2017-12-29"` EndDate string `json:"endDate" schema:"description:end date;format:date;example:2018-12-29"` - Summary string `json:"summary" schema:"description:an overview of responsibilities;example:Developing and maintaining the company website using syna"` - Highlights []string `json:"highlights" schema:"description:some of accomplishments;items_example:Worked with mobile team at Twitter to develop remote debugging tools for mobile browsers"` + Summary string `json:"summary,omitempty" schema:"description:an overview of responsibilities;example:Developing and maintaining the company website using syna"` + Highlights []string `json:"highlights,omitempty" schema:"description:some of accomplishments;items_example:Worked with mobile team at Twitter to develop remote debugging tools for mobile browsers"` } type educationSchema struct { Institution string `json:"institution" schema:"name of institute;example:XYZ Institute of Technology"` - Location locationSchema `json:"location" schema:"description:location of institution"` + Location locationSchema `json:"location,omitempty" schema:"description:location of institution"` Area string `json:"area" schema:"description:area of study;example:Engineering"` StudyType string `json:"studyType" schema:"description:type of study;example:Bachelor"` StartDate string `json:"startDate" schema:"description:start date;format:date;example:2017-06-28"` EndDate string `json:"endDate" schema:"description:end date;format:date;example:2013-06-28"` - Score scoreSchema `json:"score"` - Courses []string `json:"courses" schema:"description:notable courses/subjects;items_example:CS302 - Introduction to Algorithms"` - Honors []string `json:"honors" schema:"description:some education honours;items_example:Magna Cum Laude"` - Highlights []string `json:"highlights" schema:"description:some of accomplishments;items_example:Live abroad within a new culture"` + Score scoreSchema `json:"score,omitempty"` + Courses []string `json:"courses,omitempty" schema:"description:notable courses/subjects;items_example:CS302 - Introduction to Algorithms"` + Honors []string `json:"honors,omitempty" schema:"description:some education honours;items_example:Magna Cum Laude"` + Highlights []string `json:"highlights,omitempty" schema:"description:some of accomplishments;items_example:Live abroad within a new culture"` } type volunteerSchema struct { Organization string `json:"organization" schema:"description:name of the organization;example:Xyz"` Position string `json:"position" schema:"description:type of the contribution;example:Open Source Contributor"` - Location locationSchema `json:"location" schema:"description:location of activity"` - URL string `json:"url" schema:"description:related link to support volunteer experience;format:uri;example:http://xyz.example.com"` + Location locationSchema `json:"location,omitempty" schema:"description:location of activity"` + URL string `json:"url,omitempty" schema:"description:related link to support volunteer experience;format:uri;example:http://xyz.example.com"` StartDate string `json:"startDate" schema:"description:start date;format:date;example:2014-06-29"` EndDate string `json:"endDate" schema:"description:end date;format:date;example:2017-06-29"` - Summary string `json:"summary" schema:"description:an overview of responsibilities;example:Frontend developer"` - Highlights []string `json:"highlights" schema:"description:some of accomplishments;items_example:Invited as a speaker in Xyzcon'17"` + Summary string `json:"summary,omitempty" schema:"description:an overview of responsibilities;example:Frontend developer"` + Highlights []string `json:"highlights,omitempty" schema:"description:some of accomplishments;items_example:Invited as a speaker in Xyzcon'17"` } type publicationSchema struct { Name string `json:"name" schema:"description:name of the publication;example:Deep learning and Artificial Intelligence"` Publisher string `json:"publisher" schema:"description:name of the publisher;example:XYZ, Computer Magazine"` ReleaseDate string `json:"releaseDate" schema:"description:release date of publication;example:2015-08-01"` - Resources []resourceSchema `json:"resources" schema:"description:multiple resources with label"` - URL string `json:"url" schema:"description:url of the publication;format:uri;example:http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html"` - Summary string `json:"summary" schema:"description:short summary of the publication;example:Discussion of the advent of deep learning and artificial intelligence"` + Resources []resourceSchema `json:"resources,omitempty" schema:"description:multiple resources with label"` + URL string `json:"url,omitempty" schema:"description:url of the publication;format:uri;example:http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html"` + Summary string `json:"summary,omitempty" schema:"description:short summary of the publication;example:Discussion of the advent of deep learning and artificial intelligence"` } type legalSchema struct { Name string `json:"name" schema:"description:name of the document;example:XYZ's patent on LZW compression, a fundamental part of the widely used GIF graphics format"` - LegalType string `json:"legalType" schema:"description:type of the document;example:Patent, Trademark, Copyright"` - Description string `json:"description" schema:"description:a brief description about the document;example:Some legal document!"` - ApplicationDate string `json:"applicationDate" schema:"description:date of the application;format:date;example:2015-08-01"` - GrantDate string `json:"grantDate" schema:"description:date of the grant;format:date;example:2016-09-01"` - EndDate string `json:"endDate" schema:"description:end date;format:date;example:2020-09-03"` - Resources []resourceSchema `json:"resources" schema:"description:multiple resources with label"` - IDNumber string `json:"idNumber" schema:"description:application number or Id Number;example:JP2004369746A"` - CurrentAssignee string `json:"currentAssignee" schema:"example:John Doe"` - PreviousAssignee string `json:"previousAssignee" schema:"example:John Doe"` - Author string `json:"author" schema:"example:John Doe"` - CoAuthors string `json:"coAuthors" schema:"example:John Doe"` + LegalType string `json:"legalType,omitempty" schema:"description:type of the document;example:Patent, Trademark, Copyright"` + Description string `json:"description,omitempty" schema:"description:a brief description about the document;example:Some legal document!"` + ApplicationDate string `json:"applicationDate,omitempty" schema:"description:date of the application;format:date;example:2015-08-01"` + GrantDate string `json:"grantDate,omitempty" schema:"description:date of the grant;format:date;example:2016-09-01"` + EndDate string `json:"endDate,omitempty" schema:"description:end date;format:date;example:2020-09-03"` + Resources []resourceSchema `json:"resources,omitempty" schema:"description:multiple resources with label"` + IDNumber string `json:"idNumber,omitempty" schema:"description:application number or Id Number;example:JP2004369746A"` + CurrentAssignee string `json:"currentAssignee,omitempty" schema:"example:John Doe"` + PreviousAssignee string `json:"previousAssignee,omitempty" schema:"example:John Doe"` + Author string `json:"author,omitempty" schema:"example:John Doe"` + CoAuthors string `json:"coAuthors,omitempty" schema:"example:John Doe"` } type skillSchema struct { Name string `json:"name" schema:"description:name of the skill;example:Web Development"` Proficiency string `json:"proficiency" schema:"description:proficiency level of the skill;enum:beginner,early,competent,advanced,expert;example:advanced"` - Keywords []string `json:"keywords" schema:"description:some keywords pertaining to the skill;items_example:HTML"` + Keywords []string `json:"keywords,omitempty" schema:"description:some keywords pertaining to the skill;items_example:HTML"` } type awardSchema struct { Title string `json:"title" schema:"description:title of the award;example:Awarded Software Process Achievement Award"` Date string `json:"date" schema:"description:date of the award;format:date;example:2016-06-12"` Awarder string `json:"awarder" schema:"description:name of the awarder;example:IEEE"` - Summary string `json:"summary" schema:"description:reason of the award;example:Received for my work in Deep learning and AI"` + Summary string `json:"summary,omitempty" schema:"description:reason of the award;example:Received for my work in Deep learning and AI"` } type projectSchema struct { Name string `json:"name" schema:"description:name of the project;example:File Transfer application"` - Location locationSchema `json:"location" schema:"description:location of the project"` - Description string `json:"description" schema:"description:short summary of project;example:Developed a client and server based application"` - Highlights []string `json:"highlights" schema:"description:specify multiple features;items_example:used Java AWT and Swing for client side userinterface"` - Keywords []string `json:"keywords" schema:"description:specify special elements involved;items_example:Java"` + Location locationSchema `json:"location,omitempty" schema:"description:location of the project"` + Description string `json:"description,omitempty" schema:"description:short summary of project;example:Developed a client and server based application"` + Highlights []string `json:"highlights,omitempty" schema:"description:specify multiple features;items_example:used Java AWT and Swing for client side userinterface"` + Keywords []string `json:"keywords,omitempty" schema:"description:specify special elements involved;items_example:Java"` StartDate string `json:"startDate" schema:"start date;format:date;example:2016-06-29"` EndDate string `json:"endDate" schema:"description:end date;format:date;example:2017-03-02"` - Resources []resourceSchema `json:"resources" schema:"description:specify multiple resources with label"` - URL string `json:"url" schema:"description:url of the project;format:uri;example:http://www.example.org/csdl/mags/co/1996/10/rx069-abs.html"` - Roles []string `json:"roles" schema:"description:specify your role on this project;items_example:Team Lead"` - Entity string `json:"entity" schema:"description:relevant company/entity affiliations;example:greenpeace"` - Type string `json:"type" schema:"description:type of the project;example:volunteering"` + Resources []resourceSchema `json:"resources,omitempty" schema:"description:specify multiple resources with label"` + URL string `json:"url,omitempty" schema:"description:url of the project;format:uri;example:http://www.example.org/csdl/mags/co/1996/10/rx069-abs.html"` + Roles []string `json:"roles,omitempty" schema:"description:specify your role on this project;items_example:Team Lead"` + Entity string `json:"entity,omitempty" schema:"description:relevant company/entity affiliations;example:greenpeace"` + Type string `json:"type,omitempty" schema:"description:type of the project;example:volunteering"` } type certificateSchema struct { - Code string `json:"code" schema:"description:code of the certificate;example:1Z0-062"` + Code string `json:"code,omitempty" schema:"description:code of the certificate;example:1Z0-062"` Name string `json:"name" schema:"description:name of the certificate;example:XYZ Certified Application Specialist (MCAS)"` - Website string `json:"website" schema:"description:link to issuing authority's description of the certificate;format:uri;example:http://www.example.org"` - Verification string `json:"verification" schema:"description:external candidate verification URL;format:uri;example:http://www.example.org"` - GrantDate string `json:"grantDate" schema:"description:date of the grant;format:date;example:2017-06-29"` - Score scoreSchema `json:"score" schema:"description:exam score"` - EndDate string `json:"endDate" schema:"description:end date of certificate;format:date;example:2017-06-29"` - DoesNotExpire bool `json:"doesNotExpire" schema:"example:true"` + Website string `json:"website,omitempty" schema:"description:link to issuing authority's description of the certificate;format:uri;example:http://www.example.org"` + Verification string `json:"verification,omitempty" schema:"description:external candidate verification URL;format:uri;example:http://www.example.org"` + GrantDate string `json:"grantDate,omitempty" schema:"description:date of the grant;format:date;example:2017-06-29"` + Score scoreSchema `json:"score,omitempty" schema:"description:exam score"` + EndDate string `json:"endDate,omitempty" schema:"description:end date of certificate;format:date;example:2017-06-29"` + DoesNotExpire bool `json:"doesNotExpire,omitempty" schema:"example:true"` } type referenceSchema struct { - Name string `json:"name" schema:"description:name of the reference;example:Stephan Mark"` - Company string `json:"company" schema:"description:company name;example:Xyz"` - Position string `json:"position" schema:"description:position of reference;example:Senior Software Engineer"` + Name string `json:"name,omitempty" schema:"description:name of the reference;example:Stephan Mark"` + Company string `json:"company,omitempty" schema:"description:company name;example:Xyz"` + Position string `json:"position,omitempty" schema:"description:position of reference;example:Senior Software Engineer"` Reference string `json:"reference" schema:"description:reference text;example:Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing."` } type languageSchema struct { Language string `json:"language" schema:"description:name of language;example:English"` - Level string `json:"level" schema:"description:proficiency level for the language;enum:basic,conversational,fluent,native;example:fluent"` + Level string `json:"level,omitempty" schema:"description:proficiency level for the language;enum:basic,conversational,fluent,native;example:fluent"` } type interestSchema struct { Name string `json:"name" schema:"description:name of the interest;example:Machine Learning"` - Keywords []string `json:"keywords" schema:"description:keywords of the interest;items_example:Neural Networks"` + Keywords []string `json:"keywords,omitempty" schema:"description:keywords of the interest;items_example:Neural Networks"` } type metaSchema struct { - Canonical string `json:"canonical" schema:"description:URL (as per RFC 3986) to latest version of this document"` - Version string `json:"version" schema:"description:version field which follows semver;example:v1.0.0"` - LastModified string `json:"lastModified" schema:"description:date-time of last modified;format:date-time;example:2017-06-29T15:53:01+01:00"` - UUID string `json:"uuid" schema:"description:uuid v4 of the resume;example:078c39ce-23ee-4970-9637-c07379132dce"` + Canonical string `json:"canonical,omitempty" schema:"description:URL (as per RFC 3986) to latest version of this document"` + Version string `json:"version,omitempty" schema:"description:version field which follows semver;example:v1.0.0"` + LastModified string `json:"lastModified,omitempty" schema:"description:date-time of last modified;format:date-time;example:2017-06-29T15:53:01+01:00"` + UUID string `json:"uuid,omitempty" schema:"description:uuid v4 of the resume;example:078c39ce-23ee-4970-9637-c07379132dce"` } // Schema is the struct which jsonschema, uischema, and example are generated from. From 1d232ac99eab9fb140f655ca8f71c08b77909b2b Mon Sep 17 00:00:00 2001 From: Arman Mazdaee Date: Sun, 12 May 2019 15:00:30 +0430 Subject: [PATCH 08/31] use fields without omitempty as required --- example.json | 1 - schema.json | 126 +++++++++++++++++++++++++++++++++++++++++++ schema/base.go | 14 +++++ schema/jsonschema.go | 7 +++ 4 files changed, 147 insertions(+), 1 deletion(-) diff --git a/example.json b/example.json index 3976826..4826606 100644 --- a/example.json +++ b/example.json @@ -218,7 +218,6 @@ } ], "meta": { - "canonical": "", "version": "v1.0.0", "lastModified": "2017-06-29T15:53:01+01:00", "uuid": "078c39ce-23ee-4970-9637-c07379132dce" diff --git a/schema.json b/schema.json index 7f4dcd0..11dfa71 100644 --- a/schema.json +++ b/schema.json @@ -23,6 +23,11 @@ "type": "string" } }, + "required": [ + "title", + "date", + "awarder" + ], "type": "object" }, "type": "array" @@ -71,6 +76,12 @@ "type": "string" } }, + "required": [ + "type", + "value", + "best", + "worst" + ], "type": "object" }, "verification": { @@ -84,6 +95,9 @@ "type": "string" } }, + "required": [ + "name" + ], "type": "object" }, "type": "array" @@ -103,6 +117,9 @@ "type": "string" } }, + "required": [ + "title" + ], "type": "object" }, "education": { @@ -151,6 +168,10 @@ "type": "number" } }, + "required": [ + "lat", + "long" + ], "type": "object" }, "score": { @@ -172,6 +193,12 @@ "type": "string" } }, + "required": [ + "type", + "value", + "best", + "worst" + ], "type": "object" }, "startDate": { @@ -184,6 +211,13 @@ "type": "string" } }, + "required": [ + "institution", + "area", + "studyType", + "startDate", + "endDate" + ], "type": "object" }, "type": "array" @@ -203,6 +237,9 @@ "type": "string" } }, + "required": [ + "name" + ], "type": "object" }, "type": "array" @@ -226,6 +263,9 @@ "type": "string" } }, + "required": [ + "language" + ], "type": "object" }, "type": "array" @@ -291,11 +331,18 @@ "type": "string" } }, + "required": [ + "url", + "label" + ], "type": "object" }, "type": "array" } }, + "required": [ + "name" + ], "type": "object" }, "type": "array" @@ -345,6 +392,10 @@ "type": "number" } }, + "required": [ + "lat", + "long" + ], "type": "object" }, "email": { @@ -373,6 +424,10 @@ "type": "number" } }, + "required": [ + "lat", + "long" + ], "type": "object" }, "phone": { @@ -400,6 +455,11 @@ "type": "string" } }, + "required": [ + "network", + "username", + "url" + ], "type": "object" }, "type": "array" @@ -461,6 +521,10 @@ "type": "number" } }, + "required": [ + "lat", + "long" + ], "type": "object" }, "name": { @@ -481,6 +545,10 @@ "type": "string" } }, + "required": [ + "url", + "label" + ], "type": "object" }, "type": "array" @@ -506,6 +574,11 @@ "type": "string" } }, + "required": [ + "name", + "startDate", + "endDate" + ], "type": "object" }, "type": "array" @@ -540,6 +613,10 @@ "type": "string" } }, + "required": [ + "url", + "label" + ], "type": "object" }, "type": "array" @@ -554,6 +631,11 @@ "type": "string" } }, + "required": [ + "name", + "publisher", + "releaseDate" + ], "type": "object" }, "type": "array" @@ -579,6 +661,9 @@ "type": "string" } }, + "required": [ + "reference" + ], "type": "object" }, "type": "array" @@ -610,6 +695,10 @@ "type": "string" } }, + "required": [ + "name", + "proficiency" + ], "type": "object" }, "type": "array" @@ -639,6 +728,10 @@ "type": "number" } }, + "required": [ + "lat", + "long" + ], "type": "object" }, "organization": { @@ -664,6 +757,12 @@ "type": "string" } }, + "required": [ + "organization", + "position", + "startDate", + "endDate" + ], "type": "object" }, "type": "array" @@ -697,6 +796,10 @@ "type": "number" } }, + "required": [ + "lat", + "long" + ], "type": "object" }, "name": { @@ -722,11 +825,34 @@ "type": "string" } }, + "required": [ + "name", + "position", + "startDate", + "endDate" + ], "type": "object" }, "type": "array" } }, + "required": [ + "core", + "personal", + "work", + "education", + "volunteer", + "publications", + "legal", + "skills", + "awards", + "projects", + "certificate", + "references", + "languages", + "interests", + "meta" + ], "title": "Resumic resume Schema", "type": "object" } \ No newline at end of file diff --git a/schema/base.go b/schema/base.go index e854176..0d2c936 100644 --- a/schema/base.go +++ b/schema/base.go @@ -24,6 +24,20 @@ func getJSONName(field reflect.StructField) string { return name } +func isOmitEmpty(field reflect.StructField) bool { + jsonTag := field.Tag.Get("json") + if jsonTag == "" { + return false + } + tags := strings.Split(jsonTag, ",")[1:] + for _, tag := range tags { + if tag == "omitempty" { + return true + } + } + return false +} + type schemaTags map[string]string func newSchemaTags(tag reflect.StructTag) schemaTags { diff --git a/schema/jsonschema.go b/schema/jsonschema.go index 10e205d..b83e005 100644 --- a/schema/jsonschema.go +++ b/schema/jsonschema.go @@ -77,12 +77,16 @@ func generateObjectJSONSchema(typ reflect.Type, tags schemaTags) (map[string]int } properties := map[string]interface{}{} + required := []string{} for i := 0; i < typ.NumField(); i++ { field := typ.Field(i) fieldName := getJSONName(field) if fieldName == "" { continue } + if !isOmitEmpty(field) { + required = append(required, fieldName) + } fieldTags := newSchemaTags(field.Tag) property, err := generateJSONSchema(field.Type, fieldTags) if err != nil { @@ -91,6 +95,9 @@ func generateObjectJSONSchema(typ reflect.Type, tags schemaTags) (map[string]int properties[fieldName] = property } schema["properties"] = properties + if len(required) > 0 { + schema["required"] = required + } return schema, nil } From 2784ae9685f6b45e17ef9bdb7e4283ff13a75792 Mon Sep 17 00:00:00 2001 From: Arman Mazdaee Date: Sun, 12 May 2019 15:05:49 +0430 Subject: [PATCH 09/31] Add "additionalProperties":false to every object --- schema.json | 28 ++++++++++++++++++++++++++++ schema/jsonschema.go | 1 + 2 files changed, 29 insertions(+) diff --git a/schema.json b/schema.json index 11dfa71..723f826 100644 --- a/schema.json +++ b/schema.json @@ -1,9 +1,11 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, "properties": { "awards": { "description": "list of awards have been received", "items": { + "additionalProperties": false, "properties": { "awarder": { "description": "name of the awarder", @@ -34,6 +36,7 @@ }, "certificate": { "items": { + "additionalProperties": false, "properties": { "code": { "description": "code of the certificate", @@ -57,6 +60,7 @@ "type": "string" }, "score": { + "additionalProperties": false, "description": "exam score", "properties": { "best": { @@ -103,6 +107,7 @@ "type": "array" }, "core": { + "additionalProperties": false, "properties": { "livingArea": { "description": "living area which could be city or country or even continent", @@ -124,6 +129,7 @@ }, "education": { "items": { + "additionalProperties": false, "properties": { "area": { "description": "area of study", @@ -159,6 +165,7 @@ "type": "string" }, "location": { + "additionalProperties": false, "description": "location of institution", "properties": { "lat": { @@ -175,6 +182,7 @@ "type": "object" }, "score": { + "additionalProperties": false, "properties": { "best": { "description": "best possible score", @@ -224,6 +232,7 @@ }, "interests": { "items": { + "additionalProperties": false, "properties": { "keywords": { "description": "keywords of the interest", @@ -247,6 +256,7 @@ "languages": { "description": "list of languages", "items": { + "additionalProperties": false, "properties": { "language": { "description": "name of language", @@ -273,6 +283,7 @@ "legal": { "description": "list of legals", "items": { + "additionalProperties": false, "properties": { "applicationDate": { "description": "date of the application", @@ -320,6 +331,7 @@ "resources": { "description": "multiple resources with label", "items": { + "additionalProperties": false, "properties": { "label": { "description": "label of the resource", @@ -348,6 +360,7 @@ "type": "array" }, "meta": { + "additionalProperties": false, "description": "the schema version and any other tooling configuration", "properties": { "canonical": { @@ -371,6 +384,7 @@ "type": "object" }, "personal": { + "additionalProperties": false, "description": "sensitive informations", "properties": { "birthPlace": { @@ -383,6 +397,7 @@ "type": "string" }, "currentLocation": { + "additionalProperties": false, "description": "living location", "properties": { "lat": { @@ -415,6 +430,7 @@ "type": "string" }, "permanentLocation": { + "additionalProperties": false, "description": "permanently living location", "properties": { "lat": { @@ -440,6 +456,7 @@ "profiles": { "description": "list of social networks", "items": { + "additionalProperties": false, "properties": { "network": { "description": "name of the network", @@ -483,6 +500,7 @@ "projects": { "description": "list of career projects", "items": { + "additionalProperties": false, "properties": { "description": { "description": "short summary of project", @@ -512,6 +530,7 @@ "type": "array" }, "location": { + "additionalProperties": false, "description": "location of the project", "properties": { "lat": { @@ -534,6 +553,7 @@ "resources": { "description": "specify multiple resources with label", "items": { + "additionalProperties": false, "properties": { "label": { "description": "label of the resource", @@ -586,6 +606,7 @@ "publications": { "description": "list of publications", "items": { + "additionalProperties": false, "properties": { "name": { "description": "name of the publication", @@ -602,6 +623,7 @@ "resources": { "description": "multiple resources with label", "items": { + "additionalProperties": false, "properties": { "label": { "description": "label of the resource", @@ -643,6 +665,7 @@ "references": { "description": "list of references", "items": { + "additionalProperties": false, "properties": { "company": { "description": "company name", @@ -671,6 +694,7 @@ "skills": { "description": "list of professional skill-sets", "items": { + "additionalProperties": false, "properties": { "keywords": { "description": "some keywords pertaining to the skill", @@ -705,6 +729,7 @@ }, "volunteer": { "items": { + "additionalProperties": false, "properties": { "endDate": { "description": "end date", @@ -719,6 +744,7 @@ "type": "array" }, "location": { + "additionalProperties": false, "description": "location of activity", "properties": { "lat": { @@ -769,6 +795,7 @@ }, "work": { "items": { + "additionalProperties": false, "properties": { "description": { "description": "companies primary activity", @@ -787,6 +814,7 @@ "type": "array" }, "location": { + "additionalProperties": false, "description": "location of the company", "properties": { "lat": { diff --git a/schema/jsonschema.go b/schema/jsonschema.go index b83e005..b312e1f 100644 --- a/schema/jsonschema.go +++ b/schema/jsonschema.go @@ -98,6 +98,7 @@ func generateObjectJSONSchema(typ reflect.Type, tags schemaTags) (map[string]int if len(required) > 0 { schema["required"] = required } + schema["additionalProperties"] = false return schema, nil } From 98443701f6fe571a3dbfc5511f1eb22fe929a4ee Mon Sep 17 00:00:00 2001 From: Arman Mazdaee Date: Wed, 15 May 2019 12:29:35 +0430 Subject: [PATCH 10/31] Change some of required fields --- schema.json | 15 ++++----------- schema/schema.go | 14 +++++++------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/schema.json b/schema.json index 723f826..ad509c7 100644 --- a/schema.json +++ b/schema.json @@ -122,9 +122,6 @@ "type": "string" } }, - "required": [ - "title" - ], "type": "object" }, "education": { @@ -596,8 +593,7 @@ }, "required": [ "name", - "startDate", - "endDate" + "startDate" ], "type": "object" }, @@ -655,8 +651,7 @@ }, "required": [ "name", - "publisher", - "releaseDate" + "publisher" ], "type": "object" }, @@ -786,8 +781,7 @@ "required": [ "organization", "position", - "startDate", - "endDate" + "startDate" ], "type": "object" }, @@ -856,8 +850,7 @@ "required": [ "name", "position", - "startDate", - "endDate" + "startDate" ], "type": "object" }, diff --git a/schema/schema.go b/schema/schema.go index 632b346..6e7342d 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -24,7 +24,7 @@ type profileSchema struct { } type coreSchema struct { - Title string `json:"title" schema:"description:job title;example:Software Engineer"` + Title string `json:"title,omitempty" schema:"description:job title;example:Software Engineer"` WorkArea string `json:"workArea,omitempty" schema:"description:work area which could be city or country or even remote;example:Munich Citycenter + 20kms"` LivingArea string `json:"livingArea,omitempty" schema:"description:living area which could be city or country or even continent;example:Germany"` } @@ -53,7 +53,7 @@ type workSchema struct { Location locationSchema `json:"location,omitempty" schema:"description:location of the company"` URL string `json:"url,omitempty" schema:"description:url of the company website;format:uri;example:http://xyz.example.com"` StartDate string `json:"startDate" schema:"description:start date;format:date;example:2017-12-29"` - EndDate string `json:"endDate" schema:"description:end date;format:date;example:2018-12-29"` + EndDate string `json:"endDate,omitempty" schema:"description:end date;format:date;example:2018-12-29"` Summary string `json:"summary,omitempty" schema:"description:an overview of responsibilities;example:Developing and maintaining the company website using syna"` Highlights []string `json:"highlights,omitempty" schema:"description:some of accomplishments;items_example:Worked with mobile team at Twitter to develop remote debugging tools for mobile browsers"` } @@ -64,7 +64,7 @@ type educationSchema struct { Area string `json:"area" schema:"description:area of study;example:Engineering"` StudyType string `json:"studyType" schema:"description:type of study;example:Bachelor"` StartDate string `json:"startDate" schema:"description:start date;format:date;example:2017-06-28"` - EndDate string `json:"endDate" schema:"description:end date;format:date;example:2013-06-28"` + EndDate string `json:"endDate,omitepmty" schema:"description:end date;format:date;example:2013-06-28"` Score scoreSchema `json:"score,omitempty"` Courses []string `json:"courses,omitempty" schema:"description:notable courses/subjects;items_example:CS302 - Introduction to Algorithms"` Honors []string `json:"honors,omitempty" schema:"description:some education honours;items_example:Magna Cum Laude"` @@ -77,7 +77,7 @@ type volunteerSchema struct { Location locationSchema `json:"location,omitempty" schema:"description:location of activity"` URL string `json:"url,omitempty" schema:"description:related link to support volunteer experience;format:uri;example:http://xyz.example.com"` StartDate string `json:"startDate" schema:"description:start date;format:date;example:2014-06-29"` - EndDate string `json:"endDate" schema:"description:end date;format:date;example:2017-06-29"` + EndDate string `json:"endDate,omitempty" schema:"description:end date;format:date;example:2017-06-29"` Summary string `json:"summary,omitempty" schema:"description:an overview of responsibilities;example:Frontend developer"` Highlights []string `json:"highlights,omitempty" schema:"description:some of accomplishments;items_example:Invited as a speaker in Xyzcon'17"` } @@ -85,7 +85,7 @@ type volunteerSchema struct { type publicationSchema struct { Name string `json:"name" schema:"description:name of the publication;example:Deep learning and Artificial Intelligence"` Publisher string `json:"publisher" schema:"description:name of the publisher;example:XYZ, Computer Magazine"` - ReleaseDate string `json:"releaseDate" schema:"description:release date of publication;example:2015-08-01"` + ReleaseDate string `json:"releaseDate,omitempty" schema:"description:release date of publication;example:2015-08-01"` Resources []resourceSchema `json:"resources,omitempty" schema:"description:multiple resources with label"` URL string `json:"url,omitempty" schema:"description:url of the publication;format:uri;example:http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html"` Summary string `json:"summary,omitempty" schema:"description:short summary of the publication;example:Discussion of the advent of deep learning and artificial intelligence"` @@ -126,7 +126,7 @@ type projectSchema struct { Highlights []string `json:"highlights,omitempty" schema:"description:specify multiple features;items_example:used Java AWT and Swing for client side userinterface"` Keywords []string `json:"keywords,omitempty" schema:"description:specify special elements involved;items_example:Java"` StartDate string `json:"startDate" schema:"start date;format:date;example:2016-06-29"` - EndDate string `json:"endDate" schema:"description:end date;format:date;example:2017-03-02"` + EndDate string `json:"endDate,omitempty" schema:"description:end date;format:date;example:2017-03-02"` Resources []resourceSchema `json:"resources,omitempty" schema:"description:specify multiple resources with label"` URL string `json:"url,omitempty" schema:"description:url of the project;format:uri;example:http://www.example.org/csdl/mags/co/1996/10/rx069-abs.html"` Roles []string `json:"roles,omitempty" schema:"description:specify your role on this project;items_example:Team Lead"` @@ -153,7 +153,7 @@ type referenceSchema struct { } type languageSchema struct { - Language string `json:"language" schema:"description:name of language;example:English"` + Language string `json:"language,omitepty" schema:"description:name of language;example:English"` Level string `json:"level,omitempty" schema:"description:proficiency level for the language;enum:basic,conversational,fluent,native;example:fluent"` } From f5707bbb7c52f0558ca993c07785bafb06407c84 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Wed, 15 May 2019 17:08:40 -0400 Subject: [PATCH 11/31] got rid of nomakr rule --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index 5afa506..fdeb0f8 100644 --- a/Makefile +++ b/Makefile @@ -20,10 +20,6 @@ release: pre-build @go build -ldflags "-s -w -X $(CODEPATH)/cmd.version=$(RESUMIC_VERSION) -X $(CODEPATH)/cmd.gitCommit=$(GITCOMMIT)" -o resumic @packr2 clean -nopackr: # Builds without installing packr. Useful if offline. - @go build -ldflags "-s -w -X $(CODEPATH)/cmd.version=$(RESUMIC_VERSION) -X $(CODEPATH)/cmd.gitCommit=$(GITCOMMIT)" -o resumic - - test: build go test -v ./... From 31a527613ccc1b82df10c5d5471ce491d395b96f Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Mon, 20 May 2019 21:41:18 -0400 Subject: [PATCH 12/31] removed docs/dev folder --- docs/dev/doc.md | 1088 ------------------------------------------ docs/dev/overview.md | 19 - 2 files changed, 1107 deletions(-) delete mode 100644 docs/dev/doc.md delete mode 100644 docs/dev/overview.md diff --git a/docs/dev/doc.md b/docs/dev/doc.md deleted file mode 100644 index 00a2fa5..0000000 --- a/docs/dev/doc.md +++ /dev/null @@ -1,1088 +0,0 @@ - -# Core -This section is of object type that tells about the basic information of the user and consists of the following sub-sections: -## type -## additionalProperties -## properties -### name -Sub-section of type string, used to specify the name of the person -The schema snippet can be shown below: - - name: - { - "type": "string" - } - -### title -Sub-section of type string, used to specify the title of the person -The schema snippet can be shown below: - - title: - { - "type": "string", - "description": "e.g. Software Engineer" - } - -### image -Sub-section of type string, used to specify the image of the person -The schema snippet can be shown below: - - image: - { - "type": "string", - "description": "URL (as per RFC 3986) to a image in JPEG or PNG format" - } - -### email -Sub-section of type string, used to specify the email of the person -The schema snippet can be shown below: - - email: - { - "type": "string", - "description": "e.g. lucas@xyz.com", - "format": "email" - } - -### phone -Sub-section of type string, used to specify the phone of the person -The schema snippet can be shown below: - - phone: - { - "type": "string", - "description": "e.g. 912-217-7923 [Phone numbers are stored as strings so use any format you like]" - } - -### url -Sub-section of type string, used to specify the url of the person -The schema snippet can be shown below: - - url: - { - "type": "string", - "format": "uri", - "description": "e.g. http://www.exampleslide.com/my-slides/" - } - -### summary -Sub-section of type string, used to specify the summary of the person -The schema snippet can be shown below: - - summary: - { - "type": "string", - "description": "Write a short 2-3 sentence biography about yourself" - } - -### currentLocation -Sub-section of type object, used to specify the currentLocation of the person -The schema snippet can be shown below: - - currentLocation: - { - "type": "object", - "format": "location", - "description": "Select the location where you currently live.", - "properties": { - "lat": { - "type": "number" - }, - "long": { - "type": "number" - } - } - } - -### permanentLocation -Sub-section of type object, used to specify the permanentLocation of the person -The schema snippet can be shown below: - - permanentLocation: - { - "type": "object", - "format": "location", - "description": "Select the location where you permanently live.", - "properties": { - "lat": { - "type": "number" - }, - "long": { - "type": "number" - } - } - } - - -# Work -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## additionalItems -## items -### name -Sub-section of type string, used to specify the name of the person -The schema snippet can be shown below: - - name: - { - "type": "string", - "description": "e.g. XYZ Inc. - [Company name]" - } - -### description -Sub-section of type string, used to specify the description of the person -The schema snippet can be shown below: - - description: - { - "type": "string", - "description": "e.g. A social media company - [Description of the companies primary activity]" - } - -### position -Sub-section of type string, used to specify the position of the person -The schema snippet can be shown below: - - position: - { - "type": "string", - "description": "e.g. Software Engineer - [Position at the company]" - } - -### location -Sub-section of type object, used to specify the location of the person -The schema snippet can be shown below: - - location: - { - "type": "object", - "format": "location", - "description": "e.g. Germany - [Location for this activity]", - "properties": { - "lat": { - "type": "number" - }, - "long": { - "type": "number" - } - } - } - -### url -Sub-section of type string, used to specify the url of the person -The schema snippet can be shown below: - - url: - { - "type": "string", - "description": "e.g. http://xyz.example.com - [Related link to the company website]", - "format": "uri" - } - -### startDate -Sub-section of type string, used to specify the startDate of the person -The schema snippet can be shown below: - - startDate: - { - "type": "string", - "description": "e.g. 2017-06-28 - [resume.json uses the ISO 8601 date standard]", - "format": "date" - } - -### endDate -Sub-section of type string, used to specify the endDate of the person -The schema snippet can be shown below: - - endDate: - { - "type": "string", - "description": "e.g. 2018-12-29 - [resume.json uses the ISO 8601 date standard]", - "format": "date" - } - -### summary -Sub-section of type string, used to specify the summary of the person -The schema snippet can be shown below: - - summary: - { - "type": "string", - "description": "Give an overview of your responsibilities at the company" - } - -### highlights -Sub-section of type array, used to specify the highlights of the person -The schema snippet can be shown below: - - highlights: - { - "type": "array", - "description": "Specify multiple accomplishments", - "additionalItems": false, - "items": { - "type": "string", - "description": "e.g. Worked with mobile team at Twitter to develop remote debugging tools for mobile browsers " - } - } - - -# Education -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## additionalItems -## items -### institution -Sub-section of type string, used to specify the institution of the person -The schema snippet can be shown below: - - institution: - { - "type": "string", - "description": "e.g. XYZ Institute of Technology - [Add institute name]" - } - -### area -Sub-section of type string, used to specify the area of the person -The schema snippet can be shown below: - - area: - { - "type": "string", - "description": "e.g. Engineering" - } - -### studyType -Sub-section of type string, used to specify the studyType of the person -The schema snippet can be shown below: - - studyType: - { - "type": "string", - "description": "e.g. Bachelor" - } - -### startDate -Sub-section of type string, used to specify the startDate of the person -The schema snippet can be shown below: - - startDate: - { - "type": "string", - "description": "e.g. 2017-06-29 - [resume.json uses the ISO 8601 date standard]", - "format": "date" - } - -### endDate -Sub-section of type string, used to specify the endDate of the person -The schema snippet can be shown below: - - endDate: - { - "type": "string", - "description": "e.g. 2013-06-29 - [resume.json uses the ISO 8601 date standard]", - "format": "date" - } - -### score -Sub-section of type object, used to specify the score of the person -The schema snippet can be shown below: - - score: - { - "type": "object", - "additionalProperties": true, - "properties": { - "scoretype": { - "type": "string", - "description": "eg. GPA or PERCENTAGE - [Add score type]" - }, - "scorevalue": { - "type": "string", - "description": "eg. 3.4/4.0 - [Add obtained score/total score]" - } - } - } - -### courses -Sub-section of type array, used to specify the courses of the person -The schema snippet can be shown below: - - courses: - { - "type": "array", - "description": "List notable courses/subjects", - "additionalItems": false, - "items": { - "type": "string", - "description": "e.g. CS302 - Introduction to Algorithms - [Add course name]" - } - } - -### honors -Sub-section of type array, used to specify the honors of the person -The schema snippet can be shown below: - - honors: - { - "type": "array", - "description": "List education honours", - "additionalItems": false, - "items": { - "type": "string", - "description": "e.g. Magna Cum Laude" - } - } - - -# Volunteer -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## additionalItems -## items -### organization -Sub-section of type string, used to specify the organization of the person -The schema snippet can be shown below: - - organization: - { - "type": "string", - "description": "e.g. Xyz " - } - -### position -Sub-section of type string, used to specify the position of the person -The schema snippet can be shown below: - - position: - { - "type": "string", - "description": "e.g. Open Source Contributor [Contribution type]" - } - -### location -Sub-section of type object, used to specify the location of the person -The schema snippet can be shown below: - - location: - { - "type": "object", - "format": "location", - "description": "e.g. Germany - [Location for this activity]", - "properties": { - "lat": { - "type": "number" - }, - "long": { - "type": "number" - } - } - } - -### url -Sub-section of type string, used to specify the url of the person -The schema snippet can be shown below: - - url: - { - "type": "string", - "description": "e.g. http://xyz.example.com - [Related link to support volunteer experience]", - "format": "uri" - } - -### startDate -Sub-section of type string, used to specify the startDate of the person -The schema snippet can be shown below: - - startDate: - { - "type": "string", - "description": "e.g. 2014-06-29 - [resume.json uses the ISO 8601 date standard]", - "format": "date" - } - -### endDate -Sub-section of type string, used to specify the endDate of the person -The schema snippet can be shown below: - - endDate: - { - "type": "string", - "description": "e.g. 2017-06-29 - [resume.json uses the ISO 8601 date standard] ", - "format": "date" - } - -### summary -Sub-section of type string, used to specify the summary of the person -The schema snippet can be shown below: - - summary: - { - "type": "string", - "description": "Give an overview of your responsibilities at the company" - } - -### highlights -Sub-section of type array, used to specify the highlights of the person -The schema snippet can be shown below: - - highlights: - { - "type": "array", - "description": "Specify accomplishments and achievements", - "additionalItems": false, - "items": { - "type": "string", - "description": "e.g Invited as a speaker in Xyzcon'17" - } - } - - -# Publications -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## description -## additionalItems -## items -### name -Sub-section of type string, used to specify the name of the person -The schema snippet can be shown below: - - name: - { - "type": "string", - "description": "e.g. Deep learning and Artificial Intelligence" - } - -### publisher -Sub-section of type string, used to specify the publisher of the person -The schema snippet can be shown below: - - publisher: - { - "type": "string", - "description": "e.g. XYZ, Computer Magazine" - } - -### releaseDate -Sub-section of type string, used to specify the releaseDate of the person -The schema snippet can be shown below: - - releaseDate: - { - "type": "string", - "description": "e.g. 2015-08-01 - [resume.json uses the ISO 8601 date standard]" - } - -### resources -Sub-section of type array, used to specify the resources of the person -The schema snippet can be shown below: - - resources: - { - "type": "array", - "description": "Specify multiple resources with label", - "additionalItems": false, - "url": { - "type": "string", - "format": "uri", - "description": "e.g. http://www.example.com/my-example-slides/" - }, - "label": { - "type": "string", - "description": "e.g Slides" - } - } - -### url -Sub-section of type string, used to specify the url of the person -The schema snippet can be shown below: - - url: - { - "type": "string", - "description": "e.g. http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html" - } - -### summary -Sub-section of type string, used to specify the summary of the person -The schema snippet can be shown below: - - summary: - { - "type": "string", - "description": "e.g. Discussion of the advent of deep learning and artificial intelligence - Short summary of publication" - } - - -# Legal -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## description -## additionalItems -## items -### name -Sub-section of type string, used to specify the name of the person -The schema snippet can be shown below: - - name: - { - "type": "string", - "description": "e.g. XYZ's patent on LZW compression, a fundamental part of the widely used GIF graphics format - [Add document name]" - } - -### legalType -Sub-section of type string, used to specify the legalType of the person -The schema snippet can be shown below: - - legalType: - { - "type": "string", - "description": "e.g. Patent, Trademark, Copyright - Give the type of this document" - } - -### description -Sub-section of type string, used to specify the description of the person -The schema snippet can be shown below: - - description: - { - "type": "string", - "description": "Give a brief description about this document" - } - -### applicationDate -Sub-section of type string, used to specify the applicationDate of the person -The schema snippet can be shown below: - - applicationDate: - { - "type": "string", - "description": "e.g. 2015-08-01 - [resume.json uses the ISO 8601 date standard]", - "format": "date" - } - -### grantDate -Sub-section of type string, used to specify the grantDate of the person -The schema snippet can be shown below: - - grantDate: - { - "type": "string", - "description": "e.g. 2016-09-01 - [resume.json uses the ISO 8601 date standard]", - "format": "date" - } - -### endDate -Sub-section of type string, used to specify the endDate of the person -The schema snippet can be shown below: - - endDate: - { - "type": "string", - "description": "e.g. 2020-09-03 - [resume.json uses the ISO 8601 date standard]", - "format": "date" - } - -### resources -Sub-section of type array, used to specify the resources of the person -The schema snippet can be shown below: - - resources: - { - "type": "array", - "description": "Specify multiple resources with label", - "additionalItems": false, - "url": { - "type": "string", - "format": "uri", - "description": "e.g. http://www.example.com/my-patent-slides/" - }, - "label": { - "type": "string", - "description": "e.g Slides" - } - } - -### idNumber -Sub-section of type string, used to specify the idNumber of the person -The schema snippet can be shown below: - - idNumber: - { - "type": "string", - "description": "e.g. JP2004369746A - [Add the application number or Id Number] " - } - - -# Skills -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## description -## additionalItems -## items -### name -Sub-section of type string, used to specify the name of the person -The schema snippet can be shown below: - - name: - { - "type": "string", - "description": "e.g. Web Development" - } - -### keyword -Sub-section of type array, used to specify the keyword of the person -The schema snippet can be shown below: - - keyword: - { - "type": "array", - "description": "List some keywords pertaining to the skill", - "additionalItems": false, - "items": { - "type": "object", - "additionalProperties": true, - "properties": { - "name": { - "type": "string", - "description": "e.g. HTML - [Add the skill name]" - }, - "score": { - "type": "number", - "description": "e.g. 20 - [Score for the skill name]" - } - } - } - } - - -# Awards -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## description -## additionalItems -## items -### title -Sub-section of type string, used to specify the title of the person -The schema snippet can be shown below: - - title: - { - "type": "string", - "description": "e.g. Awarded Software Process Achievement Award " - } - -### date -Sub-section of type string, used to specify the date of the person -The schema snippet can be shown below: - - date: - { - "type": "string", - "description": "e.g. 2016-06-12 - [resume.json uses the ISO 8601 date standard]", - "format": "date" - } - -### awarder -Sub-section of type string, used to specify the awarder of the person -The schema snippet can be shown below: - - awarder: - { - "type": "string", - "description": "e.g. IEEE" - } - -### summary -Sub-section of type string, used to specify the summary of the person -The schema snippet can be shown below: - - summary: - { - "type": "string", - "description": "e.g. Received for my work in Deep learning and AI" - } - - -# Projects -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## description -## additionalItems -## items -### name -Sub-section of type string, used to specify the name of the person -The schema snippet can be shown below: - - name: - { - "type": "string", - "description": "e.g. File Transfer application - [Name of the project]" - } - -### location -Sub-section of type object, used to specify the location of the person -The schema snippet can be shown below: - - location: - { - "type": "object", - "format": "location", - "description": "e.g France - [Location for this activity]", - "properties": { - "lat": { - "type": "number" - }, - "long": { - "type": "number" - } - } - } - -### description -Sub-section of type string, used to specify the description of the person -The schema snippet can be shown below: - - description: - { - "type": "string", - "description": "e.g. Developed a client and server based application - [Short summary of project]" - } - -### highlights -Sub-section of type array, used to specify the highlights of the person -The schema snippet can be shown below: - - highlights: - { - "type": "array", - "description": "Specify multiple features", - "additionalItems": false, - "items": { - "type": "string", - "description": "e.g. used Java AWT and Swing for client side userinterface" - } - } - -### keywords -Sub-section of type array, used to specify the keywords of the person -The schema snippet can be shown below: - - keywords: - { - "type": "array", - "description": "Specify special elements involved", - "additionalItems": false, - "items": { - "type": "string", - "description": "e.g. Java" - } - } - -### startDate -Sub-section of type string, used to specify the startDate of the person -The schema snippet can be shown below: - - startDate: - { - "type": "string", - "description": "e.g. 2017-06-29 - [resume.json uses the ISO 8601 date standard]", - "format": "date" - } - -### endDate -Sub-section of type string, used to specify the endDate of the person -The schema snippet can be shown below: - - endDate: - { - "type": "string", - "description": "e.g. 2017-06-29 - [resume.json uses the ISO 8601 date standard] ", - "format": "date" - } - -### resources -Sub-section of type array, used to specify the resources of the person -The schema snippet can be shown below: - - resources: - { - "type": "array", - "description": "Specify multiple resources with label", - "additionalItems": false, - "url": { - "type": "string", - "format": "uri", - "description": "e.g. http://www.example.com/my-awesome-slides/" - }, - "label": { - "type": "string", - "description": "e.g slides" - } - } - -### url -Sub-section of type string, used to specify the url of the person -The schema snippet can be shown below: - - url: - { - "type": "string", - "format": "uri", - "description": "e.g. http://www.example.org/csdl/mags/co/1996/10/rx069-abs.html" - } - -### roles -Sub-section of type array, used to specify the roles of the person -The schema snippet can be shown below: - - roles: - { - "type": "array", - "description": "Specify your role on this project or in company", - "additionalItems": false, - "items": { - "type": "string", - "description": "e.g. Team Lead, Speaker, Writer" - } - } - -### entity -Sub-section of type string, used to specify the entity of the person -The schema snippet can be shown below: - - entity: - { - "type": "string", - "description": "e.g. 'greenpeace', 'corporationXYZ' - [Relevant company/entity affiliations]" - } - -### type -Sub-section of type string, used to specify the type of the person -The schema snippet can be shown below: - - type: - { - "type": "string", - "description": " e.g. 'volunteering', 'presentation', 'talk', 'application', 'conference'" - } - - -# Certificates -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## additionalItems -## items -### code -Sub-section of type string, used to specify the code of the person -The schema snippet can be shown below: - - code: - { - "type": "string", - "description": "e.g. 1Z0-062" - } - -### name -Sub-section of type string, used to specify the name of the person -The schema snippet can be shown below: - - name: - { - "type": "string", - "description": "e.g. XYZ Certified Application Specialist (MCAS) - [Add the certificate name]" - } - -### website -Sub-section of type string, used to specify the website of the person -The schema snippet can be shown below: - - website: - { - "type": "string", - "description": "Link to issuing authority's description of the certificate", - "format": "uri" - } - -### verification -Sub-section of type string, used to specify the verification of the person -The schema snippet can be shown below: - - verification: - { - "type": "string", - "description": "External candidate verification URL", - "format": "uri" - } - -### grantDate -Sub-section of type string, used to specify the grantDate of the person -The schema snippet can be shown below: - - grantDate: - { - "type": "string", - "description": "e.g. 2017-06-29 - [resume.json uses the ISO 8601 date standard]", - "format": "date" - } - -### score -Sub-section of type string, used to specify the score of the person -The schema snippet can be shown below: - - score: - { - "type": "string", - "description": "Exam result (PASS/FAIL, 100%, 100)", - "format": "date" - } - -### endDate -Sub-section of type string, used to specify the endDate of the person -The schema snippet can be shown below: - - endDate: - { - "type": "string", - "description": "e.g. 2020-01-20", - "format": "date" - } - -### doesNotExpire -Sub-section of type boolean, used to specify the doesNotExpire of the person -The schema snippet can be shown below: - - doesNotExpire: - { - "type": "boolean", - "format": "checkbox" - } - - -# References -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## description -## additionalItems -## items -### name -Sub-section of type string, used to specify the name of the person -The schema snippet can be shown below: - - name: - { - "type": "string", - "description": "e.g. Stephan Mark" - } - -### company -Sub-section of type string, used to specify the company of the person -The schema snippet can be shown below: - - company: - { - "type": "string", - "description": "e.g. Xyz" - } - -### position -Sub-section of type string, used to specify the position of the person -The schema snippet can be shown below: - - position: - { - "type": "string", - "description": "e.g. Senior Software Engineer" - } - -### reference -Sub-section of type string, used to specify the reference of the person -The schema snippet can be shown below: - - reference: - { - "type": "string", - "description": "e.g. Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing." - } - - -# Languages -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## description -## additionalItems -## items -### language -Sub-section of type string, used to specify the language of the person -The schema snippet can be shown below: - - language: - { - "type": "string", - "description": "e.g. English, Spanish - [Name of language]" - } - -### score -Sub-section of type number, used to specify the score of the person -The schema snippet can be shown below: - - score: - { - "type": "number", - "description": "e.g. 20 - [Score for the language]" - } - - -# Interests -This section is of array type that tells about the basic information of the user and consists of the following sub-sections: -## type -## additionalItems -## items -### name -Sub-section of type string, used to specify the name of the person -The schema snippet can be shown below: - - name: - { - "type": "string", - "description": "e.g. Philosophy" - } - - -# Meta -This section is of object type that tells about the basic information of the user and consists of the following sub-sections: -## type -## description -## additionalProperties -## properties -### canonical -Sub-section of type string, used to specify the canonical of the person -The schema snippet can be shown below: - - canonical: - { - "type": "string", - "description": "URL (as per RFC 3986) to latest version of this document" - } - -### version -Sub-section of type string, used to specify the version of the person -The schema snippet can be shown below: - - version: - { - "type": "string", - "description": "e.g. v1.0.0 - A version field which follows semver" - } - -### lastModified -Sub-section of type string, used to specify the lastModified of the person -The schema snippet can be shown below: - - lastModified: - { - "type": "string", - "description": "Using ISO 8601 with YYYY-MM-DDThh:mm:ss" - } - diff --git a/docs/dev/overview.md b/docs/dev/overview.md deleted file mode 100644 index 7c84c86..0000000 --- a/docs/dev/overview.md +++ /dev/null @@ -1,19 +0,0 @@ -#Overview -The schema.json file consists of a set of sections,sub-sections with related properties. -The current version of schema.json consists of the following sub-sections: - - * core - * work - * education - * courses - * volunteer - * publications - * legal - * skills - * awards - * projects - * certificates - * references - * languages - * interests - * meta \ No newline at end of file From 6f4e6c2e9c5b1f0cac6b1891ac18a197ec7d671b Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Tue, 21 May 2019 15:56:42 -0400 Subject: [PATCH 13/31] removed whole docs folder --- docs/LICENSE | 428 --------------------------- docs/README.md | 21 -- docs/schema/doc.go | 1 - docs/schema/schema.go | 666 ------------------------------------------ 4 files changed, 1116 deletions(-) delete mode 100644 docs/LICENSE delete mode 100644 docs/README.md delete mode 100644 docs/schema/doc.go delete mode 100644 docs/schema/schema.go diff --git a/docs/LICENSE b/docs/LICENSE deleted file mode 100644 index fd662a7..0000000 --- a/docs/LICENSE +++ /dev/null @@ -1,428 +0,0 @@ -Attribution-ShareAlike 4.0 International - -======================================================================= - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More_considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - -======================================================================= - -Creative Commons Attribution-ShareAlike 4.0 International Public -License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution-ShareAlike 4.0 International Public License ("Public -License"). To the extent this Public License may be interpreted as a -contract, You are granted the Licensed Rights in consideration of Your -acceptance of these terms and conditions, and the Licensor grants You -such rights in consideration of benefits the Licensor receives from -making the Licensed Material available under these terms and -conditions. - - -Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. BY-SA Compatible License means a license listed at - creativecommons.org/compatiblelicenses, approved by Creative - Commons as essentially the equivalent of this Public License. - - d. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - e. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - f. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - g. License Elements means the license attributes listed in the name - of a Creative Commons Public License. The License Elements of this - Public License are Attribution and ShareAlike. - - h. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - i. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - j. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - k. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - l. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - m. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - -Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. Additional offer from the Licensor -- Adapted Material. - Every recipient of Adapted Material from You - automatically receives an offer from the Licensor to - exercise the Licensed Rights in the Adapted Material - under the conditions of the Adapter's License You apply. - - c. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - b. ShareAlike. - - In addition to the conditions in Section 3(a), if You Share - Adapted Material You produce, the following conditions also apply. - - 1. The Adapter's License You apply must be a Creative Commons - license with the same License Elements, this version or - later, or a BY-SA Compatible License. - - 2. You must include the text of, or the URI or hyperlink to, the - Adapter's License You apply. You may satisfy this condition - in any reasonable manner based on the medium, means, and - context in which You Share Adapted Material. - - 3. You may not offer or impose any additional or different terms - or conditions on, or apply any Effective Technological - Measures to, Adapted Material that restrict exercise of the - rights granted under the Adapter's License You apply. - - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material, - - including for purposes of Section 3(b); and - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - -Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - -Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - -Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - - -======================================================================= - -Creative Commons is not a party to its public -licenses. Notwithstanding, Creative Commons may elect to apply one of -its public licenses to material it publishes and in those instances -will be considered the “Licensor.” The text of the Creative Commons -public licenses is dedicated to the public domain under the CC0 Public -Domain Dedication. Except for the limited purpose of indicating that -material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the -public licenses. - -Creative Commons may be contacted at creativecommons.org. - diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index dc551b4..0000000 --- a/docs/README.md +++ /dev/null @@ -1,21 +0,0 @@ - - - -## Development -# Documentation - -No documentation available yet. Start your first contribution with some documentation. - -See how you can contribute with our [contribution guide](/CONTRIBUTING.md). diff --git a/docs/schema/doc.go b/docs/schema/doc.go deleted file mode 100644 index b9e149c..0000000 --- a/docs/schema/doc.go +++ /dev/null @@ -1 +0,0 @@ -package schema diff --git a/docs/schema/schema.go b/docs/schema/schema.go deleted file mode 100644 index 05d4150..0000000 --- a/docs/schema/schema.go +++ /dev/null @@ -1,666 +0,0 @@ -package schema - -type Data struct { - Schema string `json:"$schema"` - Title string `json:"title"` - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Core struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Name struct { - Type string `json:"type"` - } `json:"name"` - Title struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"title"` - Image struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"image"` - Email struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"email"` - Phone struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"phone"` - Url struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - } `json:"url"` - Summary struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"summary"` - CurrentLocation struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - Properties struct { - Lat struct { - Type string `json:"type"` - } `json:"lat"` - Long struct { - Type string `json:"type"` - } `json:"long"` - } `json:"properties"` - } `json:"currentLocation"` - PermanentLocation struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - Properties struct { - Lat struct { - Type string `json:"type"` - } `json:"lat"` - Long struct { - Type string `json:"type"` - } `json:"long"` - } `json:"properties"` - } `json:"permanentLocation"` - } `json:"properties"` - } `json:"core"` - Work struct { - Type string `json:"type"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Name struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"name"` - Description struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"description"` - Position struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"position"` - Location struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - Properties struct { - Lat struct { - Type string `json:"type"` - } `json:"lat"` - Long struct { - Type string `json:"type"` - } `json:"long"` - } `json:"properties"` - } `json:"location"` - Url struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"url"` - StartDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"startDate"` - EndDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"endDate"` - Summary struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"summary"` - Highlights struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"items"` - } `json:"highlights"` - } `json:"properties"` - } `json:"items"` - } `json:"work"` - Education struct { - Type string `json:"type"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Institution struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"institution"` - Location struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - Properties struct { - Lat struct { - Type string `json:"type"` - } `json:"lat"` - Long struct { - Type string `json:"type"` - } `json:"long"` - } `json:"properties"` - } `json:"location"` - Area struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"area"` - StudyType struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"studyType"` - StartDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"startDate"` - EndDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"endDate"` - Score struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Scoretype struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"scoretype"` - Scorevalue struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"scorevalue"` - } `json:"properties"` - } `json:"score"` - Courses struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"items"` - } `json:"courses"` - Honors struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"items"` - } `json:"honors"` - } `json:"properties"` - } `json:"items"` - } `json:"education"` - Volunteer struct { - Type string `json:"type"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Organization struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"organization"` - Position struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"position"` - Location struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - Properties struct { - Lat struct { - Type string `json:"type"` - } `json:"lat"` - Long struct { - Type string `json:"type"` - } `json:"long"` - } `json:"properties"` - } `json:"location"` - Url struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"url"` - StartDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"startDate"` - EndDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"endDate"` - Summary struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"summary"` - Highlights struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"items"` - } `json:"highlights"` - } `json:"properties"` - } `json:"items"` - } `json:"volunteer"` - Publications struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Name struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"name"` - Publisher struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"publisher"` - ReleaseDate struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"releaseDate"` - Resources struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Url struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - } `json:"url"` - Label struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"label"` - } `json:"resources"` - Url struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - } `json:"url"` - Summary struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"summary"` - } `json:"properties"` - } `json:"items"` - } `json:"publications"` - Legal struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Name struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"name"` - LegalType struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"legalType"` - Description struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"description"` - ApplicationDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"applicationDate"` - GrantDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"grantDate"` - EndDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"endDate"` - Resources struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Url struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - } `json:"url"` - Label struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"label"` - } `json:"resources"` - IdNumber struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"idNumber"` - } `json:"properties"` - } `json:"items"` - } `json:"legal"` - Skills struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Name struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"name"` - Keyword struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Name struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"name"` - Score struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"score"` - } `json:"properties"` - } `json:"items"` - } `json:"keyword"` - } `json:"properties"` - } `json:"items"` - } `json:"skills"` - Awards struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Title struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"title"` - Date struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"date"` - Awarder struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"awarder"` - Summary struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"summary"` - } `json:"properties"` - } `json:"items"` - } `json:"awards"` - Projects struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Name struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"name"` - Location struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - Properties struct { - Lat struct { - Type string `json:"type"` - } `json:"lat"` - Long struct { - Type string `json:"type"` - } `json:"long"` - } `json:"properties"` - } `json:"location"` - Description struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"description"` - Highlights struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"items"` - } `json:"highlights"` - Keywords struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"items"` - } `json:"keywords"` - StartDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"startDate"` - EndDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"endDate"` - Resources struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Url struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - } `json:"url"` - Label struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"label"` - } `json:"resources"` - Url struct { - Type string `json:"type"` - Format string `json:"format"` - Description string `json:"description"` - } `json:"url"` - Roles struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"items"` - } `json:"roles"` - Entity struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"entity"` - Type struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"type"` - } `json:"properties"` - } `json:"items"` - } `json:"projects"` - Certificates struct { - Type string `json:"type"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Code struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"code"` - Name struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"name"` - Website struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"website"` - Verification struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"verification"` - GrantDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"grantDate"` - Score struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"score"` - EndDate struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"endDate"` - DoesNotExpire struct { - Type string `json:"type"` - Format string `json:"format"` - } `json:"doesNotExpire"` - } `json:"properties"` - } `json:"items"` - } `json:"certificates"` - References struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Name struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"name"` - Company struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"company"` - Position struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"position"` - Reference struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"reference"` - } `json:"properties"` - } `json:"items"` - } `json:"references"` - Languages struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Language struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"language"` - Score struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"score"` - } `json:"properties"` - } `json:"items"` - } `json:"languages"` - Interests struct { - Type string `json:"type"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Name struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"name"` - Keywords struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalItems bool `json:"additionalItems"` - Items struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"items"` - } `json:"keywords"` - } `json:"properties"` - } `json:"items"` - } `json:"interests"` - Meta struct { - Type string `json:"type"` - Description string `json:"description"` - AdditionalProperties bool `json:"additionalProperties"` - Properties struct { - Canonical struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"canonical"` - Version struct { - Type string `json:"type"` - Description string `json:"description"` - } `json:"version"` - LastModified struct { - Type string `json:"type"` - Description string `json:"description"` - Format string `json:"format"` - } `json:"lastModified"` - } `json:"properties"` - } `json:"meta"` - } `json:"properties"` -} From 57a1e6151e306b729623af20796c0b1d7f08b25a Mon Sep 17 00:00:00 2001 From: Arman Mazdaee Date: Sun, 26 May 2019 19:29:43 +0430 Subject: [PATCH 14/31] Fix themesDir issue --- cmd/render.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/render.go b/cmd/render.go index 49b65a3..47f59a2 100644 --- a/cmd/render.go +++ b/cmd/render.go @@ -3,6 +3,7 @@ package cmd import ( "fmt" "io/ioutil" + "path/filepath" "github.com/resumic/schema/render" "github.com/resumic/schema/theme" @@ -30,6 +31,11 @@ func renderRun(cmd *cobra.Command, args []string) error { if err != nil { return err } + } else { + themesDir, err = filepath.Abs(themesDir) + if err != nil { + return fmt.Errorf("Couldn't convert themesDir to absolute: %s", err) + } } resume, err := ioutil.ReadFile(resumePath) From 675fccc2d649a696120b6ec37466970ce3242a0c Mon Sep 17 00:00:00 2001 From: Michael Grosser Date: Mon, 17 Jun 2019 14:27:55 +0000 Subject: [PATCH 15/31] Remove Docs link until docs are available --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 989bcca..1a42ca6 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,6 @@ Standardized and generic data schema for your resume/CV # Resumic Easily share your machine readable data or export your resume/CV to a great looking website or PDF. -## Using Resumic -Take a look at our full [documentation](/docs). - ## Support For detailed information on support options see our [support guide](/SUPPORT.md). From 80a4416bbd58d5412ee7a7c9af96f0145069ddbe Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Sat, 29 Jun 2019 18:27:19 -0400 Subject: [PATCH 16/31] adding -o flag to example command --- .examples/hello.json | 220 ++++++++++++++++++++++++++++++++++++++++ cmd/generate_example.go | 4 + go.mod | 13 +-- go.sum | 38 +++++++ 4 files changed, 267 insertions(+), 8 deletions(-) create mode 100644 .examples/hello.json diff --git a/.examples/hello.json b/.examples/hello.json new file mode 100644 index 0000000..d4280f5 --- /dev/null +++ b/.examples/hello.json @@ -0,0 +1,220 @@ +{ + "core": { + "title": "Software Engineer", + "workArea": "Munich Citycenter + 20kms", + "livingArea": "Germany", + "optionalKey": "foo" + }, + "optionalData": { + "one": "two", + "foo": "bar" + }, + "optionalData1": { + "one": "two", + "foo": "bar" + }, + "optionalData2": { + "one": "two", + "foo": "bar" + }, + "personal": { + "name": "John Doe", + "gender": "male", + "image": "example.com/Abcxyz", + "email": "lucas@example.com", + "phone": "912-217-7923", + "url": "http://www.example.com/", + "summary": "The man who sold the world!", + "currentLocation": { + "lat": 35.712758, + "long": 51.392114 + }, + "permanentLocation": { + "lat": 35.712758, + "long": 51.392114 + }, + "birthday": "1995-02-14", + "birthPlace": "Munich", + "profiles": [ + { + "network": "github", + "username": "john_doe", + "url": "https://github.com/john_doe" + } + ], + "relationshipStatus": "married", + "postalAddress": "John Doe, Wittekindshof, Schulstrasse 4, 32547 Bad Oyenhausen, Germany" + }, + "work": [ + { + "name": "XYZ Inc", + "description": "A social media company", + "position": "Software Engineer", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "url": "http://xyz.example.com", + "startDate": "2017-12-29", + "endDate": "2018-12-29", + "summary": "Developing and maintaining the company website using syna", + "highlights": [ + "Worked with mobile team at Twitter to develop remote debugging tools for mobile browsers" + ] + } + ], + "education": [ + { + "institution": "XYZ Institute of Technology", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "area": "Engineering", + "studyType": "Bachelor", + "startDate": "2017-06-28", + "endDate": "2013-06-28", + "score": { + "type": "GPA", + "value": "3.4", + "best": "4", + "worst": "0" + }, + "courses": ["CS302 - Introduction to Algorithms"], + "honors": ["Magna Cum Laude"], + "highlights": ["Live abroad within a new culture"] + } + ], + "volunteer": [ + { + "organization": "Xyz", + "position": "Open Source Contributor", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "url": "http://xyz.example.com", + "startDate": "2014-06-29", + "endDate": "2017-06-29", + "summary": "Frontend developer", + "highlights": ["Invited as a speaker in Xyzcon'17"] + } + ], + "publications": [ + { + "name": "Deep learning and Artificial Intelligence", + "publisher": "XYZ, Computer Magazine", + "releaseDate": "2015-08-01", + "resources": [ + { + "url": "http://www.example.com/my-example-slides/", + "label": "Slides" + } + ], + "url": "http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html", + "summary": "Discussion of the advent of deep learning and artificial intelligence" + } + ], + "legal": [ + { + "name": "XYZ's patent on LZW compression, a fundamental part of the widely used GIF graphics format", + "legalType": "Patent, Trademark, Copyright", + "description": "Some legal document!", + "applicationDate": "2015-08-01", + "grantDate": "2016-09-01", + "endDate": "2020-09-03", + "resources": [ + { + "url": "http://www.example.com/my-example-slides/", + "label": "Slides" + } + ], + "idNumber": "JP2004369746A", + "currentAssignee": "John Doe", + "previousAssignee": "John Doe", + "author": "John Doe", + "coAuthors": "John Doe" + } + ], + "skills": [ + { + "name": "Web Development", + "proficiency": "advanced", + "keywords": ["HTML"] + } + ], + "awards": [ + { + "title": "Awarded Software Process Achievement Award", + "date": "2016-06-12", + "awarder": "IEEE", + "summary": "Received for my work in Deep learning and AI" + } + ], + "projects": [ + { + "name": "File Transfer application", + "location": { + "lat": 35.712758, + "long": 51.392114 + }, + "description": "Developed a client and server based application", + "highlights": ["used Java AWT and Swing for client side userinterface"], + "keywords": ["Java"], + "startDate": "2016-06-29", + "endDate": "2017-03-02", + "resources": [ + { + "url": "http://www.example.com/my-example-slides/", + "label": "Slides" + } + ], + "url": "http://www.example.org/csdl/mags/co/1996/10/rx069-abs.html", + "roles": ["Team Lead"], + "entity": "greenpeace", + "type": "volunteering" + } + ], + "certificate": [ + { + "code": "1Z0-062", + "name": "XYZ Certified Application Specialist (MCAS)", + "website": "http://www.example.org", + "verification": "http://www.example.org", + "grantDate": "2017-06-29", + "score": { + "type": "GPA", + "value": "3.4", + "best": "4", + "worst": "0" + }, + "endDate": "2017-06-29", + "doesNotExpire": true + } + ], + "references": [ + { + "name": "Stephan Mark", + "company": "Xyz", + "position": "Senior Software Engineer", + "reference": "Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing." + } + ], + "languages": [ + { + "language": "English", + "level": "fluent" + } + ], + "interests": [ + { + "name": "Machine Learning", + "keywords": ["Neural Networks"] + } + ], + "meta": { + "version": "v1.0.0", + "lastModified": "2017-06-29T15:53:01+01:00", + "uuid": "078c39ce-23ee-4970-9637-c07379132dce" + } +} diff --git a/cmd/generate_example.go b/cmd/generate_example.go index fb928b0..ca9d2d6 100644 --- a/cmd/generate_example.go +++ b/cmd/generate_example.go @@ -9,6 +9,9 @@ import ( "github.com/spf13/cobra" ) +// Flag to specify output +var output string + func generateExampleRun(cmd *cobra.Command, args []string) error { var examplePath string if len(args) == 0 { @@ -40,5 +43,6 @@ var generateExampleCmd = &cobra.Command{ } func init() { + generateExampleCmd.Flags().StringVarP(&output, "output", "o", "resume_example.json", "Specify a custom output file for example resume data.") generateCmd.AddCommand(generateExampleCmd) } diff --git a/go.mod b/go.mod index f3223ba..0dc7b77 100644 --- a/go.mod +++ b/go.mod @@ -3,21 +3,18 @@ module github.com/resumic/schema require ( github.com/emirpasic/gods v1.12.0 // indirect github.com/gobuffalo/events v1.1.8 // indirect - github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0 - github.com/gobuffalo/packr/v2 v2.2.0 + github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e // indirect + github.com/gobuffalo/packd v0.3.0 + github.com/gobuffalo/packr/v2 v2.5.2 + github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754 // indirect github.com/gohugoio/hugo v0.49.2 - github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect github.com/kr/pty v1.1.4 // indirect github.com/markbates/inflect v1.0.4 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/spf13/cobra v0.0.3 + github.com/spf13/cobra v0.0.5 github.com/stretchr/objx v0.2.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.1.0 - golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 // indirect - golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect - golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 // indirect gopkg.in/src-d/go-billy.v4 v4.3.0 // indirect gopkg.in/src-d/go-git-fixtures.v3 v3.3.0 // indirect gopkg.in/src-d/go-git.v4 v4.9.1 diff --git a/go.sum b/go.sum index 456ecf9..5273fe1 100644 --- a/go.sum +++ b/go.sum @@ -21,6 +21,7 @@ github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkx github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/bep/debounce v1.1.0 h1:6ocXeW2iZ/7vAzgXz82J00tYxncMiEEBExPftTtOQzk= github.com/bep/debounce v1.1.0/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= github.com/bep/gitmap v1.0.0 h1:cTTZwq7vpGuhwefKCBDV9UrHnZAPVJTvoWobimrqkUc= @@ -32,8 +33,13 @@ github.com/chaseadamsio/goorgeous v1.1.0/go.mod h1:6QaC0vFoKWYDth94dHFNgRT2YkT5F github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cpuguy83/go-md2man v1.0.8 h1:DwoNytLphI8hzS2Af4D0dfaEaiSq2bN05mEm4R6vf8M= github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -149,6 +155,8 @@ github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c h1:Z/ppYX6EtPEysb github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2 h1:8thhT+kUJMTMy3HlX4+y9Da+BNJck+p109tqqKp7WDs= github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/logger v1.0.0 h1:xw9Ko9EcC5iAFprrjJ6oZco9UpzS5MQ4jAwghsLHdy4= +github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw= github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= github.com/gobuffalo/mapi v1.0.1 h1:JRuTiZzDEZhBHkFiHTxJkYRT6CbYuL0K/rn+1byJoEA= @@ -178,6 +186,8 @@ github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb h1:039sqjIDVgXXcB5 github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb/go.mod h1:Foenia9ZvITEvG05ab6XpiD5EfBHPL8A6hush8SJ0o8= github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0 h1:P6naWPiHm/7R3eYx/ub3VhaW9G+1xAMJ6vzACePaGPI= github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4= +github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24= github.com/gobuffalo/packr v1.15.0/go.mod h1:t5gXzEhIviQwVlNx/+3SfS07GS+cZ2hn76WLzPp6MGI= github.com/gobuffalo/packr v1.15.1/go.mod h1:IeqicJ7jm8182yrVmNbM6PR4g79SjN9tZLH8KduZZwE= @@ -192,6 +202,8 @@ github.com/gobuffalo/packr/v2 v2.1.0 h1:nWGTgGtZrR4yBQvmAKF4AthraObjRMzx6lJa9e+J github.com/gobuffalo/packr/v2 v2.1.0/go.mod h1:n90ZuXIc2KN2vFAOQascnPItp9A2g9QYSvYvS3AjQEM= github.com/gobuffalo/packr/v2 v2.2.0 h1:Ir9W9XIm9j7bhhkKE9cokvtTl1vBm62A/fene/ZCj6A= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/packr/v2 v2.5.2 h1:4EvjeIpQLZuRIljwnidYgbRXbr1yIzVRrESiLjqKj6s= +github.com/gobuffalo/packr/v2 v2.5.2/go.mod h1:sgEE1xNZ6G0FNN5xn9pevVu4nywaxHvgup67xisti08= github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= github.com/gobuffalo/plush v3.7.21+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= @@ -264,6 +276,8 @@ github.com/karrick/godirwalk v1.7.5 h1:VbzFqwXwNbAZoA6W5odrLr+hKK197CcENcPh6E/gJ github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/karrick/godirwalk v1.8.0 h1:ycpSqVon/QJJoaT1t8sae0tp1Stg21j+dyuS7OoagcA= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.12 h1:BqUm+LuJcXjGv1d2mj3gBiQyrQ57a0rYoAmhvJQ7RDU= +github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e h1:RgQk53JHp/Cjunrr1WlsXSZpqXn+uREuHvUVcK82CV8= github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= @@ -353,6 +367,8 @@ github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhg github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v0.0.0-20180804101149-46c73eb196ba h1:8Vzt8HxRjy7hp1eqPKVoAEPK9npQFW2510qlobGzvi0= github.com/russross/blackfriday v0.0.0-20180804101149-46c73eb196ba/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sanity-io/litter v1.1.0 h1:BllcKWa3VbZmOZbDCoszYLk7zCsKHz5Beossi8SUcTc= github.com/sanity-io/litter v1.1.0/go.mod h1:CJ0VCw2q4qKU7LaQr3n7UOSHzgEMgcGco7N/SkZQPjw= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -375,6 +391,8 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= @@ -384,6 +402,8 @@ github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/fsync v0.0.0-20170320142552-12a01e648f05 h1:pQHm7pxjSgC54M1rtLSLmju25phy6RgYf3p4O6XanYE= github.com/spf13/fsync v0.0.0-20170320142552-12a01e648f05/go.mod h1:jdsEoy1w+v0NpuwXZEaRAH6ADTDmzfRnE2eVwshwFrM= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= @@ -396,6 +416,8 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/viper v1.2.0/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= github.com/spf13/viper v1.2.1 h1:bIcUwXqLseLF3BDAZduuNfekWG87ibtFxi59Bq+oI9M= github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= +github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -411,6 +433,7 @@ github.com/tdewolff/parse v2.3.3+incompatible h1:q6OSjvHtvBucLb34z24OH1xl5wGdw1m github.com/tdewolff/parse v2.3.3+incompatible/go.mod h1:8oBwCsVmUkgHO8M5iCzSIDtpzXOT0WXX9cWhz+bIzJQ= github.com/tdewolff/test v0.0.0-20171106182207-265427085153 h1:B1Z2txQ2QI9nsWELeEvGBAdNhMylGMSCCypjsLJh/Mw= github.com/tdewolff/test v0.0.0-20171106182207-265427085153/go.mod h1:DiQUlutnqlEvdvhSn2LPGy4TFwRauAaYDsL+683RNX4= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= github.com/wellington/go-libsass v0.0.0-20180624165032-615eaa47ef79 h1:ivqgxj/zO3UZuzX7ZnlcyX8cAbNqLl1oes4zPddAO5Q= @@ -425,6 +448,7 @@ github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56 h1:yhqBHs09Sm github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.1.0 h1:ngVtJC9TY/lg0AA/1k48FYhBrhRoFlEmWzsehpNAaZg= github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -439,11 +463,14 @@ golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85 h1:et7+NAX3lLIk5qUCTA9QelBjGE/NkhzYw/mhnr0s7nI= golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190131182504-b8fe1690c613 h1:MQ/ZZiDsUapFFiMS+vzwXkCTeEKaum+Do5rINYJDmxc= golang.org/x/crypto v0.0.0-20190131182504-b8fe1690c613/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjWtbDmn9OYFLX5Ik9alpJpE= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81 h1:00VmoueYNlNz/aHIilyyQz/MHSqGoWJzpFv/HW8xpzI= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -471,6 +498,8 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0 golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190412183630-56d357773e84 h1:IqXQ59gzdXv58Jmm2xn0tSOR9i6HqroaOFRQ3wR/dJQ= golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -488,12 +517,17 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8 h1:YoY1wS6JYVRpIfFngRf2HHo9R9dAne3xbkGOQ5rJXjU= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952 h1:FDfvYgoVsA7TTZSbgiqjAbfPbK47CNHdWl3h/PJtii0= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190515120540-06a5c4944438 h1:khxRGsvPk4n2y8I/mLLjp7e5dMTJmH75wvqS6nMwUtY= +golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -516,6 +550,8 @@ golang.org/x/tools v0.0.0-20190409150902-04e50493df54 h1:L7+razWg8CVl9qm8LxypkFI golang.org/x/tools v0.0.0-20190409150902-04e50493df54/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421 h1:0lteSdckF24NlQCFAMS8BzXQy45S0v4SY3N3BBkq/gA= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0 h1:Dh6fw+p6FyRl5x/FvNswO1ji0lIGzm3KP8Y9VkS9PTE= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= @@ -540,3 +576,5 @@ gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 2e1ee606e59dd8b0cb21439e6d5884ddb8d5f3a0 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Sat, 29 Jun 2019 18:46:40 -0400 Subject: [PATCH 17/31] cleaning up -o flag code for generate example --- cmd/generate_example.go | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/cmd/generate_example.go b/cmd/generate_example.go index ca9d2d6..c081ad4 100644 --- a/cmd/generate_example.go +++ b/cmd/generate_example.go @@ -9,16 +9,11 @@ import ( "github.com/spf13/cobra" ) -// Flag to specify output -var output string +// Flag to specify output. Default value is "resume_example.json" +var outputFileName string func generateExampleRun(cmd *cobra.Command, args []string) error { - var examplePath string - if len(args) == 0 { - examplePath = "resume_example.json" - } else { - examplePath = args[0] - } + fmt.Println(outputFileName) example, err := schema.GenerateExample() if err != nil { return fmt.Errorf("Couldn't generate the example: %s", err) @@ -27,11 +22,12 @@ func generateExampleRun(cmd *cobra.Command, args []string) error { if err != nil { return fmt.Errorf("Couldn't marshal the example to json: %s", err) } - err = ioutil.WriteFile(examplePath, exampleJSON, 0600) + err = ioutil.WriteFile(outputFileName, exampleJSON, 0600) + if err != nil { - return fmt.Errorf("Couldn't write the example to %s: %s", examplePath, err) + return fmt.Errorf("Couldn't write the example to %s: %s", outputFileName, err) } - fmt.Printf("Example file created successfully at %s\n", examplePath) + fmt.Printf("Example file created successfully at %s\n", outputFileName) return nil } @@ -43,6 +39,6 @@ var generateExampleCmd = &cobra.Command{ } func init() { - generateExampleCmd.Flags().StringVarP(&output, "output", "o", "resume_example.json", "Specify a custom output file for example resume data.") + generateExampleCmd.Flags().StringVarP(&outputFileName, "output", "o", "resume_example.json", "Specify a custom output file for example resume data.") generateCmd.AddCommand(generateExampleCmd) } From 9b6e4efef9edcb5b8854162b5c4285064d52de80 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Sat, 29 Jun 2019 18:47:03 -0400 Subject: [PATCH 18/31] deleted errant println --- cmd/generate_example.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/generate_example.go b/cmd/generate_example.go index c081ad4..081cdce 100644 --- a/cmd/generate_example.go +++ b/cmd/generate_example.go @@ -13,7 +13,6 @@ import ( var outputFileName string func generateExampleRun(cmd *cobra.Command, args []string) error { - fmt.Println(outputFileName) example, err := schema.GenerateExample() if err != nil { return fmt.Errorf("Couldn't generate the example: %s", err) From 190f94f8595a99e1935224013f78d389bb2e928a Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Sat, 29 Jun 2019 18:59:31 -0400 Subject: [PATCH 19/31] added -o flag to generate jsonschema cmd --- cmd/generate_jsonschema.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cmd/generate_jsonschema.go b/cmd/generate_jsonschema.go index a390620..65969b7 100644 --- a/cmd/generate_jsonschema.go +++ b/cmd/generate_jsonschema.go @@ -8,13 +8,9 @@ import ( "github.com/spf13/cobra" ) +var schemaPath string + func generateJSONSchemaRun(cmd *cobra.Command, args []string) error { - var schemaPath string - if len(args) == 0 { - schemaPath = "resume.json" - } else { - schemaPath = args[0] - } schema, err := schema.GenerateJSONSchema() if err != nil { return fmt.Errorf("Couldn't generate JSON schema: %s", err) @@ -35,5 +31,6 @@ var generateJSONSchemaCmd = &cobra.Command{ } func init() { + generateJSONSchemaCmd.Flags().StringVarP(&schemaPath, "output", "o", "resume.json", "Specify an output file for the resume data") generateCmd.AddCommand(generateJSONSchemaCmd) } From 5fbe96523cb2341949ba08a01ad9c194178a5e12 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Sat, 29 Jun 2019 19:15:25 -0400 Subject: [PATCH 20/31] added -o flags to schema commands, fixed tests --- cmd/generate_example_test.go | 2 +- cmd/generate_jsonschema_test.go | 2 +- cmd/generate_uischema.go | 15 ++++++--------- cmd/generate_uischema_test.go | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/cmd/generate_example_test.go b/cmd/generate_example_test.go index 0e8f38a..0bbc294 100644 --- a/cmd/generate_example_test.go +++ b/cmd/generate_example_test.go @@ -12,7 +12,7 @@ func TestGenerateExampleRunValid(t *testing.T) { if err != nil { t.Fatalf("Could not generate temp file: %s", err) } - err = Execute([]string{"generate", "example", tempFile.Name()}) + err = Execute([]string{"generate", "example", "-o", tempFile.Name()}) if err != nil { t.Fatalf("Could not generate example, %s", err) } diff --git a/cmd/generate_jsonschema_test.go b/cmd/generate_jsonschema_test.go index fa17754..0aaa37e 100644 --- a/cmd/generate_jsonschema_test.go +++ b/cmd/generate_jsonschema_test.go @@ -12,7 +12,7 @@ func TestGenerateJSONSchemaRunValid(t *testing.T) { if err != nil { t.Fatalf("Could not generate temp file: %s", err) } - err = Execute([]string{"generate", "jsonschema", tempFile.Name()}) + err = Execute([]string{"generate", "jsonschema", "-o", tempFile.Name()}) if err != nil { t.Fatalf("Could not generate schema, %s", err) } diff --git a/cmd/generate_uischema.go b/cmd/generate_uischema.go index 59eee2c..539aaf2 100644 --- a/cmd/generate_uischema.go +++ b/cmd/generate_uischema.go @@ -8,22 +8,18 @@ import ( "github.com/spf13/cobra" ) +var uiSchemaPath string + func generateUISchemaRun(cmd *cobra.Command, args []string) error { - var schemaPath string - if len(args) == 0 { - schemaPath = "resume.json" - } else { - schemaPath = args[0] - } schema, err := schema.GenerateUISchema() if err != nil { return fmt.Errorf("Couldn't generate UI schema: %s", err) } - err = ioutil.WriteFile(schemaPath, schema, 0600) + err = ioutil.WriteFile(uiSchemaPath, schema, 0600) if err != nil { - return fmt.Errorf("Couldn't write the schema to %s: %s", schemaPath, err) + return fmt.Errorf("Couldn't write the schema to %s: %s", uiSchemaPath, err) } - fmt.Printf("UI schema file created successfully at %s\n", schemaPath) + fmt.Printf("UI schema file created successfully at %s\n", uiSchemaPath) return nil } @@ -35,5 +31,6 @@ var generateUISchemaCmd = &cobra.Command{ } func init() { + generateUISchemaCmd.Flags().StringVarP(&uiSchemaPath, "output", "o", "resume.json", "Specify an output file for the resume data") generateCmd.AddCommand(generateUISchemaCmd) } diff --git a/cmd/generate_uischema_test.go b/cmd/generate_uischema_test.go index 686c9e9..abb40a7 100644 --- a/cmd/generate_uischema_test.go +++ b/cmd/generate_uischema_test.go @@ -12,7 +12,7 @@ func TestGenerateUISchemaRunValid(t *testing.T) { if err != nil { t.Fatalf("Could not generate temp file: %s", err) } - err = Execute([]string{"generate", "uischema", tempFile.Name()}) + err = Execute([]string{"generate", "uischema", "-o", tempFile.Name()}) if err != nil { t.Fatalf("Could not generate schema, %s", err) } From 3e4c52e3272a81828561c3284b3474abff1cbe6c Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Sun, 30 Jun 2019 23:33:03 -0400 Subject: [PATCH 21/31] added render flags --- cmd/render.go | 61 ++++++++++++++++++++++++---------------------- cmd/render_test.go | 2 +- 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/cmd/render.go b/cmd/render.go index f570501..4fab613 100644 --- a/cmd/render.go +++ b/cmd/render.go @@ -3,7 +3,6 @@ package cmd import ( "fmt" "io/ioutil" - "strings" "github.com/resumic/schema/render" "github.com/resumic/schema/theme" @@ -16,35 +15,37 @@ const ( defaultResume = "resume.json" ) +var ( + resumePath string + htmlPath string +) + func renderRun(cmd *cobra.Command, args []string) error { - var ( - resumePath string - htmlPath string - ) - switch argLen := len(args); argLen { - // No args: use defaults for input file and output file. - case 0: - resumePath = defaultResume - htmlPath = defaultHTML - // 1 argument: check to see what the file type is. If JSON, use as input file. - // If HTML, use as output file. This doesn't permit using files with no extension. - case 1: - if strings.Contains(args[0], ".json") { - resumePath = args[0] - htmlPath = defaultHTML - } else if strings.Contains(args[0], ".html") { - resumePath = defaultResume - htmlPath = args[0] - } else { - return fmt.Errorf("Please provide argument(s) with a valid .json or .html extension") - } - // 2 args: use args for input and output files. - case 2: - resumePath = args[0] - htmlPath = args[1] - } - // resumePath := args[0] - // htmlPath := args[1] + + // switch argLen := len(args); argLen { + // // No args: use defaults for input file and output file. + // case 0: + // resumePath = defaultResume + // htmlPath = defaultHTML + // // 1 argument: check to see what the file type is. If JSON, use as input file. + // // If HTML, use as output file. This doesn't permit using files with no extension. + // case 1: + // if strings.Contains(args[0], ".json") { + // resumePath = args[0] + // htmlPath = defaultHTML + // } else if strings.Contains(args[0], ".html") { + // resumePath = defaultResume + // htmlPath = args[0] + // } else { + // return fmt.Errorf("Please provide argument(s) with a valid .json or .html extension") + // } + // // 2 args: use args for input and output files. + // case 2: + // resumePath = args[0] + // htmlPath = args[1] + // } + // // resumePath := args[0] + // // htmlPath := args[1] cacheDir, err := cmd.Flags().GetString("cacheDir") if err != nil { panic(err) @@ -89,6 +90,8 @@ var renderCmd = &cobra.Command{ } func init() { + renderCmd.Flags().StringVarP(&resumePath, "resume", "r", "resume.json", "Path to resume data file") + renderCmd.Flags().StringVarP(&htmlPath, "output", "o", "resume.html", "Path to output file") renderCmd.Flags().StringP("theme", "t", "test-theme", "Theme to use") renderCmd.Flags().StringP("themesDir", "d", "", "Filesystem path to themes directory") rootCmd.AddCommand(renderCmd) diff --git a/cmd/render_test.go b/cmd/render_test.go index b6ef648..f7e2d0f 100644 --- a/cmd/render_test.go +++ b/cmd/render_test.go @@ -18,7 +18,7 @@ func TestRenderRun(t *testing.T) { if err != nil { t.Fatalf("Could not make temp file: %s", err) } - err = Execute([]string{"--cacheDir", cacheDir, "render", resumePath, tempFile.Name()}) + err = Execute([]string{"--cacheDir", cacheDir, "render", "-r", resumePath, "-o", tempFile.Name()}) if err != nil { t.Fatalf("Could not render the resume html: %s", err) } From 8efdf749c5f3c7e20f6fe2db242a4bb58d7dd745 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Sun, 30 Jun 2019 23:51:33 -0400 Subject: [PATCH 22/31] added validate -r flag --- cmd/validate.go | 15 ++++++--------- cmd/validate_test.go | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/cmd/validate.go b/cmd/validate.go index 97ebb09..0ef653c 100644 --- a/cmd/validate.go +++ b/cmd/validate.go @@ -9,17 +9,13 @@ import ( "github.com/spf13/cobra" ) +var resumePathValidate string + func validateRun(cmd *cobra.Command, args []string) error { - var resumePath string - if len(args) == 0 { - resumePath = "resume.json" - } else { - resumePath = args[0] - } - resume, err := ioutil.ReadFile(resumePath) + resume, err := ioutil.ReadFile(resumePathValidate) if err != nil { - return fmt.Errorf("Couldn't read the resume json file from %s: %s", resumePath, err) + return fmt.Errorf("Couldn't read the resume json file from %s: %s", resumePathValidate, err) } if err := schema.ValidateResume(resume); err != nil { @@ -28,7 +24,7 @@ func validateRun(cmd *cobra.Command, args []string) error { } return fmt.Errorf("Couldn't validate the resume: %s", err) } - fmt.Printf("%s is valid and conforming with the resumic schema\n", resumePath) + fmt.Printf("%s is valid and conforming with the resumic schema\n", resumePathValidate) return nil } @@ -40,5 +36,6 @@ var validateCmd = &cobra.Command{ } func init() { + validateCmd.Flags().StringVarP(&resumePathValidate, "resume", "r", "resume.json", "Path to resume data file") rootCmd.AddCommand(validateCmd) } diff --git a/cmd/validate_test.go b/cmd/validate_test.go index 3506f9e..4d6ed83 100644 --- a/cmd/validate_test.go +++ b/cmd/validate_test.go @@ -4,7 +4,7 @@ import "testing" func TestValidateRunValid(t *testing.T) { resumeFile := "../example.json" - err := validateRun(validateCmd, []string{resumeFile}) + err := Execute([]string{"validate", "-r", resumeFile}) //validateRun(validateCmd, []string{"-r", resumeFile}) if err != nil { t.Fatalf("Expected valid state, got error, %s", err) } From ac4abf5de6682d686ac03a23d0b2f6124dc94569 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Mon, 15 Jul 2019 13:50:23 -0400 Subject: [PATCH 23/31] cleaned up extra comments --- cmd/render.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/cmd/render.go b/cmd/render.go index 4fab613..a4d7834 100644 --- a/cmd/render.go +++ b/cmd/render.go @@ -21,31 +21,6 @@ var ( ) func renderRun(cmd *cobra.Command, args []string) error { - - // switch argLen := len(args); argLen { - // // No args: use defaults for input file and output file. - // case 0: - // resumePath = defaultResume - // htmlPath = defaultHTML - // // 1 argument: check to see what the file type is. If JSON, use as input file. - // // If HTML, use as output file. This doesn't permit using files with no extension. - // case 1: - // if strings.Contains(args[0], ".json") { - // resumePath = args[0] - // htmlPath = defaultHTML - // } else if strings.Contains(args[0], ".html") { - // resumePath = defaultResume - // htmlPath = args[0] - // } else { - // return fmt.Errorf("Please provide argument(s) with a valid .json or .html extension") - // } - // // 2 args: use args for input and output files. - // case 2: - // resumePath = args[0] - // htmlPath = args[1] - // } - // // resumePath := args[0] - // // htmlPath := args[1] cacheDir, err := cmd.Flags().GetString("cacheDir") if err != nil { panic(err) From 2f10228412584e814d445e8d2b7ab307886331d3 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Mon, 15 Jul 2019 13:51:35 -0400 Subject: [PATCH 24/31] got rid of extra consts --- cmd/render.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cmd/render.go b/cmd/render.go index a4d7834..9def034 100644 --- a/cmd/render.go +++ b/cmd/render.go @@ -9,12 +9,6 @@ import ( "github.com/spf13/cobra" ) -// Added in case we change default filenames. -const ( - defaultHTML = "resume.html" - defaultResume = "resume.json" -) - var ( resumePath string htmlPath string From a30010ce01407bbc4ca97c38becc065ff6fbef8f Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Mon, 15 Jul 2019 14:01:34 -0400 Subject: [PATCH 25/31] fixing usage string --- cmd/render.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/render.go b/cmd/render.go index 9def034..2bbd9b9 100644 --- a/cmd/render.go +++ b/cmd/render.go @@ -52,7 +52,7 @@ func renderRun(cmd *cobra.Command, args []string) error { } var renderCmd = &cobra.Command{ - Use: "render JSON_PATH (defaults to resume.json) HTML_PATH (defaults to resume.html)", + Use: "render", Short: "Render json resume to html", Args: cobra.MaximumNArgs(2), RunE: renderRun, From 83569b2e3854350af9ca2e85592c4eef6b188c3e Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Wed, 31 Jul 2019 12:54:46 -0400 Subject: [PATCH 26/31] got rid of path in generate example --- cmd/generate_example.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/generate_example.go b/cmd/generate_example.go index 081cdce..3a9aa3f 100644 --- a/cmd/generate_example.go +++ b/cmd/generate_example.go @@ -31,7 +31,7 @@ func generateExampleRun(cmd *cobra.Command, args []string) error { } var generateExampleCmd = &cobra.Command{ - Use: "example PATH", + Use: "example", Short: "Generate an example json resume", Args: cobra.MaximumNArgs(1), RunE: generateExampleRun, From 084676a04aef71df2dab22abe41ccb78a9900b4e Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Wed, 31 Jul 2019 12:57:42 -0400 Subject: [PATCH 27/31] got rid of PATH text in generate jsonschema --- cmd/generate_jsonschema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/generate_jsonschema.go b/cmd/generate_jsonschema.go index 65969b7..6175038 100644 --- a/cmd/generate_jsonschema.go +++ b/cmd/generate_jsonschema.go @@ -24,7 +24,7 @@ func generateJSONSchemaRun(cmd *cobra.Command, args []string) error { } var generateJSONSchemaCmd = &cobra.Command{ - Use: "jsonschema PATH", + Use: "jsonschema", Short: "Generate the jsonschema for the resumic schema", Args: cobra.MaximumNArgs(1), RunE: generateJSONSchemaRun, From dbe30bf13ea982061840fdbd950063bb7c6a877b Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Wed, 31 Jul 2019 12:59:31 -0400 Subject: [PATCH 28/31] got rid of PATH text in generate uischema --- cmd/generate_uischema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/generate_uischema.go b/cmd/generate_uischema.go index 539aaf2..15fc9af 100644 --- a/cmd/generate_uischema.go +++ b/cmd/generate_uischema.go @@ -24,7 +24,7 @@ func generateUISchemaRun(cmd *cobra.Command, args []string) error { } var generateUISchemaCmd = &cobra.Command{ - Use: "uischema PATH", + Use: "uischema", Short: "Generate the uischema for the resumic schema", Args: cobra.MaximumNArgs(1), RunE: generateUISchemaRun, From 8bcb6b53e088b0fadabf4f66e26401fb1b6d0eb0 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Wed, 31 Jul 2019 15:59:43 -0400 Subject: [PATCH 29/31] added date format to releaseDate --- schema/schema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/schema.go b/schema/schema.go index 6e7342d..b3d5a89 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -85,7 +85,7 @@ type volunteerSchema struct { type publicationSchema struct { Name string `json:"name" schema:"description:name of the publication;example:Deep learning and Artificial Intelligence"` Publisher string `json:"publisher" schema:"description:name of the publisher;example:XYZ, Computer Magazine"` - ReleaseDate string `json:"releaseDate,omitempty" schema:"description:release date of publication;example:2015-08-01"` + ReleaseDate string `json:"releaseDate,omitempty" schema:"description:release date of publication;format:date;example:2015-08-01"` Resources []resourceSchema `json:"resources,omitempty" schema:"description:multiple resources with label"` URL string `json:"url,omitempty" schema:"description:url of the publication;format:uri;example:http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html"` Summary string `json:"summary,omitempty" schema:"description:short summary of the publication;example:Discussion of the advent of deep learning and artificial intelligence"` From af306a00f446c94fb60a6895368c21fe8c1b1e6c Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Wed, 31 Jul 2019 16:30:32 -0400 Subject: [PATCH 30/31] fixed schema.json with new releaseDate format -> fixed tests --- go.mod | 13 +++++-------- go.sum | 38 ++++++++++++++++++++++++++++++++++++++ schema.json | 3 ++- 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index f3223ba..0dc7b77 100644 --- a/go.mod +++ b/go.mod @@ -3,21 +3,18 @@ module github.com/resumic/schema require ( github.com/emirpasic/gods v1.12.0 // indirect github.com/gobuffalo/events v1.1.8 // indirect - github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0 - github.com/gobuffalo/packr/v2 v2.2.0 + github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e // indirect + github.com/gobuffalo/packd v0.3.0 + github.com/gobuffalo/packr/v2 v2.5.2 + github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754 // indirect github.com/gohugoio/hugo v0.49.2 - github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect github.com/kr/pty v1.1.4 // indirect github.com/markbates/inflect v1.0.4 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/spf13/cobra v0.0.3 + github.com/spf13/cobra v0.0.5 github.com/stretchr/objx v0.2.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.1.0 - golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 // indirect - golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect - golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 // indirect gopkg.in/src-d/go-billy.v4 v4.3.0 // indirect gopkg.in/src-d/go-git-fixtures.v3 v3.3.0 // indirect gopkg.in/src-d/go-git.v4 v4.9.1 diff --git a/go.sum b/go.sum index 456ecf9..5273fe1 100644 --- a/go.sum +++ b/go.sum @@ -21,6 +21,7 @@ github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkx github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/bep/debounce v1.1.0 h1:6ocXeW2iZ/7vAzgXz82J00tYxncMiEEBExPftTtOQzk= github.com/bep/debounce v1.1.0/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= github.com/bep/gitmap v1.0.0 h1:cTTZwq7vpGuhwefKCBDV9UrHnZAPVJTvoWobimrqkUc= @@ -32,8 +33,13 @@ github.com/chaseadamsio/goorgeous v1.1.0/go.mod h1:6QaC0vFoKWYDth94dHFNgRT2YkT5F github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cpuguy83/go-md2man v1.0.8 h1:DwoNytLphI8hzS2Af4D0dfaEaiSq2bN05mEm4R6vf8M= github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -149,6 +155,8 @@ github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c h1:Z/ppYX6EtPEysb github.com/gobuffalo/logger v0.0.0-20181127160119-5b956e21995c/go.mod h1:+HxKANrR9VGw9yN3aOAppJKvhO05ctDi63w4mDnKv2U= github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2 h1:8thhT+kUJMTMy3HlX4+y9Da+BNJck+p109tqqKp7WDs= github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/logger v1.0.0 h1:xw9Ko9EcC5iAFprrjJ6oZco9UpzS5MQ4jAwghsLHdy4= +github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw= github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= github.com/gobuffalo/mapi v1.0.1 h1:JRuTiZzDEZhBHkFiHTxJkYRT6CbYuL0K/rn+1byJoEA= @@ -178,6 +186,8 @@ github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb h1:039sqjIDVgXXcB5 github.com/gobuffalo/packd v0.0.0-20181124090624-311c6248e5fb/go.mod h1:Foenia9ZvITEvG05ab6XpiD5EfBHPL8A6hush8SJ0o8= github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0 h1:P6naWPiHm/7R3eYx/ub3VhaW9G+1xAMJ6vzACePaGPI= github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4= +github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24= github.com/gobuffalo/packr v1.15.0/go.mod h1:t5gXzEhIviQwVlNx/+3SfS07GS+cZ2hn76WLzPp6MGI= github.com/gobuffalo/packr v1.15.1/go.mod h1:IeqicJ7jm8182yrVmNbM6PR4g79SjN9tZLH8KduZZwE= @@ -192,6 +202,8 @@ github.com/gobuffalo/packr/v2 v2.1.0 h1:nWGTgGtZrR4yBQvmAKF4AthraObjRMzx6lJa9e+J github.com/gobuffalo/packr/v2 v2.1.0/go.mod h1:n90ZuXIc2KN2vFAOQascnPItp9A2g9QYSvYvS3AjQEM= github.com/gobuffalo/packr/v2 v2.2.0 h1:Ir9W9XIm9j7bhhkKE9cokvtTl1vBm62A/fene/ZCj6A= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/packr/v2 v2.5.2 h1:4EvjeIpQLZuRIljwnidYgbRXbr1yIzVRrESiLjqKj6s= +github.com/gobuffalo/packr/v2 v2.5.2/go.mod h1:sgEE1xNZ6G0FNN5xn9pevVu4nywaxHvgup67xisti08= github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= github.com/gobuffalo/plush v3.7.21+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI= @@ -264,6 +276,8 @@ github.com/karrick/godirwalk v1.7.5 h1:VbzFqwXwNbAZoA6W5odrLr+hKK197CcENcPh6E/gJ github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/karrick/godirwalk v1.8.0 h1:ycpSqVon/QJJoaT1t8sae0tp1Stg21j+dyuS7OoagcA= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.12 h1:BqUm+LuJcXjGv1d2mj3gBiQyrQ57a0rYoAmhvJQ7RDU= +github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e h1:RgQk53JHp/Cjunrr1WlsXSZpqXn+uREuHvUVcK82CV8= github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= @@ -353,6 +367,8 @@ github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhg github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v0.0.0-20180804101149-46c73eb196ba h1:8Vzt8HxRjy7hp1eqPKVoAEPK9npQFW2510qlobGzvi0= github.com/russross/blackfriday v0.0.0-20180804101149-46c73eb196ba/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sanity-io/litter v1.1.0 h1:BllcKWa3VbZmOZbDCoszYLk7zCsKHz5Beossi8SUcTc= github.com/sanity-io/litter v1.1.0/go.mod h1:CJ0VCw2q4qKU7LaQr3n7UOSHzgEMgcGco7N/SkZQPjw= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -375,6 +391,8 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= @@ -384,6 +402,8 @@ github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/fsync v0.0.0-20170320142552-12a01e648f05 h1:pQHm7pxjSgC54M1rtLSLmju25phy6RgYf3p4O6XanYE= github.com/spf13/fsync v0.0.0-20170320142552-12a01e648f05/go.mod h1:jdsEoy1w+v0NpuwXZEaRAH6ADTDmzfRnE2eVwshwFrM= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= @@ -396,6 +416,8 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/viper v1.2.0/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= github.com/spf13/viper v1.2.1 h1:bIcUwXqLseLF3BDAZduuNfekWG87ibtFxi59Bq+oI9M= github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= +github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -411,6 +433,7 @@ github.com/tdewolff/parse v2.3.3+incompatible h1:q6OSjvHtvBucLb34z24OH1xl5wGdw1m github.com/tdewolff/parse v2.3.3+incompatible/go.mod h1:8oBwCsVmUkgHO8M5iCzSIDtpzXOT0WXX9cWhz+bIzJQ= github.com/tdewolff/test v0.0.0-20171106182207-265427085153 h1:B1Z2txQ2QI9nsWELeEvGBAdNhMylGMSCCypjsLJh/Mw= github.com/tdewolff/test v0.0.0-20171106182207-265427085153/go.mod h1:DiQUlutnqlEvdvhSn2LPGy4TFwRauAaYDsL+683RNX4= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= github.com/wellington/go-libsass v0.0.0-20180624165032-615eaa47ef79 h1:ivqgxj/zO3UZuzX7ZnlcyX8cAbNqLl1oes4zPddAO5Q= @@ -425,6 +448,7 @@ github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56 h1:yhqBHs09Sm github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.1.0 h1:ngVtJC9TY/lg0AA/1k48FYhBrhRoFlEmWzsehpNAaZg= github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -439,11 +463,14 @@ golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85 h1:et7+NAX3lLIk5qUCTA9QelBjGE/NkhzYw/mhnr0s7nI= golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190131182504-b8fe1690c613 h1:MQ/ZZiDsUapFFiMS+vzwXkCTeEKaum+Do5rINYJDmxc= golang.org/x/crypto v0.0.0-20190131182504-b8fe1690c613/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjWtbDmn9OYFLX5Ik9alpJpE= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81 h1:00VmoueYNlNz/aHIilyyQz/MHSqGoWJzpFv/HW8xpzI= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -471,6 +498,8 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0 golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190412183630-56d357773e84 h1:IqXQ59gzdXv58Jmm2xn0tSOR9i6HqroaOFRQ3wR/dJQ= golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -488,12 +517,17 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8 h1:YoY1wS6JYVRpIfFngRf2HHo9R9dAne3xbkGOQ5rJXjU= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952 h1:FDfvYgoVsA7TTZSbgiqjAbfPbK47CNHdWl3h/PJtii0= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190515120540-06a5c4944438 h1:khxRGsvPk4n2y8I/mLLjp7e5dMTJmH75wvqS6nMwUtY= +golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -516,6 +550,8 @@ golang.org/x/tools v0.0.0-20190409150902-04e50493df54 h1:L7+razWg8CVl9qm8LxypkFI golang.org/x/tools v0.0.0-20190409150902-04e50493df54/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421 h1:0lteSdckF24NlQCFAMS8BzXQy45S0v4SY3N3BBkq/gA= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0 h1:Dh6fw+p6FyRl5x/FvNswO1ji0lIGzm3KP8Y9VkS9PTE= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= @@ -540,3 +576,5 @@ gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/schema.json b/schema.json index ad509c7..d0b0710 100644 --- a/schema.json +++ b/schema.json @@ -614,6 +614,7 @@ }, "releaseDate": { "description": "release date of publication", + "format": "date", "type": "string" }, "resources": { @@ -876,4 +877,4 @@ ], "title": "Resumic resume Schema", "type": "object" -} \ No newline at end of file +} From b3afdcac74aa3ccce9489daddb0154aa02832687 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana Date: Wed, 31 Jul 2019 23:07:52 -0400 Subject: [PATCH 31/31] renamed releasedDate to publicationDate --- example.json | 4 ++-- schema.json | 4 ++-- schema/schema.go | 12 ++++++------ ui.json | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/example.json b/example.json index 4826606..865a88b 100644 --- a/example.json +++ b/example.json @@ -99,7 +99,7 @@ { "name": "Deep learning and Artificial Intelligence", "publisher": "XYZ, Computer Magazine", - "releaseDate": "2015-08-01", + "publicationDate": "2015-08-01", "resources": [ { "url": "http://www.example.com/my-example-slides/", @@ -222,4 +222,4 @@ "lastModified": "2017-06-29T15:53:01+01:00", "uuid": "078c39ce-23ee-4970-9637-c07379132dce" } -} \ No newline at end of file +} diff --git a/schema.json b/schema.json index d0b0710..706cd1a 100644 --- a/schema.json +++ b/schema.json @@ -612,8 +612,8 @@ "description": "name of the publisher", "type": "string" }, - "releaseDate": { - "description": "release date of publication", + "publicationDate": { + "description": "date of publication", "format": "date", "type": "string" }, diff --git a/schema/schema.go b/schema/schema.go index b3d5a89..8437308 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -83,12 +83,12 @@ type volunteerSchema struct { } type publicationSchema struct { - Name string `json:"name" schema:"description:name of the publication;example:Deep learning and Artificial Intelligence"` - Publisher string `json:"publisher" schema:"description:name of the publisher;example:XYZ, Computer Magazine"` - ReleaseDate string `json:"releaseDate,omitempty" schema:"description:release date of publication;format:date;example:2015-08-01"` - Resources []resourceSchema `json:"resources,omitempty" schema:"description:multiple resources with label"` - URL string `json:"url,omitempty" schema:"description:url of the publication;format:uri;example:http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html"` - Summary string `json:"summary,omitempty" schema:"description:short summary of the publication;example:Discussion of the advent of deep learning and artificial intelligence"` + Name string `json:"name" schema:"description:name of the publication;example:Deep learning and Artificial Intelligence"` + Publisher string `json:"publisher" schema:"description:name of the publisher;example:XYZ, Computer Magazine"` + PublicationDate string `json:"publicationDate,omitempty" schema:"description:date of publication;format:date;example:2015-08-01"` + Resources []resourceSchema `json:"resources,omitempty" schema:"description:multiple resources with label"` + URL string `json:"url,omitempty" schema:"description:url of the publication;format:uri;example:http://www.computer.org.example.com/csdl/mags/co/2015/10/rx069-abs.html"` + Summary string `json:"summary,omitempty" schema:"description:short summary of the publication;example:Discussion of the advent of deep learning and artificial intelligence"` } type legalSchema struct { diff --git a/ui.json b/ui.json index 6165f32..dc88fdd 100644 --- a/ui.json +++ b/ui.json @@ -464,7 +464,7 @@ "publisher": { "ui:placeholder": "XYZ, Computer Magazine" }, - "releaseDate": { + "publicationDate": { "ui:placeholder": "2015-08-01" }, "resources": { @@ -487,7 +487,7 @@ "ui:order": [ "name", "publisher", - "releaseDate", + "publicationDate", "resources", "url", "summary" @@ -658,4 +658,4 @@ } } } -} \ No newline at end of file +}