question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New environment variable value to avoid animation in download progress

See original GitHub issue

Good afternoon, lightpohl, and many thanks for this downloader program. After trying some others, I find yours much more simple and practical.

I’m in the process of creating a python 3 script (that later I will “dockerize”) to automate the downloading of my subscriptions and I have a problem when reading the output of your program using subprocess. Somehow, when I call your script using subprocess module in Python by doing:

o_process = subprocess.Popen(plu_cmd,
                             bufsize=0,
                             universal_newlines=True,
                             stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE)

# METHOD 1
#---------
#o_process.wait()
#u_stdout = o_process.stdout.read()
#u_stderr = o_process.stderr.read()

# METHOD 2
#---------
u_stdout, u_stderr = o_process.communicate()

# --- TEST CODE ---
print('CMD:    %s' % repr(plu_cmd))
print('STDOUT: %s' % repr(u_stdout))
# ------ end ------`

where plu_cmd is the shell call to your script, I don’t get the full stdout output and I precissely miss the animated lines of each episode, where the percentage downloaded is continuously updating.

CMD:    ('/mnt/jupiter/pw_david/projects/coding/docker/podcast_dl/scripts/bin/podcast-dl-linux-x64', '--url', 'https://www.ivoox.com/feed_fg_f133371_filtro_1.xml', '--out-dir', '/mnt/jupiter/pw_david/projects/coding/docker/podcast_dl/test_data/podcasts_private/podcast la hermandad', '--limit', '2', '--episode-template', '{{release_date}}_{{title}}')
STDOUT: 'Starting download of 2 episodes\n\n1 of 2\nTitle: La Hermandad Podcast 10x12: el programa de... algo, pero verano.\nPublish Date: Mon, 02 Aug 2021 12:23:34 +0200\n\n2 of 2\nTitle: La Hermandad Podcast 10x11: veraneando en la guerra del mañana\nPublish Date: Tue, 06 Jul 2021 13:53:26 +0200\n\n'

For that reason I would like to have an extra value for LOG_LEVEL environment variable that just printed a final static line.

Regards and many thanks in advance for taking it into consideration.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
HeuristicPersoncommented, Aug 16, 2021

Many thanks, lightpohl. I’m just finishing the docker image now with version 6.0.0 but this weekend I’ll try 6.1.0 and I’ll let you know how it goes.

imagen

1reaction
lightpohlcommented, Aug 15, 2021

Hey! Support for LOG_LEVEL=static is available in v6.1.0. Let me know if you run into any issues! 💯

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows Splash Screen for the Task Sequence Progress
The script will grab all variables and create an array of any variable values that the variable name starts with “SA_”.
Read more >
Environment Variables - V-Ray for 3ds Max - Chaos Help
This page provides information on environment variables that affect ... This variable is useful for animations with 3ds max OSLs as these ...
Read more >
Analyzing the Hidden Danger of Environment Variables for ...
The use of environment variables is a common practice in the DevOps community as it provides easy access to configuration properties.
Read more >
Reveal or hide a view using animation - Android Developers
Create member variables for the views that you want to crossfade. You need these references later when modifying the views during the animation....
Read more >
Python Progress Bar - Stack Overflow
The animated test (last one) should say in range(101) not 100, the progress stops at 99% and never displays done.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found