A tool to crawl Overleaf templates and store data in Supabase
Project description
Supabase Overleaf Template Crawler
This project crawls LaTeX templates from Overleaf and stores them in a Supabase instance. It can be set up to work with both local and cloud-based Supabase deployments.
Table of Contents
Setup
Supabase CLI Installation
The Supabase CLI is a powerful tool that simplifies the process of setting up and managing your Supabase projects. Here's how to install it on different operating systems:
macOS
Using Homebrew:
brew install supabase/tap/supabase
Windows
Using Scoop:
scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
scoop install supabase
Linux
Using Apt (Debian/Ubuntu):
sudo apt-get update
sudo apt-get install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.supabase.com/public/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/supabase-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/supabase-archive-keyring.gpg] https://dl.supabase.com/apt stable main" | sudo tee /etc/apt/sources.list.d/supabase.list
sudo apt-get update
sudo apt-get install supabase
For other Linux distributions, you can use the official install script:
curl -s https://packages.supabase.com/setup.sh | sudo bash
After installation, verify the CLI is installed correctly:
supabase --version
Local Supabase Setup
-
Initialize a new Supabase project:
supabase init -
Start the local Supabase instance:
supabase start -
This will provide you with local URLs and keys. Make note of these for configuration.
Cloud Supabase Setup
-
Log in to your Supabase account via CLI:
supabase login -
Initialize a new project:
supabase init -
Link your local project to a Supabase project:
supabase link --project-ref your-project-ref
Replace
your-project-refwith your actual project reference. -
Push your local schema to the cloud project:
supabase db push
Project Installation
-
Clone this repository:
git clone https://github.com/yourusername/supabase-overleaf-crawler.git cd supabase-overleaf-crawler
-
Install dependencies:
pip install -r requirements.txt
Configuration
-
Copy the example configuration file:
cp src/config/config.example.py src/config/config.py
-
Edit
src/config/config.pywith your Supabase details:- For local setup, use the URL and key provided by
supabase start - For cloud setup, use the URL and key from your Supabase project dashboard
- For local setup, use the URL and key provided by
Usage
Run the crawler:
python src/main.py
Project Structure
src/: Contains the source codemain.py: Main entry pointcrawler_general.py: Crawls general template informationcrawler_detail.py: Crawls detailed template informationdb_handler.py: Handles database operationsconfig/: Contains configuration files
data/: (Optional) For storing any local datarequirements.txt: List of Python dependenciesREADME.md: This filesupabase/: Contains Supabase configuration files (created bysupabase init)
Database Setup
The crawler expects certain tables to exist in your Supabase database. You can set these up by running the SQL commands in supabase/migrations/your-migration-file.sql.
For both local and cloud setups, the migration will be applied automatically when you run supabase db push.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file supabase_overleaf-0.1.1.tar.gz.
File metadata
- Download URL: supabase_overleaf-0.1.1.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
792e737cfcf46844b80836cb3abac0cfec2e4c126d48fc6042aca0429dbdcaac
|
|
| MD5 |
b537db82c781d8769103e50a4c9be36b
|
|
| BLAKE2b-256 |
714aecc6aa5bb714a23fba93a3b8ba51ad58c4429c6e47b17d09605f4000e80d
|
File details
Details for the file supabase_overleaf-0.1.1-py3-none-any.whl.
File metadata
- Download URL: supabase_overleaf-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66645174ef61ddd3931cc138f823cd276363c1ef121020f03d8f72488d8811c4
|
|
| MD5 |
b35c6d02980624e8d0d2c4786a9d5b30
|
|
| BLAKE2b-256 |
043ac4219940fb87b4b34bef8114f32c65d536b488be99c3cc87286d0c507e1b
|