From 2da22f4a81916c4060fdf0dfd9452ab851bc7938 Mon Sep 17 00:00:00 2001 From: David Liao <35374714+davidycliao@users.noreply.github.com> Date: Sun, 17 Sep 2023 03:32:00 +0100 Subject: [PATCH] UPDATE v0.1.6 --- R/zzz.R | 16 ++++++++-------- _pkgdown.yml | 4 ---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/R/zzz.R b/R/zzz.R index 37332e54..a446bbd7 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -13,7 +13,7 @@ violet <- "\033[35m" reset <- "\033[0m" - # Coloring Taiwan in rainbow colors + # Coloring Taiwan rainbow_taiwan <- paste0( red, "T", orange, "a", @@ -27,16 +27,16 @@ # Creating the first message message1 <- paste0(dark_green, "legis", reset, rainbow_taiwan) - # Maximum allowed length - max_len <- 64 - num_spaces <- max_len - nchar(message1, type = "bytes") - 4 - num_spaces <- max(0, num_spaces) - - message1 <- paste0("## ", message1, rep(" ", num_spaces), " ##") - # Second message message2 <- "## An R package connecting to the Taiwan Legislative API. ##" + # Calculate the required number of spaces to align the two lines + num_spaces <- nchar(message2, type = "bytes") - nchar(message1, type = "bytes") - 6 # -6 to account for the four hashes and two spaces + num_spaces <- max(0, num_spaces) + + message1 <- paste0("## ", message1, rep(" ", num_spaces), " ##") + packageStartupMessage(message1) packageStartupMessage(message2) } + diff --git a/_pkgdown.yml b/_pkgdown.yml index cfb1cced..9d093a09 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -6,16 +6,12 @@ home: links: - text: Discussion href: https://github.com/davidycliao/legisTaiwan/discussions - - text: The Center of Legislative Study at Taiwan SCU 台灣東吳大學國會研究中心 - href: https://twcongress.weebly.com/2228326371360392600924235.html - text: legisCrawler 爬台灣立法委員問政專輯的爬蟲小幫手️🕸️ href: https://davidycliao.github.io/legisCrawler/ - text: "Text and Policy Research Group @ UCD" href: https://text-and-policy.com - text: "The Connected_Politics Lab @ UCD" href: https://www.ucd.ie/connected_politics/ - - text: "legisTaiwan: An Interface to Access Taiwan Legislative API in R" - href: https://davidycliao.github.io/legisTaiwan/ - text: "LACAN: Legislators, Accountability and Collective Agency" href: https://projectlacan.wordpress.com/team/ - text: "ParlSpeech: Legislative Speeches in the Key Parliamentary Democracies"