Hello, I'm trying to create a bot for getting the ...
# getting-started
a
Hello, I'm trying to create a bot for getting the documentation of an object/member in Kotlin from the standard library (a class/property/method etc), but I'm wondering multiple questions : 1. Is it allowed ? Will I hit any limitations doing this by scrapping the website each time ? (if yes at how many ?) 2. Is there any export I can find anywhere ? This will avoid me scrapping
e
it's all from kdocs in the source code, you can build your own with https://github.com/JetBrains/kotlin/tree/master/libraries/tools/kotlin-stdlib-docs
a
Yes I know, but will it be simpler to create a scrapper or a Kotlin KDoc analyser ? 🤔 Or maybe there is already some library I can use to retrieve the KDoc of an element from a fqname (for example
kotlin.Long
or
kotlin.Long#and
?
e
I mean you can just
./gradlew buildLatestVersion
instead of scraping
a
Ah sorry, code source seems to be mainly contained in the
build.gradle.kts
and it's big, is there any documentation on what it does in details ?
e
runs dokka
a
Okay I see, so then I could just clone this folder of the repository, run the script on each new major Kotlin release, and use the local export to extract the data I need ? I asked Claude AI and it also says that dokka has a plugin to export to JSON, I just have to create a new task for it and then I could directly use that, is it true ?
e
there isn't any maintained dokka json exporter as far as I know, but it shouldn't be hard to write
a
(I never used dokka so I don't know exactly its features and how to use it)
Okay I see, I'll try that when I have time to, thanks for the answers !