From b6b6f0294072c9a64a9b2c8f3ea54ff3785ef1c5 Mon Sep 17 00:00:00 2001 From: Wenjie SUN Date: Fri, 9 Aug 2024 15:37:43 +0200 Subject: [PATCH] Update license & version --- DESCRIPTION | 2 +- LICENSE | 23 +++++++++++++++++++++-- LICENSE.md | 21 --------------------- R/lib.R | 13 ++++++++++--- 4 files changed, 32 insertions(+), 27 deletions(-) delete mode 100644 LICENSE.md diff --git a/DESCRIPTION b/DESCRIPTION index 5e0badc..942c05b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ggfigdone Title: Manage & Modify ggplot figures using ggfigdone -Version: 0.0.0.9001 +Version: 0.1.0 Authors@R: person("Wenjie", "SUN", , "sunwjie@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3100-2346")) diff --git a/LICENSE b/LICENSE index c2c2538..b9fdf0e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,2 +1,21 @@ -YEAR: 2024 -COPYRIGHT HOLDER: Wenjie SUN +MIT License + +Copyright (c) 2024 Wenjie SUN + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 42c6b35..0000000 --- a/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# MIT License - -Copyright (c) 2024 Wenjie SUN - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/R/lib.R b/R/lib.R index 827087c..fdf215c 100644 --- a/R/lib.R +++ b/R/lib.R @@ -486,9 +486,16 @@ format.fdObj = function(x, ...) { cat(paste0("## Number of figures: ", length(x$env))) cat("\n") ## Last updated date - cat(paste0("## Last updated date: ")) - cat(as.character(as.POSIXct(max(sapply(x$env, function(x) x$updated_date))))) - cat("\n") + if (length(x$env) == 0) { + cat(paste0("## Last updated date: ")) + cat(as.character(Sys.time())) + cat("\n") + } else { + cat("## Last updated date: ") + cat(format(as.POSIXct(max(sapply(x$env, function(x) x$updated_date))), "%Y-%m-%d %H:%M:%S")) + + cat("\n") + } invisible(x) }