Package: md-footer
md-footermd-footeris a simple, yet powerful command-line tool designed to manage Markdown footers across multiple documents. Born out of the need for consistent footer content in Markdown files, this tool provides an easy way to append predefined footers, including social media links, contact information, and more, to your Markdown documents.This is just a quick and easy project, will be adding more features soon if someone interested in it.Table of Contentsmd-footerTable of ContentsInstallationGetting StartedTemplatesCreating a New TemplateDeleting a TemplateListing TemplatesVariablesSetting a VariableVariable Format in TemplatesVariables File FormatListing VariablesAppending Footer to Markdown FilesLoading Variables from a JSON FileReal-World ExamplesContributionLicenseMy links (added by md-footer :D)Installationmd-footercan be installed using pip. Ensure you have Python 3.6 or higher installed on your system.To installmd-footer, run:pip install md-footerGetting StartedAfter installingmd-footer, you can begin setting up templates and variables to customize your footers.TemplatesAtemplateis a Markdown file that serves as a blueprint for the footer to be appended. It can include static text and placeholders for variables.Creating a New TemplateTo add a new template:md-footer add <template-file-path> [template-name]Iftemplate-nameis not provided, the file name is used as the template name.Deleting a TemplateTo delete an existing template:md-footer remove <template-name>Listing TemplatesTo list all available templates:md-footer templatesBy default, you can use thedefault.mdtemplate that comes withmd-footer. This template includes a sample footer with contact information and social media links. So you can use it by running:md-footer run <markdown-file-path> -t defaultVariablesVariables are placeholders in a template that get replaced with their set values.Setting a VariableSet a variable using:md-footer var <variable-name> <value>Example:md-footer var email "example@email.com"Variable Format in TemplatesIn templates, variables are denoted by curly braces:{variable_name}For example,{email}in a template will be replaced with the value of theemailvariable.Variables File FormatThevars.jsonfile is a JSON formatted file where variable values are defined. Example:{"email":"example@email.com","twitter":"@exampleTwitter","website":"https://example.com"}Listing VariablesTo list all variables and their values:md-footer list-varsThis command displays all the variables currently stored and their associated values, which are used when templates are processed.
By default arecurrent_dateandcurrent_timevariables are set to the current date and time respectively.Appending Footer to Markdown FilesTo append a footer to a Markdown file:md-footer run <markdown-file-path> -t [template-name]Iftemplate-nameis not provided, the default template is used.Loading Variables from a JSON FileTo load variables from a JSON file:md-footer load-vars <json-file-path>Real-World ExamplesConsistent Footers in Project Documentation: Maintain consistent footer sections in GitHub READMEs with updated contact information and links.Automating Blog Post Footers: Quickly append a standard footer with author info and calls to action in Markdown-based blog posts.Educational Content and Course Notes: Append additional resources and contact information to educational materials and notes.ContributionContributions tomd-footerare welcome! Feel free to fork the repository, make changes, and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.Licensemd-footeris released under the MIT License. See theLICENSEfile for more details.My links (added by md-footer :D)WebsiteGitHubTwitterMediumEmailBuy me a coffee ❤️