Skip to content

Commit 8b99c11

Browse files
committed
Remove unused and duplicates
1 parent 687a81f commit 8b99c11

16 files changed

Lines changed: 31 additions & 182 deletions

File tree

assets/commands/index.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ ascii.md
333333
asciiart.md
334334
asciidoc.md
335335
asciidoctor.md
336+
asciijump.md
336337
asciinema.md
337338
asciiquarium.md
338339
asciitopgm.md
@@ -724,6 +725,7 @@ boggle.md
724725
boltctl.md
725726
boltd.md
726727
bombadillo.md
728+
bombardier.md
727729
bondai.md
728730
bookokrat.md
729731
boot.md
@@ -1005,6 +1007,7 @@ cat.md
10051007
catchsegv.md
10061008
catimg.md
10071009
cava.md
1010+
cavezofphear.md
10081011
cavif.md
10091012
cb.md
10101013
cbatticon.md
@@ -1366,6 +1369,7 @@ create_ap.md
13661369
createdb.md
13671370
createrepo.md
13681371
createuser.md
1372+
cribbage.md
13691373
crictl.md
13701374
crl.1s.md
13711375
crl2pkcs7.1s.md
@@ -1438,6 +1442,7 @@ cupstestppd.md
14381442
curl-impersonate.md
14391443
curl.md
14401444
curlie.md
1445+
curseofwar.md
14411446
cursor.md
14421447
cut.md
14431448
cutycapt.md
@@ -1760,6 +1765,7 @@ dolt.md
17601765
domainname.md
17611766
done.md
17621767
doom.md
1768+
dopewars.md
17631769
doppler-projects.md
17641770
doppler-run.md
17651771
doppler-secrets.md
@@ -1944,6 +1950,7 @@ emaint.md
19441950
ember.md
19451951
emcc.md
19461952
emerge.md
1953+
empire.md
19471954
emulationstation.md
19481955
emulator.md
19491956
emuto.md
@@ -2259,6 +2266,7 @@ fq.md
22592266
free.md
22602267
freecad.md
22612268
freeramdisk.md
2269+
freesweep.md
22622270
freqtrade.md
22632271
fresh.md
22642272
freshclam.md
@@ -2773,6 +2781,7 @@ gnome-terminal.md
27732781
gnomon.md
27742782
gnucash-cli.md
27752783
gnucash.md
2784+
gnugo.md
27762785
gnumeric.md
27772786
gnuplot.md
27782787
gnuradio.md
@@ -4529,6 +4538,7 @@ nb.md
45294538
nbfifteen.md
45304539
nbmemoblocks.md
45314540
nbmines.md
4541+
nbpipes.md
45324542
nbsos.md
45334543
nbtscan.md
45344544
nc.md
@@ -4928,6 +4938,7 @@ oletools.md
49284938
olevba.md
49294939
ollama.md
49304940
oma.md
4941+
omega-rpg.md
49314942
omf.md
49324943
omm.md
49334944
omshell.md
@@ -5406,6 +5417,7 @@ pgmtost4.md
54065417
pgrep.md
54075418
pgtree.md
54085419
phan.md
5420+
phantasia.md
54095421
phar.md
54105422
pharo.md
54115423
phetch.md
@@ -6382,6 +6394,8 @@ rnano.md
63826394
rndc.md
63836395
rnm.md
63846396
robo.md
6397+
robotfindskitten.md
6398+
robots.md
63856399
rofi.md
63866400
rogue.md
63876401
roll.md
@@ -6502,6 +6516,7 @@ sadc.md
65026516
safe-rm.md
65036517
safe.md
65046518
safety.md
6519+
sail.md
65056520
sails.md
65066521
sake.md
65076522
salloc.md
@@ -6753,6 +6768,7 @@ slackpkg.md
67536768
slapd.md
67546769
slapt-get.md
67556770
slapt-src.md
6771+
slashem.md
67566772
sldtoppm.md
67576773
sleep.md
67586774
slides.md
@@ -7447,6 +7463,7 @@ tredis.md
74477463
tree.md
74487464
treemd.md
74497465
treetime.md
7466+
trek.md
74507467
trex.md
74517468
trezorctl.md
74527469
trickle.md
@@ -7478,6 +7495,7 @@ tsx.md
74787495
tt.md
74797496
tts.md
74807497
tty-clock.md
7498+
tty-solitaire.md
74817499
tty.md
74827500
ttyd.md
74837501
ttyper.md
@@ -7986,6 +8004,7 @@ wtf.md
79868004
wtfis.md
79878005
wttr.in.md
79888006
wtype.md
8007+
wump.md
79898008
wut.md
79908009
wuzz.md
79918010
x-cmd.md

