From 79e9b52480d1cf15030dfc5c5f926bcd7c5317d7 Mon Sep 17 00:00:00 2001 From: Sami Date: Sun, 13 Feb 2022 23:25:13 +0500 Subject: [PATCH] Github section working too, notifications and dockerfile rem --- db.sqlite3 | Bin 147456 -> 151552 bytes .../migrations/0010_auto_20220213_1722.py | 25 ++++++++ .../migrations/0011_auto_20220213_1724.py | 25 ++++++++ .../migrations/0012_auto_20220213_1751.py | 25 ++++++++ .../0010_auto_20220213_1722.cpython-39.pyc | Bin 0 -> 882 bytes .../0011_auto_20220213_1724.cpython-39.pyc | Bin 0 -> 882 bytes .../0012_auto_20220213_1751.cpython-39.pyc | Bin 0 -> 882 bytes .../__pycache__/models.cpython-39.pyc | Bin 1046 -> 1067 bytes githubCrawler/__pycache__/urls.cpython-39.pyc | Bin 223 -> 307 bytes .../__pycache__/views.cpython-39.pyc | Bin 0 -> 1528 bytes .../migrations/0003_auto_20220213_1722.py | 22 +++++++ .../migrations/0004_auto_20220213_1724.py | 28 +++++++++ .../migrations/0005_auto_20220213_1751.py | 18 ++++++ .../0003_auto_20220213_1722.cpython-39.pyc | Bin 0 -> 693 bytes .../0004_auto_20220213_1724.cpython-39.pyc | Bin 0 -> 792 bytes .../0005_auto_20220213_1751.cpython-39.pyc | Bin 0 -> 635 bytes githubCrawler/models.py | 17 +++--- githubCrawler/urls.py | 5 +- githubCrawler/views.py | 56 +++++++++++++++++- requirements.txt | 32 ++++++++++ templates/docker.html | 6 +- templates/github.html | 28 ++++----- templates/home.html | 4 +- 23 files changed, 259 insertions(+), 32 deletions(-) create mode 100644 dockerhubCrawler/migrations/0010_auto_20220213_1722.py create mode 100644 dockerhubCrawler/migrations/0011_auto_20220213_1724.py create mode 100644 dockerhubCrawler/migrations/0012_auto_20220213_1751.py create mode 100644 dockerhubCrawler/migrations/__pycache__/0010_auto_20220213_1722.cpython-39.pyc create mode 100644 dockerhubCrawler/migrations/__pycache__/0011_auto_20220213_1724.cpython-39.pyc create mode 100644 dockerhubCrawler/migrations/__pycache__/0012_auto_20220213_1751.cpython-39.pyc create mode 100644 githubCrawler/__pycache__/views.cpython-39.pyc create mode 100644 githubCrawler/migrations/0003_auto_20220213_1722.py create mode 100644 githubCrawler/migrations/0004_auto_20220213_1724.py create mode 100644 githubCrawler/migrations/0005_auto_20220213_1751.py create mode 100644 githubCrawler/migrations/__pycache__/0003_auto_20220213_1722.cpython-39.pyc create mode 100644 githubCrawler/migrations/__pycache__/0004_auto_20220213_1724.cpython-39.pyc create mode 100644 githubCrawler/migrations/__pycache__/0005_auto_20220213_1751.cpython-39.pyc create mode 100644 requirements.txt diff --git a/db.sqlite3 b/db.sqlite3 index 50b3a79237307a8fcd0f204e47ba02814c1f5973..63c6c1d8a5c7c52cb6dcee73f23bedc520558e6c 100644 GIT binary patch delta 2272 zcmcIlZ)h837{B+D<&rjcmyV7!UEPvs?WWD$z4teFb708qKsHB_7E7mTnjA^jCfBA{ z>xiYj)IT2t|7CEn52Xdc!LTUBMG$eiPeVbbU;H$N_{9$nL}7jreJ|;1o7B<`49Sz1 z_nzPLd!G0GJ~?d@qCQqV^9b~MU!}qgA5;+IZ+viR9Cx# z5b~+?oN1&SM~>eMrNjkQPKF%@PHX}3;!Y}F)C8GPWu8;ifujv7xL=egE2@$_QZFXo zy;%(JB)F{@p4X%}14RX@>cAro0}HuUhTTzuz{i!1m99L|*@e-+&?@~o{W5)-ev3Xw zcTsaPsZMqk06@fG#?RLbr!K=*;8oGS^O<>8R4)8&eR?1gkOXQa~E!bCAO zW#p7zwmQhJgJ^}j#(~E;5BZsY#s5z2i7{}@1~9jFe6S)95y1)^ zCW0d)VEJUFZ@6~700?lrB9AuqPMhiRDZN;E{5*1uAanLCSe7b5v`Qw?%KohgF5B&C zK;n?Its;mAQpLH#xL%5eCyJ(?(@XZ60Ybj;b3jv-yo5M8%wQYbqF3zP;HJexkIWKjSxll0n`lbrr#v{QSv=xn-!%AY|!cz685d@AZXJR zJ|aOi#!2=5<29&iP}x#(OV*Y~5!j@40^uWH1J-_(#zz*n<2ls|00LXELLibi&FNW< zWpfi|er}w}7zMU4VVd*lsVqA=hc3UUoBC{QR?n1lGnUhfdMRxhCH4Vvi(5d%fCy&U zLVDKJOQ#xTpo5X~xCa}W!FS6jUCJ5LCF26?EMl4LZtN{SJBSubk?7Wm2}lE27gn}{ z&GpZ_2rOfP=Ix!wk~8w@(zsEIWu_+dqPf>eY`KOTzU+>qN*C{If)lQVad)7{-@c5| zSLjpJZR&L@PTnTpAQ}Hx{#^Ud?aN3UnfAq$;=>Yj=1Ji5{aa5M#x)*EO=LI$$yN~d zl~W_7(Q-7M&Fa~x7A`L=yy&$s*%g^lJaa^eAoh-*=o#5{Chm$ zNXq%p7aMcs|7+zPqkvPhxja68`iopfMK(@3A!cWe=^yhLr6oj| znROXcvJ&&s^Wzg!ax?SdbMn)TRaGVj>aSyzX)@Smz^G!t#`m0eFHg&Mtpr95X2yW+ z!O4tM*jX4Dn67O0?>M(gR1a~R{NFUeE~6ZiCf8=h z2h0Y{#(d|evoByw2l_pcZ~OUmjHZmt#{5jv**Ad2rtocN+RymkfuGlgfra}N15Y#e zDSl_Zd0PdTWO$_vbq$Sl4NVjbO|1+}tV~Q97#Ncn(i_cBc$q?`$MG<6s~Q;?TIw2@>KYm=7#dj_T3Q*J1EXm> zLw2JvA3Kn=Ha5;EnXbdj)BsYiF#QZK(_9csbyEY2z;YG^CIJx+UOfi>75pxI_xM`* WEO_tnw(;r#JtfAwUC);35)%Mg6p diff --git a/dockerhubCrawler/migrations/0010_auto_20220213_1722.py b/dockerhubCrawler/migrations/0010_auto_20220213_1722.py new file mode 100644 index 0000000..247cb37 --- /dev/null +++ b/dockerhubCrawler/migrations/0010_auto_20220213_1722.py @@ -0,0 +1,25 @@ +# Generated by Django 3.0 on 2022-02-13 17:22 + +import datetime +from django.db import migrations, models +from django.utils.timezone import utc + + +class Migration(migrations.Migration): + + dependencies = [ + ('dockerhubCrawler', '0009_auto_20220206_0905'), + ] + + operations = [ + migrations.AlterField( + model_name='dockerhubcrawler', + name='last_pushed', + field=models.DateTimeField(blank=True, default=datetime.datetime(2019, 5, 20, 17, 22, 49, 233471, tzinfo=utc), null=True), + ), + migrations.AlterField( + model_name='dockerhubcrawler', + name='last_updated', + field=models.DateTimeField(blank=True, default=datetime.datetime(2019, 5, 20, 17, 22, 49, 233546, tzinfo=utc), null=True), + ), + ] diff --git a/dockerhubCrawler/migrations/0011_auto_20220213_1724.py b/dockerhubCrawler/migrations/0011_auto_20220213_1724.py new file mode 100644 index 0000000..daf0c9d --- /dev/null +++ b/dockerhubCrawler/migrations/0011_auto_20220213_1724.py @@ -0,0 +1,25 @@ +# Generated by Django 3.0 on 2022-02-13 17:24 + +import datetime +from django.db import migrations, models +from django.utils.timezone import utc + + +class Migration(migrations.Migration): + + dependencies = [ + ('dockerhubCrawler', '0010_auto_20220213_1722'), + ] + + operations = [ + migrations.AlterField( + model_name='dockerhubcrawler', + name='last_pushed', + field=models.DateTimeField(blank=True, default=datetime.datetime(2019, 5, 20, 17, 24, 29, 7546, tzinfo=utc), null=True), + ), + migrations.AlterField( + model_name='dockerhubcrawler', + name='last_updated', + field=models.DateTimeField(blank=True, default=datetime.datetime(2019, 5, 20, 17, 24, 29, 7578, tzinfo=utc), null=True), + ), + ] diff --git a/dockerhubCrawler/migrations/0012_auto_20220213_1751.py b/dockerhubCrawler/migrations/0012_auto_20220213_1751.py new file mode 100644 index 0000000..2b9c42d --- /dev/null +++ b/dockerhubCrawler/migrations/0012_auto_20220213_1751.py @@ -0,0 +1,25 @@ +# Generated by Django 3.0 on 2022-02-13 17:51 + +import datetime +from django.db import migrations, models +from django.utils.timezone import utc + + +class Migration(migrations.Migration): + + dependencies = [ + ('dockerhubCrawler', '0011_auto_20220213_1724'), + ] + + operations = [ + migrations.AlterField( + model_name='dockerhubcrawler', + name='last_pushed', + field=models.DateTimeField(blank=True, default=datetime.datetime(2019, 5, 20, 17, 51, 59, 100227, tzinfo=utc), null=True), + ), + migrations.AlterField( + model_name='dockerhubcrawler', + name='last_updated', + field=models.DateTimeField(blank=True, default=datetime.datetime(2019, 5, 20, 17, 51, 59, 100259, tzinfo=utc), null=True), + ), + ] diff --git a/dockerhubCrawler/migrations/__pycache__/0010_auto_20220213_1722.cpython-39.pyc b/dockerhubCrawler/migrations/__pycache__/0010_auto_20220213_1722.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..45fca0c4abb533dc1fb196a6d5a133f2dbe921a6 GIT binary patch literal 882 zcmZ`%O>fgc5M6t1$8i#xB0eO9=!HuzwG#xW2vw~>AR)npa`9#5c($qC^#{8)6}`f> zg1^CE+G|h!3zblrby78|#M=8jGkUW-^E}CD6cAk5ZhyW-2{|{;`f||O!>wK+00B#o z*nDka6?SYFG^UpEsc;H6b}jOrfCKJN0xq|6?+1-Nus)NCcY*oj)5O+6ku7A>WL2rO zS5&}-npm2)O`00Y`WmCNhg*F^;3T$y#5Pz9E2iAZU9f?2FYkfF{oDr^Jm`TBeF$K{ z`!GE7v6Rsng*#{0{Eh$c$G7>c>!}$6Ow@^EWa%5nRR(qbS;8 zN!wIx7R~UDUa)8Z8)D;n*Ttq>RwIt^Kw6dYp)-NTFv(8KPwwuYqPkbU?~QT~DU zSx03|2aI8AD>&Li#=f?RFzLnvUh@)onPyx`8_UtbzG%37XAYJ)Cq$3l;;{!=!Mm9D z%`FYO(oBpFs+zBU@*g6fV5o!3Jp7`#RG~_WEZnbak)_K~2;2IklE`f@hguD?qot&dwhG6uD;9M`dIe4hSYvo1T{q$eLEOZOp9 z%0;ye^RDf#)%gA@*fyC^+os9Ws$4eOCExV7w6@Gi{_CZbfs literal 0 HcmV?d00001 diff --git a/dockerhubCrawler/migrations/__pycache__/0011_auto_20220213_1724.cpython-39.pyc b/dockerhubCrawler/migrations/__pycache__/0011_auto_20220213_1724.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2436f21017565b92ab9c7a4bc68026c162e14d3e GIT binary patch literal 882 zcmZ`%&2G~`5MKYraS})o2n0fK;NnZ11SBMcs#YL4(F^6`%gXU=QakG(c5Nzhg==1b zH{fA-fxY&WSEz(w)=AZjs20p>{>##d}WD#l>IeC;|RC>g1|^*0EtX67Di+-J9EGUi@8|`Z02PiIN(ADJm`WC zJ=TT(+QU)?YYT3zulTqB!yn${FU-h?11$WG>VCK?7^@#bnJk$&Yi4gme9oCr_s8SO zn8r1L@8mh1yqr$=sL77nUb_B72|>r)<5L~a{b!U%kLe7n`xg0chajWMDK!6Go znXe^iZbepZM>aLKEu7qqTuMF=aKQaez~xrvo!XHH^b;9*ON=M`BTEN)I+t;smW9$@ zUIG_tM77=2Nn$9QYly}!ZuJ#`lZXO|ETD55+1$xou)yYC)&Yn6nGY^_&;cL15I~Q2 zp?~IMDT6Z`Zk%25Z~liryw0CnQ2<+5_$}T2cvUb~KZG(_aCy|s-pKe^a2eelk0%or zH+9LT<0-zA9X5G3eG;vy$%?9bB33o48g<0sAU*F8vUIVt zpS4uRbif#fHiF~1&)AnH7AD+Sz$;z=FOrliX<<1!*b_CE?@eNfb3*jsEv7w4bKd&2 zZ*Hm4lxAXdP*(i%C;uYy0lHea$imNxOBJd(Ps6>c5^1s;g|MlPOSxc`EHj?eD!kMT zIpKB5!}SD(DE{;x@t;n%t8das>*H4U%)z$)IIcr2d>;SaI9;^7QAgfKmhM6p7xQu( vW^LPTtI?fHXH%y_ZJQ=f%3{@M8@%psb$Vzr`7c-EzA|bl&y+xiv~T|fF^=rO literal 0 HcmV?d00001 diff --git a/githubCrawler/__pycache__/models.cpython-39.pyc b/githubCrawler/__pycache__/models.cpython-39.pyc index 53167bf8755e84d61a8db5b94086bf935272e252..7b33e8e7513a8b1377a0a92199fd971574d5a7ec 100644 GIT binary patch literal 1067 zcmY*Y!H&}~5Vhl^P1>}(s16eL)ufB}oGwd_d#Q9ejhv*x++eonpm>)R~R#u3+ovPhbd? zVvbVJ-or8XIJxoCVC(tZ=fMq0JK%T0_IU?RL-3;iUXOQqc!kpbHTsNs#Cum^8ebzH zr2|0JH-po>o;TBD#V({!`5%JN$=EZ!f_l(Twnf~jQX@_bB`g=YM+ky3TQ9DAw@ zo3k?v*2A*4m17WXGdE~~;5mE-b(2O(*nBPI=Ub#K-S=;jk6I|5XjbIO%c_!j#_D`k z>ZGYIR%%HrwOWX*)=Aa^g`8xzi#%!BoK)XUmr`9TN@M#v^boMDkM_!(Y%}&i+s;}! z0MYM3)fP6s#6O7LH-zKI=m~Ur>8YnS!pS4Zpk5g}&u_h&)cyutdW&F#bF}e(;h%0g zp#0$M&a!fkll3rL6-5s96inAbtq+p@z_?=w(62(sH(gfc6j(EXZYrUaMG5?|uVU=0 z$T>{SwCOA_?4Cy1Tx3hzzFTY}N;Ao{rqofb`jD?ipj@49*l`b!@X(9#dbCfIdtzup zN=sGXoG<2h3&xscoeSBEb6iq*meO&@^Nv}*KRa1*~S zYcUgTemdGYqGeM|p-$UC2h|L=MPx$Che9lLb!3$*$&zBHQQNOVJj90}LmU!E*BKD% tDWU8*n20Y}Ia^Kmw1pkKvwxz?YdLaPJ7upn;j^~r=eB#=J{03P_y;;o0G|K= delta 684 zcmYk4L2uJA6vzGIBu&~hq7!H!xUd7Pm!=>jCfLSdgB=jNzyWfxyxO$s(k8N#O{#`= zpwdo5sv>cQBSPYv@CEV>D)9+8Fl_e#mh$|bpWpNEZ|A%B*$ZjA-9&11e*B>?@glsl zwV@)07^G+dF#tM1%wl+s80IjxKH?ZN`!(u1OI_B5+MQ&Kr*g39TzB=7e7m^ZcesdIf|PX=shr>HRoR3x+ZRG_#2|x{ZUcm@<|kp z%A+332FG0V2H7M!c^CR&Q`zQ zbwxuHIx<)J;Ov zqm(JHHgV^At215zz7k@A(13%T&?Y!|Nvk{Ku`11v@i8Dn2 delta 142 zcmdnYbf2+4k(ZZ?0SLT`ekM9HGB7*_agYHMkmCTv#Uel=g&~D8has0Sijk2aogs=T zg(;Xplldi3hC!3@7E3{5Nrs;$^DXX_ti-(Ze7(}5oZ=#o0k^n;OrUH@YEfSCN`@j< Qpct5#cs_~^q=1JN08&>SFaQ7m diff --git a/githubCrawler/__pycache__/views.cpython-39.pyc b/githubCrawler/__pycache__/views.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fe4eb039548e6ff7d6ef874849500f5bab4fbe1b GIT binary patch literal 1528 zcmY*ZNpBlB6y`FUMvM0)J`_f7N*fC(ik^xfZj1&n95<+w%K(8e5@~50=>{XIT@WZZ6t2)@5g8iTKWg#Na|@<%{;3BP&^ zgdv6nn&Jp!%M(E&!YFeDojQ@Tq(jUV?$nFC&pJQynaBKJQ53L%HDGNpa)!F$BVr7tsbD2%}P^;c>u{-eTjh46DyGr=AI>>L$N}akt%+f0^HJ1&$MF$AN0hT+k{%;Z; zPz3PTlQ@AHX*9tzGDk<~BmVHzPGmwWqMeyrk~yv@!MD#y0f74 z=J*JGSg-ujpZK%J993|@m+vlLmJV|m`i(pRP3g=+<}y4dHQ!_q1sPkjmTrTe{{-D* z-PRr81It?p_=e@@v6+f_ramW|mO>%hsaSWl??CwQ*07F%U& z52Omq&|0cy*_<`mI@D}J-lkqJoA;OnyU0dWE!geGM=ba3TDC4=269iYvJIQD1Z#hz z41jI|PPXO(-G6+AWTFbv(#3pM7fpBB>rm!`R-GmeS@;&y!9jxARA6*d0d zm7(u{IWbNikGO4dnn#X(2%^@Q$1F)leI1V!Sb#=rONsk>3|9G--5TK{YTDSoBbhYq@5eZ>uSzqY|u`i1WU)LA)Ewo`ToBAFIBCEv1A$D*Jd$>bF?2#7mA$dl& z@ut(k0q8bK0J;D?Jra_T$`=sX4b3W>#OWwIP~%MMVWCw$1la|veOVY6sy@Sr4%Bz` n5y>9d>WSAmmRhv$kF5I)et^(I@E7)>RJK*9ja#342;6@FDG8qr literal 0 HcmV?d00001 diff --git a/githubCrawler/migrations/0003_auto_20220213_1722.py b/githubCrawler/migrations/0003_auto_20220213_1722.py new file mode 100644 index 0000000..ac7acb2 --- /dev/null +++ b/githubCrawler/migrations/0003_auto_20220213_1722.py @@ -0,0 +1,22 @@ +# Generated by Django 3.0 on 2022-02-13 17:22 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('githubCrawler', '0002_auto_20220205_1704'), + ] + + operations = [ + migrations.RemoveField( + model_name='githubcrawler', + name='last_updated', + ), + migrations.AddField( + model_name='githubcrawler', + name='last_pushed_number', + field=models.IntegerField(null=True), + ), + ] diff --git a/githubCrawler/migrations/0004_auto_20220213_1724.py b/githubCrawler/migrations/0004_auto_20220213_1724.py new file mode 100644 index 0000000..7b4a768 --- /dev/null +++ b/githubCrawler/migrations/0004_auto_20220213_1724.py @@ -0,0 +1,28 @@ +# Generated by Django 3.0 on 2022-02-13 17:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('githubCrawler', '0003_auto_20220213_1722'), + ] + + operations = [ + migrations.AlterField( + model_name='githubcrawler', + name='api_url', + field=models.CharField(blank=True, max_length=1000, null=True), + ), + migrations.AlterField( + model_name='githubcrawler', + name='last_pushed', + field=models.DateTimeField(blank=True, null=True), + ), + migrations.AlterField( + model_name='githubcrawler', + name='last_pushed_number', + field=models.IntegerField(blank=True, null=True), + ), + ] diff --git a/githubCrawler/migrations/0005_auto_20220213_1751.py b/githubCrawler/migrations/0005_auto_20220213_1751.py new file mode 100644 index 0000000..e2a55a5 --- /dev/null +++ b/githubCrawler/migrations/0005_auto_20220213_1751.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0 on 2022-02-13 17:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('githubCrawler', '0004_auto_20220213_1724'), + ] + + operations = [ + migrations.AlterField( + model_name='githubcrawler', + name='last_pushed', + field=models.DateField(blank=True, null=True), + ), + ] diff --git a/githubCrawler/migrations/__pycache__/0003_auto_20220213_1722.cpython-39.pyc b/githubCrawler/migrations/__pycache__/0003_auto_20220213_1722.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d434aedf4bf34b878f5f8c68696b143f03226dd8 GIT binary patch literal 693 zcmY*XOK;Oa5Z+f3+awa=(DDnAa;e=E1P4^LLIQE12Obw+R!(Mc9sKI9O~tuf^F#Pc zd*#Gm0P&c0QZ|kY!)$+;xt@Fg0b&D*cU~?8L53l1{m;?RXpXDNCjuF z7zmJG8A#-7c_UK^>K&Vpeh`+;g^Q{pH(6ISwRPjF0W9sxr}kw+!5OK2Mh02Rfu#a? z&QpnMJ@O4eZ3Ova@<%vX2QY@ohC{HCxky6@sb%ECH@Cg0@hmU8%YOO7WY;AccbFu} zLT7!~=tZ)iFL|PmpC*rQajP9}T4uJ>eG6HKFwE~~)^%2)Q-gglAllwuBIvrWmT2D3 zIVJnDoJ$kZ4#pGeMjs0-;erMW^iV)+7imo-^d*u%)%vQ>N?+7RfGyU5^{PN?=nl-? zdy7@`8DIJ`E;t7mJR^N>`nv8gN3%^vO^Z90zcF**NATun9)GZCY;3cth|k-$ELPiF z#C?0+m`}Pj%^Fvojd%MKCjO7O`0jo&QFyXX;qeJkxL6#uUyOevV^aH&Od!QyHBww~ x@kgoQ&!gY!*MPd1D;L5#tMldvmcydMMnm#$^sRSD)m-p=OWCPk+KFVlA#dxzvCWuTh>WN_E4&oukgJC?UNhqe++ROy6 z_B~;P^So$RU3#JTjRciESS%JtjCXC#mWw6+hez!2WVuXsdD%A4jCoVAPRXm{J8~9L z-TN-xVN*nM$r()^vIWB68Ij$5)mNbAJG^ zsw-1am(kQrSYL!O6EcQHI|*pd7<=DwX$xCVKm(P4Dl0%M*H#P9Wee)LJyKz_!~_>B zzV*%g8E@gLD4~bV>}AzLzDqV?-N5ehz7X}$wrAC^Jbt4==~(l!h|ilw7TNZS z)irBWy@ssS@s2LciT~j_zI_%kGJgC&~~y7o(aU7S9yIP(w>8U?jF1yV{1La%4YI(%jT)2M_bbF(ZA;n*Ixht literal 0 HcmV?d00001 diff --git a/githubCrawler/migrations/__pycache__/0005_auto_20220213_1751.cpython-39.pyc b/githubCrawler/migrations/__pycache__/0005_auto_20220213_1751.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cf7d84aaef5dc416dc58e60cfff5ea88d376661e GIT binary patch literal 635 zcmZWm&2H2%5cW^9n}n{^3-AU=xomcqR$LHm#oviufJ-ixHy+ZY&JT8?iZfjM0=xmQ zXK_KZB9Pc!~L%f%ugXeY1Z?RQGZPoLbk0FzU6`vij`ifYo(oHi_H zl)NR1DgKQp4z%W9dCpbvo}}R~#FCV`q^U|HhpKC>n>C#RZ3|zzZ*xpe(d`lgken)# zGet|9a|r6t4}e)cR{^f@nyJ|}$6BQ3I4E-QyW0skZc$dl#khTGnlHL7AhSD7W zC(ZGC*?%$q$7ksF5JSY-O%Mi@;X3#e+)UN;G;p!1Wm|SjwVfzUG^XO+lXs^_*u_Q9 OcjCP8Y^~SekpBg3@vD>o literal 0 HcmV?d00001 diff --git a/githubCrawler/models.py b/githubCrawler/models.py index fa0053b..8bba0dc 100644 --- a/githubCrawler/models.py +++ b/githubCrawler/models.py @@ -1,3 +1,4 @@ +from re import T from django.db import models # Create your models here. @@ -5,18 +6,18 @@ from django.db import models 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) + api_url = models.CharField(max_length=1000, null= True, blank=True) + last_pushed = models.DateField(null= True,blank=True) + last_pushed_number = models.IntegerField(null= True,blank=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' + check_len = len(self.url) + if self.url[check_len-1] == "/": + self.api_url = self.url + 'commits/master' + else: + self.api_url = self.url + '/commits/master' 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 \ No newline at end of file diff --git a/githubCrawler/urls.py b/githubCrawler/urls.py index 63961a9..7e96f8d 100644 --- a/githubCrawler/urls.py +++ b/githubCrawler/urls.py @@ -1,11 +1,10 @@ from django.urls import path +from . import views urlpatterns = [ -#path('create_routes////',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'), +path('github',views.GithubPage, name='GithubPage'), ] \ No newline at end of file diff --git a/githubCrawler/views.py b/githubCrawler/views.py index 91ea44a..bf4e02a 100644 --- a/githubCrawler/views.py +++ b/githubCrawler/views.py @@ -1,3 +1,57 @@ from django.shortcuts import render - +import requests +from .models import GithubCrawler # Create your views here. +import requests +from bs4 import BeautifulSoup +import datetime + +def month_converter(month): + months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + return months.index(month) + 1 + + +def GithubPage(request): + + for githubobj in GithubCrawler.objects.all(): + + URL = githubobj.api_url + page = requests.get(URL) + temp = '' + Soup = BeautifulSoup(page.text, 'lxml') + heading_tags = ["h2"] + for tags in Soup.find_all(heading_tags): + # print(tags) + temp = tags.text.strip() + break # first one is latest no need to loop through all of them + + temp = temp[10:] + temp = temp.replace(",", "") + temp = temp.split(' ') + #print(temp) + last_pushed_thing = datetime.datetime(int(temp[3]), int(month_converter(temp[1])), int(temp[2])) # y-m-d + + for div in Soup.findAll('div', attrs={'class':'issue-link js-issue-link'}): + print(div.find('a')['href']) + + # finding commit number here and saving in db + + el = Soup.find(class_='issue-link js-issue-link', href=True) + temp_result = (el['href']) + + temp_result = temp_result.split('/') + last_pushed_number_thing = int(temp_result[len(temp_result)-1]) + + if githubobj.last_pushed_number: + if githubobj.last_pushed_number < last_pushed_number_thing: + print("send email and notify here") + + githubobj.last_pushed_number = last_pushed_number_thing + githubobj.last_pushed = last_pushed_thing + + githubobj.save() + + allobjs = GithubCrawler.objects.all() + + + return render(request, 'github.html', context={'githubobjs': allobjs}) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0c9d44a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,32 @@ +backoff==1.11.1 +beautifulsoup4==4.10.0 +certifi==2021.10.8 +charset-normalizer==2.0.10 +click==8.0.3 +coverage==5.5 +gpg==1.16.0 +idna==3.3 +lxml==4.7.1 +noti.py==0.4.0 +numpy==1.22.0 +pandas==1.3.5 +protobuf==3.19.2 +pyonfleet==1.2.1 +PyQt3D==5.15.5 +PyQt5==5.15.6 +PyQt5-sip==12.9.0 +PyQtChart==5.15.5 +PyQtDataVisualization==5.15.5 +PyQtNetworkAuth==5.15.5 +PyQtPurchasing==5.15.5 +PyQtWebEngine==5.15.5 +python-dateutil==2.8.2 +pytz==2021.3 +PyYAML==5.4.1 +ratelimit==2.2.1 +requests==2.27.1 +six==1.16.0 +soupsieve==2.3.1 +TBB==0.2 +tqdm==4.62.3 +urllib3==1.26.8 diff --git a/templates/docker.html b/templates/docker.html index 5f83bca..383e101 100644 --- a/templates/docker.html +++ b/templates/docker.html @@ -61,7 +61,7 @@ Docker
  • {{ obj.url }}
  • +
  • {{ obj.last_pushed }}
  • +
  • {{obj.last_pushed_number}}
  • +
    + {% endfor %}

    - - Read More - +
    - +
    diff --git a/templates/home.html b/templates/home.html index 4d1e388..f236f0b 100644 --- a/templates/home.html +++ b/templates/home.html @@ -61,7 +61,7 @@ Docker