From 6bfbec9e7c11ba4e96a2856a04a70f0706df505e Mon Sep 17 00:00:00 2001 From: jennybc Date: Sat, 28 Dec 2024 13:41:36 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20tidyvers?= =?UTF-8?q?e/googledrive@3f99766ae70d734ac31a140d3ec7c47623dfc5ae=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/articles/messages-and-errors.html | 14 +- dev/articles/multiple-files.html | 102 +++---- dev/articles/permissions.html | 10 +- dev/pkgdown.yml | 2 +- dev/reference/as_dribble.html | 16 +- dev/reference/dribble-checks.html | 33 +- dev/reference/drive_about.html | 4 +- dev/reference/drive_cp.html | 24 +- dev/reference/drive_create.html | 30 +- dev/reference/drive_get.html | 18 +- dev/reference/drive_id.html | 4 +- dev/reference/drive_link.html | 6 +- dev/reference/drive_mkdir.html | 26 +- dev/reference/drive_mv.html | 22 +- dev/reference/drive_publish.html | 8 +- dev/reference/drive_put.html | 16 +- dev/reference/drive_rename.html | 18 +- dev/reference/drive_reveal.html | 300 +++++++++---------- dev/reference/drive_rm.html | 16 +- dev/reference/drive_share.html | 12 +- dev/reference/drive_trash.html | 48 +-- dev/reference/drive_update.html | 10 +- dev/reference/drive_upload.html | 22 +- dev/reference/googledrive-configuration.html | 14 +- dev/reference/shortcut_create.html | 22 +- dev/reference/shortcut_resolve.html | 48 +-- dev/search.json | 2 +- 27 files changed, 424 insertions(+), 423 deletions(-) diff --git a/dev/articles/messages-and-errors.html b/dev/articles/messages-and-errors.html index aadf583b4..e3f8acfb2 100644 --- a/dev/articles/messages-and-errors.html +++ b/dev/articles/messages-and-errors.html @@ -294,11 +294,11 @@

Programmatic generation of bullets
 dat <- drive_find(n_max = 5)
 gargle_map_cli(dat)
-#> [1] "{.drivepath name-squatter-mv} {cli::col_grey('<id: 1uO2scFVdBjbqijj6LKmg4VkqmsiDHl98>')}"      
-#> [2] "{.drivepath chicken-mv-renamed.txt} {cli::col_grey('<id: 12hT4mQCaA1qTpa8JEC5pCspwSHRp31jJ>')}"
-#> [3] "{.drivepath name-squatter-mv} {cli::col_grey('<id: 1wQOQt5o6mu2qoyWQ_l_67NN1_K06lr6J>')}"      
-#> [4] "{.drivepath chicken-mv-renamed.txt} {cli::col_grey('<id: 1iKe4x3Zgi1PiKukxfxybVvE3Vkn9GIlq>')}"
-#> [5] "{.drivepath name-squatter-mv} {cli::col_grey('<id: 1KzVSgiHO0UXoFBk3hepNrA6PAf9gVWjK>')}"
+#> [1] "{.drivepath name-squatter-mv} {cli::col_grey('<id: 1ffLw3bmeh2x-p83A7DSTZT39Wu2wMEXM>')}" +#> [2] "{.drivepath chicken-mv-renamed.txt} {cli::col_grey('<id: 1nUhjhg-vym4XsvzWoJqSSKBAXBJaJ_Um>')}" +#> [3] "{.drivepath name-squatter-mv} {cli::col_grey('<id: 1uO2scFVdBjbqijj6LKmg4VkqmsiDHl98>')}" +#> [4] "{.drivepath chicken-mv-renamed.txt} {cli::col_grey('<id: 12hT4mQCaA1qTpa8JEC5pCspwSHRp31jJ>')}" +#> [5] "{.drivepath name-squatter-mv} {cli::col_grey('<id: 1wQOQt5o6mu2qoyWQ_l_67NN1_K06lr6J>')}"

gargle_map_cli.dribble() also allows a custom template, but it’s a more complicated and less common situation than for character. We won’t get into that here. (I don’t consider @@ -336,11 +336,11 @@

Programmatic generation of bullets bulletize(gargle_map_cli(dat)) )) #> Some Drive files: +#> • name-squatter-mv <id: 1ffLw3bmeh2x-p83A7DSTZT39Wu2wMEXM> +#> • chicken-mv-renamed.txt <id: 1nUhjhg-vym4XsvzWoJqSSKBAXBJaJ_Um> #> • name-squatter-mv <id: 1uO2scFVdBjbqijj6LKmg4VkqmsiDHl98> #> • chicken-mv-renamed.txt <id: 12hT4mQCaA1qTpa8JEC5pCspwSHRp31jJ> #> • name-squatter-mv <id: 1wQOQt5o6mu2qoyWQ_l_67NN1_K06lr6J> -#> • chicken-mv-renamed.txt <id: 1iKe4x3Zgi1PiKukxfxybVvE3Vkn9GIlq> -#> • name-squatter-mv <id: 1KzVSgiHO0UXoFBk3hepNrA6PAf9gVWjK> #> … and 5 more

