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

[jarun#702] implemented fetch-status & export-on operations #721

Merged
merged 1 commit into from
Mar 9, 2024

Conversation

LeXofLeviafan
Copy link
Collaborator

@LeXofLeviafan LeXofLeviafan commented Mar 7, 2024

fixes #702 and #708:

  • implementing a fetch_data() function returning a FetchResult namedtuple including additional information (+deprecating network_handler())
  • adding a --url-redirect option for add/update action (url_redirect parameter in API) to update the URL by following permanent redirects
  • adding a --tag-redirect option for add/update action (tag_redirect parameter in API) to procure an extra tag based on HTTP code (when it's a permanent redirect); optionally customizing the tag
  • adding a --tag-error option for add/update action (tag_error parameter in API) to procure an extra tag based on HTTP code (when it's an error response); optionally customizing the tag
  • adding a --del-error option for add/update action (del_error parameter in API) to delete/prevent adding the URL upon receiving an error response; optionally specifying which errors are matched (a network error will always match when adding, but not when updating – to prevent deleting existing bookmarks due to a network failure)
  • adding a --export-on option for add/update action (export_on parameter in API) to adjust the output of an --export (filtering export by matched HTTP responses and including replaced URLs/deleted bookmarks in the output); this matches the HTTP codes of other such operations by default, which optionally can be overridden
  • documenting the new options in CLI help, README and manpage
  • implementing tests to ensure that various combinations of these parameters work as expected, including retained original behaviour of the code without it

also:

  • improving testing performance by mocking HTTP/fetch_data() responses
  • adding support for multiple index values in update_rec(), append_tag_at_index(), delete_tag_at_index(), refreshdb(), print_rec()

@LeXofLeviafan LeXofLeviafan force-pushed the fetch-status branch 3 times, most recently from c5bdbd0 to 3e52a25 Compare March 7, 2024 05:20
@LeXofLeviafan
Copy link
Collaborator Author

LeXofLeviafan commented Mar 7, 2024

…Whoa. These typings are really hard to appease on multiple Python versions.
(And it seems like tox doesn't even try using different Python versions with this config 😅)

@jarun jarun merged commit ce7f86f into jarun:master Mar 9, 2024
1 check passed
@jarun
Copy link
Owner

jarun commented Mar 9, 2024

Thank you!

@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2024
@LeXofLeviafan LeXofLeviafan deleted the fetch-status branch August 24, 2024 17:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New features requests
2 participants