spellbook/filter-tabs-list.py

11 lines
400 B
Python
Raw Normal View History

2022-03-21 18:45:11 -07:00
# This program takes a txt file written by (SaveMyTabs)[https://addons.mozilla.org/en-US/firefox/addon/save-my-tabs/?src=search] and splits it such that each link is on it's own line which makes it easy to open in firefox
file = open('opentabs')
out = open('tab-list', 'w')
for line in file:
url = line[18:]
end = url.rfind("/")
snip = len(url) - end
out.write(url[:-snip] + "\n")