Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIXES: flat version from 0.0.11 to 0.0.15 #16

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/flat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps: # This workflow has 3 steps
# The first step is to check out the repository so it can read the files inside of it and do other operations
- name: Check out repo
uses: actions/checkout@v3
uses: actions/checkout@v4
# This step installs Deno, which is a new Javascript runtime that improves on Node. We'll use it for postprocessing later
- name: Setup deno
uses: denoland/setup-deno@main
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ But what if you want to process or change the data in some way before it gets ad

// Helper library written for useful postprocessing tasks with Flat Data
// Has helper functions for manipulating csv, json, excel, zip, and image files
import { readJSON, writeJSON } from 'https://deno.land/x/[email protected].11/mod.ts'
import { readJSON, writeJSON } from 'https://deno.land/x/[email protected].15/mod.ts'

// Step 1: Read the downloaded_filename JSON
const filename = Deno.args[0] // Same name as downloaded_filename `const filename = 'btc-price.json';`
Expand Down Expand Up @@ -166,7 +166,7 @@ But what if you want to process or change the data in some way before it gets ad
5. **Remove the original downloaded data (optional):** If you optionally only wanted to keep the postprocessed-btc-price.json file and not the original data, you can add the following lines to the postprocess script to simply delete it before it gets committed to the repository.

```javascript
import { readJSON, writeJSON, removeFile } from 'https://deno.land/x/[email protected].11/mod.ts'
import { readJSON, writeJSON, removeFile } from 'https://deno.land/x/[email protected].15/mod.ts'

const filename = Deno.args[0]

Expand Down
2 changes: 1 addition & 1 deletion btc-price-postprocessed.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"currency":"United States Dollar","bitcoinRate":"42,479.7667"},{"currency":"British Pound Sterling","bitcoinRate":"35,495.7532"},{"currency":"Euro","bitcoinRate":"41,381.4948"},{"currency":"Chinese Yuan","bitcoinRate":"40,202.5000"}]
[{"currency":"United States Dollar","bitcoinRate":"94,546.638"},{"currency":"British Pound Sterling","bitcoinRate":"75,399.053"},{"currency":"Euro","bitcoinRate":"90,705.303"},{"currency":"Chinese Yuan","bitcoinRate":"690,058.092"}]
2 changes: 1 addition & 1 deletion btc-price.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time":{"updated":"Jan 1, 2024 00:17:00 UTC","updatedISO":"2024-01-01T00:17:00+00:00","updateduk":"Jan 1, 2024 at 00:17 GMT"},"disclaimer":"This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org","chartName":"Bitcoin","bpi":{"USD":{"code":"USD","symbol":"$","rate":"42,479.7667","description":"United States Dollar","rate_float":42479.7667},"GBP":{"code":"GBP","symbol":"£","rate":"35,495.7532","description":"British Pound Sterling","rate_float":35495.7532},"EUR":{"code":"EUR","symbol":"€","rate":"41,381.4948","description":"Euro","rate_float":41381.4948},"CNY":{"code":"CNY","symbol":"¥","rate":"40,202.5000","description":"Chinese Yuan","rate_float":40202.5}}}
{"time":{"updated":"Jan 1, 2025 00:57:19 UTC","updatedISO":"2025-01-01T00:57:19+00:00","updateduk":"Jan 1, 2025 at 00:57 GMT"},"disclaimer":"This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org","chartName":"Bitcoin","bpi":{"USD":{"code":"USD","symbol":"$","rate":"94,546.638","description":"United States Dollar","rate_float":94546.638},"GBP":{"code":"GBP","symbol":"£","rate":"75,399.053","description":"British Pound Sterling","rate_float":75399.0529},"EUR":{"code":"EUR","symbol":"€","rate":"90,705.303","description":"Euro","rate_float":90705.3026},"CNY":{"code":"CNY","symbol":"¥","rate":"690,058.092","description":"Chinese Yuan","rate_float":690058.0919}}}