Add manual links to controllers#3108
Conversation
|
Requires mixxxdj/manual#122 to be merged first. |
daschuer
left a comment
There was a problem hiding this comment.
Thank you. I have left some comments.
Unfortunately this is too big to review.
Can we revert the mass reformation?
0a76464 to
3d181ac
Compare
I removed the commit. Btw, you can hide files by type in the "Files Changed" tab: https://github.com/mixxxdj/mixxx/pull/3108/files?file-filters%5B%5D=.cpp&file-filters%5B%5D=.h |
|
Moving the discussion from a removed (now orphaned) commit here for better visibility:
|
What do you mean by "namespace conflicts"? Can you give an example? IMHO we could start estabilishing a new naming scheme for controller mappings to be able to do that. I'd appreciate that, but maybe we should also postpone that until the new controller system is in place and keep the naming scheme for legacy mappings for consistency. Also, I think we'd need another mechanism to distinguish user controller mappings from built-in ones. Right now, it's easy, because you just don't specify a manual page in custom mappings. If we auto-generate the link, we'd need to make an HTTP request to check if the page exists.
I have doubts about this. For the Wiki page that would make sense, because you could just click the URL and be presented with an editing page. This is not the case for the Manual. |
Done using this python script:
import re
import requests
import sys
def replace_forum_url(matchobj):
oldurl = matchobj.group(0).decode().replace("&", "&")
oldurl = "https://mixxx.discourse.group" + oldurl.partition("forums")[2]
print(oldurl)
req = requests.head(oldurl, allow_redirects=True)
return req.url.replace("&", "&").encode()
for file in sys.argv[1:]:
with open(file, mode="rb") as f:
content = f.read()
content = re.sub(rb'https?://mixxx.org/forums/[\w\?&;=\/\.]+', replace_forum_url, content)
with open(file, mode="wb") as f:
f.write(content)
|
Thank you. LGTM the pre-commit hook reports some white space issues. |
Yes, I had to skip a bunch of hooks because the formatting of our XML files is completely broken. This is why I opened #3107. |
No description provided.