-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from Exifly/main
v1.3.14
- Loading branch information
Showing
33 changed files
with
4,092 additions
and
154 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"count": 1426, | ||
"entries": [ | ||
{ | ||
"API": "AdoptAPet", | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import subprocess | ||
|
||
PS_CD="cd /code" | ||
PS_START_SERVER="python start.py" | ||
PS_START_SERVER_2="python3 start.py" | ||
|
||
result_code = subprocess.call(PS_START_SERVER, shell=True) | ||
if result_code != 0: | ||
print(f"Command {PS_START_SERVER} failed to run.. Trying {PS_START_SERVER_2}") | ||
subprocess.call(PS_START_SERVER_2, shell=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Flask==2.2.3 | ||
Flask==2.2.5 | ||
Flask-Cors==3.0.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from datetime import datetime | ||
import xml.etree.ElementTree as ET | ||
|
||
# legge gli URL dal file | ||
with open('urls.txt', 'r') as f: | ||
urls = f.read().splitlines() | ||
|
||
# crea un nuovo oggetto ElementTree | ||
urlset = ET.Element('urlset') | ||
urlset.set('xmlns', 'http://www.sitemaps.org/schemas/sitemap/0.9') | ||
|
||
# per ogni URL, crea un nuovo elemento url e aggiungi loc e lastmod | ||
for url in urls: | ||
url_elem = ET.SubElement(urlset, 'url') | ||
loc_elem = ET.SubElement(url_elem, 'loc') | ||
loc_elem.text = url | ||
lastmod_elem = ET.SubElement(url_elem, 'lastmod') | ||
lastmod_elem.text = datetime.now().strftime('%Y-%m-%d') | ||
priority_el = ET.SubElement(url_elem, 'priority') | ||
priority_el.text = "0.2" | ||
|
||
# crea il file sitemap.xml e scrive l'ElementTree al suo interno | ||
ET.ElementTree(urlset).write('sitemap.xml', encoding='utf-8', xml_declaration=True) |
Oops, something went wrong.