You are not logged in.

#26 2013-10-05 23:52:09

RMorel
Member
Registered: 2013-10-05
Posts: 10

Re: Greg -- a command-line podcast aggregator

Hi Manolo,

I was just trying out greg and even though I have only used it for a short while it does seem pretty great at what it does, but I am having a small issue.

I would like to organize the podcasts by their name as a directory in ~/Podcasts, this does indeed work with 'Create subdirectory = yes' in the .conf file.
The issue is I am stubborn and want to use spaces in the name as appropriate, but greg puts single quotes around the directory name when it creates it/writes to it.

I started afresh and here are my steps to reproduce:

  • cp /etc/greg.conf ~/.config/greg/greg.conf
  • vim ~/.config/greg/greg.conf
  • diff -U 0 /etc/greg.conf ~/.config/greg/greg.conf
    --- /etc/greg.conf      2013-05-03 04:11:36.000000000 +0200
    +++ /home/rolf/.config/greg/greg.conf   2013-10-06 00:54:41.779512259 +0200
    @@ -71 +71 @@
    -Create subdirectory = no
    +Create subdirectory = yes
  • greg add 'The History Of Rome' http://feeds.feedburner.com/TheHistoryOfRome

    Note: my shell is zsh, but escaping is standard shell behaviour.

  • greg info
    
    The History Of Rome
    -------------------
        url: http://feeds.feedburner.com/TheHistoryOfRome

    Note: here the quotes are not added to the name.

  • greg download 1
    Downloading Update- One Year Later -- Post_History_of_Rome_Update.mp3
  • ls -R ~/Podcasts
    /home/rolf/Podcasts:
    'The History Of Rome'
    
    /home/rolf/Podcasts/'The History Of Rome':
    Post_History_of_Rome_Update.mp3

    Note: the single quotes round the directory name.

It seems likely that it is a small bug, but if you have some other suggestion that would be great too.

Rolf

Edit:
The version of greg used is the 'normal' AUR package.

Last edited by RMorel (2013-10-05 23:55:12)

Offline

#27 2013-10-06 20:07:00

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

Hi, Rolf, thanks a lot for your comments!

I've just checked the behaviour of both the stable greg and the git head, and, here, with bash and fish, the subdirectory is created correctly, without quotes. A couple of things:

  • Could you please try running that sequence of greg commands in bash? Just to rule out that something in your .zshrc is interfering, perhaps.

  • In the meantime, as a workaround, you might want to try

    greg add The\ History\ Of\ Rome\ http://feeds.feedburner.com/TheHistoryOfRome

    That is, escaping spaces. That seems to work here too.

Let me know how these two little tests come up, if and when you can.

Cheers,
Manolo

Last edited by manolomartinez (2013-10-06 20:08:37)

Offline

#28 2013-10-06 21:10:12

RMorel
Member
Registered: 2013-10-05
Posts: 10

Re: Greg -- a command-line podcast aggregator

Hi Manolo,

I just tried with bash and it does not matter which type of quoting I use (backslash, single or double quotes), all yield the same result.
This is with both stable and git-latest.

I have verified that if I actually pass the quotes to greg they will show up in greg info.

  • $ greg add The\ History\ Of\ Rome http://feeds.feedburner.com/TheHistoryOfRome
  • $ greg add \'The\ History\ Of\ Rome\' http://feeds.feedburner.com/TheHistoryOfRome
  • $ greg info
    
    The History Of Rome
    -------------------
        url: http://feeds.feedburner.com/TheHistoryOfRome
    
    'The History Of Rome'
    ---------------------
        url: http://feeds.feedburner.com/TheHistoryOfRome

I git cloned the repository to see if I can resolve the problem myself and a simple search did bring this up:

.../greg $ ack 'Create subdirector' 
data/greg.conf
74:Create subdirectory = no

greg/greg.py
145:            section, 'Create subdirectories', fallback='no')
288:        "Create subdirectory", "no")

Are these (last) two meant to be separate configure options?

If you have not already, maybe you could try with an clean copy of the conf file and apply the patch and see if this helps in reproducing my trouble.

