rsstools


Namersstools JSON
Version 0.3.1 PyPI version JSON
download
home_pageNone
Summarytools for managing rss feeds
upload_time2024-11-30 11:08:20
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords rss feed rssfeed xml tool cli rssxml atomrss rssatom news atom rssfeed rssfeedreader rssfeedparser rssfeedgenerator rssfeedmanager
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # rsstools

A powerful Python tool for creating, editing, and managing RSS feeds with both programmatic and command-line interfaces.

## Features

- Create new RSS feeds with all required elements
- Add, update, and remove items from feeds
- Load and save RSS feeds to XML files
- Validate feed structure and required elements
- Command-line interface for easy management
- Support for optional elements like author and publication date

## Installation

### Dependencies

First, ensure you have Python 3.7 or higher installed. This package requires the following dependencies:

```
click>=8.0.0
```

### Installing via pip (recommended)

1. Run this command:
```bash
pip install rsstools
```

### Using via pyz

1. Download the latest pyz from the releases tab.
2. Make the file executable:
```bash
chmod +x rsstools.pyz
```
3. You can run it directly:
```bash
python rsstools.pyz
```

If you need to extract the contents:
```bash
unzip rsstools.pyz -d rsstools_extracted
cd rsstools_extracted
```

### Installing from source

This package requires the following dependencies:
```
click>=8.0.0
```

1. Clone the repository:
```bash
git clone https://github.com/sctech-tr/rsstools.git
cd rsstools
```

2. Install the package:
```bash
pip install .
```

## Usage

### Command Line Interface

1. Create a new RSS feed:
```bash
rsstools create -t "My Blog" -l "https://myblog.com" -d "My personal blog" -o feed.xml
```

2. Add an item to the feed:
```bash
rsstools add feed.xml \
-t "First Post" \
-l "https://myblog.com/first" \
-d "My first post" \
-a "John Doe" \
-p "2024-10-18T12:00:00"
```

3. List all items in a feed:
```bash
rsstools list feed.xml
```

4. Export items to JSON:
```bash
rsstools list feed.xml -o items.json
```

5. Update an item:
```bash
rsstools update feed.xml "https://myblog.com/first" -t "Updated Post Title"
```

6. Remove an item:
```bash
rsstools remove feed.xml "https://myblog.com/first"
```

### Python API

```python

from rsstools import RSSFeedCreator
from datetime import datetime

# Create a new feed
feed = RSSFeedCreator(
    title="My Blog",
    link="https://myblog.com",
    description="My personal blog about technology"
)

# Add an item
feed.add_item(
    title="First Post",
    link="https://myblog.com/first-post",
    description="This is my first blog post",
    author="John Doe",
    pub_date=datetime.now()
)

# Save the feed
feed.save("blog_feed.xml")

# Load an existing feed
feed.load("blog_feed.xml")

# Update an item
feed.update_item(
    guid="https://myblog.com/first-post",
    title="Updated First Post"
)

# Remove an item
feed.remove_item(guid="https://myblog.com/first-post")

# Get all items
items = feed.get_items()
```

## Contributing

1. Fork the repository
2. Open a PR

## License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

## Error Handling

The package uses custom exceptions (`RSSToolsError`) for error handling. Always wrap your code in try-except blocks when using the API:

```python
from rsstools import RSSFeedCreator, RSSToolsError

try:
    feed = RSSFeedCreator("My Blog", "https://myblog.com", "My blog description")
    feed.save("feed.xml")
except RSSToolsError as e:
    print(f"Error: {str(e)}")
```

## Common Issues and Solutions

1. **Invalid Feed Structure**: Ensure your RSS feed follows the standard RSS 2.0 format.
2. **File Permissions**: Make sure you have write permissions in the directory where you're saving the feed.
3. **Date Format**: When using the CLI, provide dates in ISO format (YYYY-MM-DDTHH:MM:SS).

## Getting Help

