Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul PDF Generation #201

Merged
merged 46 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
a65fc34
Add booklet support
uvidyadharan Jul 13, 2023
42fae84
Merge branch 'FIRST-Tech-Challenge:main' into booklets
uvidyadharan Jul 13, 2023
fd8d2cb
Merge pull request #73 from uvidyadharan/booklets
uvidyadharan Jul 13, 2023
a84902c
Branding
uvidyadharan Jul 16, 2023
1c05e5f
Reformat for pdf generation
uvidyadharan Jul 18, 2023
97e2206
Delete update-tlmgr-latest.sh
uvidyadharan Jul 18, 2023
2e49e49
Fix errors on CI check
uvidyadharan Jul 18, 2023
f9dbf84
Update conf.py
uvidyadharan Jul 18, 2023
78f88d9
Minor Changes
uvidyadharan Jul 21, 2023
7748b6f
Test
uvidyadharan Jul 21, 2023
3d3f456
Update make
uvidyadharan Jul 21, 2023
7f74ec8
Merge pull request #74 from uvidyadharan/branding-2
uvidyadharan Jul 21, 2023
a9299d4
Fix yaml
uvidyadharan Jul 21, 2023
a647f78
Merge pull request #75 from uvidyadharan/branding-2
uvidyadharan Jul 21, 2023
2cb9f09
debug
uvidyadharan Jul 21, 2023
cefee43
Update Makefile
uvidyadharan Jul 21, 2023
be25310
Update Makefile
uvidyadharan Jul 21, 2023
79b8ee5
Update Makefile
uvidyadharan Jul 21, 2023
7b5330c
Update conf.py
uvidyadharan Jul 21, 2023
6d027f4
Update booklets.yaml
uvidyadharan Jul 22, 2023
2edd75d
Update booklets.yaml
uvidyadharan Jul 22, 2023
7c8c227
Update booklets.yaml
uvidyadharan Jul 22, 2023
a7c8cbb
Update booklets.yaml
uvidyadharan Jul 22, 2023
302dc30
Add S3 support
uvidyadharan Jul 26, 2023
49169ae
Update conf.py
uvidyadharan Jul 26, 2023
341b915
Update booklets.yaml
uvidyadharan Jul 26, 2023
3a2ee0f
Update booklets.yaml
uvidyadharan Jul 26, 2023
9f2521e
Update booklets.yaml
uvidyadharan Jul 26, 2023
441894b
Update conf.py
uvidyadharan Jul 26, 2023
14e451a
Add booklets page
uvidyadharan Jul 26, 2023
fab20dc
Update index.rst
uvidyadharan Jul 26, 2023
6494dc4
Update conf.py
uvidyadharan Aug 3, 2023
3a2101b
Update Blocks-Tutorial.rst
uvidyadharan Aug 3, 2023
d76a69a
Update Android-Studio-Tutorial.rst
uvidyadharan Aug 3, 2023
b1029ca
Update OnBot-Java-Tutorial.rst
uvidyadharan Aug 3, 2023
9f98cb8
Update disable-instant-run.rst
uvidyadharan Aug 3, 2023
8c9ff80
Update Downloading-the-Android-Studio-Project-Folder.rst
uvidyadharan Aug 3, 2023
ed76983
Update Fork-and-Clone-From-GitHub.rst
uvidyadharan Aug 3, 2023
60fe8f2
Update Blocks-Reference-Material.rst
uvidyadharan Aug 3, 2023
0600729
Update managing-opmodes.rst
uvidyadharan Aug 3, 2023
4efd83d
Update Using-Sensors-(Blocks).rst
uvidyadharan Aug 3, 2023
87b2adb
Update Controlling-a-Servo-(OnBot-Java).rst
uvidyadharan Aug 3, 2023
6eca49a
Merge branch 'main' of github.com:uvidyadharan/ftcdocs
uvidyadharan Aug 3, 2023
2eb1e72
Add Workflow documentation
uvidyadharan Aug 3, 2023
4c76ddb
Merge branch 'branding-2' of github.com:uvidyadharan/ftcdocs
uvidyadharan Aug 3, 2023
c93560c
Update Style
uvidyadharan Aug 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/booklets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Booklets Builder"

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build-booklets:
runs-on: ubuntu-latest
if: github.repository == 'uvidyadharan/ftcdocs'
permissions:
id-token: write
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Refresh Packages
run: sudo apt-fast -y update

- name: Install Dependencies
run: xargs -a dependencies sudo apt-fast install -y

- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'pip'

- name: Python Install Dependencies
run: pip install -r docs/requirements.txt

- name: Build Booklets
env:
SPHINXOPTS: "-D html_context.commit=${{ github.sha }} -D version=latest -A display_github=true -A github_user=${{ github.repository_owner }} -A github_repo=${{ github.event.repository.name }} -A github_version=${{ github.ref_name }} -A conf_py_path=/docs/source/"
run: make -C docs/ booklets

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::549273919012:role/gh-actions/ftc-docs-uploader
aws-region: us-west-2
- name: Upload Booklets to S3
run: |
aws s3 sync docs/build/booklets s3://ftc-docs-cdn/booklets/en --delete
7 changes: 5 additions & 2 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- uses: reviewdog/action-misspell@v1
with:
Expand Down Expand Up @@ -123,5 +123,8 @@ jobs:
with:
python-version: 3.8

- name: Python Install Dependencies
run: pip install -r docs/requirements.txt

- name: image-check
run: make -C docs/ imagecheck
run: make -C docs/ imagecheck
1 change: 1 addition & 0 deletions dependencies
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
texlive-xetex
latexmk
jq
fonts-roboto
11 changes: 11 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ SIZEMAX = 500
AUTOBUILD = sphinx-autobuild
HTMLBUILDDIR = build/html
LATEXBUILDDIR = build/latex/
BOOKLETSBUILDDIR = build/booklets

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Expand All @@ -24,6 +26,15 @@ help:
autobuild:
@$(AUTOBUILD) $(SOURCEDIR) $(HTMLBUILDDIR) --port=7350

