Skip to content

Commit ef6b615

Browse files
committed
fixed typing, formatting
1 parent 40f9b3e commit ef6b615

File tree

11 files changed

+28
-26
lines changed

11 files changed

+28
-26
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<a href="https://github.com/cecoeco/Readability.jl/actions/workflows/CI.yml"><img alt="CI test" src="https://github.com/cecoeco/Readability.jl/actions/workflows/CI.yml/badge.svg"></a>
33
<a href="https://cecoeco.github.io/Readability.jl/stable/"><img src="https://img.shields.io/badge/docs-stable-blue.svg" alt="Documentation Stable" /></a>
44
<a href="https://cecoeco.github.io/Readability.jl/dev/"><img src="https://img.shields.io/badge/docs-dev-blue.svg" alt="Documentation Dev"></a>
5-
<a href="https://juliapkgstats.com/pkg/Readability"><img src="https://img.shields.io/badge/dynamic/json?url=http%3A%2F%2Fjuliapkgstats.com%2Fapi%2Fv1%2Fmonthly_downloads%2FReadability&query=total_requests&suffix=%2Fmonth&label=Downloads" alt="Package Statistics"></a>
5+
<a href="https://juliapkgstats.com/pkg/Readability"><img src="https://img.shields.io/badge/dynamic/json?url=http%3A%2F%2Fjuliapkgstats.com%2Fapi%2Fv1%2Ftotal_downloads%2FReadability&query=total_requests&label=Downloads" alt="Package Statistics"></a>
66
<a href="https://github.com/JuliaDiff/BlueStyle"><img alt="Style: Blue" src="https://img.shields.io/badge/code%20style-blue-4495d1.svg"></a>
77

88
</div>

app/src-oxygen/index.jl

+4-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ function serve_reactjs(; build_directory::String)::Nothing
5555
for path in Base.Filesystem.readdir(build_directory; join=true)
5656
filename::String = Base.Filesystem.basename(path)
5757
if filename == "index.html"
58-
Oxygen.get("/") do
59-
Oxygen.file(path)
58+
for page in ["/", "*"]
59+
Oxygen.get(page) do
60+
Oxygen.file(path)
61+
end
6062
end
6163
else
6264
Oxygen.get("/$filename") do

