b958f5b446
* working base with merged ui repo * include project search * widgets * working cards * remove .pyc files * again * add gitignore * nice hovers * interactive background working * beautiful search * working widgets * optimized * project query * all working * models show up but only from the last stream * fixed models * cleaner * model search moved * add models * UI models and bindings * rearrangement * moved folder * cleanup * rearrange * rename1 * rename2 * cleanup * rename1 * rename2 * hide old ui * bindings added * rename * still works * works * works except resize * project scroll working * scroll down * load button fixed * emit sender card to dockwidget * models cards added * model cards recognized * resize * publish works * cards created in the right order * fix order * styling * perfect model card * visuals * remove widget btn * publish button to the bottom * add and remove model cards faster * remove old code * stretch cards
25 lines
741 B
Python
25 lines
741 B
Python
def main():
|
|
"""Removes Python version and OS from Requirements.txt"""
|
|
req_file = "plugin_utils/requirements.txt"
|
|
|
|
with open(req_file, "r") as file:
|
|
lines = file.readlines()
|
|
new_lines = []
|
|
for i, line in enumerate(lines):
|
|
new_line = line.split(";")[0].replace(" ", "")
|
|
if "[" in new_line and "]" in new_line:
|
|
new_line = new_line.split("[")[0] + new_line.split("]")[1]
|
|
if i < len(lines) - 1:
|
|
new_line += "\n"
|
|
|
|
new_lines.append(new_line)
|
|
|
|
with open(req_file, "w") as file:
|
|
file.writelines(new_lines)
|
|
print("Requirements file overwritten")
|
|
file.close()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|