feedDiasp icon indicating copy to clipboard operation
feedDiasp copied to clipboard

dryrun mode ?

Open danc opened this issue 9 years ago • 8 comments

I plan to implement a dryrun option in order to test without posting, mainly to fill post.txt database with old articles without posting them to Diaspora. Or maybe there is another way to achieve this ?

danc avatar Nov 20 '16 20:11 danc

Dry run mode should not post on D* neither fill the posts.txt in my opinion, the goal being just simulating sending a post. It's misleading to call an option --dry-run if it actually modifies your data, in this case your posts.txt .

ghost avatar Nov 21 '16 00:11 ghost

Ok, I understand your concern. How do you manage the initial step, when you want to feed Diaspora without publishing all the RSS feed history ?

danc avatar Nov 21 '16 09:11 danc

First time I was switching from by-hand to using feedDiasp so I guess it was not really an issue. But we could definitly use an option like "--populate-db" or something to create the posts.txt with the last entries in the RSS without actually posting them on D*. Guess it could be useful while launching new instance of feedDiasp.

ghost avatar Nov 21 '16 15:11 ghost

I agree the option should be more explicit. So we would need two options : --populate-db (default True) --post-items (default True)

to explicitly distinguish and control the behaviour. Dryrun mode would correspond to the two options to False, --populate-db=False, --post-items=False while my use case would correspond to --populate-db=True, --post-items=False

Thanks for the feedback, does everybody agree ?

danc avatar Nov 21 '16 16:11 danc

if --populate-db=True and --post-items=True, you get the normal behaviour don't you? So what's the use case for --post-items=True? I'm not sure to use a --populate-db=False and --post-items=True

It's clear to me that --populate-db should not post rss entries but I'm not sure to ever use the --post-items=True if --populate-db option by itself does not post itself on D*.

I' think the two following options are interesting:

  • --dry-run : does not feed the db, does not post entries to D*, display some information for each post (maybe the title?)
  • --populate-db[=X] : feed the db with the last X entries of the rss feed, defaults to all current entries of the rss feed

ghost avatar Nov 21 '16 22:11 ghost

@chaica --populate-db=False with --post-items=Truecould be used to finally publish items which are already the database, but without fetching new entries.

Then --list-unpublished-posts could show the titles of unpublished posts in the database.

Debakel avatar Dec 07 '16 16:12 Debakel

Still a great idea to me :)

ghost avatar Jan 26 '17 10:01 ghost

sorry, subject still interesting, but no time to work on it properly. thanks for the feedbacks

danc avatar Jan 26 '17 11:01 danc