app/src-react/components/footer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import "../assets/css/footer.css";
33
const Footer: React.FC = () => {
44
return (
55
<footer className="footer">
6-
© {new Date().getFullYear()} Readability.jl contributors
6+
© {new Date().getFullYear()} Readability.jl Contributors
77
<a href="https://opensource.org/license/MIT/" target="_blank">
88
MIT License
99
</a>

src/ari.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
ari(text::String)
2+
ari(text::String)::Int
33
44
Returns the Automated Readability Index (ARI) of `text`.
55

src/coleman-liau.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function sentences_per_100_words(text::String)::Number
77
end
88

99
"""
10-
coleman_liau(text::String)
10+
coleman_liau(text::String)::Number
1111
1212
Returns the Coleman-Liau Index of `text`.
1313

src/core.jl

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
characters(text::String)
2+
characters(text::String)::Int
33
44
Returns the number of characters in `text`.
55
"""
@@ -8,7 +8,7 @@ function characters(text::String)::Int
88
end
99

1010
"""
11-
characters_per_word(text::String)
11+
characters_per_word(text::String)::Number
1212
1313
Returns the number of characters per word or the average word length in `text`.
1414
"""
@@ -17,7 +17,7 @@ function characters_per_word(text::String)::Number
1717
end
1818

1919
"""
20-
sentences(text::String)
20+
sentences(text::String)::Int
2121
2222
Returns the number of sentences in `text`.
2323
"""
@@ -26,7 +26,7 @@ function sentences(text::String)::Int
2626
end
2727

2828
"""
29-
sentences_per_paragraph(text::String)
29+
sentences_per_paragraph(text::String)::Number
3030
3131
Returns the number of sentences per paragraph or the average paragraph length in `text`.
3232
"""
@@ -35,7 +35,7 @@ function sentences_per_paragraph(text::String)::Number
3535
end
3636

3737
"""
38-
syllables(text::String)
38+
syllables(text::String)::Int
3939
4040
Returns the number of syllables in `text`.
4141
"""
@@ -59,7 +59,7 @@ function syllables(text::String)::Int
5959
end
6060

6161
"""
62-
syllables_per_word(text::String)
62+
syllables_per_word(text::String)::Number
6363
6464
Returns the number of syllables per word or the average word length in `text`.
6565
"""
@@ -68,7 +68,7 @@ function syllables_per_word(text::String)::Number
6868
end
6969

7070
"""
71-
words(text::String)
71+
words(text::String)::Int
7272
7373
Returns the number of words in `text`.
7474
"""
@@ -77,7 +77,7 @@ function words(text::String)::Int
7777
end
7878

7979
"""
80-
words_per_sentence(text::String)
80+
words_per_sentence(text::String)::Number
8181
8282
Returns the number of words per sentence or the sentence length in `text`.
8383
"""
@@ -86,7 +86,7 @@ function words_per_sentence(text::String)::Number
8686
end
8787

8888
"""
89-
lines(text::String)
89+
lines(text::String)::Int
9090
9191
Returns the number of lines `text`.
9292
"""
@@ -95,7 +95,7 @@ function lines(text::String)::Int
9595
end
9696

9797
"""
98-
paragraphs(text::String)
98+
paragraphs(text::String)::Int
9999
100100
Returns the number of paragraphs in `text`.
101101
"""

src/dale-chall+spache.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function dale_chall(text::String)::Number
5656
end
5757

5858
"""
59-
spache(text::String)
59+
spache(text::String)::Number
6060
6161
Returns the Spache readability score of `text`.
6262
"""

src/flesch.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
flesch_kincaid_grade_level(text::String)
2+
flesch_kincaid_grade_level(text::String)::Float64
33
44
Returns the Flesch-Kincaid grade level of `text`.
55
"""
@@ -8,7 +8,7 @@ function flesch_kincaid_grade_level(text::String)::Float64
88
end
99

1010
"""
11-
flesch_reading_ease_score(text::String)
11+
flesch_reading_ease_score(text::String)::Float64
1212
1313
Returns the Flesch Reading Ease Score of `text`.
1414
"""

src/gunning_fog.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
complex_words(text::String)
2+
complex_words(text::String)::Int
33
44
Returns the number of complex words (words with 3 or more syllables and not ending in "es", "ed", or "ing") in `text`.
55
"""
@@ -20,7 +20,7 @@ function percentage_of_complex_words(text::String)::Number
2020
end
2121

2222
"""
23-
gunning_fog(text::String)
23+
gunning_fog(text::String)::Number
2424
2525
Returns the Gunning Fog index of `text`.
2626
"""

src/smog.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
polysyllabic_words(text::String)
2+
polysyllabic_words(text::String)::Int
33
44
Returns the number of words with 3 or more syllables in `text`.
55
"""

src/time.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
reading_time(text::String; wpm::Number=238)::Number
2+
reading_time(text::String; wpm::Number=238)::Float64
33
44
Returns the reading time of `text` in seconds.
55
@@ -13,14 +13,14 @@ Returns the reading time of `text` in seconds.
1313
- `Float64`: The reading time in seconds.
1414
1515
"""
16-
function reading_time(text::String; wpm::Number=238)::Number
16+
function reading_time(text::String; wpm::Number=238)::Float64
1717
seconds::Float64 = words(text) / wpm * 60
1818

1919
return seconds
2020
end
2121

2222
"""
23-
speaking_time(text::String; wpm::Number=183)::Number
23+
speaking_time(text::String; wpm::Number=183)::Float64
2424
2525
Returns the speaking time of `text` in seconds.
2626
@@ -34,7 +34,7 @@ Returns the speaking time of `text` in seconds.
3434
- `Float64`: The speaking time in seconds.
3535
3636
"""
37-
function speaking_time(text::String; wpm::Number=183)::Number
37+
function speaking_time(text::String; wpm::Number=183)::Float64
3838
seconds::Float64 = words(text) / wpm * 60
3939

4040
return seconds

0 commit comments

Comments
 (0)