Skip to content

Commit 8ee9aac

Browse files
committed
cleaner progress log display
1 parent f3edd33 commit 8ee9aac

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,13 @@ In case when the same option is specified both in the YAML file and in as a comm
9696
When you run BDFR manually from your Terminal, if you pass `--progress-bar` you will get a short summary of results with a progress bar, instead of more detailed logs.
9797

9898
```
99-
✅ 646🔼 Colorado lake porn by None
100-
✅ 643🔼 Crater lake, Oregon [OC] 6000x4000 byBroomesPhotography
101-
✅ 642🔼 Lake Louis, Alberta, Canada - Aug 4/21 by hallidc
102-
✅ 118637🔼 TIME’s new cover. by sudde004
103-
✅ 87051🔼 “Safety glasses” that I made for my wife’s Optometry office. by alanbrendan
104-
✅ 71576🔼 I'd like to propose this type of design for this sub's logo. by None
105-
✅ 66352🔼 The new National Geographic cover by Crazylyric
106-
✅ 65328🔼 This "Seatbelts save lives" campaign by harschil
107-
✅ 65106🔼 Poster for better shark culling laws by mladish
108-
✅ 62722🔼 Really cool design made by Daren Newman for the Tokyo Olympics by None
109-
✅ 61632🔼 Let us make this International Fixed Calendar work by BanX
110-
✅ 60414🔼 Very direct ads from the City of Toronto against littering by the_ravenant
99+
✅ 52🔼 Helianthus Annuus: A beautiful sunflower grown from a birdseed mix. [OC]
100+
❌ 124🔼 Olives
101+
✅ 20🔼 Carpobrotus chilensis, Marina, California [3023x4032] [OC]
102+
✅ 0🔼 Game made with preserved ferns, acorns, meadowsweet flowers and moss [OC]
103+
✅ 223🔼 Plinia cauliflora "Jabuticaba" and bees
104+
✅ 367🔼 Frozen saxifraga cotyledon - or "fjelldronning" aka mountain queen - on a r...
105+
✅ 135🔼 Hibiscus syriacus - Minerva Rose of Sharon [OC]
111106
Subreddits: 100%|███████████████████████████████████████| 5/5 [00:45<00:00, 9.09s/subreddit]
112107
```
113108

bdfr/downloader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def download(self):
4848
for generator in tqdm(self.reddit_lists, desc="Subreddits", unit="subreddit", colour="red"):
4949
desc = generator.url if isinstance(generator, praw.models.ListingGenerator) else "Posts"
5050
for submission in tqdm(list(generator), desc=desc, unit="post", colour="green", leave=False):
51-
log_str = f'{submission.score}🔼 {submission.title} by {submission.author}'
51+
title_short = submission.title[:60] + (submission.title[60:] and '...')
52+
log_str = f'{submission.score:5d}🔼 {title_short}'
5253
try:
5354
if self._download_submission(submission):
5455
logger_progress_bar.info(f'✅ {log_str}')

0 commit comments

Comments
 (0)