michaelkamprath / multi-service-rtmp-broadcaster

A dockerized livestream rebroadcaster
GNU General Public License v3.0
136 stars 25 forks source link

Small formatting and textual issues #18

Closed jimdrie closed 4 years ago

jimdrie commented 4 years ago

In rtmp-conf-generator.py: In Python, function names are usually snake case, so lower case with underscores between them, just like variable names. For example createRTMPApplicationBlocks would become create_rtmp_application_blocks.

Using tabs or spaces is a personal preference, but spaces are preferred. Currently in most places tabs are used, but also four spaces in some places.

There is some double indentation in addRTMPPushConfiguration, where four spaces of indentation are preferred.

Sometimes, spaces are missing around the equals sign, for example: rtmp_conf=orig_rtmp_conf[:push_pos]. When using keyword parameters in function calls, this is correct though, so file=sys.stderr is perfectly fine.

In the configuration (both in rtmp-conf-generator.py and README.md): rebroacastList should be rebroadcastList.

Thanks for this great project, I just want to help improve it, sorry if it sounds a bit like nitpicking.

michaelkamprath commented 4 years ago

In rtmp-conf-generator.py: In Python, function names are usually snake case, so lower case with underscores between them, just like variable names. For example createRTMPApplicationBlocks would become create_rtmp_application_blocks.

That's a style preference. I work an environment where functions are camel case and variables as snake case to help differentiate between them. Since PEP8 permits it, we have never changed it. Since I am used to it, it's what you get for the first version :-/

Using tabs or spaces is a personal preference, but spaces are preferred. Currently in most places tabs are used, but also four spaces in some places.

It's intended to use spaces, but admittedly I don't think I have my editor set up right. Will fix.

There is some double indentation in addRTMPPushConfiguration, where four spaces of indentation are preferred.

That was fixed.

Sometimes, spaces are missing around the equals sign, for example: rtmp_conf=orig_rtmp_conf[:push_pos]. When using keyword parameters in function calls, this is correct though, so file=sys.stderr is perfectly fine.

I blame late night coding.

In the configuration (both in rtmp-conf-generator.py and README.md): rebroacastList should be rebroadcastList.

Same answer. will fix.

Thanks for this great project, I just want to help improve it, sorry if it sounds a bit like nitpicking

No worries. As I've said before: pull requests (and other contributions) are welcome.

michaelkamprath commented 4 years ago

OK I have address all your issues with this commit. Please close this issue if you agree.

michaelkamprath commented 4 years ago

I will interpret the silence as acceptance ;-)