How to copyright intellectual property
This page is a tutorial of r function or JavaScript that helps make copyrighting intellectual property on a website. It also walks through the file header needed to license property with GNU General Public License.
file name
Copyright year name
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
At the top of all programming files paste the above section and comment it out. I would suggest using GNU General Public License to license your work.
You need to run this function first install.packages("lubridate") or install.packages("tidyverse").
copyright <- function(start, name){
current_year <- lubridate::year(Sys.Date())
if (start < current_year) {str <- glue::glue('{start} - {current_year} -- {name}')}
else if (start == current_year) {str <- glue::glue('{current_year} -- {name}')}
else {str <- 'Time Error'}
pander::pander(glue::glue('<i class="far fa-copyright"></i>{str}'))
}
This function is needs a start year and name pass into the function call.
To calculate current year the lubridate package is used.
let current_year = new Date().getFullYear();
document.getElementById('current_year').textContent = current_year;
This is another to implement the current year code but with JavaScript.
© <span id="current_year"></span> Name
This is the HTML needed to implement the JS code from above.
For attribution, please cite this work as
Tolliver (2021, March 20). Tolli-Coding: Copyright. Retrieved from https://tolli-coding.netlify.app/posts/2021-03-20-copyright/
BibTeX citation
@misc{tolliver2021copyright,
author = {Tolliver, Kyle},
title = {Tolli-Coding: Copyright},
url = {https://tolli-coding.netlify.app/posts/2021-03-20-copyright/},
year = {2021}
}