Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"ORCID",
"ruleset",
"Rulesets",
"Simulink"
"Simulink",
"Zenodo"
],
"flagWords": [],
"ignorePaths": [
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ message: >-
If you use this software,
please put the copyright NOTICE.txt in your developments
and cite it using metadata in this file.
# doi:
doi: 10.5281/zenodo.15447056
title: "Template GitHub repository for open-source MATLAB"
authors:
- &djmaxus
Expand Down
8 changes: 0 additions & 8 deletions CITATION.cff.template

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
![GitHub Tag](https://img.shields.io/github/v/tag/djmaxus/matlab-repo-init?sort=semver&style=flat&label=version)
![GitHub Release Date](https://img.shields.io/github/release-date/djmaxus/matlab-repo-init?display_date=published_at&style=flat&label=dated)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15447056.svg)](https://doi.org/10.5281/zenodo.15447056)


Quickstart your public MATLAB repository. Batteries included 🔋

Expand Down
15 changes: 10 additions & 5 deletions init.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,19 @@ function set_license(file_name,year,full_name)
end

function reset_cff(first_name,last_name,project_title)
cff_template = read_to_char('CITATION.cff.template');
delete_file('CITATION.cff.template');

reset_file('CITATION.cff', cff_template + ...
reset_file('CITATION.cff', ...
"# https://github.com/citation-file-format/citation-file-format\n" + ...
"cff-version: 1.2.0\n" + ...
"type: software\n" + ...
"message: >-\n" + ...
" If you use this software,\n" + ...
" please put the copyright NOTICE.txt in your developments\n" + ...
" and cite it using metadata in this file.\n" + ...
"title: """ + project_title + """\n" + ...
"authors:\n" + ...
" - family-names: " + last_name + "\n" + ...
" given-names: " + first_name + "\n"...
" given-names: " + first_name + "\n" + ...
"# doi:\n"...
);
end

Expand Down