{"id":18783972,"url":"https://github.com/sparkpost/freemarker-converter-in-c-sharp","last_synced_at":"2025-07-19T02:34:07.950Z","repository":{"id":138516352,"uuid":"111843366","full_name":"SparkPost/FreeMarker-Converter-in-C-Sharp","owner":"SparkPost","description":"A utility to convert FreeMarker templates to SparkPost templates","archived":false,"fork":false,"pushed_at":"2018-03-15T15:57:13.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-12-29T11:49:20.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SparkPost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-23T19:21:10.000Z","updated_at":"2018-03-15T15:57:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"9b932950-9cfe-47a6-a221-eccf87d6994d","html_url":"https://github.com/SparkPost/FreeMarker-Converter-in-C-Sharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2FFreeMarker-Converter-in-C-Sharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2FFreeMarker-Converter-in-C-Sharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2FFreeMarker-Converter-in-C-Sharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2FFreeMarker-Converter-in-C-Sharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SparkPost","download_url":"https://codeload.github.com/SparkPost/FreeMarker-Converter-in-C-Sharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699583,"owners_count":19682575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T20:41:28.732Z","updated_at":"2025-02-19T17:17:22.293Z","avatar_url":"https://github.com/SparkPost.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FreeMarker-Converter-in-C#\n\nFreeMarker template converter utility (C# version)\n\nThis is a utility to convert FreeMarker templates to SparkPost templates.\n* FreeMarker home: http://freemarker.org/ \n* FreeMarker Manual: http://freemarker.org/docs/index.html\n\n== Installation ==\n1) Install Git if it is not already installed\n2) Clone this repo\n3) Place FreeMarker templates for conversion into the INBOX folder\n4) Execute the program.cs script \n5) Collect the converted templates from the OUTBOX folder\n\n\n== Usage ==\n\nIn the sample.fm file inside INBOX, there are two simple substitutions.\n\n${Recipient.lead.firstname[0]!\"\"}  ,  ${Gears.unsubscribe()}\n\nWhen converted to SparkPost template placeholders, they become\n\n{{Recipient.lead.firstname}}  ,  {{Gears.unsubscribe}}\n\n\u003cPRE\u003e\nMore complex conversions are also possible.  The current version will operate on the following:\n - Basic substitutions\n \nlook for these to replace\nFreeMarker support logical operators:\n  Logical or: ||\n  Logical and: \u0026\u0026\n  Logical not: !\n\nThere are FLAGS, INTERPOLATIONS, and COMMENTS to account for.\n  FLAGS = \u003c#action ... \u003e\n  COMMENTS=  \u003c#-- comment --\u003e\n  INTERPOLATION = ${variable}\n\nSamples of FLAGS are:\n\u003c#list ...\u003e\n\u003c#if ...\u003e\nNote that user defined directives are not yet supported.  IE: \u003c@directive ...\u003e will fail\nSamples of INTERPOLATION are:\n  ${Recipient.lead.firstname}\n  ${Gears.unsubscribe()}\n  \n Watch out for character slicing which is not currently supporteed\n IE: ${Recipient.lead.firstname[0]}\n \n Also watch for logical operator, IE:\n  IE: ${Recipient.lead.firstname[0]!\"\"}\n  ^^ in other words, Recipient firstname first character is NOT == \"\"\n  \nTurn \"assignments into substitution vars. IE:  \n  \u003c#assign countrycontact=Recipient.contact.pv_landenid[0]!\"\" /\u003e\n  BECOMES...\n  \"substitution_data\" : {\"countrycontact\" :\"Recipient.contact.pv_landenid\"}\n  \n\u003c/PRE\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Ffreemarker-converter-in-c-sharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparkpost%2Ffreemarker-converter-in-c-sharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Ffreemarker-converter-in-c-sharp/lists"}