Skip to content

Instantly share code, notes, and snippets.

@yringot
Created February 25, 2018 02:41

Revisions

  1. yringot created this gist Feb 25, 2018.
    244 changes: 244 additions & 0 deletions greg.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,244 @@
    # Copyright (C) 2012 Manolo Martínez <manolo@austrohungaro.com>
    #
    # This file is part or Greg.
    #
    # Greg is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # Greg is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with Greg. If not, see <http://www.gnu.org/licenses/>.
    #
    #
    # Placeholders ###############################################################
    #
    # Througout this config file, you can use several placeholders to construct
    # strings that make reference to the entry you are currently downloading, the
    # podcast name, etc. At the moment, these are the available placeholders:
    #
    # {link} the download link of the podcast entry
    # {filename} the name of the file to be downloaded (which need not be the name
    # under which you will save it locally)
    # {directory} the directory which the file is to be downloaded to
    # {fullpath} the concatenation of directory and filename
    # {title} the title of the podcast entry
    # {filename_title} just like {title}, but leaving only alphanumeric characters
    # and the underscore, so as to have a sane filename.
    # {date} the date of the podcast entry
    # {podcasttitle} the title of the podcast
    # {filename_podcasttitle} see above.
    # {name} the name you use to refer to the podcast in greg
    # {subtitle} a description of the feed
    # {entrysummary} a summary of the podcast entry
    #
    # If you have chosen to install BeautifulSoup, which is an optional dependency,
    # {subtitle} and {summary} will be converted from html to text. Otherwise, they
    # will show the original html, sanitized by feedparser.
    #
    # Whenever you use a placeholder in this configfile, it will be substituted by
    # whatever it refers to. The {date} placeholder, by default, will be
    # substituted by the entry date in the format YYYY-MM-DD. If you want to change
    # this, you can use the field date_format to specify a different format. For
    # example, use
    #
    # date_format = %d/%m/%y
    #
    # if you want {date} to be substituted by the entry date as dd/mm/yy.
    # The syntax here is that of Python's strftime().
    #
    ##############################################################################
    #
    # The option under [DEFAULT] will be applied to all feeds, unless some specific
    # feed configuration overrules it. For example, if the download directory is
    # "~/Podcasts", all feeds will be downloaded to this directory except for those
    # that have a different Download directory in their section.

    [DEFAULT]

    # The following gives the name of the directory in which greg will store the
    # information about feeds and the latest downloaded issues. This is the only
    # option that cannot be overriden by specific podcasts -- that is, any "Data
    # directory" field in a section below will not be read.

    Data directory = ~/.local/share/greg/data

    # The following gives the name of the file in which greg will store downloaded
    # podcasts

    Download directory = /media/ext/pi_down/podcasts

    # For the following option, you can choose
    # "no" (the feed will be downloaded directly to the download directory)
    # "yes" (the feed will be downloaded to its own directory)

    Create subdirectory = yes

    # If you choose "yes", you can provide a name for the subdirectory with
    # subdirectory_name. This name can include any of the placeholders described
    # above -- except for {directory} or {fullpath}, of course. For example:
    #
    # subdirectory_name = {podcasttitle}
    #
    ### Tagging ##################################################################
    #
    # Answering "yes" to the following option will make greg fill out podcast
    # metadata, using the podcast title as Artist, and the entry title as Title. This
    # is probably most useful as an option to specific podcasts; those that are not
    # correctly tagged at origin.

    Tag = no

    # You can specify which metadata greg should fill out. The available options
    # are:
    #
    # tag_title
    # tag_artist
    # tag_date
    # tag_album-artist
    # tag_album
    # tag_track
    # tag_track-total
    # tag_disc
    # tag_disc-total
    # tag_grouping
    # tag_composer
    # tag_genre
    # tag_comment
    # tag_picture
    # tag_sort-title
    # tag_sort-artist
    # tag_sort-album-artist
    # tag_sort-album
    # tag_sort-composer
    #
    # the syntax you need to use is, e.g.
    #
    # tag_title = Some text, possibly including, or just being, a {placeholder}
    #
    # where the available placeholders are described above.
    #
    # So,
    #
    # tag_artist = {title}
    #
    # will fill the artist tag with the title of the entry. The default is

    tag_artist = {podcasttitle}
    tag_title = {title}
    tag_genre = Podcast

    # Finally, if you are using a custom download handler (see below), you need to tell
    # greg how to figure out the name of the podcast files, using the file_to_tag
    # option. For example if your
    # download handler saves podcasts under a name such as "entry title.ogg", you
    # will need to add the following to the podcast's config section:
    #
    # file_to_tag = {entry}.ogg
    #
    ###############################################################################
    #
    # The following option defines how many podcasts should Greg download in its
    # first sync. Any integer will do; e.g.,
    #
    # firstsync = 1
    #
    # means that Greg will only download the latest podcast. Also,
    #
    # firstsync = all
    #
    # asks Greg to download every available podcast.
    #
    #
    firstsync = 10
    #
    ###############################################################################
    #
    # The following option expects a list of words (separated by commas) which would
    # be part of the mime-type of the desired enclosures. That is, if the feed is a
    # video podcast you would have here
    #
    # mime = video
    #
    # If the feed has both video and audio enclosures, and you want them both,
    # you'll add
    #
    # mime = audio, video
    #
    # The default is to download only audio files. Thus,
    #
    mime = audio, bittorrent
    #
    ###############################################################################
    #
    # The following option provides a custom download handler. It expects a shell
    # command, in which you can use the placeholders enumerated above.
    #
    # For example, if you want to use wget to download your podcasts, you might use
    #
    # downloadhandler = wget {link} -P {directory}
    #
    # The following special case simply instructs greg to download the podcast
    # itself.
    #
    #downloadhandler = greg
    #
    downloadhandler = aria2c --conf-path=/home/osmc/.aria2/aria2-torrent-podcasts.conf --dir={directory} --out={podcasttitle}_{date}_{filename} {link}
    #
    ###############################################################################
    #
    # Some feeds are abnormal in that they don't use enclosures. The following
    # option, when set to "yes", instructs greg to ignore enclosures and simply
    # return the entry link as {link}.
    #
    ignoreenclosures = no
    #
    ################################################################################
    #
    # Some other feeds are abnormal in that they don't carry information about
    # enclosure types. The following option, when set to "yes", instructs greg to
    # ignore enclosure types and simply download every enclosure
    #
    notype = no
    #
    ###############################################################################
    #
    # Finally, you don't need to download every issue of a podcast. You can specify
    # a condition such that greg will download an issue if and only if the issue
    # meets it. For example,
    #
    # filter = "BBC" in "{title}" and "Lennon" not in "{title}"
    #
    # The syntax here is Python's, but it should be straightforward: "and", "or" and
    # "not" mean what they customarily mean, and "in" means that the string to its
    # left is contained in the string to its right -- i.e., "BBC" is in "BBC News".
    #
    ##############################################################################
    #
    # In the local version of this file, now you can add sections for individual
    # feeds, if and when you need them. The name of the section should be the name
    # you are using to refer to the feed in greg (i.e., one of the names that "greg
    # list" returns):
    #
    # [MyFeed1]
    #
    # Download directory = ~/Documents/MyFeed1
    #
    # Tag = yes
    #
    # [MyFeed2]
    #
    # etc.
    #
    # In the global version of this file (that is, /etc/greg.conf) sections for
    # individual feeds will not be read.
    #

    [WRINT]
    filter = "tsabgleich" and "Flaschen" not in "{title}" and "Toby" not in "{entrysummary}"
    firstsync = 20