Skip to content

Commit

Permalink
Upgrade Manubot Rootstock version (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhimmel authored Sep 6, 2017
1 parent b5953b1 commit 735128a
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 167 deletions.
14 changes: 13 additions & 1 deletion SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ echo https://github.com/$OWNER/$REPO/settings/keys
```

Manually add `deploy.key.pub` (with write access) to GitHub under the repository's deploy key settings (the URL echoed above).
Give the key a descriptive title, such as "Travis CI Manubot".

For the next step, you need the [Travis command line client](https://github.com/travis-ci/travis.rb) installed.
This program is a Ruby gem:
Expand Down Expand Up @@ -103,6 +104,14 @@ TRAVIS_ENCRYPT_ID=`grep \
sed --in-place "s/f2f00aaf6402/$TRAVIS_ENCRYPT_ID/g" deploy.sh
```

Next, limit [concurrent](https://blog.travis-ci.com/2014-07-18-per-repository-concurrency-setting/) Travis CI jobs to ensure previous builds deploy before subsequent ones begin:

```sh
travis settings \
--repo=$OWNER/$REPO \
maximum_number_of_builds --set 1
```

The continuous integration configuration is now complete.
Clean up:

Expand All @@ -123,11 +132,14 @@ Now update `README.md` files to reference the new repository:
# Perform substitutions
sed --in-place "s/greenelab/$OWNER/g" README.md
sed --in-place "s/manubot-rootstock/$REPO/g" README.md

# Remove deletable content file
git rm content/02.delete-me.md
```

## Finalize

Run `git status` or `git diff` to check that the following files have unstaged changes:
Run `git status` or `git diff --word-diff` to check that the following files have unstaged changes:

+ `README.md`
+ `ci/deploy.key.enc`
Expand Down
193 changes: 37 additions & 156 deletions build/assets/style.csl
Original file line number Diff line number Diff line change
@@ -1,142 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" default-locale="en-GB">
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" default-locale="en-US">
<!-- This style was edited with the Visual CSL Editor (http://editor.citationstyles.org/visualEditor/) -->
<info>
<title>Manubot</title>
<id>http://www.zotero.org/styles/manubot</id>
<link href="http://www.zotero.org/styles/manubot" rel="self"/>
<link href="https://royalsociety.org/journals/authors/author-guidelines/" rel="documentation"/>
<link href="https://github.com/greenelab/manubot-rootstock" rel="documentation"/>
<author>
<name>Josefa Bleu</name>
<email>josefa.bleu@gmail.com</email>
<name>Daniel Himmelstein</name>
<email>daniel.himmelstein@gmail.com</email>
</author>
<contributor>
<name>Michael Berkowitz</name>
<email>[email protected]</email>
</contributor>
<contributor>
<name>Sean Takats</name>
<email>[email protected]</email>
</contributor>
<contributor>
<name>Sebastian Karcher</name>
</contributor>
<contributor>
<name>Michael Doube</name>
<email>[email protected]</email>
</contributor>
<category citation-format="numeric"/>
<category field="biology"/>
<issn>0962-8452</issn>
<eissn>1471-2954</eissn>
<updated>2017-05-24T17:47:27+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
<updated>2017-09-04T20:54:02+00:00</updated>
<rights license="https://creativecommons.org/publicdomain/zero/1.0/legalcode">This work is dedicated to the public domain via CC0 1.0</rights>
</info>
<locale>
<terms>
<term name="accessed">accessed on</term>
<term name="edition" form="short">edn</term>
</terms>
</locale>
<macro name="author">
<names variable="author" suffix=". ">
<name sort-separator=" " initialize-with="" name-as-sort-order="all" delimiter=", " delimiter-precedes-last="never" et-al-min="10" et-al-use-first="1"/>
<et-al font-style="italic"/>
<label form="long" prefix=", "/>
<substitute>
<names variable="editor"/>
</substitute>
<names variable="author">
<name initialize="false" initialize-with="" et-al-min="12" et-al-use-first="10" et-al-use-last="true"/>
</names>
</macro>
<macro name="editor">
<names variable="editor" prefix="(" suffix=")">
<label form="short" suffix=" " strip-periods="true"/>
<name sort-separator=" " initialize-with="" delimiter=", " delimiter-precedes-last="never"/>
</names>
</macro>
<macro name="publisher">
<group delimiter=": " suffix=". ">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
</macro>
<macro name="journal-title">
<macro name="venue">
<choose>
<if type="article-journal article-magazine" match="any">
<group suffix=" ">
<text variable="container-title" form="short" font-style="italic"/>
</group>
<if match="any" variable="container-title">
<text variable="container-title"/>
</if>
<else-if type="article-newspaper">
<group delimiter=", " suffix=". ">
<text variable="container-title" form="short" font-style="italic"/>
<date variable="issued">
<date-part name="day" suffix=" "/>
<date-part name="month"/>
</date>
</group>
<else-if match="any" variable="container-title-short">
<text variable="container-title-short"/>
</else-if>
<else-if match="any" variable="publisher">
<text variable="publisher"/>
</else-if>
<else-if match="any" variable="collection-title">
<text variable="collection-title"/>
</else-if>
<else>
<text variable="container-title" suffix=". " form="short" font-style="italic"/>
</else>
</choose>
</macro>
<macro name="title">
<group delimiter=" ">
<choose>
<if type="book">
<text variable="title" font-style="italic"/>
</if>
<else>
<text variable="title"/>
</else>
</choose>
</group>
</macro>
<macro name="edition">
<choose>
<if is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="short" suffix="."/>
</group>
</if>
<else>
<text variable="edition" suffix="."/>
</else>
</choose>
</macro>
<macro name="issued">
<choose>
<if variable="issued">
<date variable="issued">
<date-part name="year" suffix=" "/>
</date>
</if>
<else>
<text term="in press" suffix=". " text-case="capitalize-first"/>
</else>
</choose>
</macro>
<macro name="access">
<choose>
<if variable="URL">
<group suffix=".">
<choose>
<if type="webpage">
<group prefix=" (" delimiter=" " suffix=")">
<text term="accessed"/>
<date variable="accessed">
<date-part name="day" suffix=" "/>
<date-part name="month" suffix=" "/>
<date-part name="year"/>
</date>
</group>
</if>
</choose>
<text variable="URL" prefix=" See "/>
</group>
</if>
</choose>
</macro>
<citation collapse="citation-number">
Expand All @@ -147,38 +42,24 @@
<text variable="citation-number"/>
</layout>
</citation>
<bibliography second-field-align="flush" et-al-min="11" et-al-use-first="10">
<bibliography hanging-indent="true" second-field-align="margin">
<layout>
<text variable="citation-number" suffix="."/>
<text macro="author"/>
<text macro="issued"/>
<text macro="title" suffix=". "/>
<choose>
<if type="book">
<text macro="edition" prefix=" " suffix=" "/>
<text macro="publisher"/>
</if>
<else-if type="chapter paper-conference" match="any">
<group prefix=" " delimiter=" " suffix=", ">
<text term="in" text-case="capitalize-first"/>
<text variable="container-title" font-style="italic"/>
<text macro="editor"/>
</group>
<group prefix=" " delimiter=" " suffix=".">
<label variable="page" form="short"/>
<text variable="page"/>
</group>
<text macro="publisher" prefix=" "/>
</else-if>
<else>
<text macro="journal-title"/>
<group suffix=". ">
<text variable="volume" font-weight="bold"/>
<text variable="page" prefix=", "/>
</group>
</else>
</choose>
<text macro="access"/>
<text variable="citation-number" suffix=". "/>
<group>
<text variable="title" font-weight="bold"/>
</group>
<group display="block">
<text macro="author"/>
</group>
<group delimiter=" ">
<text macro="venue" font-style="italic"/>
<date variable="issued" prefix="(" suffix=")">
<date-part name="year"/>
<date-part name="month" form="numeric-leading-zeros" prefix="-"/>
<date-part name="day" form="numeric-leading-zeros" prefix="-"/>
</date>
<text variable="URL"/>
</group>
</layout>
</bibliography>
</style>
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ manubot \
--log-level=INFO

# pandoc settings
CSL_PATH=https://github.com/dhimmel/manubot-rootstock/raw/5f01555cd81f67591de271bfb564487c65ca3313/build/assets/style.csl
CSL_PATH=build/assets/style.csl
DOCX_PATH=build/assets/pandoc-reference.docx
BIBLIOGRAPHY_PATH=output/references.json
INPUT_PATH=output/manuscript.md
Expand Down
2 changes: 1 addition & 1 deletion build/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- pip:
- errorhandler==2.0.1
- ghp-import==0.5.5
- git+https://github.com/dhimmel/manubot@03020da42f72fdaa05fceae2995a47a49a7823fb
- git+https://github.com/greenelab/manubot@367f0b5c8046e5ce2f1e5a0ef555ec29a4aefd59
- opentimestamps-client==0.5.0
- opentimestamps==0.1.0
- pandoc-eqnos==0.16
Expand Down
3 changes: 3 additions & 0 deletions content/99.back-matter.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
## References {.page_break_before}

<!-- Explicitly insert bibliography here -->
<div id="refs"></div>
18 changes: 10 additions & 8 deletions webpage/github-pandoc.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* From https://gist.github.com/dashed/6714393 with Manubot modifications */

/*! normalize.css v2.1.3 | MIT License | git.io/normalize */

/* ==========================================================================
Expand Down Expand Up @@ -453,14 +455,14 @@ table {
}

.go-top {
position: fixed;
bottom: 2em;
right: 2em;
text-decoration: none;
background-color: #E0E0E0;
font-size: 12px;
padding: 1em;
display: inline;
position: fixed;
bottom: 2em;
right: 2em;
text-decoration: none;
background-color: #E0E0E0;
font-size: 12px;
padding: 1em;
display: inline;
}

/* Github css */
Expand Down

0 comments on commit 735128a

Please sign in to comment.