Skip to content

Commit

Permalink
Merge pull request #39 from roflmaostc/filter_talk
Browse files Browse the repository at this point in the history
Add feature to add speaker search
  • Loading branch information
carstenbauer authored Jul 22, 2024
2 parents 6fe812d + c8e67f6 commit 946192f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ JuliaCon.talksby("Carsten Bauer")

![image](https:/JuliaCon/JuliaCon.jl/assets/187980/e58c0281-ef1c-4ccd-93c3-8ce86e095622)

## Search for talks by title
```julia
JuliaCon.talksabout("Optics")
```

## T-Shirt code

Expand Down
3 changes: 2 additions & 1 deletion src/JuliaCon.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ end
JuliaCon.tomorrow()
JuliaCon.now()
JuliaCon.talksby("Carsten Bauer")
JuliaCon.talksabout("Optics")
JuliaCon.jcon[] = nothing
end
end

export juliacon2024, today, tomorrow, now, talksby
export juliacon2024, today, tomorrow, now, talksby, talksabout

end
13 changes: 13 additions & 0 deletions src/schedule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -516,3 +516,16 @@ function talksby(speaker::AbstractString)
end
_print_talks_list(df; bold_title=true, show_time=true)
end

"""
talksabout(title::AbstractString)
Search for talks with titles containing the given `title` string.
"""
function talksabout(title::AbstractString)
jcon = get_conference_schedule()
df = filter(jcon; view=true) do talk
any(contains(lowercase(talk.title), lowercase(title)))
end
_print_talks_list(df; bold_title=true, show_time=true)
end

0 comments on commit 946192f

Please sign in to comment.