Code Monkey home page Code Monkey logo

bookdown.org's Introduction

bookdown.org

Source documents to generate the list of books on the bookdown website https://bookdown.org.

bookdown.org's People

Contributors

actions-user avatar aimergdiaz avatar brshallo avatar cderv avatar colinfay avatar dlebauer avatar dullhunk avatar enriquegit avatar frareb avatar gagolews avatar garrettgman avatar github-actions[bot] avatar gorgens avatar gwmatthews avatar henningsway avatar jacobkap avatar jjallaire avatar johncoene avatar jrafi avatar jweisber avatar kuriwaki avatar nerivo avatar rkabacoff avatar robertschnitman avatar robinlovelace avatar rubenfcasal avatar tcgriffith avatar winterwang avatar yihui avatar zachbogart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bookdown.org's Issues

Enable Travis CI

Generate the posts on Travis to make it easier for me to review pull requests to add new books from external URLs.

Accommodate to bs4_book

For books generated with the bs4_book format, the diffs would look like this:

git diff content/archive/external/adv-r-hadley-nz.md
diff --git a/content/archive/external/adv-r-hadley-nz.md b/content/archive/external/adv-r-hadley-nz.md
index f731283..749ebaf 100644
--- a/content/archive/external/adv-r-hadley-nz.md
+++ b/content/archive/external/adv-r-hadley-nz.md
@@ -1,13 +1,11 @@
 ---
-title: "Advanced R"
+title: "Welcome | Advanced R"
 author: "Hadley Wickham"
 date: ""
 tags: [Advanced R, R Programming]
 link: "https://adv-r.hadley.nz/"
-length_weight: "35%"
-cover: "https://adv-r.hadley.nz/cover.png"
-repo: "hadley/adv-r"
+length_weight: "0%"
 pinned: true
 ---
  1. We probably need to extract the book title after |:
    title = xml_text(title)
    but before doing that, we need a relatively reliable way to tell if the page is generated from bs4_book (i.e., not accidentally truncating titles generated from other formats such as gitbook).
  2. We need to fetch the cover image and Github repo elsewhere (bs4_book may need to write these information to the HTML file if it hasn't already done so).
  3. The book length estimate for gitbook was calculated from the size of search_index.json:
    book_length = function(url) {
    x = httr::headers(httr::HEAD(paste0(url, 'search_index.json')))$`content-length`
    if (length(x) == 0) 0 else as.numeric(x)
    }
    I'm not sure how this should be done for bs4_book (presumably it also has a search index, but I don't know if it's comparable to gitbook's index in terms of file size).
  4. bs4_book doesn't seem to write out the date information.

Automate fetching books and publishing the site

Currently I ran R/create-md.R manually locally to fetch books from bookdown.org and other external sources. Then I inspect the diffs manually, and commit the desired changes. Finally I re-publish the site with R/publish.R manually.

I wish to use GHA to automate both steps. For example, we could use GHA to fetch the books and create a PR each week. Note that this needs caching book data to R/_book_meta.rds to avoid fetching books that haven't been updated since the previous week. Without caching, it will be very time-consuming. I have a local copy of _book_meta.rds here: _book_meta.rds.zip

Support tags

Currently bookdown does not really support tags, so I need to implement it there first, then scrape tags from the HTML pages. Otherwise I may also try to compute tags automatically, which may be inaccurate, though.

Build error : Failed to retrieve package sources for MASS 7.3-60.0.1 from CRAN

Hi, thanks for creating such an amazing bookdown tool. I have been using it these days and have republished a manuscript multiple times with no error. But 2 days ago, I came across an error while republishing my latest writing:

`Installing MASS (7.3-60.0.1) ...
curl: HTTP 200 https://cran.rstudio.com/src/contrib/PACKAGES.rds
curl: HTTP 404 https://cran.rstudio.com/src/contrib/Archive/MASS/MASS_7.3-60.0.1.tar.gz
curl: (22) The requested URL returned error: 404
curl: HTTP 404 https://cran.rstudio.com/src/contrib/Archive/MASS/MASS_7.3-60.0.1.tar.gz
curl: (22) The requested URL returned error: 404
curl: HTTP 404 https://cran.rstudio.com/src/contrib/Archive/MASS/MASS_7.3-60.0.1.tar.gz
curl: (22) The requested URL returned error: 404
curl: HTTP 404 https://cran.rstudio.com/src/contrib/Archive/MASS/MASS_7.3-60.0.1.tar.gz
curl: (22) The requested URL returned error: 404
curl: HTTP 404 https://cran.rstudio.com/src/contrib/Archive/MASS/MASS_7.3-60.0.1.tar.gz
curl: (22) The requested URL returned error: 404
FAILED
Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to retrieve package sources for MASS 7.3-60.0.1 from CRAN (internet connectivity issue?)

Unable to fully restore the R packages associated with this deployment.
Please review the preceding messages to determine which package
encountered installation difficulty and the cause of the failure.`

