Skip to content

A convenient repository to convert into comprehensive PDFs the Effect documentation, and the guides and examples of the official Effect repo and Effect HTTP. Optimized for ChatGPT integration.

Notifications You must be signed in to change notification settings

guillempuche/effect_docs_for_chatgpt

Repository files navigation

Effect Documentation PDF and Markdown Generator for ChatGPT

This guide explains how to create a PDF or markdown file from the Effect documentation, README guides, and examples.

Prerequisites

Setup

Clone the Necessary Repositories

First, clone the Effect Website and Effect Github repositories:

git clone https://github.com/Effect-TS/website.git
git clone https://github.com/Effect-TS/effect.git
git clone https://github.com/sukovanej/effect-http.git

Next, in the same directory where you cloned the Effect Website, clone your Deno PDF generator repository:

git clone https://github.com/guillempuche/effect_docs_for_chatgpt.git

Your directory structure should now look something like this:

/some-folder
|-- /effect_docs_for_chatgpt
|-- /effect
|-- /effect-http
|-- /website

Usage

Navigate to the Deno PDF generator directory and run the following command:

cd effect_docs_for_chatgpt
deno task generate-pdf <docsDirPath> <effectDirPath> <httpDirPath> [format:pdf|md] [outputFileName]

This command will convert the Markdown files found in the ../website/content/docs directory and include content from the ../effect repository into a single PDF or Markdown file named documentation. The last format and the document name arguments are optional.

Example Command

If all repositories are cloned under your home directory, the command would look like this:

deno task generate-pdf ../website/content/docs ../effect ../effect-http md output <-- It will generate "output.md"
deno task generate-pdf ../website/content/docs ../effect ../effect-http pdf <-- It will generate "documentation.pdf"
deno task generate-pdf ../website/content/docs ../effect ../effect-http <-- It will generate "documentation.pdf"

Additional Commands

Within the Deno PDF generator repository, you have access to other useful tasks:

  • Linting: deno lint to check for stylistic errors.
  • Formatting: deno fmt to format the source code.

Troubleshooting

  • Ensure you have read and write permissions for the directories involved.
  • Confirm that all paths are correctly specified in the commands.
  • Check that Deno is correctly installed by running deno --version.
  • If you encounter errors related to Deno's permissions, ensure the script in your deno.jsonc file has the necessary permissions flags set.

About

A convenient repository to convert into comprehensive PDFs the Effect documentation, and the guides and examples of the official Effect repo and Effect HTTP. Optimized for ChatGPT integration.

Topics

Resources

Stars

Watchers

Forks