cli/src/commonMain/kotlin/com/linuxcommandlibrary/nativecli/data/DataRepository.kt

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import com.linuxcommandlibrary.nativecli.data.generated.tipsData
77
import com.linuxcommandlibrary.shared.BasicInfo
88
import com.linuxcommandlibrary.shared.MarkdownParser
99
import com.linuxcommandlibrary.shared.TipInfo
10+
import com.linuxcommandlibrary.shared.getSectionSortPriority
1011

1112
data class CommandInfo(val name: String)
1213

@@ -41,23 +42,7 @@ object DataRepository {
4142
return MarkdownParser.splitByHeaders(content, "# ").map { (title, sectionContent) ->
4243
CommandSection(title, sectionContent)
4344
}.filter { it.title.uppercase() != "TAGLINE" }
44-
.sortedBy { getSortPriority(it.title) }
45-
}
46-
47-
private fun getSortPriority(title: String): Int = when (title.uppercase()) {
48-
"TLDR" -> 0
49-
"NAME" -> 1
50-
"SYNOPSIS" -> 2
51-
"DESCRIPTION" -> 3
52-
"PARAMETERS" -> 4
53-
"OPTIONS" -> 5
54-
"EXAMPLES" -> 6
55-
"CONFIGURATION" -> 7
56-
"CAVEATS" -> 90
57-
"HISTORY" -> 91
58-
"AUTHOR" -> 92
59-
"SEE ALSO" -> 93
60-
else -> 50
45+
.sortedBy { getSectionSortPriority(it.title) }
6146
}
6247

6348
fun getBasicCategories(): List<BasicCategory> = basicsData.mapNotNull { (id, content) ->

common/src/androidMain/kotlin/com/linuxcommandlibrary/shared/Platform.kt

Lines changed: 0 additions & 25 deletions
This file was deleted.

common/src/commonMain/kotlin/com/linuxcommandlibrary/shared/App.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,3 @@ val basicsSortOrder =
120120
* Only allow characters in html file names to guarantee matching on the website and app deep linking
121121
*/
122122
fun String.toHtmlFileName(): String = this.lowercase().replace(onlyCharactersRegex, "")
123-
124-
fun String.isLetter(): Boolean = this.firstOrNull() in 'a'..'z' || this.firstOrNull() in 'A'..'Z'

common/src/commonMain/kotlin/com/linuxcommandlibrary/shared/EmptyClass.kt

Lines changed: 0 additions & 3 deletions
This file was deleted.

common/src/commonMain/kotlin/com/linuxcommandlibrary/shared/MarkdownModels.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ data class CommandSectionInfo(
4747
)
4848

4949
/**
50-
* Get sort priority for command sections.
50+
* Get sort priority for command sections by title string.
5151
* TLDR first, SEE ALSO and AUTHOR/HISTORY last.
5252
*/
53-
fun CommandSectionInfo.getSortPriority(): Int = when (title.uppercase()) {
53+
fun getSectionSortPriority(title: String): Int = when (title.uppercase()) {
5454
"TLDR" -> 0
5555
"NAME" -> 1
5656
"SYNOPSIS" -> 2
@@ -65,3 +65,5 @@ fun CommandSectionInfo.getSortPriority(): Int = when (title.uppercase()) {
6565
"SEE ALSO" -> 93
6666
else -> 50
6767
}
68+
69+
fun CommandSectionInfo.getSortPriority(): Int = getSectionSortPriority(title)

common/src/commonMain/kotlin/com/linuxcommandlibrary/shared/Platform.kt

Lines changed: 0 additions & 24 deletions
This file was deleted.

common/src/desktopMain/kotlin/com/linuxcommandlibrary/shared/Platform.kt

Lines changed: 0 additions & 23 deletions
This file was deleted.

common/src/iosMain/kotlin/com/linuxcommandlibrary/shared/Platform.kt

Lines changed: 0 additions & 25 deletions
This file was deleted.

common/src/jvmMain/kotlin/com/linuxcommandlibrary/shared/Platform.kt

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)