Git Product home page Git Product logo

Comments (9)

Blackjacx avatar Blackjacx commented on May 28, 2024 2

I think I'll face the effort. It will be worth it in the end 👍 I'll make it my weekend project ^^

from wwdc.

Blackjacx avatar Blackjacx commented on May 28, 2024 1

I will tomorrow, late now here :-)

If you have time you can have a look over PR #62
It resolves 2 of the issues :-) Would be cool to have it cross checked before I merge it ^^
After this I'll continue watching sessions like crazy ✌️

It is better to read the commits instead of all the changes at once

from wwdc.

Blackjacx avatar Blackjacx commented on May 28, 2024 1

Okay the PR is merged. I'll close this when it is confirmed that the readme generation is working

from wwdc.

Blackjacx avatar Blackjacx commented on May 28, 2024 1

Well it rocks ✌️

from wwdc.

Blackjacx avatar Blackjacx commented on May 28, 2024

I found this and this article. We could use the same principle to generate the README.md instead of editing it all the time. Steps would be the following:

  • instead of contributing to the readme we create a new folder 2020
  • pre-populate it with md files named session_number.md
  • Fill the files with the same stubs you created earlier this week
  • once a PR is merged README.md is re-generated using a GitHub action

Advantages:

  • No more manual TOC editing
  • No more conflicts
  • Clean file structure
  • Older years could be part of the default branch and don't have to be archived on another branch
  • Progress could be added automatically

What do you think? I also have use for these separate MD files in another side project...

from wwdc.

rogerluan avatar rogerluan commented on May 28, 2024

Interesting approach, I had thought of something similar but thought that it would be an overkill.

I like the pros you raised, though. I think the only con is implementing it (time consuming implementation).
So, comparing "leaving things as is" to the advantages you raised:

  • ToC editing would still be manual, but not a big deal imo.
  • Conflicts are already minimum AFAIK, since the stubbing of the sessions
  • I like the clean file structure you proposed, better than what we have now.
  • We actually don't need the 2019 branch, we can create a 2019_sessions.md with the 2019 branch's README and make it live in master, and README.md would always contain the latest WWDC (2020 for now, but in june 2021 it'd be 2021's).
  • Progress could be added via CI without all that hassle, see #59 :) we'd just have to plug this in CI

from wwdc.

Blackjacx avatar Blackjacx commented on May 28, 2024

@rogerluan which algorithm did you use to create the site link for the toc entries (#session_header)

from wwdc.

rogerluan avatar rogerluan commented on May 28, 2024

I just wrote this:

func normalizeTitleToHyperlink(_ title: String) -> String {
    return title
        .lowercased()
        .replacingOccurrences(of: "★", with: "")
        .replacingOccurrences(of: " ", with: "-")
        .replacingOccurrences(of: "'", with: "")
        .replacingOccurrences(of: "’", with: "")
        .replacingOccurrences(of: "\"", with: "")
        .replacingOccurrences(of: ":", with: "")
        .replacingOccurrences(of: ",", with: "")
        .replacingOccurrences(of: "?", with: "")
        .replacingOccurrences(of: "&", with: "")
}

It's not extensive, but worked out for all the nearly 200 video session entries. To validate the entries, I scanned all the output:

let normalizedLine = normalizeTitleToHyperlink(line)
var set = CharacterSet.alphanumerics
set.insert(charactersIn: "-")
if normalizedLine.rangeOfCharacter(from: set.inverted) != nil {
    print("## \(line)\t\t\tBroke and printed: \(normalizedLine)")
    didFailForAtLeastOneEntry = true
}

from wwdc.

rogerluan avatar rogerluan commented on May 28, 2024

Do you have Telegram? reach me on https://t.me/rogerluan @Blackjacx :)

from wwdc.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.