Edit:
~/.local/share/greg/data/data (with 'normal' escaped spaces):

[The History Of Rome]
url = http://feeds.feedburner.com/TheHistoryOfRome
date_info = available

Last edited by RMorel (2013-10-06 21:59:31)

Offline

#29 2013-10-06 22:51:38

RMorel
Member
Registered: 2013-10-05
Posts: 10

Re: Greg -- a command-line podcast aggregator

Hi Manolo,

I fixed my issue.

There is a pull request up on Github.

I only wonder why it didn't reproduce on your system, because if Create subdirectory = yes is set it was always going to hit it.

P.S.
Moderators, hope fixing the issue merits a post of it's own. Please excuse the double post.

Last edited by RMorel (2013-10-06 22:54:17)

Offline

#30 2013-10-07 19:05:14

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

RMorel wrote:

I fixed my issue.

There is a pull request up on Github

Thanks, Rolf. I've just accepted your request. I will put together a new release shortly with this and other changes.

Manolo

Offline

#31 2013-10-13 11:15:06

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

Hi, just a note to let you know that I have released greg 0.4.0

* It includes now the ability of filtering feeds (see the default greg.conf for details)
* It has fixed a number of bugs.

Enjoy, and let me know if there are regressions or other problems.

Manolo

Offline

#32 2013-10-21 09:19:48

FilipB
Member
Registered: 2013-10-21
Posts: 2

Re: Greg -- a command-line podcast aggregator

Great program, I made some changes which seem to work well for me:

Sometimes a feed doesn't specify <published> or <updated> but does for the individual podcasts, I added a check if the first two checks fail to see if entries[0].published_parsed is set and if so set sync_by_date to True.

I download my podcasts as {date}-{filename_title} but Stagger was not finding the filename if it contained accented characters. I changed the sanitize() function to convert unicode to equivalent ascii, it works ok now.

Added:

# {subtitle} a description of the feed
# {entrysummary} a summary of the podcast entry

to the placeholders because I like to set podcast summaries into mp3 comment fields to read on my old rockboxed mp3 player.

Makes use of three new modules: unicodedata, string, BeautifulSoup

I'm not really a programmer so there might be some bugs to check for but the changes are pretty minimal and it seems to work fine with the 60 or so podcasts I follow.

Hope you can make use of this stuff, here's a link to the diff file which is set against the current git version:

http://pastebin.com/d32CcvDk

Last edited by FilipB (2013-10-21 09:44:40)

Offline

#33 2013-10-21 12:57:14

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

Hi, Filip,

Thanks a lot for this. The patch looks good! It would make my life a bit easier if you could:

1. Clone my git repository
2. Add your changes (as you have) on top of HEAD
3. Create the patch with git format-patch

Please let me know if this is possible; otherwise, I'll try to read the patch as it is.

Cheers,
Manolo

Offline

#34 2013-10-22 06:46:06

FilipB
Member
Registered: 2013-10-21
Posts: 2

Re: Greg -- a command-line podcast aggregator

Manolo,

I managed to create a github account and send you a pull request, hope it works out.

-Filip

edit: I forgot to change the PKGBUILD file, I guess it would need to be updated to include 'python-beautifulsoup4' as a dependency.

Last edited by FilipB (2013-10-22 06:54:43)

Offline

#35 2013-10-24 20:11:02

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

Just a note to let you know that the changes proposed by FilipB in message #32 above are now in the master branch.

In case someone worries about these things (I do), it's still the case that the only non-optional dependencies to greg are `python` and `python-feedparser`.

Manolo

Offline

#36 2013-10-26 18:12:20

Sanjeev K Sharma
Member
Registered: 2013-08-14
Posts: 66

Re: Greg -- a command-line podcast aggregator

Just started using this, looks good.

I sometimes go a long time without doing a sync for a month or more.

Is there a "sync since the last issue downloaded" instead of syncing just the most recent one posted?

Also some podcasts list their entries in reverse - can "greg check" list the episodes in reverse?

Offline

