First Commit Working on it

This commit is contained in:
asamihassan 2022-02-06 02:35:04 +05:00
commit 2f7220cad1
220 changed files with 44594 additions and 0 deletions

View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

5
githubCrawler/admin.py Normal file
View file

@ -0,0 +1,5 @@
from django.contrib import admin
from .models import GithubCrawler
# Register your models here.
admin.site.register(GithubCrawler)

5
githubCrawler/apps.py Normal file
View file

@ -0,0 +1,5 @@
from django.apps import AppConfig
class GithubcrawlerConfig(AppConfig):
name = 'githubCrawler'

View file

@ -0,0 +1,21 @@
# Generated by Django 3.0 on 2022-02-01 18:00
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='GithubCrawler',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('url', models.CharField(max_length=300)),
],
),
]

View file

@ -0,0 +1,33 @@
# Generated by Django 3.0 on 2022-02-05 17:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('githubCrawler', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='githubcrawler',
name='api_url',
field=models.CharField(max_length=1000, null=True),
),
migrations.AddField(
model_name='githubcrawler',
name='last_pushed',
field=models.DateTimeField(null=True),
),
migrations.AddField(
model_name='githubcrawler',
name='last_updated',
field=models.DateTimeField(null=True),
),
migrations.AlterField(
model_name='githubcrawler',
name='url',
field=models.CharField(max_length=1000),
),
]

View file

22
githubCrawler/models.py Normal file
View file

@ -0,0 +1,22 @@
from django.db import models
# Create your models here.
class GithubCrawler(models.Model):
url = models.CharField(max_length=1000,blank = False)
api_url = models.CharField(max_length=1000, null= True)
last_pushed = models.DateTimeField(null= True)
last_updated = models.DateTimeField(null= True)
def __str__(self):
return self.url
def save(self, *args, **kwargs):
split_string = self.url.split("/")
self.api_url = 'https://hub.docker.com/v2/repositories/' + split_string[5] +'/' \
+ split_string[6] + '/tags/?page=1&page_size=800'
super(GithubCrawler, self).save(*args, **kwargs)
# Research , via Chrome dev tools ;)
#https://hub.docker.com/r/vectorim/element-web/tags
#https://hub.docker.com/v2/repositories/vectorim/element-web/tags/?page=1&page_size=800

3
githubCrawler/tests.py Normal file
View file

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

11
githubCrawler/urls.py Normal file
View file

@ -0,0 +1,11 @@
from django.urls import path
urlpatterns = [
#path('create_routes/<str:string_passed>/<str:start_date>/<str:end_date>/',views.create_routes, name='create_routes'),
#path('check_LoggedIn/',views.logged_in_user, name='logged_in_user'),
#path('check_Socials/',views.social_media_details, name='social_media_details'),
]

3
githubCrawler/views.py Normal file
View file

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.