eleurent / twitter-graph

Fetch and visualize the graph of your Twitter friends and followers.
392 stars 46 forks source link

Cache and output files for "users", "search", and "likes" mode conflicts #23

Open nadesai opened 2 years ago

nadesai commented 2 years ago

Currently, queries for "users", "search", and "likes" mode conflict by reusing some caching files, as noted in #17 #18.

For example, under default settings, here are the cache files associated with the target eleurent for different modes:

Note also that for all three modes, the final results are written to out/eleurent/edges.csv and out/eleurent/nodes.csv, thus multiple runs of different modes with the same target will overwrite the result graph, which could lead to data loss.

It may make more sense to create a new directory layer under the target name associated with the mode being used, i.e. use these files instead:

Perhaps also the outfile can sit under this new directory layer as well, so that the final outputs for the different modes do not get overwritten. E.g.

eleurent commented 2 years ago

Yes I think this totally makes sense.

The only "desirable" conflict that I can think of is the one of frienships.json which can be filled a first time when creating the graph of someone's followers, and reused later when creating the graph of their friends instead, since there is probably a significant overlap. But that is not an essential feature, and it would be preserved by your suggestion anyway, so yes by all means :)