--move-booklets:
mkdir -p $(BOOKLETSBUILDDIR)
cp $(addsuffix .pdf, $(basename $(wildcard $(LATEXBUILDDIR)*.tex))) $(BOOKLETSBUILDDIR)

--generate-booklets:
BOOKLETS_BUILD="true" $(SPHINXBUILD) -M latexpdf $(SOURCEDIR) $(BUILDDIR) $(SPHINXOPTS) $(O)

booklets: --generate-booklets --move-booklets

local-full:
DOCS_BUILD="true" $(SPHINXBUILD) -b html $(SOURCEDIR) $(HTMLBUILDDIR) $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M latexpdf $(SOURCEDIR) $(BUILDDIR) $(SPHINXOPTS) $(O)
Expand Down
4 changes: 3 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ git+https://github.com/FIRST-Tech-Challenge/ftcdocs-helper@main#subdirectory=jav
sphinx_design==0.2.0
git+https://github.com/FIRST-Tech-Challenge/ftcdocs-helper@main#subdirectory=googleanalytics
git+https://github.com/FIRST-Tech-Challenge/ftcdocs-helper@main#subdirectory=cookiebanner
sphinx-sitemap==2.3.0
sphinx-sitemap==2.3.0
python-git-info==0.8.3
sphinxcontrib-mermaid==0.9.2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/assets/FTC_Center_Stage_Title.pdf
Binary file not shown.
Binary file added docs/source/assets/Latex_Footer_FTC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/assets/Latex_Logo_FTC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions docs/source/booklets/advanced.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
:orphan:

.. only:: latex

Advanced Topics, Progrmming Resources
=====================================

.. toctree::
:maxdepth: 1
:titlesonly:

/programming_resources/vision/vision_overview/vision-overview
/programming_resources/vision/tensorflow_pp_2022/tensorflow_pp_2022
/programming_resources/vision/blocks_tfod_opmode/blocks-tfod-opmode
/programming_resources/vision/java_tfod_opmode/java-tfod-opmode
/programming_resources/vision/tensorflow_ff_2021/tensorflow-ff-2021
/programming_resources/vision/webcam_controls/webcam-controls
Camera Calibration </programming_resources/vision/camera_calibration/camera-calibration>

.. toctree::
:maxdepth: 1
:titlesonly:

/programming_resources/shared/pid_coefficients/pid-coefficients
/programming_resources/shared/pidf_coefficients/pidf-coefficients
/programming_resources/shared/auto_load_opmode/auto-load-opmode
/programming_resources/shared/myblocks/index
/programming_resources/shared/external_libraries_blocks/external-libraries-blocks.rst
/programming_resources/imu/imu.rst
/programming_resources/shared/installing_kotlin/Installing-Kotlin
15 changes: 15 additions & 0 deletions docs/source/booklets/apriltags.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:orphan:

.. only:: latex

April Tags in *FIRST* Tech Challenge
====================================

.. toctree::

AprilTag Introduction </apriltag/vision_portal/apriltag_intro/apriltag-intro>
VisionPortal Overview </apriltag/vision_portal/visionportal_overview/visionportal-overview>
Understanding AprilTag Values </apriltag/understanding_apriltag_detection_values/understanding-apriltag-detection-values>
AprilTag Test Images </apriltag/opmode_test_images/opmode-test-images>


13 changes: 13 additions & 0 deletions docs/source/booklets/control_system.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:orphan:

.. only:: latex

*FIRST* Tech Challenge Control System
=====================================

.. toctree::

/programming_resources/shared/control_system_intro/The-FTC-Control-System
/control_hard_compon/index
/hardware_and_software_configuration/index

29 changes: 29 additions & 0 deletions docs/source/booklets/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Booklets
========

More 'bite-sized' versions of the FTC Docs. These are meant to be printed out and used as a reference for teams.

..
In order to add a booklet, add a link to the booklet in the list below. The link should be in the format of:
https://ftc-docs-cdn.ftclive.org/booklets/en/<booklet_name>.pdf

FTC Machine Learning
--------------------
- `FTC ML Manual <https://ftc-docs-cdn.ftclive.org/booklets/en/ftc_ml.pdf>`_

Programming Resources
---------------------
- `Programming Resources <https://ftc-docs-cdn.ftclive.org/booklets/en/prgrm_res.pdf>`_
- `Android Studios Manual <https://ftc-docs-cdn.ftclive.org/booklets/en/android_studios.pdf>`_
- `OnBot Java Manual <https://ftc-docs-cdn.ftclive.org/booklets/en/onbot_java.pdf>`_
- `Blocks Manual <https://ftc-docs-cdn.ftclive.org/booklets/en/blocks.pdf>`_

- `April Tags <https://ftc-docs-cdn.ftclive.org/booklets/en/april_tags.pdf>`_
- `Advanced User <https://ftc-docs-cdn.ftclive.org/booklets/en/advanced.pdf>`_
- `FTC SDK Guide <https://ftc-docs-cdn.ftclive.org/booklets/en/sdk.pdf>`_

Control System
--------------

- `Control System <https://ftc-docs-cdn.ftclive.org/booklets/en/control_system.pdf>`_

14 changes: 14 additions & 0 deletions docs/source/booklets/sdk.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:orphan:

.. only:: latex

*FIRST* Tech Challenge SDK
==========================

.. toctree::

SDK Overview </ftc_sdk/overview/index>
Updating Components </ftc_sdk/updating/index>



Loading
Loading