Skip to content

Commit

Permalink
change to dcterms
Browse files Browse the repository at this point in the history
  • Loading branch information
MHindermann committed Nov 19, 2024
1 parent 340650f commit 3236307
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 48 deletions.
59 changes: 27 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,51 +15,51 @@ Each prompt in the library is defined as a JSON object with the following fields

```
{
"prompt_id": "Unique identifier for the prompt",
"title": "Short, descriptive title",
"description": "Detailed explanation of the prompt",
"category": "Thematic or functional category",
"models": ["List of models"],
"author": "Creator or contributor name",
"dcterms:identifier": "Unique identifier for the prompt",
"dcterms:title": "Short, descriptive title",
"dcterms:description": "Detailed explanation of the prompt, including expected output",
"dcterms:subject": "Thematic or functional category",
"dcterms:relation": ["List of related models"],
"dcterms:creator": "Creator or contributor name",
"prompt_text": "The actual text of the prompt",
"expected_output": "Description of desired output",
"use_case": "Application context",
"dcterms:type": "Application context or genre",
"input_type": "Input required (e.g., Text, Code)",
"output_type": "Type of response (e.g., Narrative, Code)",
"version_number": "Version of the prompt",
"last_updated": "Date when the prompt was last updated",
"license": "Terms of use",
"dcterms:hasVersion": "Version of the prompt",
"dcterms:modified": "Date when the prompt was last updated",
"dcterms:rights": "Terms of use",
"export_format": ["Supported formats (e.g., JSON, YAML)"]
}
```
The `dcterms:` prefix in the JSON refers to the [DCMI Metadata Terms](https://www.dublincore.org/specifications/dublin-core/dcmi-terms/) namespace. It is used to distinguish standard metadata terms defined by the Dublin Core Metadata Initiative (DCMI) from other terms or custom metadata fields.

### Field Descriptions
1. `prompt_id`
1. `dcterms:identifier`
1. Type: String
2. Description: A unique identifier for the prompt.
3. Example: `PROMPT-0001`

2. `title`
2. `dcterms:title`
1. Type: String
2. Description: A short, descriptive title for the prompt.
3. Example: `Creative Writing Starter`

3. `description`
3. `dcterms:description`
1. Type: String
2. Description: A detailed explanation of the prompt’s purpose.
3. Example: `Generate an engaging opening line for a short story.`

4. `category`
4. `dcterms:subject`
1. Type: String
2. Description: Thematic or functional category of the prompt.
3. Example: `Creative Writing`

5. `models`
5. `dcterms:relation`
1. Type: Array of Strings
2. Description: Models associated with the prompt.
3. Example: `["GPT-4o", "Claude 3 Haiku", "claude-3-5-sonnet-20240620"]`

6. `author`
6. `dcterms:creator`
1. Type: String
2. Description: Name of the creator or contributor of the prompt.
3. Example: `Albert Müller`
Expand All @@ -69,42 +69,37 @@ Each prompt in the library is defined as a JSON object with the following fields
2. Description: The actual text of the prompt.
3. Example: `Write a compelling opening line for a short story.`

8. `expected_output`
1. Type: String
2. Description: A description of the desired output from the prompt.
3. Example: `A single sentence that hooks the reader.`

9. `use_case`
8. `dcterms:type`
1. Type: String
2. Description: The primary application context of the prompt.
3. Example: `Storytelling`

10. `input_type`
1. Type: String
2. Description: The type of input expected by the prompt.
3. Example: `Text`
9. `input_type`
1. Type: String
2. Description: The type of input expected by the prompt.
3. Example: `Text`

11. `output_type`
10. `output_type`
1. Type: String
2. Description: The type of output generated by the prompt.
3. Example: `Narrative`

12. `version_number`
11. `dcterms:hasVersion`
1. Type: String
2. Description: The version of the prompt.
3. Example: `v1.0`

13. `last_updated`
12. `dcterms:modified`
1. Type: String (ISO Date Format)
2. Description: The last date the prompt was updated.
3. Example: `2024-11-19`

14. `license`
13. `dcterms:rights`
1. Type: String
2. Description: The license under which the prompt is released.
3. Example: `Creative Commons`

15. `export_format`
14. `export_format`
1. Type: Array of Strings
2. Description: Supported export formats for the prompt.
3. Example: `["JSON", "YAML"]`
Expand Down
27 changes: 13 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@ <h1>Prompt Library</h1>
<table id="promptTable">
<thead>
<tr>
<th onclick="sortTable(0)">ID <span class="sort-indicator"></span></th>
<th onclick="sortTable(1)">Title <span class="sort-indicator"></span></th>
<th onclick="sortTable(2)">Description <span class="sort-indicator"></span></th>
<th onclick="sortTable(3)">Category <span class="sort-indicator"></span></th>
<th onclick="sortTable(4)">Models <span class="sort-indicator"></span></th>
<th onclick="sortTable(5)">Author <span class="sort-indicator"></span></th>
<th onclick="sortTable(0)">dcterms:identifier <span class="sort-indicator"></span></th>
<th onclick="sortTable(1)">dcterms:title <span class="sort-indicator"></span></th>
<th onclick="sortTable(2)">dcterms:description <span class="sort-indicator"></span></th>
<th onclick="sortTable(3)">dcterms:subject <span class="sort-indicator"></span></th>
<th onclick="sortTable(4)">dcterms:relation <span class="sort-indicator"></span></th>
<th onclick="sortTable(5)">dcterms:creator <span class="sort-indicator"></span></th>
<th onclick="sortTable(6)">Prompt Text <span class="sort-indicator"></span></th>
<th onclick="sortTable(7)">Expected Output <span class="sort-indicator"></span></th>
<th onclick="sortTable(8)">Use Case <span class="sort-indicator"></span></th>
<th onclick="sortTable(9)">Input Type <span class="sort-indicator"></span></th>
<th onclick="sortTable(10)">Output Type <span class="sort-indicator"></span></th>
<th onclick="sortTable(11)">Version Number <span class="sort-indicator"></span></th>
<th onclick="sortTable(12)">Last Updated <span class="sort-indicator"></span></th>
<th onclick="sortTable(13)">License <span class="sort-indicator"></span></th>
<th onclick="sortTable(14)">Export Format <span class="sort-indicator"></span></th>
<th onclick="sortTable(7)">dcterms:type <span class="sort-indicator"></span></th>
<th onclick="sortTable(8)">Input Type <span class="sort-indicator"></span></th>
<th onclick="sortTable(9)">Output Type <span class="sort-indicator"></span></th>
<th onclick="sortTable(10)">dcterms:hasVersion <span class="sort-indicator"></span></th>
<th onclick="sortTable(11)">dcterms:modified <span class="sort-indicator"></span></th>
<th onclick="sortTable(12)">dcterms:rights <span class="sort-indicator"></span></th>
<th onclick="sortTable(13)">Export Format <span class="sort-indicator"></span></th>
</tr>
</thead>
<tbody>
Expand Down
2 changes: 0 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function displayTable(data) {
<td>${prompt.models.join(', ')}</td>
<td>${prompt.author}</td>
<td>${prompt.prompt_text}</td>
<td>${prompt.expected_output}</td>
<td>${prompt.use_case}</td>
<td>${prompt.input_type}</td>
<td>${prompt.output_type}</td>
Expand Down Expand Up @@ -80,7 +79,6 @@ function filterPrompts() {
prompt.models.some(model => model.toLowerCase().includes(query)) ||
prompt.author.toLowerCase().includes(query) ||
prompt.prompt_text.toLowerCase().includes(query) ||
prompt.expected_output.toLowerCase().includes(query) ||
prompt.use_case.toLowerCase().includes(query) ||
prompt.input_type.toLowerCase().includes(query) ||
prompt.output_type.toLowerCase().includes(query) ||
Expand Down

0 comments on commit 3236307

Please sign in to comment.