changes folder structure of in- and output files

This commit is contained in:
Michael Beck committed 2023-06-23 20:39:40 +02:00
1 parent 02c3d055bd
commit 27746cd886
5 files changed
+6 -167

No files matched your search

+6 -3
View File
@@ -69,8 +69,11 @@ wd = "/home/michael/Documents/PS/Data/collectTweets/"
# WD Server # WD Server
# wd = '/home/yunohost.multimedia/polsoc/Politics & Society/TweetCollection/' # wd = '/home/yunohost.multimedia/polsoc/Politics & Society/TweetCollection/'
# datafile input directory
di = "data/IN/"
# Tweet-datafile output directory # Tweet-datafile output directory
td = "data/tweets/" td = "data/OUT/"
# Name of file that all tweets will be written to # Name of file that all tweets will be written to
file_alltweets = "ALL-SENATORS-TWEETS.csv" file_alltweets = "ALL-SENATORS-TWEETS.csv"
@@ -171,9 +174,9 @@ print("---")
# read keywords from a file and write to list. # read keywords from a file and write to list.
keywords = [] keywords = []
# Remove duplicate Keywords and save all non-duplicates to 'data/keywords.txt' # Remove duplicate Keywords and save all non-duplicates to 'data/keywords.txt'
deDupe("data/keywords-raw.txt", "data/keywords.txt") deDupe(f"{di}keywords-raw.txt", f"{di}keywords.txt")
# Read the keywords from a file # Read the keywords from a file
with open("data/keywords.txt", "r") as file: with open(f"{di}keywords.txt", "r") as file:
lines = file.readlines() lines = file.readlines()
for line in lines: for line in lines:
keyword = line.strip() # Remove the newline character keyword = line.strip() # Remove the newline character
File renamed without changes.
File renamed without changes.
Internal Server Error - Gitea
500 Internal Server Error

An error occurred:

An error occurred

Gitea Version: 28.2.0