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

[PYPI] Turn into front-end API/package #21 #22

Merged
merged 57 commits into from
Jan 16, 2023
Merged

[PYPI] Turn into front-end API/package #21 #22

merged 57 commits into from
Jan 16, 2023

Conversation

shmugoh
Copy link
Owner

@shmugoh shmugoh commented Aug 15, 2022

Will be used for the planned generator as a showcase of sv-dlp's capabilities

  • The generator will be built on top of Flask, but will use sv-dlp as a backend
  • It will be a separate program that can be downloaded from sv-dlp

TODO:

  • [GLOBAL] Rename extractor to service #10
  • Write initialization constructor
    • Implement download_panorama & postdownload inner class
    • Implement metadata features
      • Implement Historical Panoramas
      • Obtain linked panoramas
    • [SERVICES] Automatically detect service #13
      • Call service scripts automatically (instead of manually)
    • Adjust Apple script to constructor's standards
  • Configure distutils/setup.py
  • Write documentation
    • Module Basics & Getting Started
    • Command Line Interface - User Guide
    • Class Documentation
    • Downloading Process
    • Services - Getting Started

...and remove temporal tiles block and __template__ file
...and write planned functions for class
I might add Historical Panoramas to the structure as well - Linked Panos could be for another time
- Allocate metadata in _build_tile_arr to avoid creating requests if key data is needed such as max_zoom

- Remove metadata functions that are no longer required
...and fix a typo in download.tiles

...i might divide the download.panorama function into two, or just remove it all idk lol
@shmugoh shmugoh linked an issue Aug 15, 2022 that may be closed by this pull request
- to sort out individual tile saving; might clear the syntax later if i find it confusing

- delete `from_file()` because i don't think it might be THAT useful
@shmugoh shmugoh added enhancement New feature or request documentation labels Aug 16, 2022
@shmugoh shmugoh linked an issue Aug 16, 2022 that may be closed by this pull request
...except for google and apple; will do these later

- added _parse_panorama for all services; could be useful to add the first iteration of metadata to avoid a huge cluster
- bumped metadata count for bing
- added appropiate panorama iterations for bing and yandex

- get_metadata is always called if date cannot be obtained
...and use universal metadata structure

also remove get_date and get_coords
- polish _parse_panorama
- [yandex] change _build_pano_url to _build_meta_url
...merge _build_pano_url with _build_metadata_url
@shmugoh shmugoh self-assigned this Aug 21, 2022
@shmugoh
Copy link
Owner Author

shmugoh commented Aug 22, 2022

Essential tasks finished. Will test the module by tomorrow and fix some stuff if required.

#13 isn't really that automatic since it just obtains the available services, so the automatization has to depend on the developer instead.

@shmugoh
Copy link
Owner Author

shmugoh commented Aug 22, 2022

I MIGHT plan on doing a sv-dlp viewer program (as an example of what sv-dlp is capable of doing internally), so i might need to add tile_urls & north/south faces in metadata - idk how to explain

...update sk-zk/lookaround script, add istrekker and north_offset, remove resourcemanifest, move geo to its own script and rename some functions

been a while since i haven't touched this code and i'm feeling upset on how i organized this
@shmugoh
Copy link
Owner Author

shmugoh commented Sep 2, 2022

CLI Rewrite & SetupTools Finished.
Will begin writing the documentation. After that, polish some stuff so I can merge the branches and ship it

@shmugoh shmugoh marked this pull request as ready for review September 2, 2022 04:35
@shmugoh
Copy link
Owner Author

shmugoh commented Sep 2, 2022

I might write the package documentation on <readthedocs.io> instead, as it seems easier and convenient for me since most of the process is automatic.
CLI documentation will stay on GitHub Wikis though,

@shmugoh
Copy link
Owner Author

shmugoh commented Sep 3, 2022

Almost finished writing the documentation! Services Page is all that is left.

I found out that sv_dlp.download_panorama() doesn't work when only a Panorama ID is parsed for a service that requires MD but only works for LAT/LNG (remember that it needs the metadata for it to work).
Tomorrow I'm gonna try to write a workaround for that.

Also first iteration of raw_md.pano in sv_dlp.services.apple isn't the closest to the coordinate, so I'm gonna make it scan all iterations and see which one is the closest.

@shmugoh
Copy link
Owner Author

shmugoh commented Jan 14, 2023

I'm back after dealing with finals & mental health.
Will do documentation on contributing services, then push it to main branch & publish it on PyPi. Release might be a bit wonky, but will get better as time goes on.

- sv_dlp constructor no longer uses previous metadata when shorting urls
- added pano_id list detection in short_url
- fixed bing ?=g t ype
- fixed google regular expression url
- fixed yandex regular expression url
- return proper latitude and longitude in yandex
...add download/metadata test for latitude/longitude & pano; url test for each supported service
@shmugoh
Copy link
Owner Author

shmugoh commented Jan 16, 2023

Done! Gonna do a bit of tinkering with GitHub WorkFlows and I'm finally done

...use new bump version system & publish to pypi
@shmugoh shmugoh merged commit 1c01944 into master Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

[PYPI] Turn into front-end API/package [SERVICES] Automatically detect service
1 participant