It’s conceivable that cli will gain a better way of vectorization, but this works for now.

diff --git a/dev/articles/multiple-files.html b/dev/articles/multiple-files.html index 2d0b2b177..930a4cfab 100644 --- a/dev/articles/multiple-files.html +++ b/dev/articles/multiple-files.html @@ -174,7 +174,7 @@

Upload
 folder <- drive_mkdir("upload-into-me-article-demo")
 #> Created Drive file:
-#> • upload-into-me-article-demo <id: 1i9qaRSKlcgWW3YhFs32Gk8Wbon7exhN->
+#> • upload-into-me-article-demo <id: 1Yi6vwNMQ-HIfNnzssI9YSNJ35mj1U9C3>
 #> With MIME type:
 #> • application/vnd.google-apps.folder
 with_drive_quiet(
@@ -187,13 +187,13 @@ 

Upload #> # A dribble: 7 × 3 #> name id drive_resource #> <chr> <drv_id> <list> -#> 1 r_logo.jpg 1Mj_qzReGo7eeJoJ3RAdg7eu-1GA-KWLg <named list [43]> -#> 2 r_about.html 1bkk9Qio9ZnqrUUaD188R3G3CAWOHlbCq <named list [42]> -#> 3 imdb_latin1.csv 1vGkHgDYbmB7ETqptmciFtisaK_L971DX <named list [41]> -#> 4 chicken.txt 1pjsW0n3Jzdi31MGsuSYTVdNadZyv65po <named list [42]> -#> 5 chicken.pdf 1V-qpjTwq9r9fl2te7BhJd8P2x6tMH1ZQ <named list [42]> -#> 6 chicken.jpg 1moZUbq2wlbl2UKvfFVj1_SV0BRiQv1i3 <named list [43]> -#> 7 chicken.csv 1quBVa-divVH8bEwJ5XNDkXvzr7eT3QjY <named list [41]>

+#> 1 r_logo.jpg 1yoycE7SrO2Y8I2hS8WP3nftSSyvW6UYe <named list [43]> +#> 2 r_about.html 1kYoXJrj0DE_imf80QvG1PY3wxha0wehp <named list [42]> +#> 3 imdb_latin1.csv 1wjU-h0KLaRGmna_tWTvpOv9jpV-PE3yO <named list [42]> +#> 4 chicken.txt 1ga_UKbOwv09-ciBHpL7jpLnGKzKol5WU <named list [42]> +#> 5 chicken.pdf 1o4hgdfR1suD6aEiCOLGi7Oo4Fw1xRWOt <named list [42]> +#> 6 chicken.jpg 1474ADqqhrNiF839UkIAuM0fcLwXE8fdX <named list [43]> +#> 7 chicken.csv 1ZiGUlPAxVpLa_u6xIKym_FMXsdwGLRZ0 <named list [41]>

Now let’s reflect on the files object returned by this operation. files is a list of dribbles, one per uploaded file.

@@ -216,13 +216,13 @@

Upload #> # A dribble: 7 × 3 #> name id drive_resource #> <chr> <drv_id> <list> -#> 1 chicken.csv 1quBVa-divVH8bEwJ5XNDkXvzr7eT3QjY <named list [41]> -#> 2 chicken.jpg 1moZUbq2wlbl2UKvfFVj1_SV0BRiQv1i3 <named list [43]> -#> 3 chicken.pdf 1V-qpjTwq9r9fl2te7BhJd8P2x6tMH1ZQ <named list [41]> -#> 4 chicken.txt 1pjsW0n3Jzdi31MGsuSYTVdNadZyv65po <named list [41]> -#> 5 imdb_latin1.csv 1vGkHgDYbmB7ETqptmciFtisaK_L971DX <named list [41]> -#> 6 r_about.html 1bkk9Qio9ZnqrUUaD188R3G3CAWOHlbCq <named list [41]> -#> 7 r_logo.jpg 1Mj_qzReGo7eeJoJ3RAdg7eu-1GA-KWLg <named list [43]> +#> 1 chicken.csv 1ZiGUlPAxVpLa_u6xIKym_FMXsdwGLRZ0 <named list [41]> +#> 2 chicken.jpg 1474ADqqhrNiF839UkIAuM0fcLwXE8fdX <named list [43]> +#> 3 chicken.pdf 1o4hgdfR1suD6aEiCOLGi7Oo4Fw1xRWOt <named list [41]> +#> 4 chicken.txt 1ga_UKbOwv09-ciBHpL7jpLnGKzKol5WU <named list [41]> +#> 5 imdb_latin1.csv 1wjU-h0KLaRGmna_tWTvpOv9jpV-PE3yO <named list [41]> +#> 6 r_about.html 1kYoXJrj0DE_imf80QvG1PY3wxha0wehp <named list [41]> +#> 7 r_logo.jpg 1yoycE7SrO2Y8I2hS8WP3nftSSyvW6UYe <named list [43]>

Below we show another way to finesse this by using a variant of purrr::map() that does this for us, namely map_dfr().

@@ -237,42 +237,42 @@

Rename new names.

 (new_names <- glue("{Sys.Date()}_{basename(local_files)}"))
-#> 2024-12-27_chicken.csv
-#> 2024-12-27_chicken.jpg
-#> 2024-12-27_chicken.pdf
-#> 2024-12-27_chicken.txt
-#> 2024-12-27_imdb_latin1.csv
-#> 2024-12-27_r_about.html
-#> 2024-12-27_r_logo.jpg
+#> 2024-12-28_chicken.csv
+#> 2024-12-28_chicken.jpg
+#> 2024-12-28_chicken.pdf
+#> 2024-12-28_chicken.txt
+#> 2024-12-28_imdb_latin1.csv
+#> 2024-12-28_r_about.html
+#> 2024-12-28_r_logo.jpg
 files_dribble <- map2_dfr(files, new_names, drive_rename)
 #> Original file:
-#> • chicken.csv <id: 1quBVa-divVH8bEwJ5XNDkXvzr7eT3QjY>
+#> • chicken.csv <id: 1ZiGUlPAxVpLa_u6xIKym_FMXsdwGLRZ0>
 #> Has been renamed:
-#> • 2024-12-27_chicken.csv <id: 1quBVa-divVH8bEwJ5XNDkXvzr7eT3QjY>
+#> • 2024-12-28_chicken.csv <id: 1ZiGUlPAxVpLa_u6xIKym_FMXsdwGLRZ0>
 #> Original file:
-#> • chicken.jpg <id: 1moZUbq2wlbl2UKvfFVj1_SV0BRiQv1i3>
+#> • chicken.jpg <id: 1474ADqqhrNiF839UkIAuM0fcLwXE8fdX>
 #> Has been renamed:
-#> • 2024-12-27_chicken.jpg <id: 1moZUbq2wlbl2UKvfFVj1_SV0BRiQv1i3>
+#> • 2024-12-28_chicken.jpg <id: 1474ADqqhrNiF839UkIAuM0fcLwXE8fdX>
 #> Original file:
-#> • chicken.pdf <id: 1V-qpjTwq9r9fl2te7BhJd8P2x6tMH1ZQ>
+#> • chicken.pdf <id: 1o4hgdfR1suD6aEiCOLGi7Oo4Fw1xRWOt>
 #> Has been renamed:
-#> • 2024-12-27_chicken.pdf <id: 1V-qpjTwq9r9fl2te7BhJd8P2x6tMH1ZQ>
+#> • 2024-12-28_chicken.pdf <id: 1o4hgdfR1suD6aEiCOLGi7Oo4Fw1xRWOt>
 #> Original file:
-#> • chicken.txt <id: 1pjsW0n3Jzdi31MGsuSYTVdNadZyv65po>
+#> • chicken.txt <id: 1ga_UKbOwv09-ciBHpL7jpLnGKzKol5WU>
 #> Has been renamed:
-#> • 2024-12-27_chicken.txt <id: 1pjsW0n3Jzdi31MGsuSYTVdNadZyv65po>
+#> • 2024-12-28_chicken.txt <id: 1ga_UKbOwv09-ciBHpL7jpLnGKzKol5WU>
 #> Original file:
-#> • imdb_latin1.csv <id: 1vGkHgDYbmB7ETqptmciFtisaK_L971DX>
+#> • imdb_latin1.csv <id: 1wjU-h0KLaRGmna_tWTvpOv9jpV-PE3yO>
 #> Has been renamed:
-#> • 2024-12-27_imdb_latin1.csv <id: 1vGkHgDYbmB7ETqptmciFtisaK_L971DX>
+#> • 2024-12-28_imdb_latin1.csv <id: 1wjU-h0KLaRGmna_tWTvpOv9jpV-PE3yO>
 #> Original file:
-#> • r_about.html <id: 1bkk9Qio9ZnqrUUaD188R3G3CAWOHlbCq>
+#> • r_about.html <id: 1kYoXJrj0DE_imf80QvG1PY3wxha0wehp>
 #> Has been renamed:
-#> • 2024-12-27_r_about.html <id: 1bkk9Qio9ZnqrUUaD188R3G3CAWOHlbCq>
+#> • 2024-12-28_r_about.html <id: 1kYoXJrj0DE_imf80QvG1PY3wxha0wehp>
 #> Original file:
-#> • r_logo.jpg <id: 1Mj_qzReGo7eeJoJ3RAdg7eu-1GA-KWLg>
+#> • r_logo.jpg <id: 1yoycE7SrO2Y8I2hS8WP3nftSSyvW6UYe>
 #> Has been renamed:
-#> • 2024-12-27_r_logo.jpg <id: 1Mj_qzReGo7eeJoJ3RAdg7eu-1GA-KWLg>
+#> • 2024-12-28_r_logo.jpg <id: 1yoycE7SrO2Y8I2hS8WP3nftSSyvW6UYe>

We use purrr::map2_dfr() to work through files, the list of dribbles (= Drive files), and new_names, the vector of new names, and row bind the @@ -284,13 +284,13 @@

Rename #> # A dribble: 7 × 3 #> name id drive_resource #> <chr> <drv_id> <list> -#> 1 2024-12-27_r_logo.jpg 1Mj_qzR… <named list [43]> -#> 2 2024-12-27_r_about.html 1bkk9Qi… <named list [42]> -#> 3 2024-12-27_imdb_latin1.csv 1vGkHgD… <named list [41]> -#> 4 2024-12-27_chicken.txt 1pjsW0n… <named list [42]> -#> 5 2024-12-27_chicken.pdf 1V-qpjT… <named list [42]> -#> 6 2024-12-27_chicken.jpg 1moZUbq… <named list [43]> -#> 7 2024-12-27_chicken.csv 1quBVa-… <named list [41]> +#> 1 2024-12-28_r_logo.jpg 1yoycE7… <named list [43]> +#> 2 2024-12-28_r_about.html 1kYoXJr… <named list [42]> +#> 3 2024-12-28_imdb_latin1.csv 1wjU-h0… <named list [42]> +#> 4 2024-12-28_chicken.txt 1ga_UKb… <named list [42]> +#> 5 2024-12-28_chicken.pdf 1o4hgdf… <named list [42]> +#> 6 2024-12-28_chicken.jpg 1474ADq… <named list [43]> +#> 7 2024-12-28_chicken.csv 1ZiGUlP… <named list [41]>

Let’s confirm that, by using map2_df2() instead of map2(), we got a single dribble back, instead of a list of one-row dribbles:

@@ -299,13 +299,13 @@

Rename #> # A dribble: 7 × 3 #> name id drive_resource #> <chr> <drv_id> <list> -#> 1 2024-12-27_chicken.csv 1quBVa-… <named list [41]> -#> 2 2024-12-27_chicken.jpg 1moZUbq… <named list [43]> -#> 3 2024-12-27_chicken.pdf 1V-qpjT… <named list [42]> -#> 4 2024-12-27_chicken.txt 1pjsW0n… <named list [42]> -#> 5 2024-12-27_imdb_latin1.csv 1vGkHgD… <named list [41]> -#> 6 2024-12-27_r_about.html 1bkk9Qi… <named list [42]> -#> 7 2024-12-27_r_logo.jpg 1Mj_qzR… <named list [43]> +#> 1 2024-12-28_chicken.csv 1ZiGUlP… <named list [41]> +#> 2 2024-12-28_chicken.jpg 1474ADq… <named list [43]> +#> 3 2024-12-28_chicken.pdf 1o4hgdf… <named list [42]> +#> 4 2024-12-28_chicken.txt 1ga_UKb… <named list [42]> +#> 5 2024-12-28_imdb_latin1.csv 1wjU-h0… <named list [42]> +#> 6 2024-12-28_r_about.html 1kYoXJr… <named list [42]> +#> 7 2024-12-28_r_logo.jpg 1yoycE7… <named list [43]>

What if you wanted to get a list back, because your downstream operations include yet more map()ing? Then you would use map2().

@@ -330,7 +330,7 @@

Clean up
 drive_rm(folder)
 #> File deleted:
-#> • upload-into-me-article-demo <id: 1i9qaRSKlcgWW3YhFs32Gk8Wbon7exhN->
+#> • upload-into-me-article-demo <id: 1Yi6vwNMQ-HIfNnzssI9YSNJ35mj1U9C3>