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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

json to hugo pages #19

Merged

Conversation

elreydetoda
Copy link
Collaborator

@elreydetoda elreydetoda commented Aug 3, 2022

Part of addressing this: JupiterBroadcasting/jupiterbroadcasting.com#110

Alright, everything's working now 馃榿

NOTE: This can't be merged till I make the appropriate changes to utilize the new logic, or else it'll break the update flow that we've got with the GH action.

Summary of changes:

  • this actually could close Feat/adding pipenv聽#12 instead of that PR, I can remove those commits if we want or just add the requirements.txt back till we figure out Feat/adding pipenv聽#12
  • I've added 2 more packages python-frontmatter & pydantic-yaml
  • adding more typing to help validate/ensure some of the information we're ingesting/consuming from various locations (even the config)
    • part of this was defining what chapters look like per the spec
    • this also caused a lot of dictionaries to not be addressable as objects i.e. example_data['foo'] -> example_data.foo
  • migrated people & sponsors objects which were writing to data/ to now use content/ and writing as .md instead of .json
    • I used yaml for the frontmatter, because the output for json & toml isn't as well supported in the python-frontmatter library, and with pydantic-yaml doing a lot of the heavy lifting for ease of conversion, it just works 馃槄
  • documenting code more with docstrings
  • added some more checks if there were unexpected info, and logging errors if they are
  • simplifying show_exceptions for the jb_populate_episodes_urls function

- completely updated to use config validator new format (attrib instead of dict)
- documented jb_get_last_page_of_show
- documenting scrape_data_from_jb + sub-functions
- handling JupiterBroadcasting#16 by logging it till better solution
- making empty Jbd_Episode_Record, so it can write episode out still
- added TODO for error talked about on GH
- updating references with necessary changes for models
- adding warning when there won't be direct downloads
- simplfying replace with raw string
- adding hd_torrent to Jbd_eipsode_record
- renaming Jbd_episode_record to Jb_episode_record
- now returning object instead of dict for get_podcast_chapters
- using html2text instead of html2text.html2text
@elreydetoda elreydetoda marked this pull request as ready for review August 3, 2022 12:34
@elreydetoda elreydetoda changed the title Feat/json to hugo pages json to hugo pages Aug 4, 2022
@kbondarev
Copy link
Collaborator

@elreydetoda Good work, I managed to set it all up with pipenv and all.

One thing I'm not sure about:
Side effect of you using the UUID type for guid is that all of them were converted to be lowercase. It is most likely fine, but I can't find anywhere on podcast index whether it matters or not - is the guid case sensitive or not? (I assume not, but I kinda want to confirm that somehow)

@elreydetoda
Copy link
Collaborator Author

@elreydetoda Good work, I managed to set it all up with pipenv and all.

Yay 馃帀 , I'm glad that you got everything working and tested 馃榿 (some day you'll have to tell me how you got it to work with your python setup 馃槄 )

BTW, I just pushed the last commit which addressed your other concern from the other repo, my bad for not pushing it earlier...
JupiterBroadcasting/jupiterbroadcasting.com#252 (comment)

@elreydetoda
Copy link
Collaborator Author

One thing I'm not sure about:
Side effect of you using the UUID type for guid is that all of them were converted to be lowercase. It is most likely fine, but I can't find anywhere on podcast index whether it matters or not - is the guid case sensitive or not? (I assume not, but I kinda want to confirm that somehow)

Interesting... 馃 , it's probably happening with the conversion in the pydantic_yaml library...let me see if there's anything I can pass to modify that to all uppercase.

@kbondarev
Copy link
Collaborator

Yay tada , I'm glad that you got everything working and tested grin (some day you'll have to tell me how you got it to work with your python setup sweat_smile )

I installed a fresh Fedora 36 on a second SSD on my machine which I use only for testing distros or weird thing like that. And it all worked there out of the box 馃檲

@elreydetoda
Copy link
Collaborator Author

Lol, we'll I'm just happy it worked 馃榿

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.

None yet

2 participants