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

DocsScraper sub repo #5

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions DocsScraper/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name = "DocsScraper"
uuid = "6a596b1c-bad6-44d4-a29c-1a7b4368ba96"
authors = ["Shreyas Agrawal <[email protected]>"]
version = "0.1.0"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Gumbo = "708ec375-b3d6-5a57-a7ce-8257bf98657a"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
splendidbug marked this conversation as resolved.
Show resolved Hide resolved

[compat]
AbstractTrees = "0.4.5"
Gumbo = "0.8.2"
HTTP = "1.10.4"
URIs = "1.5.1"
24 changes: 24 additions & 0 deletions DocsScraper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# DocsScraper: "A document scraping and parsing tool used to create a custom RAG database for AIHelpMe.jl"

This tool is used to collect and parse Julia's extensive documentation.

## Requirements

```julia
using Pkg
Pkg.add("HTTP")
Pkg.add("Gumbo")
Pkg.add("AbstractTrees")
Pkg.add("URIs")
```

## Usage
1. **Basic Usage**:
```julia
parsed_text = parse_url("https://docs.julialang.org/en/v1/base/multi-threading/")
```

## How it works
```parse_url(url::String)``` extracts the base URL and recursively parses the URL so that all the inner lying text and code is returned in the form of a Vector of Dict along with each text/code's metadata.

Please note that this is merely a pre-release and more work needs to be done
1 change: 1 addition & 0 deletions DocsScraper/src/DocsScraper.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include("parser.jl")
Loading