Skip to content

Ebook version 0.1, closes #449#458

Closed
elbaulp wants to merge 1 commit intogithub:gh-pagesfrom
elbaulp:ebook-version
Closed

Ebook version 0.1, closes #449#458
elbaulp wants to merge 1 commit intogithub:gh-pagesfrom
elbaulp:ebook-version

Conversation

@elbaulp
Copy link

@elbaulp elbaulp commented Oct 17, 2017

  • Have you followed the contributing guidelines?
  • Have you explained what your changes do, and why they add value to the Guides?

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.

This is a first attempt, the script could be improved.

Copy link
Contributor

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to add CI tests to make sure that this continues to work. As a general comment I think Ruby may be better suited for this than Bash, particularly if we can't use Jekyll to e.g. remove front matter. Thanks for the PR, though!

cd tmp
cp ../../_articles/en-US/*.md .

## Remove the front matter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if Jekyll could be utilised to do this for us?

@@ -0,0 +1,42 @@
#/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#!/bin/bash or #!/usr/bin/env bash would be better here. Would also be good to add a set -e so errors aren't silently ignored.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd even suggest:

#! /usr/bin/env bash

if [ -n "$DEBUG" ]
then
  set -x
fi
set -euo pipefail
# ref: https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail

@@ -0,0 +1,42 @@
#/bin/env bash

# Author: #elbaulp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can skip this; the git log will reveal you are author.

# Generate title
echo """
---
title: Opensource Guide
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open Source Guides

echo """
---
title: Opensource Guide
author: Github
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub and friends

---
title: Opensource Guide
author: Github
rights: Attribution 4.0 International
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creative Commons Attribution 4.0 International

@elbaulp
Copy link
Author

elbaulp commented Oct 18, 2017

Hi @MikeMcQuaid, I don't know Ruby, I could try in python, maybe.

@MikeMcQuaid
Copy link
Contributor

@elbaulp Leaving it in Bash should be fine but I'd rather something like a Rubygem was installed or used in that case rather than manual perl substitutions. Thanks!

@MikeMcQuaid
Copy link
Contributor

Passing on this as there's been no movement in almost 2 months, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants