Code for meetup
This commit is contained in:
16
data/memory_meetup.txt
Normal file
16
data/memory_meetup.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
310753901
|
||||||
|
304005128
|
||||||
|
300733325
|
||||||
|
296579530
|
||||||
|
273576878
|
||||||
|
311033533
|
||||||
|
310565375
|
||||||
|
305666752
|
||||||
|
310538528
|
||||||
|
310339068
|
||||||
|
274632122
|
||||||
|
271940122
|
||||||
|
270401915
|
||||||
|
269622193
|
||||||
|
264720799
|
||||||
|
239405910
|
||||||
@@ -96,9 +96,9 @@ how_to_find_us: {how_to_find_us}
|
|||||||
|
|
||||||
|
|
||||||
def add_to_memory(text: str):
|
def add_to_memory(text: str):
|
||||||
# Save in /data/memory.txt, if not already present, the url pass as argument
|
# Save in /data/memory_meetup.txt, if not already present, the url pass as argument
|
||||||
os.makedirs("data", exist_ok=True)
|
os.makedirs("data", exist_ok=True)
|
||||||
memory_file = "data/memory.txt"
|
memory_file = "data/memory_meetup.txt"
|
||||||
if not os.path.exists(memory_file):
|
if not os.path.exists(memory_file):
|
||||||
with open(memory_file, "w") as f:
|
with open(memory_file, "w") as f:
|
||||||
f.write("")
|
f.write("")
|
||||||
@@ -118,8 +118,8 @@ def main(
|
|||||||
memory: Annotated[bool, typer.Option("--memory", "-m")] = False,
|
memory: Annotated[bool, typer.Option("--memory", "-m")] = False,
|
||||||
):
|
):
|
||||||
if memory:
|
if memory:
|
||||||
if os.path.exists("data/memory.txt"):
|
if os.path.exists("data/memory_meetup.txt"):
|
||||||
with open("data/memory.txt") as f:
|
with open("data/memory_meetup.txt") as f:
|
||||||
memory = f.read().splitlines()
|
memory = f.read().splitlines()
|
||||||
for item in memory:
|
for item in memory:
|
||||||
print(f"Fetching event {item} from memory...")
|
print(f"Fetching event {item} from memory...")
|
||||||
|
|||||||
Reference in New Issue
Block a user