aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
blob: 9734804c5dcdbaba0c87c2a26ada4358514a959b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use tokio;

use reflectub::{database, git, github};

use std::path::Path;


#[tokio::main]
async fn main() {
    // let repos = github::fetch_repos().unwrap();
    //
    // dbg!(&repos);

    // git::mirror(
    //     "https://github.com/teddywing/google-calendar-rsvp.git",
    //     Path::new("/tmp/grsvp"),
    // ).unwrap();

    // git::update(
    //     Path::new("/tmp/grsvp"),
    // ).unwrap();

    let mut db = database::Db::connect("test.db").await.unwrap();

    // db.create().await.unwrap();

    // If repo !exists
    //   insert
    //   mirror
    // Else
    //   Update updated_at
    //   fetch

    dbg!(db.repo_get(2).await.unwrap());
}