Skip to content
Snippets Groups Projects
Commit 16190a42 authored by TonyFord's avatar TonyFord
Browse files

add pull

parent 9dbab6fb
No related branches found
No related tags found
1 merge request!2Exchange.faircoin.co
......@@ -10,7 +10,7 @@ title:
-
de: "P2P Marktplatz"
en: "P2P marketplace"
url: "https://faircoin.co"
baseurl: "https://exchange.faircoin.co/p2p/1"
github_username: "tonyford"
color_theme: "rgb(15, 21, 57)"
color_text: "#fff"
......@@ -29,3 +29,5 @@ plugins_dir:
exclude:
- script
destination: ../1
pull.php 0 → 100644
<?php
$repo=$_GET['repo'];
if( !empty($repo) ){
$f='pull.yml';
echo $rep.' added to the list! Update regulary every 5 minutes';
$fp=fopen($f,'a+');
fwrite( $fp, '- '.$repo );
fclose( $fp );
}
?>
......@@ -5,6 +5,10 @@ import re
import os
import shutil
pullfile='../../1/pull.yml'
if not os.path.exists(pullfile):
sys.exit(0)
try:
shutil.rmtree('../_posts')
......@@ -30,7 +34,18 @@ file.close()
Sources=load( s, Loader=Loader )['sources']
for source in Sources:
file = open( pullfile ,'r')
s=file.read()
file.close()
Pulls=load( s, Loader=Loader )
for source in Pulls:
if not source in Sources:
continue
G=source.split('/')
gituser=G[-2]
......@@ -57,4 +72,6 @@ for source in Sources:
file.write('\n---')
file.close()
print( contents )
os.remove(pullfile)
......@@ -7,7 +7,7 @@ import datetime
Date=datetime.datetime.now().strftime('%Y-%m-%d')
file = open('../_site/price-sources.json','r')
file = open('../../1/price-sources.json','r')
j=file.read()
file.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment