tomy0000000 / Coinc

💰💱Alfred Workflow for currencies conversion
https://alfred.app/workflows/tomy0000000/coinc/
MIT License
55 stars 6 forks source link

Please change the name of the workflow #9

Closed deanishe closed 4 years ago

deanishe commented 4 years ago

I know this is a duplicate of #2, but I think @set808 didn't make clear exactly how offensive "coon" is.

It's basically the same as "nigger". It's really bad.

I understand you like the name, and have good reasons for choosing it, but it is a very racist word for most native-speakers of English.

tomy0000000 commented 4 years ago

I think I'll come up a better name soon. Before that, I'm wondering if there's any caveats or suggestions on changing the bundle id of workflow? Since I'm using tech.tomy.coon in this project, I'm not quite sure will anything breaks during the name change (Autoupdate, exist data transfering...etc).

deanishe commented 4 years ago

I'm not quite sure will anything breaks during the name change (Autoupdate, exist data transfering...etc)

Autoupdate should work correctly. If you rename the repo, GitHub redirects the old name to the new one, so the updater will get the correct, new URL. It also doesn't use the name of the workflow file, only the file extension. But you should still change the update URL in the new version.

Changing the bundle ID will change the workflow's data and cache directories, and also make Alfred think it's a different workflow. So you will lose user settings and Alfred will install a new copy of the workflow instead of replacing the old one.

How I would fix that is to first change the repo name. Then I'd make a new release with a different workflow name and keyword, but the same bundle ID. That way, Alfred will replace the old version, not create a new copy.

When it's run, the new version of the workflow checks its own bundle ID (Workflow3.alfred_env['bundle_id'] or os.getenv('alfred_workflow_bundleid)), and if it's tech.tomy.coon, it changes its own bundle ID to the new one by editing its own info.plist (using, for example, plistlib or /usr/libexec/PlistBuddy), and also renames the old data and cache directories.

Perhaps also call workflow.util.reload_workflow(os.getenv('alfred_workflow_uid')) to make sure Alfred notices the changes. (That function is only available in v1.39.0 of Alfred-Workflow and later.)

Then in later versions you release after that, use the new bundle ID.

tomy0000000 commented 4 years ago

Thanks for the comprehensive guide, I've added the section about the name changing in README. Since final exams are coming next week, I will start drafting the update afterwards. The update are expected to release by the end of the month, stay tuned.

tomy0000000 commented 4 years ago

New version has just released, thanks for the suggestion and help.