#37 2013-10-26 18:49:06

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

Hi, Sanjeev,

Sanjeev K Sharma wrote:

I sometimes go a long time without doing a sync for a month or more.

Is there a "sync since the last issue downloaded" instead of syncing just the most recent one posted?

The default behaviour is:

1 The first time greg syncs a feed, it downloads the very last entry
2 From then on, it donwloads every issue that has appeared since the last sync (or every available issue, whatever's possible).

I read you as asking for greg to do 2, which it, supposedly, already does. Is that not what you are seeing?

If you meant what greg does in the first sync (step 1 above), you can change that by modifying

firstsync = 1

in greg.conf. For example,

firstsync = all

would download every available issue in the first sync. Be sure to read /etc/greg.conf; there are many useful options there :)

Sanjeev K Sharma wrote:

Also some podcasts list their entries in reverse - can "greg check" list the episodes in reverse?

The shell should take care of that, I think. For example,

greg check -f yourfeed | tac

Manolo

Last edited by manolomartinez (2013-10-27 15:44:57)

Offline

#38 2014-01-27 08:04:23

MekkaGodzilla
Member
Registered: 2012-01-22
Posts: 9

Re: Greg -- a command-line podcast aggregator

Hi manolo,

Could greg be a little bit more verbose about the ongoing downloads?
A little progress bar with estimated remaining time would be great. Something like what pacman does.

Thank you very much.

Offline

#39 2014-06-09 17:29:57

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

MekkaGodzilla wrote:

Could greg be a little bit more verbose about the ongoing downloads?
A little progress bar with estimated remaining time would be great. Something like what pacman does.

Hello there,

I'm really sorry I somehow missed this message. If you are still interested (six months after the fact!), what I, and I think other greg users, do is use a custom download handler. For example, in my greg.conf I have

downloadhandler = wget {link} -O {directory}/{filename_title}-{date}.mp3

Wget is much nicer than greg's custom downloader (which is just a call to urllib.request.urlretrieve). I don't think it's necessary to replicate the functionality of a good downloader -- the Unix way and all that smile

Cheers,
Manolo

EDIT: I've just checked, and the email address with which I subscribe to this thread is one I no longer have access to. Duh. Sorry again!

Last edited by manolomartinez (2014-06-09 17:42:56)

Offline

#40 2014-06-09 17:39:44

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

Hello,

This is just to say that I have committed a number of bug fixes, and released a 0.4.1 version. I would encourage users of greg to upgrade. Please let me know if there are regressions.

I am preparing a 0.5 version with more substantial changes. If you have suggestions for it, please let me know here or over at Github.

Cheers,
Manolo

Offline

#41 2014-06-13 15:42:00

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

... aaand a 0.4.2 version with yet more bug fixes.

Manolo

Offline

#42 2014-10-10 11:31:01

abstrakct
Member
Registered: 2009-07-28
Posts: 35

Re: Greg -- a command-line podcast aggregator

Hi and thanks for this nice tool!
However, I have some problems. I'm trying to get greg to download everything from a feed, but it just doesn't want to...

What I've done is:

greg add Name url
greg edit Name --downloadfrom 2014-01-01
greg sync

greg parses the url fine and gets all the info, tags the files nicely and all - but it only downloads the 12 newest podcasts and then stops. The feed itself goes back to 2008 and has hundreds of items.
Is this a bug or am I doing it wrong? I could of course just do "greg download 1-400" or something, but I thought greg sync should be able to do it automatically when you've set a download-from-date?
In the conf file I've set a custom download directory, as well as firstsync=all  - if that has anything to do with this.

Thanks for any help!

Offline

#43 2014-10-10 12:05:45

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

Hi,

Could you please post the url in question, by email if you prefer, so that I can run some tests? What you are doing should indeed work.

Thanks,
Manolo

Last edited by manolomartinez (2014-10-10 12:07:44)

Offline

#44 2014-10-10 21:26:25

abstrakct
Member
Registered: 2009-07-28
Posts: 35

Re: Greg -- a command-line podcast aggregator

