Code Monkey home page Code Monkey logo

genrss's People

Contributors

amsehili avatar basdegamer avatar chaoskid42 avatar cpmpercussion avatar denilsonsa avatar dfluff avatar gaul avatar jnturton avatar kamikazow avatar lastorset avatar maphew avatar oddbloke avatar picchioni avatar rjc avatar vicky-vicky27 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

genrss's Issues

iTunes Tags

Is it possible to add the following iTunes tags:

-  <itunes:duration>300</itunes:duration>
-  <itunes:title>The Example Times Daily News Briefing</itunes:title>
-  <itunes:block>yes</itunes:block>

And copyright tags: <copyright>Copyright 2018 The Example Times – For Personal Use Only</copyright>

Everything about this script is great. I'm hoping to generate an RSS feed for Google that requires the following:

https://developers.google.com/news/assistant/newsbriefings/technical-requirements

Any help would be greatly appreciated.

can't concat str to bytes

I am running the program directly as listed in the instructions, and I only get the error "can't concat str to bytes." I this for Python 2?

Directory structure reorganization

The current directory structure of this project is:

.
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.py
├── src
│   ├── genRSS.py
│   └── util.py
└── test
    └── ...

Major issue: file pollution

When installing the package, this will happen:

venv/lib/python3.11/site-packages
├── eyed3/
├── filetype/
├── mutagen/
├── ...
├── genRSS.py
└── util.py

Both the genRSS.py and the util.py will be installed at the root of the python modules. This means it is possible to import util from anywhere:

$ ipython

In [1]: import util

In [2]: # ↑ That should have failed!

You can also check this behavior by inspecting the contents of the wheel file available from PyPI:

$ wget https://.../generss-0.3.0-py3-none-any.whl
$ unzip -l generss-0.3.0-py3-none-any.whl                                                   INT ✘ 
Archive:  generss-0.3.0-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
    10167  2023-09-13 21:15   genRSS.py
    19457  2023-09-13 19:33   util.py
     1074  2023-09-13 21:16   generss-0.3.0.dist-info/LICENSE
     3780  2023-09-13 21:16   generss-0.3.0.dist-info/METADATA
       92  2023-09-13 21:16   generss-0.3.0.dist-info/WHEEL
       39  2023-09-13 21:16   generss-0.3.0.dist-info/entry_points.txt
       12  2023-09-13 21:16   generss-0.3.0.dist-info/top_level.txt
      613  2023-09-13 21:16   generss-0.3.0.dist-info/RECORD
---------                     -------
    35234                     8 files

That's not good.

Expected structure (AKA solution)

I expected this structure:

venv/lib/python3.11/site-packages
├── ...
└── genRSS/
    ├── __main__.py
    └── util.py

Which means we have to move some files around the repository:

  • src/genRSS.pysrc/genRSS/__main__.py
  • src/util.pysrc/genRSS/util.py

And also setup Entry Points inside pyproject.toml.

See also:

Dependencies

We have this in pyproject.toml:

dependencies = ["mutagen==1.47.0", "eyed3==0.9.7"]

Why hard-coding the versions? Can't we just specify the minimum version instead? Or just leave out the version number, letting it auto-update the dependencies?

Minor cleanup: setup.py

setup.py is only needed for legacy build systems or legacy versions. It shouldn't be needed or used anymore. I suggest deleting it.

Creation date of items are corrupted

Using it like:

genRSS.py -C -r -d /mydir

I get items in the feed with date which are not the creation date (not sure where they are from), I guess they are just corrupted during a transformation.

feature request pubDate = file date

Hello,
it´s possible for you to add / change the pubdate to the filedate ?
I have a big podcast collection an it will be a big help if they sorted by the real date.

many thanks ;)

FR: Specify a leading path

Right now, if I run it with something like:

genRSS -d /a/long/path/to/my/directory/

I get items like:

      <item>
         <guid>http://localhost:8080//a/long/path/to/my/directory/file1.mp3</guid>
         <link>http://localhost:8080//a/long/path/to/my/directory/file1.mp3</link>
         <title>file1</title>
         <description>file1</description>
         <pubDate>Fri, 29 Mar 2024 22:45:08 +0000</pubDate>
         <enclosure url="http://localhost:8080//a/long/path/to/my/directory/file1.mp3" type="audio/mpeg" length="79127804"/>
         <itunes:duration>3955</itunes:duration>
      </item>

This is as it says on the tin but if I want to use a different path to publish this, I now need to find/replace all "/a/long/path/to/my/directory/" to the desired actual path.

Being able to specify the leading path would be helpful.

Problem with Parameter -d with pending /

Hallo,
I want to create an rss feed from a folder called
/storage/folder/artist
When I use genrss with -d I get an rss file with the wrong link in it:
"http://hostname//storage/folder/artist"
You can see // after the hostname and this can't work.
If I now try it as you describe, without the pending /?
-d storage/folder/artist
I get this (I mean correct) error: " --dirname must be a path to an existing directory.

I hope you understand my problem ;)

Feeds should not be served with the "application/x-rss+xml" media type

hello and thanks for the fantastic script.
my litte problem is proberly only a usage fault.
when i generate a rss the -t / --title parameter work in the
"
<title>xxxx</title>" field
but under

<title>xxxx.extension</title>" field the script add the extension from the file what starts my problem.

is there a easy solution for this problem ?
thanks

require mutagen?

Are there particular reasons to not simply make mutagen a requirement instead of optional?

Mutagen is cross platform and has no dependencies outide of the python standard library. Guaranteeing it's available would simplify setup process as well as the Readme doc. The change is very straightforward:

diff --git a/pyproject.toml b/pyproject.toml
index f2b7a5e..bb6caf1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,5 +5,7 @@ requires = ["setuptools", "wheel"]
 name = "genRSS"
 version = "0.2.0"

+dependencies = ["mutagen"]
+
 [project.scripts]
 genRSS = "genRSS:main"

Use Metadata for Description

This piggybacks off Issue #15. I'm using the script to extract the metadata as the title, but can it also extract the mp3's artist metadata and use it as the description? So when the feed is read, the title is the title of the track and the description is the artist.

Read MP3 ID3 tags

This could give richer descriptions and dates than the filesystem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.