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.
Metadata
Release files for supabase-overleaf 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| supabase_overleaf-0.1.1.tar.gz | 10.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| supabase_overleaf-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.2 kB
Release files / supabase_overleaf-0.1.1.tar.gz
| Download URL | supabase_overleaf-0.1.1.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
792e737cfcf46844b80836cb3abac0cfec2e4c126d48fc6042aca0429dbdcaac
|
|
BLAKE2b-256 checksum How to use checksums |
714aecc6aa5bb714a23fba93a3b8ba51ad58c4429c6e47b17d09605f4000e80d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.0
|
Release files / supabase_overleaf-0.1.1-py3-none-any.whl
| Download URL | supabase_overleaf-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66645174ef61ddd3931cc138f823cd276363c1ef121020f03d8f72488d8811c4
|
|
BLAKE2b-256 checksum How to use checksums |
043ac4219940fb87b4b34bef8114f32c65d536b488be99c3cc87286d0c507e1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.0
|