Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7450999
D2216.id7991.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
9 KB
Subscribers
None
D2216.id7991.diff
View Options
diff --git a/codemeta_generation.js b/codemeta_generation.js
--- a/codemeta_generation.js
+++ b/codemeta_generation.js
@@ -36,6 +36,24 @@
'issueTracker',
'name',
'version',
+ 'identifier',
+ 'description',
+ 'applicationCategory',
+ //keywords TODO:keywords array
+ 'releaseNotes',
+ 'funding',
+ 'runtimePlatform',
+ //softwareRequiremnts,
+ 'operatingSystem',
+ 'developmentStatus',
+ //relatedLink
+ 'programmingLanguage',
+ 'isPartOf',
+ //'referencePublication'
+ // "@type": "ScholarlyArticle",
+ // "idendifier": "https://doi.org/xx.xxxx/xxxx.xxxx.xxxx",
+ // "name": "title of publication"
+
];
// Names of codemeta properties with a matching HTML field name,
@@ -44,6 +62,7 @@
'givenName',
'familyName',
'email',
+ 'affiliation'
];
function generatePerson(idPrefix) {
diff --git a/dynamic_form.js b/dynamic_form.js
--- a/dynamic_form.js
+++ b/dynamic_form.js
@@ -35,6 +35,11 @@
<input type="url" id="${personPrefix}_id" name="${personPrefix}_id"
placeholder="http://orcid.org/0000-0002-1825-0097" />
</p>
+ <p>
+ <label for="${personPrefix}_affiliation">Affiliation</label>
+ <input type="url" id="${personPrefix}_affiliation" name="${personPrefix}_affiliation"
+ placeholder="Department of Computer Science, University of Pisa" />
+ </p>
`;
return fieldset;
diff --git a/fields_data.js b/fields_data.js
--- a/fields_data.js
+++ b/fields_data.js
@@ -10,6 +10,7 @@
var SPDX_LICENSES = null;
var SPDX_LICENSE_IDS = null;
+
function initSpdx() {
var xhr = new XMLHttpRequest();
xhr.open('GET', './data/spdx/licenses.json', true);
diff --git a/index.html b/index.html
--- a/index.html
+++ b/index.html
@@ -26,10 +26,48 @@
<p title="The name of the software">
<label for="name">Name</label>
- <input type="text" name="name" id="name"
+ <input type="text" name="name" id="name" aria-describedby="name_descr"
placeholder="My Software" required="true" />
+ <div class="field-description" id="name_descr">the software title</div>
</p>
+
+ <p title="Unique identifier">
+ <label for="identifier">Unique identifier</label>
+ <input type="text" name="identifier" id="identifier"
+ placeholder="10.151.xxxxx" />
+ <div class="field-description">such as ISBNs, GTIN codes, UUIDs etc.. <a href="http://schema.org/identifier">http://schema.org/identifier</a> </div>
+ </p>
+ <!-- TODO:define better
+
+ I looked at the schema.org definition of identifier (https://schema.org/identifier),
+ it can be text, url or PropertyValue.
+ Used as follows in data representation with microdata:
+
+ <div property="identifier" typeof="PropertyValue">
+ <span property="propertyID">DOI</span>:
+ <span property="value">10.151.xxxxx</span>
+ </div>
+ we can use that with identifier-type and identifier-value to have a clearer idea
+ of what needs to be in the input.
+
+ -->
+
+ <p title="Type of the software application">
+ <label for="applicationCategory">Application category</label>
+ <input type="text" name="applicationCategory" id="applicationCategory"
+ placeholder="Astronomy" />
+ </p>
+
+ <p title="a brief description of the software">
+ <label for="description">Description</label>
+ <br>
+ <textarea rows="4" cols="50"
+ name="description" id="description"
+ placeholder="My Software computes ephemerides and orbit propagation. It has been developed from early ´80." ></textarea>
+ </p>
+
+
<p title="The date on which the software was created.">
<label for="dateCreated">Creation date</label>
<input type="text" name="dateCreated" id="dateCreated"
@@ -44,9 +82,10 @@
<p>
<label for="license">License</label>
- <input list="licenses" name="license" id="license">
+ <input list="licenses" name="license" id="license" aria-describedby="licenses_descr">
<datalist id="licenses">
- </datalist>
+ </datalist> <!-- TODO: insert placeholder -->
+ <div class="field-description" id="licenses_descr">from <a href="https://spdx.org/license-list">SPDX licence list</a></div>
</p>
</fieldset>
@@ -86,8 +125,77 @@
<input type="text" name="dateModified" id="dateModified"
placeholder="YYYY-MM-DD" pattern="\d{4}-\d{2}-\d{2}" />
</p>
+
+ <p title="a brief description of the software">
+ <label for="releaseNotes">Release notes</label>
+ <br>
+ <textarea rows="4" cols="50"
+ name="releaseNotes" id="releaseNotes"
+ placeholder=
+"Change log: this and that;
+Bugfixes: that and this." ></textarea>
+ </p>
+<!--TODO: keywords as a string array -->
+
+<!--TODO: software requirements as string array -->
+
+<!--TODO: related links as URL array -->
+
+<!--TODO: referencePublication as ScholarlyArticle array -->
+
</fieldset>
+ <fieldset id="fieldsetAdditionalInfo">
+ <legend>Additional Info</legend>
+ <p title="Funding">
+ <label for="funding">Funding</label>
+ <input type="text" name="funding" id="funding" aria-describedby="funding_descr"
+ placeholder="Università di Pisa (PRA_2018_73)"/>
+ <div class="field-description" id="funding_descr">software funded by (e.g. specific grant)</div>
+ </p>
+
+ <p title="Runtime Platform">
+ <label for="runtimePlatform">Runtime Platform</label>
+ <input type="text" name="runtimePlatform" id="runtimePlatform"
+ placeholder="Python2.3" />
+ </p>
+
+ <p title="Operating System">
+ <label for="operatingSystem">Operating System</label>
+ <input type="text" name="operatingSystem" id="operatingSystem"
+ placeholder="Android 1.6" />
+ </p>
+
+ <p title="Development Status">
+ <label for="developmentStatus">Development Status</label>
+ <datalist id="developmentStatuses">
+ <option value="Concept">
+ <option value="WIP">
+ <option value="Suspended">
+ <option value="Abandoned">
+ <option value="Active">
+ <option value="Inactive">
+ <option value="Unsupported">
+ <option value="Moved">
+ </datalist>
+ <input list="developmentStatuses" id="developmentStatus" aria-describedby="developmentStatuses_descr"
+ pattern="Concept|WIP|Suspended|Abandoned|Active|Inactive|Unsupported|Moved">
+ <div class="field-description" id="developmentStatuses_descr">see <a href="http://www.repostatus.org">www.repostatus.org</a> for details</div>
+ </p>
+
+ <p title="Programming Language">
+ <label for="programmingLanguage">Programming Language</label>
+ <input type="text" name="programmingLanguage" id="programmingLanguage"
+ placeholder="C#" />
+ </p> <!-- TODO: We should add support for multiple languages, eg. by splitting on commas when exporting. -->
+
+ <p title="Part of">
+ <label for="isPartOf">I part of </label>
+ <input type="URL" name="isPartOf" id="isPartOf"
+ placeholder="http://The.Bigger.Framework.org" />
+ </p>
+ </fieldset>
+
<fieldset class="persons" id="author_container">
<legend>Authors</legend>
@@ -115,6 +223,7 @@
onclick="removePerson('contributor');" />
</div>
</fieldset>
+
</form>
<form>
<input type="button" id="generateCodemeta" value="Generate Codemeta" />
diff --git a/style.css b/style.css
--- a/style.css
+++ b/style.css
@@ -5,11 +5,12 @@
* See top-level LICENSE file for more information
*/
+
.person {
display: inline-block;
}
-#fieldsetSoftwareItself, #fieldsetDevelopmentCommunity, #fieldsetCurrentVersion {
+#fieldsetSoftwareItself, #fieldsetDevelopmentCommunity, #fieldsetCurrentVersion, #fieldsetAdditionalInfo {
display: inline-block;
}
@@ -18,10 +19,19 @@
min-width: 20em;
}
+#funding {
+ /* Funding names are long */
+ min-width: 20em;
+}
+
input[type=URL] {
/* URLs are longer than the other fields */
min-width: 20em;
}
+.field-description {
+ color : rgb(100, 104, 103);
+ font-size: small;
+}
#codemetaText {
width: 100%;
@@ -32,3 +42,8 @@
#errorMessage {
color: red;
}
+
+input:invalid {
+ color: red;
+}
+
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 16, 9:27 AM (5 d, 12 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3223633
Attached To
D2216: added some fields from the SWHAPPE example; added some TODOs
Event Timeline
Log In to Comment