Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #31 #33

Merged
merged 3 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 25 additions & 3 deletions _bookdown.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
book_filename: "2021_apis_for_social_scientists_a_collaborative_review"
delete_merged_file: true
book_filename: 2021_apis_for_social_scientists_a_collaborative_review
delete_merged_file: yes
language:
ui:
chapter_name: "Chapter "
chapter_name: 'Chapter '
rmd_files:
- index.Rmd
- Chapter_Introduction.Rmd
- Chapter_Best_practices.Rmd
- Chapter_Ckan_api.Rmd
- Chapter_Crowdtangle_api.Rmd
- Chapter_Facebook_ads_library_api.Rmd
- Chapter_Genderize_api.Rmd
- Chapter_Github_api.Rmd
- Chapter_Google_news_api.Rmd
- Chapter_Google_nlp_api.Rmd
- Chapter_Google_places_api.Rmd
- Chapter_Google_speech.Rmd
- Chapter_Google_translation_api.Rmd
- Chapter_Googletrends_api.Rmd
- Chapter_Instagram_basic_display_api.Rmd
- Chapter_Instagram_graph_api.Rmd
- Chapter_Mediacloud_api.Rmd
- Chapter_Twitter_api.Rmd
- Chapter_Wiki_api.Rmd
- Chapter_Youtube_api.Rmd
- Chapter_References_Appendix.rmd
14 changes: 14 additions & 0 deletions figures/sort_chapters.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
yaml_content <- yaml::read_yaml(here::here("_bookdown.yml"))
all_rmds <- fs::path_file(fs::dir_ls(here::here(), regexp = "^.+\\.[rR]md$"))
index_index <- which(all_rmds == "index.Rmd")
intro_index <- which(grepl("Introduction", all_rmds))
bp_index <- which(grepl("Best_practices", all_rmds))
ref_index <- which(grepl("References_Appendix", all_rmds))

## This step might not be needed because fs::path_file should have returned a sorted list. But for sanity.

sorted_chapters <- sort(all_rmds[setdiff(seq_along(all_rmds), c(index_index, intro_index, bp_index, ref_index))])

rmd_files <- c(all_rmds[index_index], all_rmds[intro_index], all_rmds[bp_index], sorted_chapters, all_rmds[ref_index])
yaml_content$rmd_files <- rmd_files
yaml::write_yaml(yaml_content, here::here("_bookdown.yml"))