Comments (8)
Hi, the easy way to keep podcasts up to date is to have greg sync
as a cron job. The greg download
command you were suggesting would download all podcasts from the past 5 days, regardless of whether it had already downloaded them before.
As for the second part of your question, greg currently does not do anything to downloaded files. Once they have been downloaded, greg's job is over. I think that's as it should be. To keep your directories free of stuff older than 5 days you could perhaps use find
in another cron job. I believe the right incantation would be something like this:
find /path/to/podcast/dir/* -type f -mtime +5 -exec rm {} \
There's an rm
in there, so please test that I got it right before erasing something you didn't mean to!
Manolo
from greg.
Thank you, that's all I was looking for. I just wanted to make sure I
wasn't missing something and then reinventing the wheel.
Much appreciated!
On Mon, Oct 12, 2015 at 4:41 PM, manolomartinez [email protected]
wrote:
Hi, the easy way to keep podcasts up to date is to have greg sync as a
cron job. The greg download command you were suggesting would download
all podcasts from the past 5 days, regardless of whether it had already
downloaded them before.As for the second part of your question, greg currently does not do
anything to downloaded files. Once they have been downloaded, greg's job is
over. I think that's as it should be. To keep your directories free of
stuff older than 5 days you could perhaps use find in another cron job. I
believe the right incantation would be something like this:find /path/to/podcast/dir/* -type f -mtime +5 -exec rm {} \
There's an rm there, so please test that I got it right before erasing
something you didn't want to!Manolo
—
Reply to this email directly or view it on GitHub
#33 (comment).
from greg.
Thank you for reporting :) Closing now.
from greg.
Instead of using cron alternatively systemd user timers could be used (which are files that could be offered by greg) on systems using it as init system (like Arch)
from greg.
Huh, care expanding on that solution? It sounds interesting.
from greg.
Two unit files needs to be created. greg.service and greg.timer.
Installed would those files into /usr/lib/systemd/user (if a user wants to customize the fetch time he needs to copy it into $HOME/.config/systemd/user/ or /etc/systemd/user)
The service (greg.service) would look like:
[Unit]
Description=Greg - Podcast aggregator
Documentation=
RequiresMountsFor=/home/[Service]
Type=simple
ExecStart=/usr/bin/greg download
(IIRC more than one ExecStart can be added for example to add this find-remove command)
And the timer (greg.timer) would look like:
[Unit]
Description=Timer for greg[Timer]
OnBootSec=1h
OnUnitActiveSec=5h[Install]
WantedBy=timers.target
Activating is done via
systemctl --user start greg.timer
OnBootSec activates the .service 1h after booting. After that OnUnitActiveSec should take control and check/download every 5h
from greg.
Thanks a lot for the explanation, Narrat. As with some other systemd tools, I am not sure how this improves over cron jobs. I'll think about it.
Thanks again,
M
from greg.
The Arch-wiki lists some points
https://wiki.archlinux.org/index.php/Systemd/Timers#As_a_cron_replacement
from greg.
Related Issues (20)
- tags are applied inconsistenly HOT 1
- Changed behavior of {filename_title} using spaces breaks downloading HOT 4
- Some feeds stopped downloading with v0.4.8 HOT 5
- Feature request: force remove HOT 3
- BUG: Custom date format not working HOT 1
- problems with a few podcasts since uprade from Ubuntu 16.04 to 20.04 HOT 4
- Not all feeds works, ie soundcloud feeds, it seems HOT 9
- 403 errors (uncaught) on all Pinecast-hosted feeds HOT 1
- Install on Rapsberry Pi Raspbian HOT 1
- Remove the license from the configuration file HOT 1
- Does this tool re-download deleted podcast episodes? HOT 1
- Release 0.4.9?
- Tagging subprocess is easy to break
- Add github tag: podcast-downloader
- Python type error with feeds that have bozo errors - bug fix included!!!
- feed sync error: document declared as us-ascii, but parsed as utf-8
- Download using title of spefic podcast HOT 1
- Question: How are previously downloaded podcasts recorded? HOT 8
- Not following 302 redirects HOT 1
- Unable to parse buzzsprout buffer of type audio/mpeg HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from greg.