Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI flag for the update source #197

Merged

Conversation

chrestomanci
Copy link
Contributor

This change adds an --update_source command line option to the command line interface.

The intended use, is that in production we don't want the delay associated with the default behaviour of updating when the API is called for the first time. This change also makes it possible to change the update URL without changing our main application, just the setup scripts.

This could be a better way to solve the problem that PR #150 is attempting to fix.

The README.md has been updated to document the new feature, but not the changelong.

When running tldextract --update, add a second optional parameter --update_source
To specify a local file or URL to update from.

This could be useful if the mozilla public subdomain list is not easily accessable
due to a firewall, or if a costom subdomain list is in use.
@chrestomanci chrestomanci marked this pull request as ready for review April 15, 2020 10:55
@john-kurkowski
Copy link
Owner

Holy 2 year bump. 😓 I was previously loathe to expand the CLI, but I now begin to understand the common request.

For this PR, I fixed conflicts, renamed the flag for consistency, and passed the new list as an argument vs. mutating an object later. I'll noodle on that last one. I don't think the partially constructed object was intentional.

@chrestomanci
Copy link
Contributor Author

Wow! two years!

I don't know if you are waiting for some sort of comment or approval from me, but if you need it, then I would be pleased if you would merge this PR, and while the change in the command line switch will be an inconvenience for me, it is not a reason to delay the merge or edit it further.

Please merge this ASAP.

@john-kurkowski
Copy link
Owner

I'm glad you're still around and find it useful! This PR seems good to me then!

@john-kurkowski john-kurkowski merged commit 8f71508 into john-kurkowski:master May 4, 2022
@john-kurkowski john-kurkowski changed the title Add an --update_source command line option Add CLI flag for the update source May 4, 2022
@chrestomanci chrestomanci deleted the cmd_update_alternate_src branch May 5, 2022 14:29
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Jun 16, 2022
https://build.opensuse.org/request/show/982862
by user mia + dimstar_suse
- Update to 3.3.0
Features
  * Add CLI flag `--suffix_list_url` to set the suffix list URL(s)
    or source file(s)
    (#gh/john-kurkowski/tldextract#197)
  * Add CLI flag `--no_fallback_to_snapshot` to not fall back to
    the snapshot
    (#gh/john-kurkowski/tldextract#260)
  * Add alias `--include_psl_private_domains` for CLI flag
    `--private_domains`
Bugfixes
  * Handle more internationalized domain name dots
    (#gh/john-kurkowski/tldextract#253)
Misc.
  * Update bundled snapshot
  * Add basic CLI test coverage
Changes in 3.2.1:
Bugfixes
  * Fix incorrect namespace used for caching function returns
    (#gh/john-kurkowski/tldextract#258)
Changes in 3.2.0:
Features
  * Add types to the public API
    (#gh/john-kurkowski/tldextract#244)
Bugfixes
    * Add support for Python 3.10, dr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants