tahamajs's picture
download
raw
839 Bytes
import os
import re
directory = 'app/src/main/java/com/airmouse'
def replace_ports(filepath):
with open(filepath, 'r') as f:
content = f.read()
# Simple replacements
new_content = content.replace('8080', '9090')
new_content = new_content.replace('8081', '9091')
new_content = new_content.replace('8082', '9093')
# We might have mistakenly replaced something else but these are just 8080, 8081, 8082
# In port contexts they are safe to replace.
if new_content != content:
with open(filepath, 'w') as f:
f.write(new_content)
print(f"Updated {filepath}")
for root, _, files in os.walk(directory):
for file in files:
if file.endswith('.kt') or file.endswith('.md'):
filepath = os.path.join(root, file)
replace_ports(filepath)

Xet Storage Details

Size:
839 Bytes
·
Xet hash:
2bd0055512016c8f939fa27bcba595002d124ee7feb68066dea7e12d672a6308

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.