Skip to content

Feature/hopa bookmarks - #110

Open
epsig wants to merge 28 commits into
masterfrom
feature/hopa_bookmarks
Open

Feature/hopa bookmarks#110
epsig wants to merge 28 commits into
masterfrom
feature/hopa_bookmarks

Conversation

@epsig

@epsig epsig commented Aug 29, 2026

Copy link
Copy Markdown
Owner

No description provided.

@epsig epsig linked an issue Aug 29, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are confirmed correctness/build issues (link dependencies and unsafe container indexing) that can cause link failures or runtime crashes.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR migrates homepage and bookmarks-page generation from legacy Perl scripts to the C++ codebase, introducing new bookmarks/page formatting modules, updating bookmark data sources, and refreshing the generated HTML outputs.

Changes:

  • Added a new shob.bookmarks C++ module (events, configurable bookmarks, current events) and corresponding unit tests/CMake targets.
  • Added new shob.pages formatters to rebuild index.html and configurable bookmark pages using shared HTML helpers (table::yellowRed, html::List) and updated HeadBottom options.
  • Removed legacy Perl bookmark generation code paths and updated bookmark CSV data + regenerated HTML pages.
File summaries
File Description
CMakeLists.txt Adds shob.bookmarks library + test target and links it into the main executable.
src/shob.pages/HeadBottom.h Adds toggles to optionally emit <h1> and footer.
src/shob.pages/HeadBottom.cpp Implements conditional <h1> and footer rendering.
src/shob.pages/FormatHomePage.h Declares homepage rebuild entrypoint.
src/shob.pages/FormatHomePage.cpp Generates pages/index.html from bookmarks + site blocks.
src/shob.pages/FormatBookmarks.h Declares configurable bookmark page formatter.
src/shob.pages/FormatBookmarks.cpp Builds bookmark pages from CSV-configured blocks and events.
src/shob.html/table.h Adds table::yellowRed helper to format two-column blocks with headers.
src/shob.html/table.cpp Implements table::yellowRed HTML generation.
src/shob.html/List.h Adds html::List helper for unordered lists.
src/shob.html/List.cpp Implements unordered list rendering from MultipleStrings.
src/shob.general/itdate.h Makes splitAndValidate publicly callable; keeps date immutable via const dd.
src/shob.cpp Wires homepage + bookmarks rebuild into the main run.
src/shob.bookmarks/OwnSportPages.h Declares helpers to build sports page link ranges.
src/shob.bookmarks/OwnSportPages.cpp Implements sports page link list generation.
src/shob.bookmarks/ListOfEvents.h Introduces event list container and render helpers.
src/shob.bookmarks/ListOfEvents.cpp Implements event list rendering helpers.
src/shob.bookmarks/Event.h Introduces simple event model (name/url).
src/shob.bookmarks/Event.cpp Implements HTML anchor generation for events.
src/shob.bookmarks/CurrentEvents.h Declares “current events” lookup API.
src/shob.bookmarks/CurrentEvents.cpp Implements date-window filtering from current.csv.
src/shob.bookmarks/ConfigurableBookmarks.h Declares CSV-driven bookmark page configuration/events API.
src/shob.bookmarks/ConfigurableBookmarks.cpp Implements config parsing and event lookup from CSV archives.
src/shob.bookmarks.test/TestOwnSportPages.h Declares OwnSportPages unit tests.
src/shob.bookmarks.test/TestOwnSportPages.cpp Implements OwnSportPages unit tests.
src/shob.bookmarks.test/TestCurrentEvents.h Declares CurrentEvents unit test.
src/shob.bookmarks.test/TestCurrentEvents.cpp Implements CurrentEvents unit test.
src/shob.bookmarks.test/TestConfigurableBookmarks.h Declares ConfigurableBookmarks unit tests.
src/shob.bookmarks.test/TestConfigurableBookmarks.cpp Implements ConfigurableBookmarks unit tests.
src/shob.bookmarks.test/BookmarksUnitTest.cpp Adds a dedicated gtest runner for bookmarks unit tests.
data/bookmarks/config.csv Updates/extends bookmark page configuration (new pages/blocks).
data/bookmarks/archive.csv Updates bookmark link archive content (adds sport blocks, removes one entry).
pages/index.html Regenerated homepage HTML based on new C++ generators.
pages/bookmarks_media.html Regenerated media bookmarks HTML.
pages/bookmarks_treinen.html Regenerated trains bookmarks HTML.
pages/bookmarks_computers.html Regenerated computers bookmarks HTML.
pages/bookmarks_sport.html Regenerated sport bookmarks HTML.
pages/tmp_bookmarks_science.html Regenerated tmp science bookmarks HTML.
pages/tmp_bookmarks_milieu.html Regenerated tmp environment bookmarks HTML.
code/Sport_Collector/Bookmarks_Index.pm Removes unused exported Perl generator (get_sport_links) and its implementation.
code/Shob/SiteUpdater.pm Stops invoking Perl-based homepage/bookmarks generators in site update flow.
code/Shob/Bookmarks.pm Removes the legacy Perl bookmarks generator module.
code/Shob/Algemeen.pm Removes legacy Perl homepage generation (get_hopa).
Review details
  • Files reviewed: 43/43 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CMakeLists.txt Outdated
Comment on lines 129 to 133
target_link_libraries(shob.pages shob.football shob.general shob.readers shob.html shob.teams)
target_link_libraries(shob shob.football shob.general shob.readers shob.html shob.teams shob.pages)
target_link_libraries(shob shob.football shob.general shob.readers shob.html shob.teams shob.pages
shob.bookmarks)
target_link_libraries(shob.pages.test shob.football shob.general shob.readers shob.html
shob.teams shob.pages shob.test.utils gtest_main)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 16145de.

Comment thread src/shob.html/table.h Outdated
Comment thread src/shob.html/table.cpp Outdated
Comment on lines +23 to +30
MultipleStrings ListOfEvents::printFirstAndLast() const
{
MultipleStrings return_value;
return_value.addContent(events.front().link());
return_value.addContent(" t/m ");
return_value.addContent(events.back().link());
return return_value;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 16145de.

Comment thread src/shob.pages/FormatBookmarks.cpp Outdated
Comment on lines +60 to +64
auto hb = HeadBottomInput(dd_page);
hb.title = props.title;
hb.css = StyleSheetType::SeparateFile;
hb.copyTitleToH1 = false;
std::swap(hb.body, blocks[0]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 16145de.

Co-authored-by: epsig <34799234+epsig@users.noreply.github.com>
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.

convert hopa en bookmarks

3 participants