My R version is 4.3.3 and I have installed the latest MASS package locally but still get the error. I saw a similar issue here. Don't know if it is also a hosting service issue. Can you help me out? Thank you.

Adding published book to main page and removing old url

My book https://bookdown.org/roback/bookdown-BeyondMLR/ was recently published by CRC Press (https://www.routledge.com/Beyond-Multiple-Linear-Regression-Applied-Generalized-Linear-Models-And/Roback-Legler/p/book/9781439885383), and I'm wondering if it could be featured on the bookdown homepage? Its cover image can be found at https://images.routledge.com/common/jackets/amazon/978143988/9781439885383.jpg. Thanks for considering!

One related question... an earlier version of this book was also published on bookdown at https://bookdown.org/roback/bookdown-bysh/ (before the publisher suggested a name change). Is it possible to set up a re-direct from the old version to the new version, or is it cleanest just to delete the old version?

I'm sorry to ask this via Issues - I tried to use a pull request with staging.txt but was not successful...

Build error : Failed to retrieve package sources

Hi, I appreciate your awesome bookdown package.

I have a deployment issue.

I tried to fix this error while 1 week, but I can't find a way to solve this problem.

2 weeks ago, I can deploy my book to the website below.

https://bookdown.org/yuaye_kt/io_methology/

when I deploy my bookdown, there was an error message below.

I didn't use foreign library, but there was a Build error (failed to retrieve package sources).

[Connect] 2021/04/18 08:51:49.500098452 curl: (22) The requested URL returned error: 404 
[Connect] 2021/04/18 08:51:50.568753166 curl: HTTP 404 https://cran.rstudio.com//src/contrib/Archive/foreign/foreign_0.8-81.tar.gz
[Connect] 2021/04/18 08:51:50.568765704 curl: (22) The requested URL returned error: 404 
[Connect] 2021/04/18 08:51:51.576547818 FAILED
[Connect] 2021/04/18 08:51:51.576451572 Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to retrieve package sources for foreign 0.8-81 from CRAN (internet connectivity issue?)
[Connect] 2021/04/18 08:51:51.576471446 
[Connect] 2021/04/18 08:51:51.576523200 Unable to fully restore the R packages associated with this deployment.
[Connect] 2021/04/18 08:51:51.576524686 Please review the preceding messages to determine which package
[Connect] 2021/04/18 08:51:51.576536379 encountered installation difficulty and the cause of the failure.
[Connect] 2021/04/18 08:51:51.584796975 Warning message:
[Connect] 2021/04/18 08:51:51.584974807 In packrat::restore(overwrite.dirty = TRUE, prompt = FALSE, restart = FALSE) :
[Connect] 2021/04/18 08:51:51.584980515   The most recent snapshot was generated using R version 4.0.5
[Connect] 2021/04/18 08:51:51.577409218 Error code: r-package-not-available
[Connect] An R package required by the content cannot be found in the package repository.
[Connect] Possible causes:
[Connect] * The R package being installed is not available for the version of R configured at Connect.
[Connect] * The R package being installed is not available for linux.
[Connect] * The client computer that published the content is using a different package repository from the Connect server, and the R package being installed is not available in the repository configured at the Connect server.
[Connect] * The package repository moved to a new URL after the content was published, and Connect is now attempting to rebuild the environment using the old package repository URL.
[Connect] 
[Connect] Possible solutions:
[Connect] * Install a version of R on the Connect server that matches the one being used by the client computer. You can identify the required R version from the deployment logs, which will contain an entry similar to this:
  > Bundle requested R version 3.5.0; using /usr/lib/R/bin/R which has version 3.4.4
  In this example, the client computer has R 3.5.0 and the Connect server has R version 3.4.4. The recommended solution would be to install R version 3.5.0 on the Connect server alonside the existing 3.4.4 installation.
[Connect] * Replace usage of Windows-specific R packages with ones available for linux.
[Connect] * Configure the client with a package repository that is accessible via http(s) from the Connect server, such as CRAN or RStudio Package Manager. Reinstall the affected packages from the new repository and publish the content again.
[Connect] 
[Connect] References:
[Connect] * https://docs.rstudio.com/connect/admin/getting-started/#installation
[Connect] * https://support.rstudio.com/hc/en-us/articles/360004067074-Managing-Packages-with-RStudio
[Connect] 
[Connect] 2021/04/18 08:51:51.577409218 Additional data:
[Connect] Repository: 'CRAN'
[Connect] Package: 'foreign'
[Connect] PackageVersion: '0.8-81'
[Connect] Found in the following log entry:
[Connect] 2021/04/18 08:51:51.576451572 Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to retrieve package sources for foreign 0.8-81 from CRAN (internet connectivity issue?)
[Connect] Build error: An R package required by the content cannot be found in the package repository. (r-package-not-available)
Site deployment failed with error: An R package required by the content cannot be found in the package repository. (r-package-not-available)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.