# Linux Kernel Module Cheat

##### 38.5.1.2. asciidoctor/extract-header-ids

Documentation for asciidoctor/extract-header-ids

Extract header IDs, both auto-generated and manually given.

E.g., for the document `test.adoc`:

    = Auto generated

    [[explicitly-given]]
    == La la

the script:

    ./asciidoctor/extract-header-ids test.adoc

produces:

    auto-generated
    explicitly-given

One application we have in mind for this is that as of 2.0.10 Asciidoctor does not warn on header ID collisions between auto-generated IDs: https://github.com/asciidoctor/asciidoctor/issues/3147 But this script doesn’t solve that yet as it would require generating the section IDs without the `-N` suffix. Section generation happens at `Section.generate_id` in Asciidoctor code.

Hastily hacked from: https://asciidoctor.org/docs/user-manual/#https://asciidoctor.org/docs/user-manual/#tree-processor-example until I noticed that that example had a bug at the time and so fixed it here: https://github.com/asciidoctor/asciidoctor/issues/3363