Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the cli option to add feeds #25

Closed
rguhr opened this issue Nov 27, 2023 · 3 comments
Closed

Support for the cli option to add feeds #25

rguhr opened this issue Nov 27, 2023 · 3 comments

Comments

@rguhr
Copy link

rguhr commented Nov 27, 2023

Would be great if we cloud use the tool to add feeds via command line

@pinlin168 seems to have already built something with the quickadd function and a file with urls into his fork:
master...pinlin168:python-inoreader:master

With quickadd you can not specify a folder/label. Think the way via edit is more useful.
https://www.inoreader.com/developers/edit-subscription

Maybe something like this?
inoreader edit-subscriptions --action follow --streamid https://hnrss.org/newest
inoreader edit-subscriptions --action follow --streamid https://hnrss.org/newest --folder user/-/label/Tech (or a short form like Tech only?)

@Linusp
Copy link
Owner

Linusp commented Dec 4, 2023

@rsguhr Thank you for your great advice! I implemented as you suggested.

The code is here: #26

@rguhr
Copy link
Author

rguhr commented Dec 4, 2023

Perfect , worked like a charm :)

I tested follow, unfollow and add-folder

But I have one question:
Why is setting the folder/label only allowed during the action add-folder?

    add_folder = folder if action == 'add-folder' else None
    if folder and not folder.startswith('user/-/label/'):
        folder = client.GENERAL_TAG_TEMPLATE.format(folder)

    remove_folder = folder if action == 'remove-folder' else None

(Should add_folder moved further down to remove_folder - to make sure that the correct value is added to add_folder? (My Python knowledge is limited - please ignore if this is nonsense :D )

In my ugly bash script I use the folder parameter with the subscribe (old name for follow) action. Therefore I know that it is possible to specify the folder directly when adding a feed without an extra step.

@Linusp
Copy link
Owner

Linusp commented Dec 5, 2023

I've fixed it. Thanks for the test!

@Linusp Linusp closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants