First Commit Working on it
This commit is contained in:
commit
2f7220cad1
220 changed files with 44594 additions and 0 deletions
0
githubCrawler/__init__.py
Normal file
0
githubCrawler/__init__.py
Normal file
BIN
githubCrawler/__pycache__/__init__.cpython-39.pyc
Normal file
BIN
githubCrawler/__pycache__/__init__.cpython-39.pyc
Normal file
Binary file not shown.
BIN
githubCrawler/__pycache__/admin.cpython-39.pyc
Normal file
BIN
githubCrawler/__pycache__/admin.cpython-39.pyc
Normal file
Binary file not shown.
BIN
githubCrawler/__pycache__/models.cpython-39.pyc
Normal file
BIN
githubCrawler/__pycache__/models.cpython-39.pyc
Normal file
Binary file not shown.
BIN
githubCrawler/__pycache__/urls.cpython-39.pyc
Normal file
BIN
githubCrawler/__pycache__/urls.cpython-39.pyc
Normal file
Binary file not shown.
5
githubCrawler/admin.py
Normal file
5
githubCrawler/admin.py
Normal 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
5
githubCrawler/apps.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class GithubcrawlerConfig(AppConfig):
|
||||
name = 'githubCrawler'
|
||||
21
githubCrawler/migrations/0001_initial.py
Normal file
21
githubCrawler/migrations/0001_initial.py
Normal 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)),
|
||||
],
|
||||
),
|
||||
]
|
||||
33
githubCrawler/migrations/0002_auto_20220205_1704.py
Normal file
33
githubCrawler/migrations/0002_auto_20220205_1704.py
Normal 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),
|
||||
),
|
||||
]
|
||||
0
githubCrawler/migrations/__init__.py
Normal file
0
githubCrawler/migrations/__init__.py
Normal file
BIN
githubCrawler/migrations/__pycache__/0001_initial.cpython-39.pyc
Normal file
BIN
githubCrawler/migrations/__pycache__/0001_initial.cpython-39.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
githubCrawler/migrations/__pycache__/__init__.cpython-39.pyc
Normal file
BIN
githubCrawler/migrations/__pycache__/__init__.cpython-39.pyc
Normal file
Binary file not shown.
22
githubCrawler/models.py
Normal file
22
githubCrawler/models.py
Normal 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
3
githubCrawler/tests.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
11
githubCrawler/urls.py
Normal file
11
githubCrawler/urls.py
Normal 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
3
githubCrawler/views.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
Loading…
Add table
Add a link
Reference in a new issue