diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 0b4de59..919dbc8 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -29,4 +29,6 @@ jobs: status_options: '--untracked-files=no' tagging_message: "v${{ steps.current-time.outputs.formattedTime }}" - name: Create Release - run: gh release create "v${{ steps.current-time.outputs.formattedTime }}" --notes "v${{steps.current-time.outputs.formattedTime}}" *.csv \ No newline at end of file + run: | + jq '.version = "ABC"' datapackage.json > d2.json && mv d2.json datapackage.json + gh release create "v${{ steps.current-time.outputs.formattedTime }}" --notes "v${{steps.current-time.outputs.formattedTime}}" *.csv && \ \ No newline at end of file diff --git a/CITATION.cff b/CITATION.cff index aec4433..bfd9084 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -7,5 +7,6 @@ authors: title: "India ISIN Database, by Nemo" version: 2022.4.30 url: "https://github.com/captn3m0/india-isin-database" +date-released: 2022-04-30 preferred-citation: type: data \ No newline at end of file diff --git a/datapackage.json b/datapackage.json new file mode 100644 index 0000000..0ecfcb0 --- /dev/null +++ b/datapackage.json @@ -0,0 +1,179 @@ +{ + "contributors": [ + { + "email": "isin@captnemo.in", + "path": "https://captnemo.in", + "role": "author", + "title": "Nemo" + } + ], + "description": "Regularly updated database containing all ISIN codes and details issued in India in CSV format", + "homepage": "https://github.com/captn3m0/india-isin-data", + "id": "https://doi.org/10.5281/zenodo.6508187", + "keywords": [ + "csv", + "dataset", + "india", + "isin", + "funds", + "securities", + "nsdl" + ], + "name": "india-isin-data", + "profile": "tabular-data-resource", + "resources": [ + { + "description": "Indian ISINs for Company, Statuatory Corporation, Banking Company. These are ISINs starting with INE.", + "encoding": "utf-8", + "format": "csv", + "mediatype": "text/csv", + "name": "india-isin-ine", + "path": "INE.csv", + "schema": { + "fields": [ + { + "description": "ISIN code for the security", + "example": "INF00XX01093", + "name": "ISIN", + "title": "ISIN Code", + "type": "string" + }, + { + "description": "Description for the security", + "example": "ITI MUTUAL FUND LIQUID FUND REG GROWTH", + "name": "Description", + "title": "ISIN Description", + "type": "string" + }, + { + "description": "Name of the issuer that issued this security", + "example": "ITI MUTUAL FUND", + "name": "Issuer", + "title": "Name of the Issuer", + "type": "string" + }, + { + "description": "Description of the type of security", + "example": "MUTUAL FUND UNIT (TRASE)", + "name": "Type", + "title": "Security Type", + "type": "string" + }, + { + "description": "ISIN Status (such as Deleted, Active, Suspended)", + "example": "ACTIVE", + "name": "Status", + "title": "Security Status", + "type": "string" + } + ] + }, + "title": "India ISIN (Company, Statuatory Corporation, Banking Company)" + }, + { + "description": "Indian ISINs for Mutual Funds. These are ISINs starting with INF.", + "encoding": "utf-8", + "format": "csv", + "mediatype": "text/csv", + "name": "india-isin-inf", + "path": "INF.csv", + "schema": { + "fields": [ + { + "description": "ISIN code for the security", + "example": "INF00XX01093", + "name": "ISIN", + "title": "ISIN Code", + "type": "string" + }, + { + "description": "Description for the security", + "example": "ITI MUTUAL FUND LIQUID FUND REG GROWTH", + "name": "Description", + "title": "ISIN Description", + "type": "string" + }, + { + "description": "Name of the issuer that issued this security", + "example": "ITI MUTUAL FUND", + "name": "Issuer", + "title": "Name of the Issuer", + "type": "string" + }, + { + "description": "Description of the type of security", + "example": "MUTUAL FUND UNIT (TRASE)", + "name": "Type", + "title": "Security Type", + "type": "string" + }, + { + "description": "ISIN Status (such as Deleted, Active, Suspended)", + "example": "ACTIVE", + "name": "Status", + "title": "Security Status", + "type": "string" + } + ] + }, + "title": "India ISIN (Mutual Funds)" + }, + { + "description": "Indian ISINs for Partly paid up shares. These are ISINs starting with IN9.", + "encoding": "utf-8", + "format": "csv", + "mediatype": "text/csv", + "name": "india-isin-in9", + "path": "IN9.csv", + "schema": { + "fields": [ + { + "description": "ISIN code for the security", + "example": "INF00XX01093", + "name": "ISIN", + "title": "ISIN Code", + "type": "string" + }, + { + "description": "Description for the security", + "example": "ITI MUTUAL FUND LIQUID FUND REG GROWTH", + "name": "Description", + "title": "ISIN Description", + "type": "string" + }, + { + "description": "Name of the issuer that issued this security", + "example": "ITI MUTUAL FUND", + "name": "Issuer", + "title": "Name of the Issuer", + "type": "string" + }, + { + "description": "Description of the type of security", + "example": "MUTUAL FUND UNIT (TRASE)", + "name": "Type", + "title": "Security Type", + "type": "string" + }, + { + "description": "ISIN Status (such as Deleted, Active, Suspended)", + "example": "ACTIVE", + "name": "Status", + "title": "Security Status", + "type": "string" + } + ] + }, + "title": "India ISIN (Company, Statuatory Corporation, Banking Company)" + } + ], + "sources": [ + { + "path": "https://nsdl.co.in/master_search.php", + "title": "NSDL Website Detailed ISIN Search" + } + ], + "title": "India ISIN Database", + "version": "ABC", + "created": "2022-04-30 19:56:14+05:30" +} diff --git a/fetch.sh b/fetch.sh index 1de0a75..0d5a3c0 100755 --- a/fetch.sh +++ b/fetch.sh @@ -65,4 +65,11 @@ for i in E F 9; do done # Update CITATION -git diff --quiet *.csv || (sed -i "s/^version.*/version: $1/" CITATION.cff && git add CITATION.cff) +if [[ $(git diff --stat *.csv) != '' ]]; then + sed -i "s/^version.*/version: $1/" CITATION.cff + sed -i "s/^date-released.*/date-released: $(date --rfc-3339=date)/" CITATION.cff + + jq ".version = \"$1\" | .created = \"$(date --rfc-3339=seconds)\"" datapackage.json > d2.json + mv d2.json datapackage.json + git add CITATION.cff datapackage.json +fi