Use the `--help` flag with any command to see available options:
```bash
rsstools --help
rsstools create --help
rsstools add --help
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rsstools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "rss, feed, rssfeed, xml, tool, cli, rssxml, atomrss, rssatom, news, atom, rssfeed, rssfeedreader, rssfeedparser, rssfeedgenerator, rssfeedmanager",
    "author": null,
    "author_email": "sctech <gamerselimiko@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/9b/72/e6b2573becc63d199e31ec27718c1b36605e1a551eb405750d3149d7d119/rsstools-0.3.1.tar.gz",
    "platform": null,
    "description": "# rsstools\n\nA powerful Python tool for creating, editing, and managing RSS feeds with both programmatic and command-line interfaces.\n\n## Features\n\n- Create new RSS feeds with all required elements\n- Add, update, and remove items from feeds\n- Load and save RSS feeds to XML files\n- Validate feed structure and required elements\n- Command-line interface for easy management\n- Support for optional elements like author and publication date\n\n## Installation\n\n### Dependencies\n\nFirst, ensure you have Python 3.7 or higher installed. This package requires the following dependencies:\n\n```\nclick>=8.0.0\n```\n\n### Installing via pip (recommended)\n\n1. Run this command:\n```bash\npip install rsstools\n```\n\n### Using via pyz\n\n1. Download the latest pyz from the releases tab.\n2. Make the file executable:\n```bash\nchmod +x rsstools.pyz\n```\n3. You can run it directly:\n```bash\npython rsstools.pyz\n```\n\nIf you need to extract the contents:\n```bash\nunzip rsstools.pyz -d rsstools_extracted\ncd rsstools_extracted\n```\n\n### Installing from source\n\nThis package requires the following dependencies:\n```\nclick>=8.0.0\n```\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/sctech-tr/rsstools.git\ncd rsstools\n```\n\n2. Install the package:\n```bash\npip install .\n```\n\n## Usage\n\n### Command Line Interface\n\n1. Create a new RSS feed:\n```bash\nrsstools create -t \"My Blog\" -l \"https://myblog.com\" -d \"My personal blog\" -o feed.xml\n```\n\n2. Add an item to the feed:\n```bash\nrsstools add feed.xml \\\n-t \"First Post\" \\\n-l \"https://myblog.com/first\" \\\n-d \"My first post\" \\\n-a \"John Doe\" \\\n-p \"2024-10-18T12:00:00\"\n```\n\n3. List all items in a feed:\n```bash\nrsstools list feed.xml\n```\n\n4. Export items to JSON:\n```bash\nrsstools list feed.xml -o items.json\n```\n\n5. Update an item:\n```bash\nrsstools update feed.xml \"https://myblog.com/first\" -t \"Updated Post Title\"\n```\n\n6. Remove an item:\n```bash\nrsstools remove feed.xml \"https://myblog.com/first\"\n```\n\n### Python API\n\n```python\n\nfrom rsstools import RSSFeedCreator\nfrom datetime import datetime\n\n# Create a new feed\nfeed = RSSFeedCreator(\n    title=\"My Blog\",\n    link=\"https://myblog.com\",\n    description=\"My personal blog about technology\"\n)\n\n# Add an item\nfeed.add_item(\n    title=\"First Post\",\n    link=\"https://myblog.com/first-post\",\n    description=\"This is my first blog post\",\n    author=\"John Doe\",\n    pub_date=datetime.now()\n)\n\n# Save the feed\nfeed.save(\"blog_feed.xml\")\n\n# Load an existing feed\nfeed.load(\"blog_feed.xml\")\n\n# Update an item\nfeed.update_item(\n    guid=\"https://myblog.com/first-post\",\n    title=\"Updated First Post\"\n)\n\n# Remove an item\nfeed.remove_item(guid=\"https://myblog.com/first-post\")\n\n# Get all items\nitems = feed.get_items()\n```\n\n## Contributing\n\n1. Fork the repository\n2. Open a PR\n\n## License\n\nThis project is licensed under the GPL-3.0 License - see the LICENSE file for details.\n\n## Error Handling\n\nThe package uses custom exceptions (`RSSToolsError`) for error handling. Always wrap your code in try-except blocks when using the API:\n\n```python\nfrom rsstools import RSSFeedCreator, RSSToolsError\n\ntry:\n    feed = RSSFeedCreator(\"My Blog\", \"https://myblog.com\", \"My blog description\")\n    feed.save(\"feed.xml\")\nexcept RSSToolsError as e:\n    print(f\"Error: {str(e)}\")\n```\n\n## Common Issues and Solutions\n\n1. **Invalid Feed Structure**: Ensure your RSS feed follows the standard RSS 2.0 format.\n2. **File Permissions**: Make sure you have write permissions in the directory where you're saving the feed.\n3. **Date Format**: When using the CLI, provide dates in ISO format (YYYY-MM-DDTHH:MM:SS).\n\n## Getting Help\n\nUse the `--help` flag with any command to see available options:\n```bash\nrsstools --help\nrsstools create --help\nrsstools add --help\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "tools for managing rss feeds",
    "version": "0.3.1",
    "project_urls": {
        "source": "https://github.com/sctech-tr/rsstools"
    },
    "split_keywords": [
        "rss",
        " feed",
        " rssfeed",
        " xml",
        " tool",
        " cli",
        " rssxml",
        " atomrss",
        " rssatom",
        " news",
        " atom",
        " rssfeed",
        " rssfeedreader",
        " rssfeedparser",
        " rssfeedgenerator",
        " rssfeedmanager"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "08d1df0eda8223e8bcbbd02e3345092bcd28a7f8aac82b5fba2f09a1f0a2a21f",
                "md5": "3ba0f7472474d94de9d499496a4eeb5b",
                "sha256": "79c9d1d2ecab0dce9d387349f346cea77631d9c43f06730b35d94af270fede7a"
            },
            "downloads": -1,
            "filename": "rsstools-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3ba0f7472474d94de9d499496a4eeb5b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 19219,
            "upload_time": "2024-11-30T11:07:54",
            "upload_time_iso_8601": "2024-11-30T11:07:54.001174Z",
            "url": "https://files.pythonhosted.org/packages/08/d1/df0eda8223e8bcbbd02e3345092bcd28a7f8aac82b5fba2f09a1f0a2a21f/rsstools-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9b72e6b2573becc63d199e31ec27718c1b36605e1a551eb405750d3149d7d119",
                "md5": "f334551c4abac83ffa8c1e71294412de",
                "sha256": "0d1b67e04695adf47d71a7155b0d266e7d640a283a4a8d236e04360206070098"
            },
            "downloads": -1,
            "filename": "rsstools-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f334551c4abac83ffa8c1e71294412de",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 19311,
            "upload_time": "2024-11-30T11:08:20",
            "upload_time_iso_8601": "2024-11-30T11:08:20.814574Z",
            "url": "https://files.pythonhosted.org/packages/9b/72/e6b2573becc63d199e31ec27718c1b36605e1a551eb405750d3149d7d119/rsstools-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-30 11:08:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sctech-tr",
    "github_project": "rsstools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "rsstools"
}
        
Elapsed time: 3.31372s