{"action":"created","issue":{"url":"https://api.github.com/repos/openstax/cnx-recipes/issues/1039","repository_url":"https://api.github.com/repos/openstax/cnx-recipes","labels_url":"https://api.github.com/repos/openstax/cnx-recipes/issues/1039/labels{/name}","comments_url":"https://api.github.com/repos/openstax/cnx-recipes/issues/1039/comments","events_url":"https://api.github.com/repos/openstax/cnx-recipes/issues/1039/events","html_url":"https://github.com/openstax/cnx-recipes/pull/1039","id":437084861,"node_id":"MDExOlB1bGxSZXF1ZXN0MjczNDM0NjAw","number":1039,"title":"Baked pdf CLI","user":{"login":"karenc","id":153353,"node_id":"MDQ6VXNlcjE1MzM1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/153353?v=4","gravatar_id":"","url":"https://api.github.com/users/karenc","html_url":"https://github.com/karenc","followers_url":"https://api.github.com/users/karenc/followers","following_url":"https://api.github.com/users/karenc/following{/other_user}","gists_url":"https://api.github.com/users/karenc/gists{/gist_id}","starred_url":"https://api.github.com/users/karenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karenc/subscriptions","organizations_url":"https://api.github.com/users/karenc/orgs","repos_url":"https://api.github.com/users/karenc/repos","events_url":"https://api.github.com/users/karenc/events{/privacy}","received_events_url":"https://api.github.com/users/karenc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"karenc","id":153353,"node_id":"MDQ6VXNlcjE1MzM1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/153353?v=4","gravatar_id":"","url":"https://api.github.com/users/karenc","html_url":"https://github.com/karenc","followers_url":"https://api.github.com/users/karenc/followers","following_url":"https://api.github.com/users/karenc/following{/other_user}","gists_url":"https://api.github.com/users/karenc/gists{/gist_id}","starred_url":"https://api.github.com/users/karenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karenc/subscriptions","organizations_url":"https://api.github.com/users/karenc/orgs","repos_url":"https://api.github.com/users/karenc/repos","events_url":"https://api.github.com/users/karenc/events{/privacy}","received_events_url":"https://api.github.com/users/karenc/received_events","type":"User","site_admin":false},"assignees":[{"login":"karenc","id":153353,"node_id":"MDQ6VXNlcjE1MzM1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/153353?v=4","gravatar_id":"","url":"https://api.github.com/users/karenc","html_url":"https://github.com/karenc","followers_url":"https://api.github.com/users/karenc/followers","following_url":"https://api.github.com/users/karenc/following{/other_user}","gists_url":"https://api.github.com/users/karenc/gists{/gist_id}","starred_url":"https://api.github.com/users/karenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karenc/subscriptions","organizations_url":"https://api.github.com/users/karenc/orgs","repos_url":"https://api.github.com/users/karenc/repos","events_url":"https://api.github.com/users/karenc/events{/privacy}","received_events_url":"https://api.github.com/users/karenc/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/openstax/cnx-recipes/milestones/57","html_url":"https://github.com/openstax/cnx-recipes/milestone/57","labels_url":"https://api.github.com/repos/openstax/cnx-recipes/milestones/57/labels","id":4039663,"node_id":"MDk6TWlsZXN0b25lNDAzOTY2Mw==","number":57,"title":"CNX 2019 Q2","description":"","creator":{"login":"brittweinstein","id":12631203,"node_id":"MDQ6VXNlcjEyNjMxMjAz","avatar_url":"https://avatars3.githubusercontent.com/u/12631203?v=4","gravatar_id":"","url":"https://api.github.com/users/brittweinstein","html_url":"https://github.com/brittweinstein","followers_url":"https://api.github.com/users/brittweinstein/followers","following_url":"https://api.github.com/users/brittweinstein/following{/other_user}","gists_url":"https://api.github.com/users/brittweinstein/gists{/gist_id}","starred_url":"https://api.github.com/users/brittweinstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brittweinstein/subscriptions","organizations_url":"https://api.github.com/users/brittweinstein/orgs","repos_url":"https://api.github.com/users/brittweinstein/repos","events_url":"https://api.github.com/users/brittweinstein/events{/privacy}","received_events_url":"https://api.github.com/users/brittweinstein/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2019-02-07T18:32:00Z","updated_at":"2019-05-23T16:57:51Z","due_on":"2019-06-30T07:00:00Z","closed_at":null},"comments":20,"created_at":"2019-04-25T09:00:47Z","updated_at":"2019-05-23T18:56:24Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/openstax/cnx-recipes/pulls/1039","html_url":"https://github.com/openstax/cnx-recipes/pull/1039","diff_url":"https://github.com/openstax/cnx-recipes/pull/1039.diff","patch_url":"https://github.com/openstax/cnx-recipes/pull/1039.patch"},"body":"This is the baked pdf CLI branch.  These are the instructions for setting up the CLI (will be updated as the code gets updated):\r\n\r\n1. If you're concerned about messing up your work directory, feel free to clone this in a different directory:\r\n\r\n   ```\r\n   git clone -b cli-master https://github.com/openstax/cnx-recipes.git cnx-recipes-cli\r\n   cd cnx-recipes-cli\r\n   ```\r\n\r\n1. Install docker and docker-compose (docker-compose may already be bundled with docker):\r\n\r\n   ```\r\n   ./script/install-docker\r\n   ```\r\n\r\n   This should work for people using ubuntu and brew on Mac OS. For everyone else, you probably need to download docker here: https://www.docker.com/products/docker-desktop\r\n\r\n   There is no need to run other setup scripts.\r\n\r\n1. Remove any outdated docker images (this step only needs to be done once in a while when the code is stable):\r\n\r\n   ```\r\n   docker rmi openstax/cnx-recipes:latest openstax/ci-image:latest openstax/princexml:latest openstax/mathify:latest\r\n   ```\r\n\r\n   It is ok if this command returns `Error: No such image:`.\r\n\r\n   1. Rebuild docker images (this step takes some time):\r\n\r\n      ```\r\n      docker-compose build fetch-book neb mathify pdf\r\n      ```\r\n\r\n---\r\n\r\nThese are the instructions for running the CLI (will be updated as the code gets updated):\r\n\r\n1. Fetch a book:\r\n\r\n   ```\r\n   docker-compose run --rm fetch-book --with-resources intro-business\r\n   ```\r\n\r\n   This downloads the cnxml and resources for the book in `./data/intro-business/raw`.\r\n\r\n   1. If you want to download from a specific host:\r\n\r\n      ```\r\n      docker-compose run --rm -e HOST=katalyst01.cnx.org fetch-book --with-resources intro-business\r\n      ```\r\n\r\n1. Generate the single html file for the book:\r\n\r\n   ```\r\n   docker-compose run --rm assemble-book intro-business\r\n   ```\r\n\r\n     The output is in `./data/intro-business/collection.assembled.xhtml`.\r\n\r\n1. Bake the book:\r\n\r\n   ```\r\n   docker-compose run --rm bake-book intro-business\r\n   ```\r\n\r\n   This creates the baked html file in `./data/intro-business/collection.baked.xhtml`.  It automatically adds the style file `styles/output/<style-name>-pdf.css` to the html file.\r\n\r\n   1. If you want to specify your own recipe and / or style css:\r\n\r\n      ```\r\n      docker-compose run --rm -e RECIPE=recipes/output/my-recipe.css -e STYLE=styles/output/my-style.css bake-book intro-business\r\n      ``` \r\n\r\n1. (*Optional*) Transform the math in the book:\r\n\r\n   ```\r\n   docker-compose run --rm mathify-book intro-business\r\n   ```\r\n\r\n   This creates `./data/intro-business/collection.mathified.xhtml`.\r\n\r\n1. Create a pdf for the book:\r\n\r\n   ```\r\n   docker-compose run --rm build-pdf intro-business\r\n   ```\r\n\r\n   This creates `./data/intro-business/collection.pdf`.  It automatically pulls in the style file `styles/output/<style-name>-pdf.css` if it is defined in books.txt.\r\n\r\n   1. If you want to pass in a different style css:\r\n\r\n      ```\r\n      docker-compose run --rm -e STYLE=recipes/output/my-style.css build-pdf intro-business\r\n      ```\r\n\r\n---\r\n\r\nI'll rebase and fix up the commits when people have tried out the CLI."},"comment":{"url":"https://api.github.com/repos/openstax/cnx-recipes/issues/comments/495342474","html_url":"https://github.com/openstax/cnx-recipes/pull/1039#issuecomment-495342474","issue_url":"https://api.github.com/repos/openstax/cnx-recipes/issues/1039","id":495342474,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5NTM0MjQ3NA==","user":{"login":"karenc","id":153353,"node_id":"MDQ6VXNlcjE1MzM1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/153353?v=4","gravatar_id":"","url":"https://api.github.com/users/karenc","html_url":"https://github.com/karenc","followers_url":"https://api.github.com/users/karenc/followers","following_url":"https://api.github.com/users/karenc/following{/other_user}","gists_url":"https://api.github.com/users/karenc/gists{/gist_id}","starred_url":"https://api.github.com/users/karenc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karenc/subscriptions","organizations_url":"https://api.github.com/users/karenc/orgs","repos_url":"https://api.github.com/users/karenc/repos","events_url":"https://api.github.com/users/karenc/events{/privacy}","received_events_url":"https://api.github.com/users/karenc/received_events","type":"User","site_admin":false},"created_at":"2019-05-23T18:56:24Z","updated_at":"2019-05-23T18:56:24Z","author_association":"MEMBER","body":"The baked pdf CLI has been given the go-ahead by the books team.  I'm just going to clean up the commits and when it's ready, change it to ready for review (not work in progress)."}}
{"actor":{"display_login":"karenc"}}