The url is

http://www.p4.no/lyttesenter/podcast.ashx?pid=330

it's just a radio show, I've managed to get them all by "greg download x-y" so that definitely works, it just required a little bit more manual labor.

Offline

#45 2014-10-11 07:49:31

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

Hi,

Right, I see what's going on. I'll fix it immediately.

EDIT: Done. Please try (or reinstall) greg-git and it should work. Let me know if it doesn't.

Thanks for reporting!
Manolo

Last edited by manolomartinez (2014-10-11 13:10:40)

Offline

#46 2014-10-12 12:10:41

abstrakct
Member
Registered: 2009-07-28
Posts: 35

Re: Greg -- a command-line podcast aggregator

Wow, that was quick! Yes, it works now! Thanks smile

Offline

#47 2015-10-04 15:05:53

iegubkin
Member
Registered: 2015-10-04
Posts: 2

Re: Greg -- a command-line podcast aggregator

I've been using and enjoying greg for several months now. Subscribed podcasts successfully downloaded until today. Now I am getting this error:

Python 3.5.0 (default, Sep 20 2015, 11:28:25) 
[GCC 5.2.0] on Arch Linux

greg info

Traceback (most recent call last):
  File "/usr/bin/greg", line 17, in <module>
    from greg.gregparser import main 
ImportError: No module named 'greg'

greg sync

Traceback (most recent call last):
  File "/usr/bin/greg", line 17, in <module>
    from greg.gregparser import main 
ImportError: No module named 'greg'

Let me know if I can provide any more help debugging.  I hope this fine program is still being developed. I see greg is no longer in the AUR. Thank you.

Last edited by iegubkin (2015-10-04 15:08:44)

Offline

#48 2015-10-04 22:01:54

iegubkin
Member
Registered: 2015-10-04
Posts: 2

Re: Greg -- a command-line podcast aggregator

So it seems that greg stopped working because of the upgrade to Python3.5. The package needs to be reinstalled. This would be trivial if the package was still in the AUR. However, the PKGBUILD can still be found in the aur-mirror:

http://pkgbuild.com/git/aur-mirror.git/ … g/PKGBUILD

Once rebuilt greg works fine.

Offline

#49 2015-10-06 08:12:39

JASN
Member
Registered: 2009-04-17
Posts: 18

Re: Greg -- a command-line podcast aggregator

So apparently simply re-building the package didn't quite work. I get a strange Unicode error:

[remote@Arch greg]$ greg list
Traceback (most recent call last):
  File "/usr/bin/greg", line 9, in <module>
    load_entry_point('Greg==0.4.4.4', 'console_scripts', 'greg')()
  File "/usr/lib/python3.5/site-packages/greg/gregparser.py", line 112, in main
    args.func(vars(args))
  File "/usr/lib/python3.5/site-packages/greg/greg.py", line 705, in list_for_user
    session = Session(args)
  File "/usr/lib/python3.5/site-packages/greg/greg.py", line 55, in __init__
    self.data_dir = self.retrieve_data_directory()
  File "/usr/lib/python3.5/site-packages/greg/greg.py", line 95, in retrieve_data_directory
    config.read([config_filename_global, self.config_filename_user])
  File "/usr/lib/python3.5/configparser.py", line 697, in read
    self._read(fp, filename)
  File "/usr/lib/python3.5/configparser.py", line 1013, in _read
    for lineno, line in enumerate(fp, start=1):
  File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 33: ordinal not in range(128)

Python 3.5
greg-git v0.4.4.3.3.g3832d82-1

Any idea what could cause this? I don't want to switch tools because greg integrates so nicely with my podcast processing flow. Thanks!

Offline

#50 2015-10-06 09:23:10

manolomartinez
Member
Registered: 2011-04-29
Posts: 64
Website

Re: Greg -- a command-line podcast aggregator

Hello,

I have just uploaded a new version to the AUR, which should work (and also fixes some unrelated bugs). Please let me know if the new version solves this issue.

Thanks for reporting,
Manolo

Offline

Board footer

Powered by FluxBB