mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-01 14:55:12 +00:00
Deep rewrite: preparing for v1.0
- Pyrogram core is now fully asynchronous - Ditched Python 3.5, welcome 3.6 as minimum version. - Moved all types to pyrogram.types - Turned the Filters class into a module (filters) - Moved all filters to pyrogram.filters - Moved all handlers to pyrogram.handlers - Moved all emoji to pyrogram.emoji - Renamed pyrogram.api to pyrogram.raw - Clock is now synced with server's time - Telegram schema updated to Layer 117 - Greatly improved the TL compiler (proper type-constructor hierarchy) - Added "do not edit" warning in generated files - Crypto parts are executed in a thread pool to avoid blocking the event loop - idle() is now a separate function (it doesn't deal with Client instances) - Async storage, async filters and async progress callback (optional, can be sync too) - Added getpass back, for hidden password inputs
This commit is contained in:
@@ -46,7 +46,7 @@ with open("sitemap.xml", "w") as f:
|
||||
def search(path):
|
||||
try:
|
||||
for j in os.listdir(path):
|
||||
search("{}/{}".format(path, j))
|
||||
search(f"{path}/{j}")
|
||||
except NotADirectoryError:
|
||||
if not path.endswith(".rst"):
|
||||
return
|
||||
@@ -58,7 +58,7 @@ with open("sitemap.xml", "w") as f:
|
||||
else:
|
||||
folder = path[0]
|
||||
|
||||
path = "{}{}".format(canonical, "/".join(path))[:-len(".rst")]
|
||||
path = f"{canonical}{'/'.join(path)}"[:-len(".rst")]
|
||||
|
||||
if path.endswith("index"):
|
||||
path = path[:-len("index")]
|
||||
@@ -71,11 +71,11 @@ with open("sitemap.xml", "w") as f:
|
||||
urls.sort(key=lambda x: x[3], reverse=True)
|
||||
|
||||
for i in urls:
|
||||
f.write(" <url>\n")
|
||||
f.write(" <loc>{}</loc>\n".format(i[0]))
|
||||
f.write(" <lastmod>{}</lastmod>\n".format(i[1]))
|
||||
f.write(" <changefreq>{}</changefreq>\n".format(i[2]))
|
||||
f.write(" <priority>{}</priority>\n".format(i[3]))
|
||||
f.write(" </url>\n\n")
|
||||
f.write(f" <url>\n")
|
||||
f.write(f" <loc>{i[0]}</loc>\n")
|
||||
f.write(f" <lastmod>{i[1]}</lastmod>\n")
|
||||
f.write(f" <changefreq>{i[2]}</changefreq>\n")
|
||||
f.write(f" <priority>{i[3]}</priority>\n")
|
||||
f.write(f" </url>\n\n")
|
||||
|
||||
f.write("</urlset>")
|
||||
|
Reference in New Issue
Block a user