Cameron-IPFSPodcasting/podcastnode-Python

Use argparse to pass extra arguments - option for passing ipfs executable path

Closed this issue · 6 comments

Would you be opened to using the standard library argparse to pass in the path of the ipfs binary?

I'm using NixOS and I've had to patch it with the exact path of the binary rather than just relying on the standard FSH paths.
It's a "simple" change, but I wanted to check with you if you preferred using a different external library.

I'm not against it, but wanted to keep things simple.

I haven't used Nix. Do you need argparse just to run the python script locally?

Or are you making a flake? (others have asked about an ipfspodcasting flake)

If you want to modify the python script to run "normally", I'd prefer a workaround searching for ipfs here...

If you're creating a flake, I'd consider that a new client (like Umbrel, Start9, Node, etc.), so rather than change this code, create a "Nix client" repo/flake and modify it however you'd like.

Again, I don't use Nix and have no idea how flakes work.

I've already made the change. I was wondering if I could upstream the change or if I should just keep it as a patch.

In essence, I would just need an additional argument for the path to the ipfs binary, but I'll make keep change on the nix side and not let it spill over here.

For anyone interested, my nixos module is here:
https://github.com/EricTheMagician/ipfs-podcasting.nix
It's pretty straight forward. Feel free to open an issue on my repo if you have additional questions.

Thanks for creating the nix repo. What you've done seems fine (keep the change on the nix side and not spill over here).

This repo was for a simple python script for a pre-installed IPFS server. It was the first step, but has expanded to Umbrel, Start9 etc. Those versions are slightly different, so were put in their own repo.

If you're changing the ipfspath, can you also change the version to a different letter? I've been using the letter to distinguish what flavor of node is making requests to the server. 0.6p for python, 0.6s for Start9 etc. RyanHirsch already claimed "n" for his node client (0.6n). What is a good letter for Nix? 0.6x? I'd just like something to differentiate from the python script (0.6p), so I don't think you're running a standalone IPFS/Python node when I receive the request for work.

I'm fine with which ever. Since the obvious one (n) is already taken, I vote for Z since I think NixOS is the last distro that anyone really needs.
If Z is taken, X is good with me too.

So far there's d,n,p,s,u.

x & z are available. Pick whichever you want (since you made it).

It's just informational. Ideally, all the clients will function perfectly/identically. But if they have issues, I'd like to know if it's a certain repo/flavor.

Done:
EricTheMagician/ipfs-podcasting.nix@97a51b1
Thanks for doing this. I hope it takes off.
I head about it through Jupiter Broadcasting.