diff --git a/README.md b/README.md index 6dd82149b..e3a8de2d7 100644 --- a/README.md +++ b/README.md @@ -10,100 +10,106 @@ You can read more about the ReproSchema [here](https://repronim.org/reproschema) ## Available Activities -*Last updated: 2025-01-06 21:06:51 UTC* -| *Activity* | *Description* | -|----------|-------------| -| [ACE](activities/ACE) | Mobile cognitive control assessment battery containing standard tests that assess different aspects of cognitive control (attention, working memory, and goal management), modified by incorporating adaptive algorithms, immersive graphics, video tutorials, motivating feedback, and a user-friendly interface. | -| [ARI_P](activities/ARI_P) | The Affective Reactivity Index- Self Report is a concise scale for the dimensional assessment of irritability. | -| [ASSQ](activities/ASSQ) | The ASSQ is a 27-item checklist for completion by lay informants when assessing symptoms characteristic of Asperger's Syndrome or high-functioning autism spectrum disorders. | -| [BADS](activities/BADS) | BADS assessment schema | -| [BFI-2-XS](activities/BFI-2-XS) | BFI-2-XS | -| [Brief_PHQ](activities/Brief_PHQ) | PHQ-9 assessment schema | -| [CIS_P](activities/CIS_P) | The CIS is a 13 item parent report scale that assesses global functioning in domains of interpersonal relations, psychopathology, school performance, use of leisure time; monitors progress after 6 mo of treatment. | -| [CIS_SR](activities/CIS_SR) | The CIS is a 13 item self report scale that assesses global functioning in domains of interpersonal relations, psychopathology, school performance, use of leisure time; monitors progress after 6 mo of treatment. | -| [CIT](activities/CIT) | CIT schema | -| [CageAid](activities/CageAid) | schema describing cage aid assessment | -| [DAS](activities/DAS) | Daily Affect Scale schema | -| [DSM-5_A](activities/DSM-5_A) | DSM-5_A | -| [DSM-5_Y](activities/DSM-5_Y) | DSM-5_Y | -| [EPDS](activities/EPDS) | EPDS assessment schema | -| [GAD7](activities/GAD7) | GAD7 assessment schema | -| [GQ-6](activities/GQ-6) | GQ-6 | -| [IAT](activities/IAT) | The Internet Addiction Test (IAT) is a 20-item scale that measures characteristics and behaviors associated with compulsive use of the Internet that include compulsivity, escapism, and dependency. Questions also assess problems related to addictive use in personal, occupational, and social functioning. | -| [ICU_P](activities/ICU_P) | The Inventory of Callous-Unemotional Traits is a copyright protected 24-item questionnaire designed to provide a comprehensive assessment of callous and unemotional traits. These traits have proven to be important for designating a distinct subgroup group of antisocial and aggressive youth | -| [ICU_SR](activities/ICU_SR) | The Inventory of Callous-Unemotional Traits (ICUT) is a copyright protected 24-item questionnaire designed to provide a comprehensive assessment of callous and unemotional traits. These traits have proven to be important for designating a distinct subgroup group of antisocial and aggressive youth. The ICUT has three subscales: Callousness, Uncaring, and Unemotional | -| [LAS](activities/LAS) | Lyubomirsky Affect Scale schema | -| [MAAS](activities/MAAS) | Self Compassion schema | -| [MEIM](activities/MEIM) | An assessment to measure cultural affiliation | -| [MFQ_P](activities/MFQ_P) | The MFQ consists of a series of descriptive phrases regarding how the subject has been feeling or acting recently. Codings reflect whether the phrase was descriptive of the subject most of the time, sometimes, or not at all in the past two weeks. | -| [MFQ_SR](activities/MFQ_SR) | The MFQ consists of a series of descriptive phrases regarding how the subject has been feeling or acting recently. Codings reflect whether the phrase was descriptive of the subject most of the time, sometimes, or not at all in the past two weeks. | -| [MiscellaneousQuestions](activities/MiscellaneousQuestions) | schema for other questions for voice study | -| [MoodDisorderQuestionnaire](activities/MoodDisorderQuestionnaire) | MoodDisorderQuestionnaire | -| [NDA](activities/NDA) | schema describing terms needed to generate NDA guid | -| [PC-PTSD-5](activities/PC-PTSD-5) | PC-PTSD-5 assessment schema | -| [PCIAT](activities/PCIAT) | This 20-item questionnaire measures mild, moderate, and severe levels of Internet Addiction. The Parent-Child Internet Addiction Test will help you determine if you may be dealing with Internet Addiction in your home. | -| [PEIS](activities/PEIS) | PEIS assessment schema | -| [PHQ](activities/PHQ) | PHQ-8 assessment schema | -| [PHQ-4](activities/PHQ-4) | PHQ-4 | -| [PHQ-8](activities/PHQ-8) | PHQ-8 | -| [PHQ-9](activities/PHQ-9) | PHQ-9 | -| [PHQ-9a](activities/PHQ-9a) | PHQ-9a | -| [PHQ-SADS](activities/PHQ-SADS) | PHQ-SADS | -| [PHQ_15](activities/PHQ_15) | PHQ_15 | -| [PHQalcohol](activities/PHQalcohol) | PHQ Q10 schema | -| [PHQeating](activities/PHQeating) | PHQ eating disorder schema | -| [PROMISGlobalHealth](activities/PROMISGlobalHealth) | brief survey to assess the general health | -| [PSC-17](activities/PSC-17) | PSC-17 assessment schema | -| [PSC-17-Y](activities/PSC-17-Y) | PSC-17-Y assessment schema | -| [ProdromalQuestionnaireBriefVersion](activities/ProdromalQuestionnaireBriefVersion) | ProdromalQuestionnaireBriefVersion | -| [RCADS-25-C](activities/RCADS-25-C) | RCADS-25-C | -| [RCADS-25-Y](activities/RCADS-25-Y) | RCADS-25-Y | -| [SCQ](activities/SCQ) | The SCQ consists of forty yes-or-no questions, which a parent can complete in around ten minutes. It provides valuable information on a child’s body movements, use of language or gestures, and style of interacting. Usually, the SCQ is used as a screening instrument to help identify which children may have an autism spectrum disorder. It is not meant to provide a detailed diagnosis, but to indicate whether a child needs a more careful and in-depth evaluation. | -| [SCS](activities/SCS) | SelfCompassionScale schema | -| [SCS-SF](activities/SCS-SF) | Self Compassion schema | -| [SFI](activities/SFI) | SFI schema | -| [SITBI](activities/SITBI) | SITBI | -| [SRIS-SF](activities/SRIS-SF) | SRIS-SF assessment schema | -| [SWED](activities/SWED) | SWED assessment schema | -| [TEQ](activities/TEQ) | Self Compassion schema | -| [ThankYou](activities/ThankYou) | ThankYou page schema | -| [TokenActivity](activities/TokenActivity) | TokenActivity assessment schema | -| [VoiceConsent](activities/VoiceConsent) | Consent for voice study | -| [VoiceTask](activities/VoiceTask) | VoiceTask | -| [WHODAS12](activities/WHODAS12) | WHODAS12 assessment schema | -| [WHODAS36_P](activities/WHODAS36_P) | WHODAS36_P | -| [WHODAS36_S](activities/WHODAS36_S) | WHODAS36_S | -| [abcd_ant01](activities/abcd_ant01) | ABCD Youth Anthropometrics Modified From PhenX (ANT) | -| [abcd_asrs01](activities/abcd_asrs01) | ABCD Parent Adult Self Report Scores Aseba (ASR) | -| [abcd_betnet02](activities/abcd_betnet02) | ABCD rsfMRI Gordon Network Correlations | -| [abcd_bisbas01](activities/abcd_bisbas01) | ABCD Youth Behavioral Inhibition/Behavioral Approach System Scales Modified from PhenX (BIS/BAS) | -| [abcd_bpm01](activities/abcd_bpm01) | ABCD Youth Brief Problem Monitor | -| [abcd_bpmt01](activities/abcd_bpmt01) | ABCD Brief Problem Monitor-Teacher Form For Ages 6-18 (BPMT) | -| [abcd_cbcl01](activities/abcd_cbcl01) | ABCD Parent Child Behavior Checklist Raw Scores Aseba (CBCL) | -| [abcd_cbcls01](activities/abcd_cbcls01) | ABCD Parent Child Behavior Checklist Scores Aseba (CBCL) | -| [abcd_crpf01](activities/abcd_crpf01) | ABCD Parent Community Risk and Protective Factors (CRPF) | -| [abcd_fes01](activities/abcd_fes01) | ABCD Youth Family Environment Scale-Family Conflict Subscale Modified from PhenX (FES) | -| [abcd_hers01](activities/abcd_hers01) | ABCD Youth Hair Sample | -| [abcd_hsss01](activities/abcd_hsss01) | ABCD Hormone Saliva Salimetric Scores | -| [abcd_ip01](activities/abcd_ip01) | ABCD Irma Substudy Parent | -| [abcd_isc01](activities/abcd_isc01) | ABCD Irma Substudy Child | -| [abcd_ksad01](activities/abcd_ksad01) | ABCD Parent Diagnostic Interview for DSM-5 Full (KSADS-5) | -| [abcd_ksad501](activities/abcd_ksad501) | ABCD Youth Diagnostic Interview for DSM-5 5 (KSADS-5) | -| [abcd_lpds01](activities/abcd_lpds01) | ABCD Longitudinal Parent Demographics Survey | -| [abcd_lpksad01](activities/abcd_lpksad01) | ABCD Longitudinal Parent Diagnostic Interview for DSM-5 Background Items Full (KSAD) | -| [abcd_lpmh01](activities/abcd_lpmh01) | ABCD Longitudinal Parent Medical History Questionnaire | -| [abcd_lpohstbi01](activities/abcd_lpohstbi01) | ABCD Longitudinal Parent Ohio State Traumatic Brain Injury Screen-Short Modified (OTBI) | -| [abcd_lpsaiq01](activities/abcd_lpsaiq01) | ABCD Longitudinal Parent Sports and Activities Involvement Questionnaire (SAIQ) | -| [abcd_lssmh01](activities/abcd_lssmh01) | ABCD Longitudinal Summary Scores Medical History | -| [abcd_lsssa01](activities/abcd_lsssa01) | ABCD Longitudinal Summary Scores Sports Activity | -| [abcd_lsstbi01](activities/abcd_lsstbi01) | ABCD Longitudinal Summary Scores Traumatic Brain Injury | -| [abcd_lt01](activities/abcd_lt01) | ABCD Longitudinal Tracking | -| [abcd_medhxss01](activities/abcd_medhxss01) | ABCD Summary Scores Medical History | -| [abcd_nda](activities/abcd_nda) | schema describing terms needed to generate NDA guid for ABCD study | -| [demographics_and_background_information_v1](activities/demographics_and_background_information_v1) | demographics_and_background_information_v1 | -| [dsm_5_parent_guardian_rated_level_1_crosscutting_s](activities/dsm_5_parent_guardian_rated_level_1_crosscutting_s) | dsm_5_parent_guardian_rated_level_1_crosscutting_s | -| [hbn_asr](activities/hbn_asr) | HBN Adult Self Report (ASR) | + + + + + +*Last updated: 2025-01-06 21:50:05 UTC* + +| **ID** | **Activity** | **# of Items** | **Description** | +|:-----|:-----------|:-----------:|:--------------| +| 1 | [ACE](activities/ACE) | 11 | Mobile cognitive control assessment battery containing standard tests that assess different aspects of cognitive control (attention, working memory, and goal management), modified by incorporating adaptive algorithms, immersive graphics, video tutorials, motivating feedback, and a user-friendly interface. | +| 2 | [ARI_P](activities/ARI_P) | 8 | The Affective Reactivity Index- Self Report is a concise scale for the dimensional assessment of irritability. | +| 3 | [ASSQ](activities/ASSQ) | 28 | The ASSQ is a 27-item checklist for completion by lay informants when assessing symptoms characteristic of Asperger's Syndrome or high-functioning autism spectrum disorders. | +| 4 | [BADS](activities/BADS) | 11 | BADS assessment schema | +| 5 | [BFI-2-XS](activities/BFI-2-XS) | 15 | BFI-2-XS | +| 6 | [Brief_PHQ](activities/Brief_PHQ) | 34 | PHQ-9 assessment schema | +| 7 | [CIS_P](activities/CIS_P) | 14 | The CIS is a 13 item parent report scale that assesses global functioning in domains of interpersonal relations, psychopathology, school performance, use of leisure time; monitors progress after 6 mo of treatment. | +| 8 | [CIS_SR](activities/CIS_SR) | 14 | The CIS is a 13 item self report scale that assesses global functioning in domains of interpersonal relations, psychopathology, school performance, use of leisure time; monitors progress after 6 mo of treatment. | +| 9 | [CIT](activities/CIT) | 54 | CIT schema | +| 10 | [CageAid](activities/CageAid) | 4 | schema describing cage aid assessment | +| 11 | [DAS](activities/DAS) | 20 | Daily Affect Scale schema | +| 12 | [DSM-5_A](activities/DSM-5_A) | 36 | DSM-5_A | +| 13 | [DSM-5_Y](activities/DSM-5_Y) | 38 | DSM-5_Y | +| 14 | [EPDS](activities/EPDS) | 11 | EPDS assessment schema | +| 15 | [GAD7](activities/GAD7) | 8 | GAD7 assessment schema | +| 16 | [GQ-6](activities/GQ-6) | 6 | GQ-6 | +| 17 | [IAT](activities/IAT) | 21 | The Internet Addiction Test (IAT) is a 20-item scale that measures characteristics and behaviors associated with compulsive use of the Internet that include compulsivity, escapism, and dependency. Questions also assess problems related to addictive use in personal, occupational, and social functioning. | +| 18 | [ICU_P](activities/ICU_P) | 25 | The Inventory of Callous-Unemotional Traits is a copyright protected 24-item questionnaire designed to provide a comprehensive assessment of callous and unemotional traits. These traits have proven to be important for designating a distinct subgroup group of antisocial and aggressive youth | +| 19 | [ICU_SR](activities/ICU_SR) | 25 | The Inventory of Callous-Unemotional Traits (ICUT) is a copyright protected 24-item questionnaire designed to provide a comprehensive assessment of callous and unemotional traits. These traits have proven to be important for designating a distinct subgroup group of antisocial and aggressive youth. The ICUT has three subscales: Callousness, Uncaring, and Unemotional | +| 20 | [LAS](activities/LAS) | 12 | Lyubomirsky Affect Scale schema | +| 21 | [MAAS](activities/MAAS) | 15 | Self Compassion schema | +| 22 | [MEIM](activities/MEIM) | 7 | An assessment to measure cultural affiliation | +| 23 | [MFQ_P](activities/MFQ_P) | 35 | The MFQ consists of a series of descriptive phrases regarding how the subject has been feeling or acting recently. Codings reflect whether the phrase was descriptive of the subject most of the time, sometimes, or not at all in the past two weeks. | +| 24 | [MFQ_SR](activities/MFQ_SR) | 34 | The MFQ consists of a series of descriptive phrases regarding how the subject has been feeling or acting recently. Codings reflect whether the phrase was descriptive of the subject most of the time, sometimes, or not at all in the past two weeks. | +| 25 | [MiscellaneousQuestions](activities/MiscellaneousQuestions) | 6 | schema for other questions for voice study | +| 26 | [MoodDisorderQuestionnaire](activities/MoodDisorderQuestionnaire) | 16 | MoodDisorderQuestionnaire | +| 27 | [NDA](activities/NDA) | 12 | schema describing terms needed to generate NDA guid | +| 28 | [PC-PTSD-5](activities/PC-PTSD-5) | 6 | PC-PTSD-5 assessment schema | +| 29 | [PCIAT](activities/PCIAT) | 21 | This 20-item questionnaire measures mild, moderate, and severe levels of Internet Addiction. The Parent-Child Internet Addiction Test will help you determine if you may be dealing with Internet Addiction in your home. | +| 30 | [PEIS](activities/PEIS) | 17 | PEIS assessment schema | +| 31 | [PHQ](activities/PHQ) | 45 | PHQ-8 assessment schema | +| 32 | [PHQ-4](activities/PHQ-4) | 4 | PHQ-4 | +| 33 | [PHQ-8](activities/PHQ-8) | 10 | PHQ-8 | +| 34 | [PHQ-9](activities/PHQ-9) | 12 | PHQ-9 | +| 35 | [PHQ-9a](activities/PHQ-9a) | 12 | PHQ-9a | +| 36 | [PHQ-SADS](activities/PHQ-SADS) | 5 | PHQ-SADS | +| 37 | [PHQ_15](activities/PHQ_15) | 16 | PHQ_15 | +| 38 | [PHQalcohol](activities/PHQalcohol) | 6 | PHQ Q10 schema | +| 39 | [PHQeating](activities/PHQeating) | 8 | PHQ eating disorder schema | +| 40 | [PROMISGlobalHealth](activities/PROMISGlobalHealth) | 10 | brief survey to assess the general health | +| 41 | [PSC-17](activities/PSC-17) | 18 | PSC-17 assessment schema | +| 42 | [PSC-17-Y](activities/PSC-17-Y) | 18 | PSC-17-Y assessment schema | +| 43 | [ProdromalQuestionnaireBriefVersion](activities/ProdromalQuestionnaireBriefVersion) | 42 | ProdromalQuestionnaireBriefVersion | +| 44 | [RCADS-25-C](activities/RCADS-25-C) | 26 | RCADS-25-C | +| 45 | [RCADS-25-Y](activities/RCADS-25-Y) | 26 | RCADS-25-Y | +| 46 | [SCQ](activities/SCQ) | 41 | The SCQ consists of forty yes-or-no questions, which a parent can complete in around ten minutes. It provides valuable information on a child’s body movements, use of language or gestures, and style of interacting. Usually, the SCQ is used as a screening instrument to help identify which children may have an autism spectrum disorder. It is not meant to provide a detailed diagnosis, but to indicate whether a child needs a more careful and in-depth evaluation. | +| 47 | [SCS](activities/SCS) | 26 | SelfCompassionScale schema | +| 48 | [SCS-SF](activities/SCS-SF) | 12 | Self Compassion schema | +| 49 | [SFI](activities/SFI) | 12 | SFI schema | +| 50 | [SITBI](activities/SITBI) | 7 | SITBI | +| 51 | [SRIS-SF](activities/SRIS-SF) | 12 | SRIS-SF assessment schema | +| 52 | [SWED](activities/SWED) | 19 | SWED assessment schema | +| 53 | [TEQ](activities/TEQ) | 16 | Self Compassion schema | +| 54 | [ThankYou](activities/ThankYou) | 1 | ThankYou page schema | +| 55 | [TokenActivity](activities/TokenActivity) | 1 | TokenActivity assessment schema | +| 56 | [VoiceConsent](activities/VoiceConsent) | 9 | Consent for voice study | +| 57 | [VoiceTask](activities/VoiceTask) | 51 | VoiceTask | +| 58 | [WHODAS12](activities/WHODAS12) | 7 | WHODAS12 assessment schema | +| 59 | [WHODAS36_P](activities/WHODAS36_P) | 38 | WHODAS36_P | +| 60 | [WHODAS36_S](activities/WHODAS36_S) | 52 | WHODAS36_S | +| 61 | [abcd_ant01](activities/abcd_ant01) | 12 | ABCD Youth Anthropometrics Modified From PhenX (ANT) | +| 62 | [abcd_asrs01](activities/abcd_asrs01) | 80 | ABCD Parent Adult Self Report Scores Aseba (ASR) | +| 63 | [abcd_betnet02](activities/abcd_betnet02) | 182 | ABCD rsfMRI Gordon Network Correlations | +| 64 | [abcd_bisbas01](activities/abcd_bisbas01) | 21 | ABCD Youth Behavioral Inhibition/Behavioral Approach System Scales Modified from PhenX (BIS/BAS) | +| 65 | [abcd_bpm01](activities/abcd_bpm01) | 19 | ABCD Youth Brief Problem Monitor | +| 66 | [abcd_bpmt01](activities/abcd_bpmt01) | 24 | ABCD Brief Problem Monitor-Teacher Form For Ages 6-18 (BPMT) | +| 67 | [abcd_cbcl01](activities/abcd_cbcl01) | 137 | ABCD Parent Child Behavior Checklist Raw Scores Aseba (CBCL) | +| 68 | [abcd_cbcls01](activities/abcd_cbcls01) | 80 | ABCD Parent Child Behavior Checklist Scores Aseba (CBCL) | +| 69 | [abcd_crpf01](activities/abcd_crpf01) | 13 | ABCD Parent Community Risk and Protective Factors (CRPF) | +| 70 | [abcd_fes01](activities/abcd_fes01) | 9 | ABCD Youth Family Environment Scale-Family Conflict Subscale Modified from PhenX (FES) | +| 71 | [abcd_hers01](activities/abcd_hers01) | 2 | ABCD Youth Hair Sample | +| 72 | [abcd_hsss01](activities/abcd_hsss01) | 27 | ABCD Hormone Saliva Salimetric Scores | +| 73 | [abcd_ip01](activities/abcd_ip01) | 133 | ABCD Irma Substudy Parent | +| 74 | [abcd_isc01](activities/abcd_isc01) | 119 | ABCD Irma Substudy Child | +| 75 | [abcd_ksad01](activities/abcd_ksad01) | 953 | ABCD Parent Diagnostic Interview for DSM-5 Full (KSADS-5) | +| 76 | [abcd_ksad501](activities/abcd_ksad501) | 954 | ABCD Youth Diagnostic Interview for DSM-5 5 (KSADS-5) | +| 77 | [abcd_lpds01](activities/abcd_lpds01) | 118 | ABCD Longitudinal Parent Demographics Survey | +| 78 | [abcd_lpksad01](activities/abcd_lpksad01) | 79 | ABCD Longitudinal Parent Diagnostic Interview for DSM-5 Background Items Full (KSAD) | +| 79 | [abcd_lpmh01](activities/abcd_lpmh01) | 68 | ABCD Longitudinal Parent Medical History Questionnaire | +| 80 | [abcd_lpohstbi01](activities/abcd_lpohstbi01) | 30 | ABCD Longitudinal Parent Ohio State Traumatic Brain Injury Screen-Short Modified (OTBI) | +| 81 | [abcd_lpsaiq01](activities/abcd_lpsaiq01) | 241 | ABCD Longitudinal Parent Sports and Activities Involvement Questionnaire (SAIQ) | +| 82 | [abcd_lssmh01](activities/abcd_lssmh01) | 22 | ABCD Longitudinal Summary Scores Medical History | +| 83 | [abcd_lsssa01](activities/abcd_lsssa01) | 91 | ABCD Longitudinal Summary Scores Sports Activity | +| 84 | [abcd_lsstbi01](activities/abcd_lsstbi01) | 16 | ABCD Longitudinal Summary Scores Traumatic Brain Injury | +| 85 | [abcd_lt01](activities/abcd_lt01) | 1 | ABCD Longitudinal Tracking | +| 86 | [abcd_medhxss01](activities/abcd_medhxss01) | 23 | ABCD Summary Scores Medical History | +| 87 | [abcd_nda](activities/abcd_nda) | - | schema describing terms needed to generate NDA guid for ABCD study | +| 88 | [demographics_and_background_information_v1](activities/demographics_and_background_information_v1) | 88 | demographics_and_background_information_v1 | +| 89 | [dsm_5_parent_guardian_rated_level_1_crosscutting_s](activities/dsm_5_parent_guardian_rated_level_1_crosscutting_s) | 39 | dsm_5_parent_guardian_rated_level_1_crosscutting_s | +| 90 | [hbn_asr](activities/hbn_asr) | 129 | HBN Adult Self Report (ASR) | ## License All documentation is licensed CC-BY. diff --git a/scripts/update_activities_table.py b/scripts/update_activities_table.py index 0c9973829..41adb07da 100755 --- a/scripts/update_activities_table.py +++ b/scripts/update_activities_table.py @@ -31,6 +31,16 @@ def get_activity_description(activity_dir): print(f"Warning: Could not read schema for {activity_dir.name}: {str(e)}") return activity_dir.name +def count_items(activity_dir): + """Count the number of items in the activity's items folder. + Returns '-' if the items folder doesn't exist.""" + items_dir = activity_dir / "items" + if not items_dir.exists(): + return "-" + + # Count all files in the items directory + return len([f for f in items_dir.iterdir() if f.is_file()]) + def get_activities_with_descriptions(): """Get list of activities and their descriptions from the activities directory.""" repo_root = get_repo_root() @@ -41,12 +51,15 @@ def get_activities_with_descriptions(): # Get all directories and their descriptions activities = [] - for activity_dir in sorted(activities_dir.iterdir()): + for idx, activity_dir in enumerate(sorted(activities_dir.iterdir()), 1): if activity_dir.is_dir(): description = get_activity_description(activity_dir) + item_count = count_items(activity_dir) activities.append({ + 'id': str(idx), 'name': activity_dir.name, - 'description': description + 'description': description, + 'item_count': item_count }) return activities @@ -55,15 +68,15 @@ def create_markdown_table(activities): """Create a markdown table with activity links and descriptions.""" content = [ f"*Last updated: {datetime.now(UTC).strftime('%Y-%m-%d %H:%M:%S')} UTC*\n", - "| *Activity* | *Description* |", - "|----------|-------------|" + "| **ID** | **Activity** | **# of Items** | **Description** |", + "|:-----|:-----------|:-----------:|:--------------|" ] for activity in activities: activity_link = f"[{activity['name']}](activities/{activity['name']})" # Escape pipe characters in description safe_description = activity['description'].replace('|', '\\|') - content.append(f"| {activity_link} | {safe_description} |") + content.append(f"| {activity['id']} | {activity_link} | {activity['item_count']} | {safe_description} |") return "\n".join(content) @@ -86,10 +99,8 @@ def update_readme(table_content): if '## Available Activities' not in content: # If section doesn't exist, add it at the end - section_to_add = f""" -## Available Activities -{table_content} -""" + section_to_add = f"""## Available Activities +{table_content}""" content = content.rstrip() + "\n" + section_to_add + "\n" else: # Replace the existing section content