Samsara commited on
Commit
caba9f1
1 Parent(s): a0758e2

Upload 3 files

Browse files
Files changed (3) hide show
  1. Sheet1.txt +0 -0
  2. artist.txt +0 -0
  3. randumbizer.py +29 -0
Sheet1.txt ADDED
The diff for this file is too large to render. See raw diff
 
artist.txt ADDED
The diff for this file is too large to render. See raw diff
 
randumbizer.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import random
2
+ import pyperclip
3
+
4
+ def read_random_lines(artist_file="artist.txt", sheet_file="Sheet1.txt"):
5
+ with open(artist_file, "r") as artist, open(sheet_file, "r") as sheet:
6
+ artist_lines = artist.readlines()
7
+ sheet_lines = sheet.readlines()
8
+
9
+ random.shuffle(artist_lines)
10
+
11
+ while artist_lines:
12
+ sheet_line = random.choice(sheet_lines).strip()
13
+
14
+ num_artist_lines = random.randint(1, 4)
15
+
16
+ selected_artist_lines = artist_lines[:num_artist_lines]
17
+ artist_lines = artist_lines[num_artist_lines:]
18
+
19
+ result = f"{sheet_line}, " + ", ".join(line.strip() for line in selected_artist_lines)
20
+
21
+ print(result)
22
+ pyperclip.copy(result)
23
+ print("\nContent copied to clipboard.")
24
+
25
+ input("\nPress Enter to get more lines...\n")
26
+
27
+ print("\nAll lines have been displayed.")
28
+
29
+ read_random_lines()