├── .appveyor.yml ├── .github └── workflows │ ├── ai-revision.yaml │ └── manubot.yaml ├── .gitignore ├── LICENSE-CC0.md ├── LICENSE.md ├── README.md ├── USAGE.md ├── build ├── README.md ├── assets │ ├── custom-dictionary.txt │ └── style.csl ├── autobuild.sh ├── build.sh ├── environment.yml ├── pandoc │ └── defaults │ │ ├── common.yaml │ │ ├── docx.yaml │ │ ├── html.yaml │ │ ├── latex.yaml │ │ └── pdf-weasyprint.yaml ├── plugins │ ├── accordion.html │ ├── analytics.html │ ├── anchors.html │ ├── attributes.html │ ├── core.html │ ├── d3.html │ ├── hypothesis.html │ ├── inline-svg.html │ ├── jump-to-first.html │ ├── lightbox.html │ ├── link-highlight.html │ ├── mathjax.html │ ├── scite.html │ ├── table-of-contents.html │ └── tooltips.html └── themes │ ├── default.docx │ ├── default.html │ └── nih-grant.docx ├── ci ├── .gitignore ├── README.md ├── ai-revision-config.yaml ├── ai-revision-prompts.yaml ├── deploy.sh ├── install-spellcheck.sh └── install.sh ├── content ├── 00.front-matter.md ├── 01.abstract.md ├── 02.main-text.md ├── 90.back-matter.md ├── images │ ├── github.svg │ ├── mastodon.svg │ ├── orcid.svg │ └── twitter.svg ├── manual-references.bib ├── manual-references.json └── metadata.yaml ├── output └── README.md ├── setup.bash ├── thumbnail.png └── webpage ├── README.md ├── images ├── index.html └── manuscript.pdf /.appveyor.yml: -------------------------------------------------------------------------------- 1 | # See https://www.appveyor.com/docs/getting-started-with-appveyor-for-linux/ 2 | # Don't build branches with a PR, since their build will be created with the PR itself. 3 | # Otherwise there would be two builds -- one for the PR and one for the branch. 4 | # If you're having issues with getting your PR to build, make sure there are no merge conflicts. 5 | skip_branch_with_pr: true 6 | 7 | # Enable 'Do not build on "Push" events' in the AppVeyor project settings 8 | # to only build commits from pull requests 9 | branches: 10 | only: 11 | - main 12 | - master 13 | 14 | # Only run AppVeyor on commits that modify at least one of the following files 15 | # Delete these lines to run AppVeyor on all main/master branch commits 16 | only_commits: 17 | files: 18 | - .appveyor.yml 19 | - build/ 20 | - ci/install.sh 21 | - content/ 22 | 23 | image: ubuntu2204 24 | services: 25 | - docker 26 | 27 | # Set SPELLCHECK to true to enable Pandoc spellchecking 28 | environment: 29 | SPELLCHECK: true 30 | 31 | install: 32 | # Create the message with the triggering commit before install so it is 33 | # available if the build fails 34 | - TRIGGERING_COMMIT=${APPVEYOR_PULL_REQUEST_HEAD_COMMIT:-APPVEYOR_REPO_COMMIT} 35 | - JOB_MESSAGE=" for commit $TRIGGERING_COMMIT " 36 | - source ci/install.sh 37 | 38 | test_script: 39 | - bash build/build.sh 40 | - MANUSCRIPT_FILENAME=manuscript-$APPVEYOR_BUILD_VERSION-${TRIGGERING_COMMIT:0:7} 41 | - cp output/manuscript.html $MANUSCRIPT_FILENAME.html 42 | - cp output/manuscript.pdf $MANUSCRIPT_FILENAME.pdf 43 | - appveyor PushArtifact $MANUSCRIPT_FILENAME.html 44 | - appveyor PushArtifact $MANUSCRIPT_FILENAME.pdf 45 | - | 46 | if [ "${SPELLCHECK:-}" = "true" ]; then 47 | SPELLING_ERRORS_FILENAME=spelling-errors-$APPVEYOR_BUILD_VERSION-${TRIGGERING_COMMIT:0:7}.txt 48 | cp output/spelling-errors.txt $SPELLING_ERRORS_FILENAME 49 | appveyor PushArtifact $SPELLING_ERRORS_FILENAME 50 | SPELLING_ERROR_LOCATIONS_FILENAME=spelling-error-locations-$APPVEYOR_BUILD_VERSION-${TRIGGERING_COMMIT:0:7}.txt 51 | cp output/spelling-error-locations.txt $SPELLING_ERROR_LOCATIONS_FILENAME 52 | appveyor PushArtifact $SPELLING_ERROR_LOCATIONS_FILENAME 53 | fi 54 | 55 | build: off 56 | 57 | cache: 58 | - ci/cache 59 | 60 | on_success: 61 | - echo "Artifacts available from $APPVEYOR_URL/project/$APPVEYOR_ACCOUNT_NAME/$APPVEYOR_PROJECT_SLUG/builds/$APPVEYOR_BUILD_ID/artifacts" 62 | - echo "Updated PDF available from $APPVEYOR_URL/api/buildjobs/$APPVEYOR_JOB_ID/artifacts/$MANUSCRIPT_FILENAME.pdf" 63 | - appveyor AddMessage "$JOB_MESSAGE is now complete." 64 | - | 65 | if [ "${SPELLCHECK:-}" = "true" ]; then 66 | SPELLING_ERROR_COUNT=($(wc -l $SPELLING_ERROR_LOCATIONS_FILENAME)) 67 | appveyor AddMessage "
Found $SPELLING_ERROR_COUNT potential spelling error(s). Preview:$(head -n 100 $SPELLING_ERROR_LOCATIONS_FILENAME)" 68 | appveyor AddMessage "...
" 69 | fi 70 | 71 | on_failure: 72 | - appveyor AddMessage "$JOB_MESSAGE failed." 73 | 74 | # The following lines can be safely deleted, which will disable AppVeyorBot 75 | # notifications in GitHub pull requests 76 | # Notifications use Mustache templates http://mustache.github.io/mustache.5.html 77 | # See https://www.appveyor.com/docs/notifications/#customizing-message-template 78 | # for available variables 79 | notifications: 80 | - provider: GitHubPullRequest 81 | template: "AppVeyor [build {{buildVersion}}]({{buildUrl}}) 82 | {{#jobs}}{{#messages}}{{{message}}}{{/messages}}{{/jobs}} 83 | {{#passed}}The rendered manuscript from this build is temporarily available for download at:\n\n 84 | {{#jobs}}{{#artifacts}}- [`{{fileName}}`]({{permalink}})\n{{/artifacts}}{{/jobs}}{{/passed}}" 85 | -------------------------------------------------------------------------------- /.github/workflows/ai-revision.yaml: -------------------------------------------------------------------------------- 1 | name: ai-revision 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | branch: 6 | description: 'Branch to revise' 7 | required: true 8 | type: string 9 | default: 'main' 10 | file_names: 11 | description: 'File names to revise' 12 | required: false 13 | type: string 14 | default: '' 15 | model: 16 | description: 'Language model' 17 | required: true 18 | type: string 19 | default: 'gpt-4-turbo' 20 | custom_prompt: 21 | description: 'Custom prompt' 22 | required: false 23 | type: string 24 | default: '' 25 | branch_name: 26 | description: 'Output branch' 27 | required: true 28 | type: string 29 | default: 'ai-revision-gpt4turbo' 30 | 31 | jobs: 32 | ai-revise: 33 | name: AI Revise 34 | runs-on: ubuntu-latest 35 | permissions: 36 | contents: write 37 | pull-requests: write 38 | defaults: 39 | run: 40 | shell: bash --login {0} 41 | steps: 42 | - name: Checkout Repo 43 | uses: actions/checkout@v4 44 | with: 45 | ref: ${{ inputs.branch }} 46 | - name: Install environment 47 | uses: actions/setup-python@v5 48 | with: 49 | python-version: '3.11' 50 | - name: Install Manubot AI revision dependencies 51 | run: | 52 | # install using the same URL used for manubot in build/environment.yml 53 | manubot_line=$(grep "github.com/manubot/manubot" build/environment.yml) 54 | manubot_url=$(echo "$manubot_line" | awk -F"- " '{print $2}') 55 | 56 | pip install ${manubot_url}#egg=manubot[ai-rev] 57 | - name: Revise manuscript 58 | env: 59 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} 60 | AI_EDITOR_LANGUAGE_MODEL: ${{ inputs.model }} 61 | AI_EDITOR_FILENAMES_TO_REVISE: ${{ inputs.file_names }} 62 | AI_EDITOR_CUSTOM_PROMPT: ${{ inputs.custom_prompt }} 63 | # More variables can be specified to control the behavior of the model: 64 | # https://github.com/manubot/manubot-ai-editor/blob/main/libs/manubot_ai_editor/env_vars.py 65 | run: manubot ai-revision --content-directory content/ --config-directory ci/ 66 | - name: Create Pull Request 67 | uses: peter-evans/create-pull-request@v6 68 | with: 69 | commit-message: 'revise using AI model\n\nUsing the OpenAI model ${{ inputs.model }}' 70 | title: 'AI-based revision using ${{ inputs.model }}' 71 | author: OpenAI model ${{ inputs.model }} 72 | add-paths: | 73 | content/*.md 74 | branch: ${{ inputs.branch_name }} 75 | draft: true 76 | -------------------------------------------------------------------------------- /.github/workflows/manubot.yaml: -------------------------------------------------------------------------------- 1 | name: Manubot 2 | on: 3 | push: 4 | branches: 5 | - main 6 | - master 7 | pull_request: 8 | branches: 9 | - main 10 | - master 11 | # NOTE: scheduled workflows are supported as of 2022-09-27 (example commented below) 12 | # https://github.com/community/community/discussions/12269#discussioncomment-3747667 13 | # scheduled: 14 | # - cron: '40 10 1 * *' # https://crontab.guru/#40_10_1_*_* 15 | workflow_dispatch: 16 | inputs: 17 | BUILD_PDF: 18 | type: boolean 19 | description: generate PDF output 20 | default: true 21 | BUILD_DOCX: 22 | type: boolean 23 | description: generate DOCX output 24 | default: false 25 | BUILD_LATEX: 26 | type: boolean 27 | description: generate LaTeX output 28 | default: false 29 | SPELLCHECK: 30 | type: boolean 31 | description: Check spelling 32 | default: true 33 | MANUBOT_USE_DOCKER: 34 | type: boolean 35 | description: Use Docker to generate PDF 36 | default: true 37 | jobs: 38 | manubot: 39 | name: Manubot 40 | runs-on: ubuntu-latest 41 | permissions: 42 | contents: write 43 | env: 44 | GITHUB_PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} 45 | # Set SPELLCHECK to true/false for whether to check spelling in this action. 46 | # For workflow dispatch jobs, this SPELLCHECK setting will be overridden by the user input. 47 | SPELLCHECK: true 48 | defaults: 49 | run: 50 | shell: bash --login {0} 51 | steps: 52 | - name: Checkout Repository 53 | uses: actions/checkout@v4 54 | with: 55 | # fetch entire commit history to support get_rootstock_commit 56 | fetch-depth: 0 57 | - name: Set Environment Variables (Workflow Dispatch) 58 | if: github.event_name == 'workflow_dispatch' 59 | run: | 60 | echo "BUILD_PDF=${{ github.event.inputs.BUILD_PDF }}" >> $GITHUB_ENV 61 | echo "BUILD_DOCX=${{ github.event.inputs.BUILD_DOCX }}" >> $GITHUB_ENV 62 | echo "BUILD_LATEX=${{ github.event.inputs.BUILD_LATEX }}" >> $GITHUB_ENV 63 | echo "SPELLCHECK=${{ github.event.inputs.SPELLCHECK }}" >> $GITHUB_ENV 64 | echo "MANUBOT_USE_DOCKER=${{ github.event.inputs.MANUBOT_USE_DOCKER }}" >> $GITHUB_ENV 65 | - name: Set Environment Variables 66 | run: | 67 | TRIGGERING_SHA=${GITHUB_PULL_REQUEST_SHA:-$GITHUB_SHA} 68 | echo "TRIGGERING_SHA_7=${TRIGGERING_SHA::7}" >> $GITHUB_ENV 69 | echo "TRIGGERING_SHA: $TRIGGERING_SHA" 70 | DEFAULT_BRANCH=${{ github.event.repository.default_branch }} 71 | echo "DEFAULT_BRANCH=${DEFAULT_BRANCH}" >> $GITHUB_ENV 72 | echo "DEFAULT_BRANCH_REF=refs/heads/$DEFAULT_BRANCH" >> $GITHUB_ENV 73 | echo "DEFAULT_BRANCH=$DEFAULT_BRANCH" 74 | - name: Cache 75 | uses: actions/cache@v4 76 | with: 77 | path: ci/cache 78 | key: ci-cache-${{ github.ref }} 79 | restore-keys: | 80 | ci-cache-${{ env.DEFAULT_BRANCH_REF }} 81 | - name: Install Environment 82 | uses: conda-incubator/setup-miniconda@v3 83 | with: 84 | activate-environment: manubot 85 | environment-file: build/environment.yml 86 | auto-activate-base: false 87 | - name: Install Spellcheck 88 | if: env.SPELLCHECK == 'true' 89 | run: bash ci/install-spellcheck.sh 90 | - name: Build Manuscript 91 | run: bash build/build.sh 92 | - name: Upload Artifacts 93 | uses: actions/upload-artifact@v4 94 | with: 95 | name: manuscript-${{ github.run_id }}-${{ env.TRIGGERING_SHA_7 }} 96 | path: output 97 | - name: Deploy Manuscript 98 | if: github.ref == env.DEFAULT_BRANCH_REF && github.event_name != 'pull_request' && !github.event.repository.fork 99 | env: 100 | MANUBOT_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} 101 | MANUBOT_SSH_PRIVATE_KEY: ${{ secrets.MANUBOT_SSH_PRIVATE_KEY }} 102 | CI_BUILD_WEB_URL: https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks 103 | CI_JOB_WEB_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} 104 | run: bash ci/deploy.sh 105 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated manuscript output files 2 | output/* 3 | !output/README.md 4 | 5 | webpage/v 6 | 7 | # When PDF building fails, a temporary symlink named images in the root 8 | # directory is not removed. 9 | /images 10 | 11 | # Manubot cache directory 12 | ci/cache 13 | 14 | # Pandoc filters downloaded during continuous integration setup 15 | build/pandoc/filters/spellcheck.lua 16 | 17 | # Python 18 | __pycache__/ 19 | *.pyc 20 | 21 | # Jupyter Notebook 22 | .ipynb_checkpoints 23 | 24 | # Misc temporary files 25 | *.bak 26 | 27 | # System specific files 28 | 29 | ## Linux 30 | *~ 31 | .Trash-* 32 | 33 | ## macOS 34 | .DS_Store 35 | ._* 36 | .Trashes 37 | 38 | ## Windows 39 | Thumbs.db 40 | [Dd]esktop.ini 41 | 42 | ## Text Editors 43 | .vscode 44 | -------------------------------------------------------------------------------- /LICENSE-CC0.md: -------------------------------------------------------------------------------- 1 | # CC0 1.0 Universal 2 | 3 | ``` 4 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. 5 | ``` 6 | 7 | ### Statement of Purpose 8 | 9 | The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). 10 | 11 | Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. 12 | 13 | For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. 14 | 15 | 1. __Copyright and Related Rights.__ A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: 16 | 17 | i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; 18 | 19 | ii. moral rights retained by the original author(s) and/or performer(s); 20 | 21 | iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; 22 | 23 | iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; 24 | 25 | v. rights protecting the extraction, dissemination, use and reuse of data in a Work; 26 | 27 | vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and 28 | 29 | vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. 30 | 31 | 2. __Waiver.__ To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. 32 | 33 | 3. __Public License Fallback.__ Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. 34 | 35 | 4. __Limitations and Disclaimers.__ 36 | 37 | a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. 38 | 39 | b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. 40 | 41 | c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. 42 | 43 | d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. 44 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # Creative Commons Attribution 4.0 International 2 | 3 | Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. 4 | 5 | ### Using Creative Commons Public Licenses 6 | 7 | Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. 8 | 9 | * __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors). 10 | 11 | * __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees). 12 | 13 | ## Creative Commons Attribution 4.0 International Public License 14 | 15 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 16 | 17 | ### Section 1 – Definitions. 18 | 19 | a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. 20 | 21 | b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. 22 | 23 | c. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. 24 | 25 | d. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. 26 | 27 | e. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. 28 | 29 | f. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License. 30 | 31 | g. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. 32 | 33 | h. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License. 34 | 35 | i. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. 36 | 37 | j. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. 38 | 39 | k. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. 40 | 41 | ### Section 2 – Scope. 42 | 43 | a. ___License grant.___ 44 | 45 | 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: 46 | 47 | A. reproduce and Share the Licensed Material, in whole or in part; and 48 | 49 | B. produce, reproduce, and Share Adapted Material. 50 | 51 | 2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 52 | 53 | 3. __Term.__ The term of this Public License is specified in Section 6(a). 54 | 55 | 4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 56 | 57 | 5. __Downstream recipients.__ 58 | 59 | A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. 60 | 61 | B. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 62 | 63 | 6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). 64 | 65 | b. ___Other rights.___ 66 | 67 | 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 68 | 69 | 2. Patent and trademark rights are not licensed under this Public License. 70 | 71 | 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. 72 | 73 | ### Section 3 – License Conditions. 74 | 75 | Your exercise of the Licensed Rights is expressly made subject to the following conditions. 76 | 77 | a. ___Attribution.___ 78 | 79 | 1. If You Share the Licensed Material (including in modified form), You must: 80 | 81 | A. retain the following if it is supplied by the Licensor with the Licensed Material: 82 | 83 | i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); 84 | 85 | ii. a copyright notice; 86 | 87 | iii. a notice that refers to this Public License; 88 | 89 | iv. a notice that refers to the disclaimer of warranties; 90 | 91 | v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; 92 | 93 | B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and 94 | 95 | C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 96 | 97 | 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 98 | 99 | 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 100 | 101 | 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. 102 | 103 | ### Section 4 – Sui Generis Database Rights. 104 | 105 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: 106 | 107 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; 108 | 109 | b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and 110 | 111 | c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. 112 | 113 | For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. 114 | 115 | ### Section 5 – Disclaimer of Warranties and Limitation of Liability. 116 | 117 | a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__ 118 | 119 | b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__ 120 | 121 | c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. 122 | 123 | ### Section 6 – Term and Termination. 124 | 125 | a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. 126 | 127 | b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 128 | 129 | 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 130 | 131 | 2. upon express reinstatement by the Licensor. 132 | 133 | For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. 134 | 135 | c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. 136 | 137 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. 138 | 139 | ### Section 7 – Other Terms and Conditions. 140 | 141 | a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. 142 | 143 | b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. 144 | 145 | ### Section 8 – Interpretation. 146 | 147 | a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. 148 | 149 | b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. 150 | 151 | c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. 152 | 153 | d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. 154 | 155 | ``` 156 | Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. 157 | 158 | Creative Commons may be contacted at creativecommons.org 159 | ``` 160 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Try Manubot: Practice editing this manuscript 2 | 3 | 4 | 5 | [![HTML Manuscript](https://img.shields.io/badge/manuscript-HTML-blue.svg)](https://manubot.github.io/try-manubot/) 6 | [![PDF Manuscript](https://img.shields.io/badge/manuscript-PDF-blue.svg)](https://manubot.github.io/try-manubot/manuscript.pdf) 7 | [![GitHub Actions Status](https://github.com/manubot/try-manubot/workflows/Manubot/badge.svg)](https://github.com/manubot/try-manubot/actions) 8 | 9 | ## Manuscript description 10 | 11 | 12 | 13 | This repository contains a demo manuscript, intended as a playground for everyone to practice using Manubot. 14 | 15 | To edit the manuscript, make changes to the files in the [`content`](content) directory. 16 | You can edit files with the GitHub web interface by using the pencil icon, as shown in the [getting started video](https://manubot.org/docs/getting-started.html). 17 | Alternatively, if you have experience with Git and GitHub, you can fork this repository and make a traditional [pull request](https://help.github.com/en/articles/creating-a-pull-request). 18 | 19 | ## Manubot 20 | 21 | 22 | 23 | Manubot is a system for writing scholarly manuscripts via GitHub. 24 | Manubot automates citations and references, versions manuscripts using git, and enables collaborative writing via GitHub. 25 | An [overview manuscript](https://greenelab.github.io/meta-review/ "Open collaborative writing with Manubot") presents the benefits of collaborative writing with Manubot and its unique features. 26 | The [rootstock repository](https://git.io/fhQH1) is a general purpose template for creating new Manubot instances, as detailed in [`SETUP.md`](SETUP.md). 27 | See [`USAGE.md`](USAGE.md) for documentation how to write a manuscript. 28 | 29 | Please open [an issue](https://git.io/fhQHM) for questions related to Manubot usage, bug reports, or general inquiries. 30 | 31 | ### Repository directories & files 32 | 33 | The directories are as follows: 34 | 35 | + [`content`](content) contains the manuscript source, which includes markdown files as well as inputs for citations and references. 36 | See [`USAGE.md`](USAGE.md) for more information. 37 | + [`output`](output) contains the outputs (generated files) from Manubot including the resulting manuscripts. 38 | You should not edit these files manually, because they will get overwritten. 39 | + [`webpage`](webpage) is a directory meant to be rendered as a static webpage for viewing the HTML manuscript. 40 | + [`build`](build) contains commands and tools for building the manuscript. 41 | + [`ci`](ci) contains files necessary for deployment via continuous integration. 42 | 43 | ### Local execution 44 | 45 | The easiest way to run Manubot is to use [continuous integration](#continuous-integration) to rebuild the manuscript when the content changes. 46 | If you want to build a Manubot manuscript locally, install the [conda](https://conda.io) environment as described in [`build`](build). 47 | Then, you can build the manuscript on POSIX systems by running the following commands from this root directory. 48 | 49 | ```sh 50 | # Activate the manubot conda environment (assumes conda version >= 4.4) 51 | conda activate manubot 52 | 53 | # Build the manuscript, saving outputs to the output directory 54 | bash build/build.sh 55 | 56 | # At this point, the HTML & PDF outputs will have been created. The remaining 57 | # commands are for serving the webpage to view the HTML manuscript locally. 58 | # This is required to view local images in the HTML output. 59 | 60 | # Configure the webpage directory 61 | manubot webpage 62 | 63 | # You can now open the manuscript webpage/index.html in a web browser. 64 | # Alternatively, open a local webserver at http://localhost:8000/ with the 65 | # following commands. 66 | cd webpage 67 | python -m http.server 68 | ``` 69 | 70 | Sometimes it's helpful to monitor the content directory and automatically rebuild the manuscript when a change is detected. 71 | The following command, while running, will trigger both the `build.sh` script and `manubot webpage` command upon content changes: 72 | 73 | ```sh 74 | bash build/autobuild.sh 75 | ``` 76 | 77 | ### Continuous Integration 78 | 79 | Whenever a pull request is opened, CI (continuous integration) will test whether the changes break the build process to generate a formatted manuscript. 80 | The build process aims to detect common errors, such as invalid citations. 81 | If your pull request build fails, see the CI logs for the cause of failure and revise your pull request accordingly. 82 | 83 | When a commit to the `main` branch occurs (for example, when a pull request is merged), CI builds the manuscript and writes the results to the [`gh-pages`](https://github.com/manubot/try-manubot/tree/gh-pages) and [`output`](https://github.com/manubot/try-manubot/tree/output) branches. 84 | The `gh-pages` branch uses [GitHub Pages](https://pages.github.com/) to host the following URLs: 85 | 86 | + **HTML manuscript** at https://manubot.github.io/try-manubot/ 87 | + **PDF manuscript** at https://manubot.github.io/try-manubot/manuscript.pdf 88 | 89 | For continuous integration configuration details, see [`.github/workflows/manubot.yaml`](.github/workflows/manubot.yaml). 90 | 91 | ## License 92 | 93 | 97 | 98 | [![License: CC BY 4.0](https://img.shields.io/badge/License%20All-CC%20BY%204.0-lightgrey.svg)](http://creativecommons.org/licenses/by/4.0/) 99 | [![License: CC0 1.0](https://img.shields.io/badge/License%20Parts-CC0%201.0-lightgrey.svg)](https://creativecommons.org/publicdomain/zero/1.0/) 100 | 101 | Except when noted otherwise, the entirety of this repository is licensed under a CC BY 4.0 License ([`LICENSE.md`](LICENSE.md)), which allows reuse with attribution. 102 | Please attribute by linking to https://github.com/manubot/try-manubot. 103 | 104 | Since CC BY is not ideal for code and data, certain repository components are also released under the CC0 1.0 public domain dedication ([`LICENSE-CC0.md`](LICENSE-CC0.md)). 105 | All files matched by the following glob patterns are dual licensed under CC BY 4.0 and CC0 1.0: 106 | 107 | + `*.sh` 108 | + `*.py` 109 | + `*.yml` / `*.yaml` 110 | + `*.json` 111 | + `*.bib` 112 | + `*.tsv` 113 | + `.gitignore` 114 | 115 | All other files are only available under CC BY 4.0, including: 116 | 117 | + `*.md` 118 | + `*.html` 119 | + `*.pdf` 120 | + `*.docx` 121 | 122 | Please open [an issue](https://github.com/manubot/try-manubot/issues) for any question related to licensing. 123 | -------------------------------------------------------------------------------- /build/README.md: -------------------------------------------------------------------------------- 1 | # Building the manuscript 2 | 3 | [`build.sh`](build.sh) builds the repository. 4 | `bash build/build.sh` should be executed from the root directory of the repository. 5 | By default, `build.sh` creates HTML and PDF outputs. 6 | However, setting the `BUILD_PDF` environment variable to `false` will suppress PDF output. 7 | For example, run local builds using the command `BUILD_PDF=false bash build/build.sh`. 8 | 9 | To build a DOCX file of the manuscript, set the `BUILD_DOCX` environment variable to `true`. 10 | For example, use the command `BUILD_DOCX=true bash build/build.sh` locally. 11 | To export DOCX for all CI builds, set an environment variable in the CI configuration file. 12 | For GitHub Actions, set the variable in `.github\workflows\manubot.yaml` (see [docs](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-environment-variables)): 13 | 14 | ```yaml 15 | name: Manubot 16 | env: 17 | BUILD_DOCX: true 18 | ``` 19 | 20 | To generate a single DOCX output of the latest manuscript with GitHub Actions, click the "Actions" tab at the top of the repository. 21 | Select the "Manubot" workflow, then the "Run workflow" button and check "generate DOCX output" before clicking the green "Run workflow" button. 22 | 23 | Currently, equation numbers via `pandoc-eqnos` are not supported for DOCX output. 24 | 25 | Format conversion is done using [Pandoc](https://pandoc.org/MANUAL.html). 26 | `build.sh` calls `pandoc` commands using the options specified in [`pandoc/defaults`](pandoc/defaults). 27 | Each file specifies a set of pandoc `--defaults` options for a given format. 28 | To change the options, either edit the YAML files directly or add additional `--defaults` files. 29 | 30 | ## Environment 31 | 32 | Note: currently, **Windows is not supported**. 33 | 34 | The Manubot environment is managed with [conda](https://conda.io). 35 | If you do not have `conda` installed, we recommend using the Miniforge3 installer from [miniforge](https://github.com/conda-forge/miniforge) (includes `conda` and `mamba`). 36 | Install the environment from [`environment.yml`](environment.yml) by running one of following commands 37 | (from the repository's root directory): 38 | 39 | ```sh 40 | # Install the environment using conda 41 | conda env create --file build/environment.yml 42 | 43 | # Install the environment using mamba (faster) 44 | mamba env create --file build/environment.yml 45 | ``` 46 | 47 | If the `manubot` environment is already installed, but needs to be updated to reflect changes to `environment.yml`, use one of the following options: 48 | 49 | ```shell 50 | # option 1: update the existing environment. 51 | conda env update --file build/environment.yml 52 | 53 | # option 2: remove and reinstall the manubot environment. 54 | # Slower than option 1, but guarantees a fresh environment. 55 | conda env remove --name manubot 56 | conda env create --file build/environment.yml 57 | 58 | # option 3: reinstall the manubot environment faster using mamba. 59 | mamba env create --force --file build/environment.yml 60 | ``` 61 | 62 | Activate with `conda activate manubot` (assumes `conda` version of [at least](https://github.com/conda/conda/blob/9d759d8edeb86569c25f6eb82053f09581013a2a/CHANGELOG.md#440-2017-12-20) 4.4). 63 | The environment should successfully install on both Linux and macOS. 64 | However, it will fail on Windows due to the [`pango`](https://anaconda.org/conda-forge/pango) dependency. 65 | 66 | Because the build process is dependent on having the appropriate version of the `manubot` Python package, 67 | it is necessary to use the version specified in `environment.yml`. 68 | The latest `manubot` release on PyPI may not be compatible with the latest version of this rootstock repository. 69 | 70 | ## Building PDFs 71 | 72 | If Docker is available, `build.sh` uses the [Athena](https://www.athenapdf.com/) [Docker image](https://hub.docker.com/r/arachnysdocker/athenapdf) to build the PDF. 73 | Otherwise, `build.sh` uses [WeasyPrint](https://weasyprint.org/) to build the PDF. 74 | It is common for WeasyPrint to generate many warnings and errors that can be safely ignored. 75 | Examples are shown below: 76 | 77 | ```text 78 | WARNING: Ignored `pointer-events: none` at 3:16, unknown property. 79 | WARNING: Ignored `font-display:auto` at 1:53114, descriptor not supported. 80 | ERROR: Failed to load font at "https://use.fontawesome.com/releases/v5.7.2/webfonts/fa-brands-400.eot#iefix" 81 | WARNING: Expected a media type, got only/**/screen 82 | ``` 83 | -------------------------------------------------------------------------------- /build/assets/custom-dictionary.txt: -------------------------------------------------------------------------------- 1 | personal_ws-1.1 en 22 2 | al 3 | doi 4 | eq 5 | et 6 | github 7 | isbn 8 | latex 9 | manubot 10 | orcid 11 | permalink 12 | pmc 13 | pmcid 14 | pmid 15 | pubmed 16 | rootstock 17 | s 18 | strikethrough 19 | svg 20 | svgs 21 | tbl 22 | unicode 23 | wikidata 24 | -------------------------------------------------------------------------------- /build/assets/style.csl: -------------------------------------------------------------------------------- 1 | 2 | 79 | -------------------------------------------------------------------------------- /build/autobuild.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## autobuild.sh: automatically rebuild mansucript outputs and the webpage when content changes 4 | ## Depends on watchdog https://github.com/gorakhargosh/watchdog 5 | 6 | watchmedo shell-command \ 7 | --wait \ 8 | --command='bash build/build.sh && manubot webpage' \ 9 | content 10 | -------------------------------------------------------------------------------- /build/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## build.sh: compile manuscript outputs from content using Manubot and Pandoc 4 | 5 | set -o errexit \ 6 | -o nounset \ 7 | -o pipefail 8 | 9 | # Set timezone used by Python for setting the manuscript's date 10 | export TZ=Etc/UTC 11 | # Default Python to read/write text files using UTF-8 encoding 12 | export LC_ALL=en_US.UTF-8 13 | 14 | 15 | # Set DOCKER_RUNNING to true if docker is running, otherwise false. 16 | DOCKER_RUNNING="$(docker info &> /dev/null && echo "true" || (true && echo "false"))" 17 | 18 | # Set option defaults 19 | CI="${CI:-false}" 20 | BUILD_PDF="${BUILD_PDF:-true}" 21 | BUILD_DOCX="${BUILD_DOCX:-false}" 22 | BUILD_LATEX="${BUILD_LATEX:-false}" 23 | SPELLCHECK="${SPELLCHECK:-false}" 24 | MANUBOT_USE_DOCKER="${MANUBOT_USE_DOCKER:-$DOCKER_RUNNING}" 25 | # Pandoc's configuration is specified via files of option defaults 26 | # located in the $PANDOC_DATA_DIR/defaults directory. 27 | PANDOC_DATA_DIR="${PANDOC_DATA_DIR:-build/pandoc}" 28 | 29 | # Generate reference information 30 | echo >&2 "Retrieving and processing reference metadata" 31 | manubot process \ 32 | --content-directory=content \ 33 | --output-directory=output \ 34 | --cache-directory=ci/cache \ 35 | --skip-citations \ 36 | --log-level=INFO 37 | 38 | # Make output directory 39 | mkdir -p output 40 | 41 | # Create HTML output 42 | # https://pandoc.org/MANUAL.html 43 | echo >&2 "Exporting HTML manuscript" 44 | pandoc --verbose \ 45 | --data-dir="$PANDOC_DATA_DIR" \ 46 | --defaults=common.yaml \ 47 | --defaults=html.yaml 48 | 49 | # Create PDF output (unless BUILD_PDF environment variable equals "false") 50 | # If Docker is not available, use WeasyPrint to create PDF 51 | if [ "${BUILD_PDF}" != "false" ] && [ "${MANUBOT_USE_DOCKER}" != "true" ]; then 52 | echo >&2 "Exporting PDF manuscript using WeasyPrint" 53 | if [ -L images ]; then rm images; fi # if images is a symlink, remove it 54 | ln -s content/images 55 | pandoc \ 56 | --data-dir="$PANDOC_DATA_DIR" \ 57 | --defaults=common.yaml \ 58 | --defaults=html.yaml \ 59 | --defaults=pdf-weasyprint.yaml 60 | rm images 61 | fi 62 | 63 | # If Docker is available, use athenapdf to create PDF 64 | if [ "${BUILD_PDF}" != "false" ] && [ "${MANUBOT_USE_DOCKER}" == "true" ]; then 65 | echo >&2 "Exporting PDF manuscript using Docker + Athena" 66 | if [ "${CI}" = "true" ]; then 67 | # Incease --delay for CI builds to ensure the webpage fully renders, even when the CI server is under high load. 68 | # Local builds default to a shorter --delay to minimize runtime, assuming proper rendering is less crucial. 69 | MANUBOT_ATHENAPDF_DELAY="${MANUBOT_ATHENAPDF_DELAY:-5000}" 70 | echo >&2 "Continuous integration build detected. Setting athenapdf --delay=$MANUBOT_ATHENAPDF_DELAY" 71 | fi 72 | if [ -d output/images ]; then rm -rf output/images; fi # if images is a directory, remove it 73 | cp -R -L content/images output/ 74 | docker run \ 75 | --rm \ 76 | --shm-size=1g \ 77 | --volume="$(pwd)/output:/converted/" \ 78 | --security-opt=seccomp:unconfined \ 79 | arachnysdocker/athenapdf:2.16.0 \ 80 | athenapdf \ 81 | --delay=${MANUBOT_ATHENAPDF_DELAY:-1100} \ 82 | --pagesize=A4 \ 83 | manuscript.html manuscript.pdf 84 | rm -rf output/images 85 | fi 86 | 87 | # Create DOCX output (if BUILD_DOCX environment variable equals "true") 88 | if [ "${BUILD_DOCX}" = "true" ]; then 89 | echo >&2 "Exporting Word Docx manuscript" 90 | pandoc --verbose \ 91 | --data-dir="$PANDOC_DATA_DIR" \ 92 | --defaults=common.yaml \ 93 | --defaults=docx.yaml 94 | fi 95 | 96 | # Create LaTeX output (if BUILD_LATEX environment variable equals "true") 97 | if [ "${BUILD_LATEX}" = "true" ]; then 98 | echo >&2 "Exporting LaTeX manuscript" 99 | pandoc \ 100 | --data-dir="$PANDOC_DATA_DIR" \ 101 | --defaults=common.yaml \ 102 | --defaults=latex.yaml 103 | fi 104 | 105 | # Spellcheck 106 | if [ "${SPELLCHECK}" = "true" ]; then 107 | export ASPELL_CONF="add-extra-dicts $(pwd)/build/assets/custom-dictionary.txt; ignore-case true" 108 | 109 | # Identify and store spelling errors 110 | pandoc \ 111 | --data-dir="$PANDOC_DATA_DIR" \ 112 | --lua-filter spellcheck.lua \ 113 | output/manuscript.md \ 114 | | sort -fu > output/spelling-errors.txt 115 | echo >&2 "Potential spelling errors:" 116 | cat output/spelling-errors.txt 117 | 118 | # Add additional forms of punctuation that Pandoc converts so that the 119 | # locations can be detected 120 | # Create a new expanded spelling errors file so that the saved artifact 121 | # contains only the original misspelled words 122 | cp output/spelling-errors.txt output/expanded-spelling-errors.txt 123 | grep "’" output/spelling-errors.txt | sed "s/’/'/g" >> output/expanded-spelling-errors.txt || true 124 | 125 | # Find locations of spelling errors 126 | # Use "|| true" after grep because otherwise this step of the pipeline will 127 | # return exit code 1 if any of the markdown files do not contain a 128 | # misspelled word 129 | cat output/expanded-spelling-errors.txt | while read word; do grep -ion "\<$word\>" content/*.md; done | sort -h -t ":" -k 1b,1 -k2,2 > output/spelling-error-locations.txt || true 130 | echo >&2 "Filenames and line numbers with potential spelling errors:" 131 | cat output/spelling-error-locations.txt 132 | 133 | rm output/expanded-spelling-errors.txt 134 | fi 135 | 136 | echo >&2 "Build complete" 137 | -------------------------------------------------------------------------------- /build/environment.yml: -------------------------------------------------------------------------------- 1 | name: manubot 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - cairo=1.16.0 6 | - cairocffi=1.2.0 7 | - ghp-import=2.1.0 8 | - jinja2=3.1.2 9 | - jsonschema=4.17.0 10 | - librsvg=2.52.5 11 | - pandoc=2.19.2 12 | - pango=1.48.10 13 | - pip=22.3.1 14 | - python=3.11.0 15 | - requests-cache=0.9.6 16 | - requests=2.28.1 17 | - tomli=2.0.1 18 | - watchdog==2.1.9 19 | - weasyprint=53.4 20 | - yamllint=1.28.0 21 | - pip: 22 | - cffi==1.15.0 23 | - errorhandler==2.0.1 24 | - git+https://github.com/manubot/manubot@2914d720dfe02d2bda8781f8f784bc14d461e2e3 25 | - isbnlib==3.10.10 26 | - opentimestamps-client==0.7.1 27 | - opentimestamps==0.4.3 28 | - pandoc-eqnos==2.5.0 29 | - pandoc-fignos==2.4.0 30 | - pandoc-tablenos==2.3.0 31 | - pandoc-xnos==2.5.0 32 | - pandocfilters==1.5.0 33 | - panflute==2.2.3 34 | - psutil==5.9.4 35 | - pybase62==0.5.0 36 | - python-bitcoinlib==0.11.2 37 | - pyyaml==6.0 38 | -------------------------------------------------------------------------------- /build/pandoc/defaults/common.yaml: -------------------------------------------------------------------------------- 1 | # Pandoc --defaults shared between Manubot output formats. 2 | from: markdown 3 | input-file: output/manuscript.md 4 | filters: 5 | - pandoc-fignos 6 | - pandoc-eqnos 7 | - pandoc-tablenos 8 | - pandoc-manubot-cite 9 | - citeproc 10 | wrap: preserve 11 | metadata: 12 | csl: build/assets/style.csl 13 | link-citations: true 14 | -------------------------------------------------------------------------------- /build/pandoc/defaults/docx.yaml: -------------------------------------------------------------------------------- 1 | # Pandoc --defaults for DOCX output. 2 | # Load on top of common defaults. 3 | to: docx 4 | output-file: output/manuscript.docx 5 | reference-doc: build/themes/default.docx 6 | resource-path: 7 | - '.' 8 | - content 9 | -------------------------------------------------------------------------------- /build/pandoc/defaults/html.yaml: -------------------------------------------------------------------------------- 1 | # Pandoc --defaults for HTML output. 2 | # Load on top of common defaults. 3 | to: html5 4 | output-file: output/manuscript.html 5 | # include-before-body: 6 | ### third-party plugins 7 | #- build/plugins/d3.html 8 | include-after-body: 9 | ### theme 10 | - build/themes/default.html 11 | ### first-party plugins 12 | - build/plugins/core.html # needed for all first-party plugins 13 | - build/plugins/accordion.html 14 | - build/plugins/anchors.html 15 | - build/plugins/attributes.html 16 | #- build/plugins/inline-svg.html 17 | - build/plugins/jump-to-first.html 18 | - build/plugins/lightbox.html 19 | - build/plugins/link-highlight.html 20 | - build/plugins/table-of-contents.html 21 | - build/plugins/tooltips.html 22 | ### third-party plugins 23 | - build/plugins/analytics.html 24 | - build/plugins/hypothesis.html 25 | - build/plugins/mathjax.html 26 | #- build/plugins/scite.html 27 | variables: 28 | document-css: false 29 | math: "" 30 | html-math-method: 31 | method: mathjax 32 | -------------------------------------------------------------------------------- /build/pandoc/defaults/latex.yaml: -------------------------------------------------------------------------------- 1 | # Pandoc --defaults for LaTeX output. 2 | # Load on top of common defaults. 3 | to: latex 4 | output-file: output/manuscript.tex 5 | -------------------------------------------------------------------------------- /build/pandoc/defaults/pdf-weasyprint.yaml: -------------------------------------------------------------------------------- 1 | # Pandoc --defaults for PDF output via weasyprint. 2 | # Load on top of HTML defaults. 3 | output-file: output/manuscript.pdf 4 | pdf-engine: weasyprint 5 | pdf-engine-opts: 6 | - '--presentational-hints' 7 | html-math-method: 8 | method: webtex 9 | url: 'https://latex.codecogs.com/svg.latex?' 10 | -------------------------------------------------------------------------------- /build/plugins/accordion.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 102 | 103 | 104 | 105 | 114 | 115 | 147 | -------------------------------------------------------------------------------- /build/plugins/analytics.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /build/plugins/anchors.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 76 | 77 | 78 | 79 | 88 | 89 | 129 | -------------------------------------------------------------------------------- /build/plugins/attributes.html: -------------------------------------------------------------------------------- 1 | 8 | 9 | 86 | -------------------------------------------------------------------------------- /build/plugins/core.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 130 | -------------------------------------------------------------------------------- /build/plugins/d3.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | -------------------------------------------------------------------------------- /build/plugins/hypothesis.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 87 | 88 | 89 | 90 | 100 | 101 | 167 | -------------------------------------------------------------------------------- /build/plugins/inline-svg.html: -------------------------------------------------------------------------------- 1 | 15 | 16 | 54 | -------------------------------------------------------------------------------- /build/plugins/jump-to-first.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 75 | 76 | 77 | 78 | 87 | 88 | 105 | -------------------------------------------------------------------------------- /build/plugins/lightbox.html: -------------------------------------------------------------------------------- 1 | 8 | 9 | 506 | 507 | 508 | 509 | 518 | 519 | 520 | 521 | 530 | 531 | 661 | -------------------------------------------------------------------------------- /build/plugins/link-highlight.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 126 | 127 | 158 | -------------------------------------------------------------------------------- /build/plugins/mathjax.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 17 | 18 | 23 | 24 | 54 | -------------------------------------------------------------------------------- /build/plugins/scite.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 50 | 51 | 63 | -------------------------------------------------------------------------------- /build/plugins/table-of-contents.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 237 | 238 | 239 | 240 | 250 | 251 | 405 | -------------------------------------------------------------------------------- /build/plugins/tooltips.html: -------------------------------------------------------------------------------- 1 | 8 | 9 | 417 | 418 | 419 | 420 | 429 | 430 | 431 | 432 | 441 | 442 | 508 | -------------------------------------------------------------------------------- /build/themes/default.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manubot/try-manubot/35547635f2446a0ca36751638c2b77d99d4060a6/build/themes/default.docx -------------------------------------------------------------------------------- /build/themes/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 667 | -------------------------------------------------------------------------------- /build/themes/nih-grant.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manubot/try-manubot/35547635f2446a0ca36751638c2b77d99d4060a6/build/themes/nih-grant.docx -------------------------------------------------------------------------------- /ci/.gitignore: -------------------------------------------------------------------------------- 1 | # SSH public and private keys 2 | deploy.key* 3 | -------------------------------------------------------------------------------- /ci/README.md: -------------------------------------------------------------------------------- 1 | # Continuous integration tools 2 | 3 | This directory contains tools and files for continuous integration (CI). 4 | Specifically, [`deploy.sh`](deploy.sh) runs on successful `main` branch builds that are not pull requests. 5 | The contents of `../webpage` are committed to the `gh-pages` branch. 6 | The contents of `../output` are committed to the `output` branch. 7 | 8 | For more information on the CI implementation, see the CI setup documentation in `SETUP.md`. 9 | -------------------------------------------------------------------------------- /ci/ai-revision-config.yaml: -------------------------------------------------------------------------------- 1 | files: 2 | ignore: 3 | - front\-matter 4 | - back\-matter 5 | matchings: 6 | - files: 7 | - .*\.md$ 8 | prompt: default 9 | -------------------------------------------------------------------------------- /ci/ai-revision-prompts.yaml: -------------------------------------------------------------------------------- 1 | prompts: 2 | abstract: | 3 | You are a scientist with copy-editing skills who will help in improving the text of a manuscript. Revise the following abstract of this manuscript so that it has a clear sentence structure and fits in a single paragraph. The revision should follow a context-content-conclusion (C-C-C) scheme, as follows: 1) The context portion communicates to the reader what gap the paper will fill. The first sentence orients the reader by introducing the broader field in which the manuscript's research is situated. Then, the context is narrowed until it lands on the open question that the research answers. A successful context section distinguishes the research's contributions from the current state-of-the-art, communicating what is missing in the current literature (i.e., the specific gap) and why that matters (i.e. the connection between the specific gap and the broader context). 2) The content portion (e.g. "here we") first describes the novel method or approach that was used to fill the gap, then presents an executive summary of results. 3) The conclusion portion interprets the results to answer the question that was posed at the end of the context portion. There may be a second part to the conclusion portion that highlights how this conclusion moves the broader field forward (e.g. "broader significance"). 4 | 5 | Input paragraph: {{ content }} 6 | 7 | Revised paragraph: 8 | 9 | introduction: | 10 | You are a scientist with copy-editing skills tasked with refining the text of a scientific manuscript. Your goal is to revise the following paragraph from the Introduction section to enhance clarity, reduce jargon, and maintain a scholarly tone. The revision should adhere to Markdown formatting and follow a Context-Content-Conclusion (C-C-C) structure. This structure begins by setting the stage with one or two sentences (Context), progresses through what is known from the literature (Content), and concludes by highlighting an aspect of the knowledge gap the manuscript addresses (Conclusion). Your revision should: 1) preserve the original information as much as possible, with minimal changes to the text, 2) ensure most references to scientific articles are kept exactly as they appear in the original text; these references are crucial for academic integrity and may appear with the format "[@TYPE:ID]" such as "[@pmid:33931583; @doi:10.1101/2021.10.21.21265225; @pmid:31036433]", and 4) the revised paragraph must encapsulate the entire revision, following the C-C-C structure, within a single, cohesive paragraph. 11 | 12 | Input paragraph: {{ content }} 13 | 14 | Revised paragraph: 15 | 16 | results: | 17 | You are a scientist with copy-editing skills tasked with refining the text of a scientific manuscript. Your goal is to revise the following paragraph from the Results section to enhance clarity, reduce jargon, maintain a scholarly tone, adhere to Markdown formatting and follow a Context-Content-Conclusion (C-C-C) structure. This structure begins with a sentence or two that set up the question that the paragraph answers (Context) (such as the following: "To verify that there are no artifacts...," "What is the test-retest reliability of our measure?," or "We next tested whether Ca2+ flux through L-type Ca2+ channels was involved"), the middle of the paragraph presents data and logic that pertain to the question (Content), and the paragraph ends with a sentence that answers the question (Conclusion). Your revision should: 1) ensure that the paragraph has the following structure: it starts with a sentence or two that set up the question that the paragraph answers (such as the following: "To verify that there are no artifacts...," "What is the test-retest reliability of our measure?," or "We next tested whether Ca2+ flux through L-type Ca2+ channels was involved."), the middle of the paragraph presents data and logic that pertain to the question, and the paragraph ends with a sentence that answers the question. Your revision should: 1) preserve the original information as much as possible, with minimal changes to the text, 2) ensure most references to scientific articles are kept exactly as they appear in the original text; these references are crucial for academic integrity and may appear with the format "[@TYPE:ID]" such as "[@pmid:33931583; @doi:10.1101/2021.10.21.21265225; @pmid:31036433]", and 4) the revised paragraph must encapsulate the entire revision, following the C-C-C structure, within a single, cohesive paragraph. 18 | 19 | Input paragraph: {{ content }} 20 | 21 | Revised paragraph: 22 | 23 | discussion: | 24 | You are a scientist with copy-editing skills tasked with refining the text of a scientific manuscript. Your goal is to revise the following paragraph from the Discussion section to enhance clarity, reduce jargon, maintain a scholarly tone, and adhere to Markdown formatting and follow a Context-Content-Conclusion (C-C-C) structure. This structure starts by describing an area of weakness or strength of the paper (Context), then evaluates the strength or weakness by linking it to the relevant literature (Content), and it often concludes by describing a clever, informal way of perceiving the contribution or by discussing future directions that can extend the contribution. Your revision should: 1) preserve the original information as much as possible, with minimal changes to the text, 2) ensure most references to scientific articles are kept exactly as they appear in the original text; these references are crucial for academic integrity and may appear with the format "[@TYPE:ID]" such as "[@pmid:33931583; @doi:10.1101/2021.10.21.21265225; @pmid:31036433]", and 4) the revised paragraph must encapsulate the entire revision, following the C-C-C structure, within a single, cohesive paragraph. 25 | 26 | Input paragraph: {{ content }} 27 | 28 | Revised paragraph: 29 | 30 | methods: | 31 | You are a scientist with copy-editing skills tasked with refining the text of a scientific manuscript. Your goal is to revise the following paragraph from the Methods section to enhance clarity, reduce jargon, maintain a scholarly tone, and adhere to Markdown formatting. Your revision should: 1) preserve the original information as much as possible, with minimal changes to the text, 2) preserve technical details such as mathematical expressions, 3) ensure that equations (which could be numbered) are preserved and correctly defined, 4) preserve references to numbered equations, and 5) ensure most references to scientific articles are kept exactly as they appear in the original text; these references are crucial for academic integrity and may appear with the format "[@TYPE:ID]" such as "[@pmid:33931583; @doi:10.1101/2021.10.21.21265225; @pmid:31036433]". 32 | 33 | Input paragraph: {{ content }} 34 | 35 | Revised paragraph: 36 | 37 | default: | 38 | Proofread the following paragraph that is part of a scientific manuscript. 39 | Keep all Markdown formatting, citations to other articles, mathematical 40 | expressions, and equations. 41 | 42 | Input paragraph: {{ content }} 43 | 44 | Proofread paragraph: 45 | -------------------------------------------------------------------------------- /ci/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## deploy.sh: run during a CI build to deploy manuscript outputs to the output and gh-pages branches on GitHub. 4 | 5 | # Set options for extra caution & debugging 6 | set -o errexit \ 7 | -o nounset \ 8 | -o pipefail 9 | 10 | # set environment variables for GitHub Actions 11 | REPO_SLUG=${GITHUB_REPOSITORY} 12 | COMMIT=${GITHUB_SHA} 13 | BRANCH=${DEFAULT_BRANCH:-main} 14 | 15 | # Add commit hash to the README 16 | OWNER_NAME="$(dirname "$REPO_SLUG")" 17 | REPO_NAME="$(basename "$REPO_SLUG")" 18 | export REPO_SLUG COMMIT OWNER_NAME REPO_NAME 19 | envsubst < webpage/README.md > webpage/README-complete.md 20 | mv webpage/README-complete.md webpage/README.md 21 | 22 | # Configure git 23 | git config --global push.default simple 24 | git config --global user.email "$(git log --max-count=1 --format='%ae')" 25 | git config --global user.name "$(git log --max-count=1 --format='%an')" 26 | git checkout "$BRANCH" 27 | 28 | # Configure deployment credentials 29 | MANUBOT_DEPLOY_VIA_SSH=true 30 | git remote set-url origin "git@github.com:$REPO_SLUG.git" 31 | if [ -v MANUBOT_SSH_PRIVATE_KEY ] && [ "$MANUBOT_SSH_PRIVATE_KEY" != "" ]; then 32 | echo >&2 "[INFO] Detected MANUBOT_SSH_PRIVATE_KEY. Will deploy via SSH." 33 | elif [ -v MANUBOT_ACCESS_TOKEN ] && [ "$MANUBOT_ACCESS_TOKEN" != "" ]; then 34 | echo >&2 "[INFO] Detected MANUBOT_ACCESS_TOKEN. Will deploy via HTTPS." 35 | MANUBOT_DEPLOY_VIA_SSH=false 36 | git remote set-url origin "https://$MANUBOT_ACCESS_TOKEN@github.com/$REPO_SLUG.git" 37 | else 38 | echo >&2 "[INFO] Missing MANUBOT_SSH_PRIVATE_KEY and MANUBOT_ACCESS_TOKEN. Will deploy via SSH." 39 | fi 40 | 41 | if [ $MANUBOT_DEPLOY_VIA_SSH = "true" ]; then 42 | # Decrypt and add SSH key 43 | eval "$(ssh-agent -s)" 44 | ( 45 | set +o xtrace # disable xtrace in subshell for private key operations 46 | if [ -v MANUBOT_SSH_PRIVATE_KEY ]; then 47 | base64 --decode <<< "$MANUBOT_SSH_PRIVATE_KEY" | ssh-add - 48 | else 49 | echo >&2 "Deployment will fail since neither of the following environment variables are set: MANUBOT_ACCESS_TOKEN or MANUBOT_SSH_PRIVATE_KEY." 50 | fi 51 | ) 52 | fi 53 | 54 | # Fetch and create gh-pages and output branches 55 | git remote set-branches --add origin gh-pages output 56 | git fetch origin gh-pages:gh-pages output:output || \ 57 | echo >&2 "[INFO] could not fetch gh-pages or output from origin." 58 | 59 | # Configure versioned webpage and timestamp 60 | manubot webpage \ 61 | --timestamp \ 62 | --no-ots-cache \ 63 | --checkout=gh-pages \ 64 | --version="$COMMIT" 65 | 66 | # Commit message 67 | MESSAGE="\ 68 | $(git log --max-count=1 --format='%s') 69 | [ci skip] 70 | 71 | This build is based on 72 | https://github.com/$REPO_SLUG/commit/$COMMIT. 73 | 74 | This commit was created by the following CI build and job: 75 | $CI_BUILD_WEB_URL 76 | $CI_JOB_WEB_URL 77 | " 78 | 79 | # Deploy the manubot outputs to output 80 | ghp-import \ 81 | --push \ 82 | --branch=output \ 83 | --message="$MESSAGE" \ 84 | output 85 | 86 | # Deploy the webpage directory to gh-pages 87 | ghp-import \ 88 | --no-jekyll \ 89 | --follow-links \ 90 | --push \ 91 | --branch=gh-pages \ 92 | --message="$MESSAGE" \ 93 | webpage 94 | 95 | if [ $MANUBOT_DEPLOY_VIA_SSH = "true" ]; then 96 | # Workaround https://github.com/travis-ci/travis-ci/issues/8082 97 | ssh-agent -k 98 | fi 99 | -------------------------------------------------------------------------------- /ci/install-spellcheck.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## install-spellcheck.sh: run during a CI build to install Pandoc spellcheck dependencies. 4 | 5 | # Set options for extra caution & debugging 6 | set -o errexit \ 7 | -o pipefail 8 | 9 | # --allow-releaseinfo-change for error on appveyor like "Repository ... changed its 'Label' value" 10 | sudo apt-get update --yes --allow-releaseinfo-change 11 | sudo apt-get install --yes aspell aspell-en 12 | wget --directory-prefix=build/pandoc/filters \ 13 | https://github.com/pandoc/lua-filters/raw/13c3fa7e97206413609a48a82575cb43137e037f/spellcheck/spellcheck.lua 14 | -------------------------------------------------------------------------------- /ci/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## install.sh: run during an AppVeyor build to install the conda environment 4 | ## and the optional Pandoc spellcheck dependencies. 5 | 6 | # Set options for extra caution & debugging 7 | set -o errexit \ 8 | -o pipefail 9 | 10 | wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh \ 11 | --output-document miniforge.sh 12 | bash miniforge.sh -b -p $HOME/miniconda 13 | source $HOME/miniconda/etc/profile.d/conda.sh 14 | hash -r 15 | conda config \ 16 | --set always_yes yes \ 17 | --set changeps1 no 18 | mamba env create --quiet --file build/environment.yml 19 | mamba list --name manubot 20 | conda activate manubot 21 | 22 | # Install Spellcheck filter for Pandoc 23 | if [ "${SPELLCHECK:-}" = "true" ]; then 24 | bash ci/install-spellcheck.sh 25 | fi 26 | -------------------------------------------------------------------------------- /content/00.front-matter.md: -------------------------------------------------------------------------------- 1 | {## 2 | This file contains a Jinja2 front-matter template that adds version and authorship information. 3 | Changing the Jinja2 templates in this file may cause incompatibility with Manubot updates. 4 | Pandoc automatically inserts title from metadata.yaml, so it is not included in this template. 5 | ##} 6 | 7 | {## Uncomment & edit the following line to reference to a preprinted or published version of the manuscript. 8 | _A DOI-citable version of this manuscript is available at _. 9 | ##} 10 | 11 | {## Template to insert build date and source ##} 12 | 13 | test edit - hello world. This manuscript 14 | {% if manubot.ci_source is defined and manubot.ci_source.provider == "appveyor" -%} 15 | ([permalink]({{manubot.ci_source.artifact_url}})) 16 | {% elif manubot.html_url_versioned is defined -%} 17 | ([permalink]({{manubot.html_url_versioned}})) 18 | {% endif -%} 19 | was automatically generated 20 | {% if manubot.ci_source is defined -%} 21 | from [{{manubot.ci_source.repo_slug}}@{{manubot.ci_source.commit | truncate(length=7, end='', leeway=0)}}](https://github.com/{{manubot.ci_source.repo_slug}}/tree/{{manubot.ci_source.commit}}) 22 | {% endif -%} 23 | on {{manubot.generated_date_long}}. 24 | 25 | 26 | {% if manubot.date_long != manubot.generated_date_long -%} 27 | Published: {{manubot.date_long}} 28 | {% endif %} 29 | 30 | ## Authors 31 | 32 | {## Template for listing authors ##} 33 | {% for author in manubot.authors %} 34 | + **{{author.name}}** 35 | {% if author.corresponding is defined and author.corresponding == true -%}^[✉](#correspondence)^{%- endif -%} 36 |
37 | {%- set has_ids = false %} 38 | {%- if author.orcid is defined and author.orcid is not none %} 39 | {%- set has_ids = true %} 40 | ![ORCID icon](images/orcid.svg){.inline_icon width=16 height=16} 41 | [{{author.orcid}}](https://orcid.org/{{author.orcid}}) 42 | {%- endif %} 43 | {%- if author.github is defined and author.github is not none %} 44 | {%- set has_ids = true %} 45 | · ![GitHub icon](images/github.svg){.inline_icon width=16 height=16} 46 | [{{author.github}}](https://github.com/{{author.github}}) 47 | {%- endif %} 48 | {%- if author.twitter is defined and author.twitter is not none %} 49 | {%- set has_ids = true %} 50 | · ![Twitter icon](images/twitter.svg){.inline_icon width=16 height=16} 51 | [{{author.twitter}}](https://twitter.com/{{author.twitter}}) 52 | {%- endif %} 53 | {%- if author.mastodon is defined and author.mastodon is not none and author["mastodon-server"] is defined and author["mastodon-server"] is not none %} 54 | {%- set has_ids = true %} 55 | · ![Mastodon icon](images/mastodon.svg){.inline_icon width=16 height=16} 56 | [\@{{author.mastodon}}@{{author["mastodon-server"]}}](https://{{author["mastodon-server"]}}/@{{author.mastodon}}) 57 | {%- endif %} 58 | {%- if has_ids %} 59 |
60 | {%- endif %} 61 | 62 | {%- if author.affiliations is defined and author.affiliations|length %} 63 | {{author.affiliations | join('; ')}} 64 | {%- endif %} 65 | {%- if author.funders is defined and author.funders|length %} 66 | · Funded by {{author.funders | join('; ')}} 67 | {%- endif %} 68 | 69 | {% endfor %} 70 | 71 | ::: {#correspondence} 72 | ✉ — Correspondence possible via {% if manubot.ci_source is defined -%}[GitHub Issues](https://github.com/{{manubot.ci_source.repo_slug}}/issues){% else %}GitHub Issues{% endif %} 73 | {% if manubot.authors|map(attribute='corresponding')|select|max -%} 74 | or email to 75 | {% for author in manubot.authors|selectattr("corresponding") -%} 76 | {{ author.name }} \<{{ author.email }}\>{{ ", " if not loop.last else "." }} 77 | {% endfor %} 78 | {% endif %} 79 | ::: 80 | -------------------------------------------------------------------------------- /content/01.abstract.md: -------------------------------------------------------------------------------- 1 | ## Abstract {.page_break_before} 2 | 3 | TEST 4 | 5 | This manuscript is a Manubot demo, intended to give users a playground to practice using Manubot. 6 | Everyone is encouraged to try writing with Manubot by editing this manuscript. 7 | 8 | Manubot is described in the paper titled "Open collaborative writing with Manubot" [@url:https://greenelab.github.io/meta-review]. 9 | -------------------------------------------------------------------------------- /content/02.main-text.md: -------------------------------------------------------------------------------- 1 | ## Main text 2 | 3 | Lorem ipsum text [@url:https://en.wikipedia.org/wiki/Lorem_ipsum] is a strong introduction for any manuscript. 4 | 5 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 6 | Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 7 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 8 | Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 9 | 10 | Manubot makes it easy to cite this manuscript [@url:https://manubot.github.io/try-manubot]. 11 | It has been used to write several manuscripts that are now preprints on _bioRxiv_ [@doi:10.1101/474403; @doi:10.1101/515940; @doi:10.1101/502484; @doi:10.1101/654566]. 12 | Notice that only [@doi:10.1101/502484] has the correct name of the preprint server. 13 | Manubot allows authors to overwrite reference information, in this case with a BibTeX file. 14 | 15 | Lorem ipsum also makes a strong conclusion [@PMID:26945319] here is another reference to see if duplicate references are picked up by the program if the second author uses a different identifier for the same reference like here with the immediately preceding reference [@doi:10.1097/MOT.0000000000000306]. Did it work? 16 | 17 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 18 | Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 19 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 20 | Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 21 | 22 | I'm wondering about how editing this file works within the web browser. 23 | 24 | Testing inserting a reference Note that some buffers can potentially introduce modifications onto proteins such as carbamylation from urea at high temperatures [@doi:10.1016/j.ab.2013.10.024; @doi:10.1016/j.ab.2021.114321] . 25 | 26 | Trying with references again [@PMID:24161613] 27 | 28 | The objectives of the action plan for each sector are as follows: 29 | 30 | | **Development sector** | **Specific objectives of action plan** | 31 | | ----- | ---- | 32 | |**Agriculture** |SO 1: Recuperate and restore the fertility of degraded land| 33 | | |SO 2: Improve access for farmers to high quality agricultural production factors (equipment, inputs, land, results of agricultural research etc.)| 34 | | | SO 3: Improve the resilience of stakeholders to climate change} 35 | | | SO 4: Develop early warning systems to ensure efficient management of climate variability and change| 36 | | **Animal production** | SO 1: Improve the security of pastoral activities through better dissemination and exploitation of information on pastoral resources and associated access| 37 | | |SO 2: Ensure the security of animal capital with a view to supporting the pastoral economy on a sustainable basis and improve the resilience of stakeholders in order to achieve sustainable food security in Burkina Faso| 38 | | |SO 3: Reduce the vulnerability of farmers to climate change and contribute to local economic development| 39 | | **Environment and natural resources**| SO 1: Increase productivity and the resilience of ecosystems| 40 | | | SO 2: Improve biodiversity conservation| 41 | | | SO 3: Improve research and ecological monitoring| 42 | | | SO 4: Reduce GG emissions| 43 | | **Energy** | SO 1: Reduce the impact of climate change on the energy sector| 44 | | |SO 2: Ensure a sustainable supply of energy for cooking| 45 | | | SO 3: Reduce electricity consumption| 46 | | |SO 4: Gain more knowledge into the impact of climate change on the energy sector| 47 | | **Health** | SO 1: Ensure leadership and governance in terms of adapting to the impacts of climate change on the health sector| 48 | | | SO 2: Increase human resources in the health sector skilled in adapting to the effects of climate change| 49 | | | SO 3: Improve the early warning system and the response to climate change-related phenomena| 50 | | | SO 4: Adapt health infrastructure to the effects of climate change| 51 | | | SO 5: Improve research in the field of climate change| 52 | | **Infrastructure and housing** | OS 1: **Promote access to decent accommodation for disadvantaged social groups** by providing rental accommodation, supporting DIY construction and building social housing stock| 53 | | | SO 2: Provide public facilities and road, water and rain and waste-water drainage infrastructure which is practical and resilient through good design/implementation and good maintenance| 54 | | | OS 3:Turn the towns of Burkina Faso into hubs of economic growth and sustainable development by promoting a green economy| 55 | | **Horizontal issues** | SO 1: Help to improve mastery of environmental problems and climate change by members of women\'s associations| 56 | | | SO 2: Help to improve the resilience of members of women\'s associations by implementing revenue-generating activities| 57 | | | SO 3: Develop adaptation technologies which take account of the conditions in women\'s associations on the basis of traditional knowledge| 58 | | | SO 4: Improve the contribution of NGOs to better governance in implementing the NAP/CC in Burkina Faso| 59 | | | SO 5: Ensure the sustainability of civil society initiatives in climate change adaptation| 60 | | | SO 6: Help to improve public involvement in the process of reflection, analysis and decision-making in connection with climate change adaptation by producing, disseminating and making efficient use of information originating from innovative CSO experiences.| 61 | | |SO 7:Improve the mobilisation and exploitation of water resources* *| 62 | | | SO 8: Improve conservation and protection of water resources| 63 | | | SO 9: Improve knowledge about (surface and, more importantly, underground) water resources in the context of climate change| 64 | | | SO 10: Improve access to sanitation| 65 | 66 | ### The global NAP for the country as a whole can be summarised as follows: ### 67 | |**ADAPTATION OBJECTIVES: Protect accelerated growth pillars** |**ADAPTATION MEASURES AT SHORT, MEDIUM AND LONG-TERM**| 68 | |--|--| 69 | | Agriculture | - Cultivate early varieties or drought-resistant crops (Short) - Apply water and soil conservation methods (stone barriers, small dikes, filtering dikes, terraces, half moons, agroforestry, dune fixing etc.) (Short) - Promote sustainable land management (SLM) (Medium) - Improve access to climate information (Medium) - Introduce agricultural insurance (Long) | 70 | |Livestock farming | - Fight bush fires in order to prevent destruction [@doi:10.1136/bmj.312.7031.619] of dry-season grazing reserves- Adopt best animal husbandry and pastoral practices (pastoral hydraulics, pastoral resource management, pasture mowing and conservation, pasture crops, silage, animal mobility and transhumance etc.) - Ensure stakeholders take account of climate variability in development project and programme planning by improving their skills - Preserve cattle breeding at serious risk from climate variability - Ensure farmers adopt animal production methods adapted to a hot climate| 71 | 72 | I wonder what happens if I do hto 73 | 74 | Great Idea! 75 | 76 | Testing some identifier types [@bioproject:PRJDB3] and [@4dn:4DNES265ETYQ] and [@geo:GDS1234] 77 | -------------------------------------------------------------------------------- /content/90.back-matter.md: -------------------------------------------------------------------------------- 1 | ## References {.page_break_before} 2 | 3 | 4 |
5 | -------------------------------------------------------------------------------- /content/images/github.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /content/images/mastodon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /content/images/orcid.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /content/images/twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /content/manual-references.bib: -------------------------------------------------------------------------------- 1 | @article{doi:10.1101/502484, 2 | title = {Scaling tree-based automated machine learning to biomedical big data with a dataset selector}, 3 | copyright = {© 2018, Posted by Cold Spring Harbor Laboratory. This pre-print is available under a Creative Commons License (Attribution 4.0 International), CC BY 4.0, as described at http://creativecommons.org/licenses/by/4.0/}, 4 | url = {https://www.biorxiv.org/content/10.1101/502484v1}, 5 | doi = {10.1101/502484}, 6 | language = {en}, 7 | urldate = {2019-06-04}, 8 | journal = {bioRxiv}, 9 | author = {Le, Trang T. and Fu, Weixuan and Moore, Jason H.}, 10 | month = dec, 11 | year = {2018}, 12 | pages = {502484} 13 | } -------------------------------------------------------------------------------- /content/manual-references.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "url:https://github.com/manubot/rootstock", 4 | "type": "webpage", 5 | "URL": "https://github.com/manubot/rootstock", 6 | "title": "manubot/rootstock GitHub repository", 7 | "container-title": "GitHub", 8 | "issued": { 9 | "date-parts": [ 10 | [ 11 | 2019 12 | ] 13 | ] 14 | }, 15 | "author": [ 16 | { 17 | "given": "Daniel", 18 | "family": "Himmelstein" 19 | } 20 | ] 21 | } 22 | ] 23 | -------------------------------------------------------------------------------- /content/metadata.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Edit me to practice contributing to a collaborative Manubot manuscript" 3 | date: null # Defaults to date generated, but can specify like '2022-10-31'. 4 | keywords: 5 | - markdown 6 | - publishing 7 | - manubot 8 | - demo 9 | lang: en-US 10 | authors: 11 | - github: johndoe 12 | name: John Doe 13 | initials: JD 14 | orcid: XXXX-XXXX-XXXX-XXXX 15 | twitter: johndoe 16 | mastodon: johndoe 17 | mastodon-server: mastodon.social 18 | email: john.doe@something.com 19 | affiliations: 20 | - "Department of Something: University of Whatever" 21 | funders: 22 | - Grant XXXXXXXX 23 | - github: janeroe 24 | name: Jane Roe 25 | initials: JR 26 | orcid: XXXX-XXXX-XXXX-XXXX 27 | email: jane.roe@whatever.edu 28 | affiliations: 29 | - Department of Something, University of Whatever 30 | - Department of Whatever, University of Something 31 | corresponding: true 32 | -------------------------------------------------------------------------------- /output/README.md: -------------------------------------------------------------------------------- 1 | # Generated citation / reference files 2 | 3 | The `output` branch contains files automatically generated by the manuscript build process. 4 | It consists of the contents of the `output` directory of the `main` branch. 5 | These files are not tracked in `main`, but instead written to the `output` branch by continuous integration builds. 6 | 7 | ## Files 8 | 9 | This directory contains the following files: 10 | 11 | + [`citations.tsv`](citations.tsv) is a table of citations extracted from the manuscript and the corresponding standard citations and citation IDs. 12 | + [`manuscript.md`](manuscript.md) is a markdown document of all manuscript sections, with citation strings replaced by citation IDs. 13 | + [`references.json`](references.json) is CSL-JSON file of bibliographic item metadata ([see specification](https://github.com/citation-style-language/schema/blob/master/csl-data.json)) for all references. 14 | + [`variables.json`](variables.json) contains variables that were passed to the jinja2 templater. These variables contain those automatically generated by the manubot as well as those provided by the user via the `--template-variables-path` option. 15 | 16 | Pandoc consumes `manuscript.md` and `references.json` to create the formatted manuscript, which is exported to `manuscript.html`, `manuscript.pdf`, and optionally `manuscript.docx`. 17 | -------------------------------------------------------------------------------- /setup.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Setup Manubot 3 | # Based on https://github.com/manubot/rootstock/blob/main/SETUP.md 4 | # This is designed to be run from the bash terminal 5 | 6 | # Stop on first error. 7 | set -e 8 | 9 | usage() { 10 | echo "Usage: $0 [--owner text] [--repo text] [--yes]" 11 | echo "Guides the user through the creation of a new Manubot repository for their manuscript." 12 | echo 13 | echo "If no options are supplied a fully interactive process is used." 14 | echo "OWNER and REPO refer to the details of your manuscript repo location:" 15 | echo "i.e. https://github.com/OWNER/REPO." 16 | echo 17 | echo "Options:" 18 | echo " -o --owner GitHub user or organization name." 19 | echo " -r --repo Name of the repository for your new manuscript." 20 | echo " -y --yes Non-interactive mode. Continue script without asking for confirmation that the repo exists." 21 | echo " -s --ssh Use SSH to authenticate GitHub account. HTTPS is used by default." 22 | echo " Option only effective if --yes is also set, otherwise answer given in user interaction takes precedence." 23 | echo " -h --help Display usage information." 24 | 1>&2; exit 1; } 25 | 26 | # Check if to continue 27 | check(){ 28 | while true 29 | do 30 | echo "Once you have created your repo press enter to continue setup," 31 | read -r -p "or type exit to quit now: " input 32 | 33 | case $input in 34 | "") 35 | echo 36 | echo "Continuing Setup..." 37 | echo 38 | break 39 | ;; 40 | [eE][xX][iI][tT]) 41 | exit 1 42 | ;; 43 | *) 44 | echo 45 | echo "Invalid input, try again..." 46 | echo 47 | ;; 48 | esac 49 | done 50 | } 51 | 52 | # Option strings 53 | SHORT=o:r:hys 54 | LONG=owner:,repo:,help,yes,ssh 55 | 56 | YES=0 # continue when prompted 57 | AUTH=0 # used https or ssh auth 58 | 59 | # read the options 60 | OPTS=$(getopt --options $SHORT --long $LONG --name "$0" -- "$@") 61 | 62 | if [ $? != 0 ] ; then echo "Failed to parse options...exiting." >&2 ; exit 1 ; fi 63 | 64 | eval set -- "$OPTS" 65 | 66 | # extract options and their arguments into variables. 67 | while true ; do 68 | case "$1" in 69 | -o | --owner ) 70 | shift; 71 | OWNER=$1 72 | shift 73 | ;; 74 | -r | --repo ) 75 | REPO="$2" 76 | shift 2 77 | ;; 78 | -y | --yes ) 79 | YES=1 80 | shift 81 | ;; 82 | -s | --ssh ) 83 | AUTH=1; 84 | shift 85 | ;; 86 | -- ) 87 | shift 88 | break 89 | ;; 90 | -h | --help ) 91 | shift 92 | usage 93 | exit 1 94 | ;; 95 | *) 96 | echo "Internal error!" 97 | exit 1 98 | ;; 99 | esac 100 | done 101 | 102 | if [ -z "${OWNER}" ] || [ -z "${REPO}" ]; then 103 | echo "This script will take you through the setup process for Manubot." 104 | echo "First, we need to specify where to create the GitHub repo for your manuscript." 105 | echo 106 | echo "The URL will take this format: https://github.com/OWNER/REPO." 107 | echo "OWNER is your username or organization" 108 | echo "REPO is the name of your repository" 109 | echo 110 | read -r -p "Type in the OWNER now:" input 111 | OWNER=$input 112 | read -r -p "Type in the REPO now:" input 113 | REPO=$input 114 | fi 115 | 116 | # If using interactive mode, check remote repo exists. 117 | if [[ "$YES" == '0' ]]; then 118 | while true 119 | do 120 | echo 121 | read -r -p "Have you manually created https://github.com/${OWNER}/${REPO}? [y/n] " input 122 | 123 | case $input in 124 | [yY][eE][sS]|[yY]) 125 | 126 | echo 127 | echo "Continuing Setup..." 128 | echo 129 | break 130 | ;; 131 | [nN][oO]|[nN]) 132 | echo 133 | echo "Go to https://github.com/new and create https://github.com/${OWNER}/${REPO}" 134 | echo "Note: the new repo must be completely empty or the script will fail." 135 | echo 136 | check 137 | break 138 | ;; 139 | *) 140 | echo 141 | echo "Invalid input, try again..." 142 | echo 143 | ;; 144 | esac 145 | done 146 | else 147 | echo "Setting up https://github.com/${OWNER}/${REPO}" 148 | fi 149 | 150 | # Clone manubot/rootstock 151 | echo 152 | echo "Cloning Rootstock..." 153 | echo 154 | git clone --single-branch https://github.com/manubot/rootstock.git ${REPO} 155 | cd ${REPO} 156 | 157 | echo 158 | echo "Setup tracking of remote..." 159 | 160 | # Configure remotes 161 | git remote add rootstock https://github.com/manubot/rootstock.git 162 | 163 | # Check auth method 164 | if [[ "$YES" == '0' ]]; then 165 | while true 166 | do 167 | echo 168 | read -r -p "Would you like to use SSH to authenticate your GitHub account? [y/n] " input 169 | 170 | case $input in 171 | [yY][eE][sS]|[yY]) 172 | AUTH=1 173 | break 174 | ;; 175 | [nN][oO]|[nN]) 176 | AUTH=0 177 | break 178 | ;; 179 | *) 180 | echo 181 | echo "Invalid input, try again..." 182 | echo 183 | ;; 184 | esac 185 | done 186 | fi 187 | 188 | case $AUTH in 189 | 0) 190 | echo 191 | echo "Setting origin URL using its https web address" 192 | echo 193 | git remote set-url origin https://github.com/${OWNER}/${REPO}.git 194 | ;; 195 | 1) 196 | echo 197 | echo "Setting origin URL using SSH" 198 | echo 199 | git remote set-url origin git@github.com:$OWNER/$REPO.git 200 | ;; 201 | esac 202 | 203 | git push --set-upstream origin main 204 | 205 | # To use GitHub Actions only: 206 | echo "Setup for GitHub Actions ONLY..." 207 | # remove AppVeyor config 208 | git rm .appveyor.yml 209 | # remove ci/install.sh (only used by AppVeyor) 210 | git rm ci/install.sh 211 | 212 | # Update README 213 | echo "Updating README..." 214 | # Perform substitutions 215 | sed "s/manubot\/rootstock/${OWNER}\/${REPO}/g" README.md > tmp && mv -f tmp README.md 216 | sed "s/manubot\.github\.io\/rootstock/${OWNER}\.github\.io\/${REPO}/g" README.md > tmp && mv -f tmp README.md 217 | 218 | echo "Committing rebrand..." 219 | git add --update 220 | git commit --message "Brand repo to $OWNER/$REPO" 221 | git push origin main 222 | echo 223 | echo "Setup complete" 224 | echo 225 | echo "The new repo has been created at $(pwd)" 226 | echo 227 | echo "A good first step is to modify content/metadata.yaml with the relevant information for your manuscript." 228 | echo 229 | -------------------------------------------------------------------------------- /thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manubot/try-manubot/35547635f2446a0ca36751638c2b77d99d4060a6/thumbnail.png -------------------------------------------------------------------------------- /webpage/README.md: -------------------------------------------------------------------------------- 1 | # Output directory containing the formatted manuscript 2 | 3 | The [`gh-pages`](https://github.com/$REPO_SLUG/tree/gh-pages) branch hosts the contents of this directory at . 4 | The permalink for this webpage version is . 5 | To redirect to the permalink for the latest manuscript version at anytime, use the link . 6 | 7 | ## Files 8 | 9 | This directory contains the following files, which are mostly ignored on the `main` branch: 10 | 11 | + [`index.html`](index.html) is an HTML manuscript. 12 | + [`manuscript.pdf`](manuscript.pdf) is a PDF manuscript. 13 | 14 | The `v` directory contains directories for each manuscript version. 15 | In general, a version is identified by the commit hash of the source content that created it. 16 | 17 | ### Timestamps 18 | 19 | The `*.ots` files in version directories are OpenTimestamps which can be used to verify manuscript existence at or before a given time. 20 | [OpenTimestamps](https://opentimestamps.org/) uses the Bitcoin blockchain to attest to file hash existence. 21 | The `deploy.sh` script run during continuous deployment creates the `.ots` files through its `manubot webpage` call. 22 | There is a delay before timestamps get confirmed by a Bitcoin block. 23 | Therefore, `.ots` files are initially incomplete and should be upgraded at a later time, so that they no longer rely on the availability of a calendar server to verify. 24 | The `manubot webpage` call during continuous deployment identifies files matched by `webpage/v/**/*.ots` and attempts to upgrade them. 25 | You can also manually upgrade timestamps, by running the following in the `gh-pages` branch: 26 | 27 | ```shell 28 | ots upgrade v/*/*.ots 29 | rm v/*/*.ots.bak 30 | git add v/*/*.ots 31 | ``` 32 | 33 | Verifying timestamps with the `ots verify` command requires running a local bitcoin node with JSON-RPC configured, at this time. 34 | 35 | ## Source 36 | 37 | The manuscripts in this directory were built from 38 | [`$COMMIT`](https://github.com/$REPO_SLUG/commit/$COMMIT). 39 | -------------------------------------------------------------------------------- /webpage/images: -------------------------------------------------------------------------------- 1 | v/latest/images -------------------------------------------------------------------------------- /webpage/index.html: -------------------------------------------------------------------------------- 1 | v/latest/index.html -------------------------------------------------------------------------------- /webpage/manuscript.pdf: -------------------------------------------------------------------------------- 1 | v/latest/manuscript.pdf --------------------------------------------------------------------------------