add pasta getter

This commit is contained in:
Andrew Rogers
2021-10-22 16:32:18 -05:00
parent a5f6103eeb
commit 6fb0fc3a75
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -4,6 +4,8 @@ import json as j
import tweepy as t
import typing
from .pastas import PASTAS
def parse_args(args: [str], name: str):
parser = argparse.ArgumentParser(prog=name)
+12
View File
@@ -0,0 +1,12 @@
def get_pastas() -> list:
pfile = open("pastas.txt", mode="r")
pastas = pfile.read().split("\n\n")
pfile.close()
for n in range(len(pastas)):
pastas[n] = pastas[n].split("\n")
return pastas
PASTAS = get_pastas()