Skip to content

Commit

Permalink
fix(generate-dictionary): update generate script to use https and reg…
Browse files Browse the repository at this point in the history
…enerate source dictionary (#397)

* update generate-dictionary script to use https

* regenerate dictionary from spec

---------

Co-authored-by: Craig Berry <craig.berry@veeva.com>
  • Loading branch information
craigberry1 and Craig Berry committed Jul 31, 2024
1 parent 0f24a18 commit a4c5312
Show file tree
Hide file tree
Showing 2 changed files with 1,768 additions and 4 deletions.
6 changes: 3 additions & 3 deletions generate-dictionary.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Based on https://github.com/pydicom/pydicom/blob/8112bb69bfc0423c3a08cb89e7960defbe7237bf/source/generate_dict/generate_dicom_dict.py
*/
const fs = require('fs/promises');
const http = require('http');
const https = require('https');
const xml2js = require('xml2js');

require('@babel/register');
Expand Down Expand Up @@ -108,7 +108,7 @@ export default dictionary;
}

async function getDocbook(part) {
const source = await getUrl(`http://dicom.nema.org/medical/dicom/current/source/docbook/${part}`);
const source = await getUrl(`https://dicom.nema.org/medical/dicom/current/source/docbook/${part}`);
return xml2js.parseStringPromise(source);
}

Expand All @@ -123,7 +123,7 @@ function getCellData(td) {

function getUrl(url) {
return new Promise((resolve, reject) => {
http.get(url, request => {
https.get(url, request => {
let data = '';
request.on('error', () => {
reject(error);
Expand Down
Loading

0 comments on commit a4c5312

Please sign in to comment.