{"action":"created","issue":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1163","labels_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1163/labels{/name}","comments_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1163/comments","events_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1163/events","html_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/issues/1163","id":82659040,"number":1163,"title":"Convert HTML Goodies to use templates","user":{"login":"moollaza","id":873785,"avatar_url":"https://avatars.githubusercontent.com/u/873785?v=3","gravatar_id":"","url":"https://api.github.com/users/moollaza","html_url":"https://github.com/moollaza","followers_url":"https://api.github.com/users/moollaza/followers","following_url":"https://api.github.com/users/moollaza/following{/other_user}","gists_url":"https://api.github.com/users/moollaza/gists{/gist_id}","starred_url":"https://api.github.com/users/moollaza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moollaza/subscriptions","organizations_url":"https://api.github.com/users/moollaza/orgs","repos_url":"https://api.github.com/users/moollaza/repos","events_url":"https://api.github.com/users/moollaza/events{/privacy}","received_events_url":"https://api.github.com/users/moollaza/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/labels/Convert%20To%20Structured%20Answer","name":"Convert To Structured Answer","color":"5319e7"},{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/labels/Low-Hanging%20Fruit","name":"Low-Hanging Fruit","color":"009800"},{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/labels/Priority:%20High","name":"Priority: High","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-30T01:45:24Z","updated_at":"2015-06-05T18:04:41Z","closed_at":null,"body":"Many legacy Goodies return HTML strings for rendering. This was previously acceptable as we did not have access to the Handlebars templates used in every Spice IA.\r\n\r\nNow that we have templates, we should convert all Goodies returning HTML into templated Goodie that ideally won't need to actually declare any HTML! We have many built-in templates and most IA's can leverage these by specifying only the data and letting our template system do the rest of the work.\r\n\r\nIn some cases the use of a Handlebars sub-template is necessary and acceptable. In rare cases a custom template is required and we now support that (but please check with us first to make sure its absolutely necessary!)\r\n\r\nLet's cleanup our Goodies and hopefully simplify them by moving to our new templates!\r\n\r\nDetails on template usage can be seen here: https://duck.co/duckduckhack/goodie_displaying\r\n\r\nNote: Goodies also support JS and CSS now, which means we should remove any inline scripts and styles and if necessary, move them to separate CSS and JS files.\r\n\r\nHere's a list of the existing IA's which return HTML:\r\n\r\n- [ ] Average.pm\r\n- [ ] BashPrimaryExpressions.pm\r\n- [ ] BinaryLogic.pm\r\n- [ ] BloodDonor.pm\r\n- [ ] CalendarToday.pm\r\n- [x] CanadaPost.pm\r\n- [ ] Chess960.pm\r\n- [ ] ChineseZodiac.pm\r\n- [ ] ColorCodes.pm\r\n- [ ] ConvertLatLon.pm\r\n- [ ] CryptHashCheck.pm\r\n- [ ] Cusip.pm\r\n- [ ] Dessert.pm\r\n- [ ] Dewey.pm\r\n- [x] DHL.pm\r\n- [ ] Dice.pm\r\n- [x] FedEx.pm\r\n- [ ] FenViewer.pm\r\n- [ ] FIGlet.pm\r\n- [ ] FrequencySpectrum.pm (this one sorely needs conversion! It should move the styles and scripts into a CSS file and a JavaScript file)\r\n- [ ] GuitarChords.pm\r\n- [ ] HKDK.pm\r\n- [ ] HTMLEntitiesDecode.pm\r\n- [ ] HTMLEntitiesEncode.pm\r\n- [ ] IndependenceDay.pm\r\n- [ ] IPS.pm\r\n- [ ] JsKeycodes.pm ( there is a Spice PR which will convert this to use JS -- technically it could remain a Goodie and do this...)\r\n- [ ] KernelTaint.pm\r\n- [x] LaserShip.pm\r\n- [ ] Latex.pm\r\n- [ ] NameDays.pm\r\n- [x] Parcelforce.pm\r\n- [ ] PercentError.pm\r\n- [ ] PrimeFactors.pm\r\n- [ ] PrivateNetwork.pm\r\n- [ ] ResistorColors.pm\r\n- [ ] ReverseResistorColours.pm\r\n- [ ] RouterPasswords.pm (currently offline -- should be converted to Fathead!)\r\n- [ ] RubiksCubePatterns.pm\r\n- [ ] Shortcut.pm\r\n- [ ] SubnetCalc.pm\r\n- [ ] Sudoku.pm\r\n- [ ] SunInfo.pm\r\n- [ ] Teredo.pm\r\n- [ ] TimezoneConverter.pm\r\n- [ ] UN.pm\r\n- [ ] UnicodeFuzzySearch.pm\r\n- [ ] Unicornify.pm\r\n- [ ] UnixPermissions.pm\r\n- [ ] UnixTime.pm\r\n- [x] UPS.pm\r\n- [ ] Uptime.pm\r\n- [x] USPS.pm\r\n- [ ] VIN.pm\r\n- [ ] Week.pm\r\n\r\n---\r\n\r\nIf you'd like to work on converting any of these, please post below to let us know!\r\n\r\nThanks guys :smile: "},"comment":{"url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/comments/109382353","html_url":"https://github.com/duckduckgo/zeroclickinfo-goodies/issues/1163#issuecomment-109382353","issue_url":"https://api.github.com/repos/duckduckgo/zeroclickinfo-goodies/issues/1163","id":109382353,"user":{"login":"moollaza","id":873785,"avatar_url":"https://avatars.githubusercontent.com/u/873785?v=3","gravatar_id":"","url":"https://api.github.com/users/moollaza","html_url":"https://github.com/moollaza","followers_url":"https://api.github.com/users/moollaza/followers","following_url":"https://api.github.com/users/moollaza/following{/other_user}","gists_url":"https://api.github.com/users/moollaza/gists{/gist_id}","starred_url":"https://api.github.com/users/moollaza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moollaza/subscriptions","organizations_url":"https://api.github.com/users/moollaza/orgs","repos_url":"https://api.github.com/users/moollaza/repos","events_url":"https://api.github.com/users/moollaza/events{/privacy}","received_events_url":"https://api.github.com/users/moollaza/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T18:04:41Z","updated_at":"2015-06-05T18:04:41Z","body":"@phoenixwizard thanks a lot! We really appreciate it :+1: "}}