Customize HTML page used in responses from `rclone authorize`

I have an application that uses rclone as the storage backend, and I'm wanting to customize the output of the HTML page shown on rclone authorize commands to have wordage that reflects my application's name and not rclone's. I'm wanting this so that newer user's don't get confused on a message that says Please go back to rclone, when they might not even know what Rclone is, and at the least where the message might be coming from.

I saw that the HTML page is currently powered by a Go template, if that template could just be overwritten via a CLI flag or an environment variable that would solve my issue (the template itself - not the location to a template file - would be in the environment variable/cli flag). I don't really know Go all that well, but if this would be something that could be agreed upon being added I could look into making a PR myself as well.

This sounds like a good idea to me.

Putting the template itself into the flag would mean that it would need to be kept short as there are limits on how big they can be on most oses.

Perhaps just overriding the app name would be enough for your purpose?

Just overriding the app name would be fine for now, but I do see myself potentially adding some CSS or something similar in the future, so having the option to expand in the future would definitely be fine.

I didn't think about limits in argument/environment variable size, I'm not too knowledgeable on those limits if I'm being honest. If it would be better to have it point at a file that'd be fine by me - I plan on embedding my template into my application, but I can probably just write it out to some file in /tmp at runtime.

A file would proabably be best.

Do you want to send a PR for this?

If you'd be able to get it done I'd be fine with that, I can work on it if you're busy with other stuff though. Just with me not working much with Go I think it'd probably take me a while to figure out what I'm doing, but I'm fine with that if it'd work better.

I have a dev backlog about 12 months long, so if you want to see this feature any time soon, I suggest you work on it :slight_smile:

All good, I don't wanna push on any more load in that case lol - I'll get to working on that then.

1 Like

Hi Hunter,

I suggest you check the rclone contributing guide, if you haven't already. It will explain the process and guide you to make the rclone/Go development environment. I see you already know Rust and Python, so you will probably find Go fairly easy.

My guess is that your main challenge will be finding your way in the rclone source code, so I suggest you ask for a few implementation/coding tips in your GitHub issue.

1 Like

Hey, thanks for the heads up! I'll get that looked at shortly, I'll send any further questions I have in the issue I make.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.