{"id":16718975,"url":"https://github.com/kgryte/apple-card-csv","last_synced_at":"2025-04-10T08:54:27.888Z","repository":{"id":57182823,"uuid":"240424398","full_name":"kgryte/apple-card-csv","owner":"kgryte","description":"Convert Apple Card statement transactions to CSV.","archived":false,"fork":false,"pushed_at":"2020-02-23T05:23:45.000Z","size":2722,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T08:11:16.243Z","etag":null,"topics":["apple","apple-card","apple-wallet","csv","excel","export","javascript","mint","nodejs","parser","pdf","spreadsheet","statement","transactions","utility"],"latest_commit_sha":null,"homepage":"https://areines.com/apple-card-csv/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kgryte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["kgryte"],"patreon":"athan"}},"created_at":"2020-02-14T04:00:32.000Z","updated_at":"2025-02-20T19:19:54.000Z","dependencies_parsed_at":"2022-09-11T23:51:15.117Z","dependency_job_id":null,"html_url":"https://github.com/kgryte/apple-card-csv","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgryte%2Fapple-card-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgryte%2Fapple-card-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgryte%2Fapple-card-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgryte%2Fapple-card-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kgryte","download_url":"https://codeload.github.com/kgryte/apple-card-csv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767250,"owners_count":20992541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","apple-card","apple-wallet","csv","excel","export","javascript","mint","nodejs","parser","pdf","spreadsheet","statement","transactions","utility"],"created_at":"2024-10-12T21:39:37.307Z","updated_at":"2025-04-10T08:54:27.864Z","avatar_url":"https://github.com/kgryte.png","language":"JavaScript","funding_links":["https://github.com/sponsors/kgryte","https://patreon.com/athan"],"categories":[],"sub_categories":[],"readme":"\u003c!--\n\n@license Apache-2.0\n\nCopyright (c) 2020 Athan Reines.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n--\u003e\n\n# Apple Card Statement\n\n\u003e Parses an Apple Card statement.\n\n\u003c!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --\u003e\n\n\u003csection class=\"intro\"\u003e\n\nFor older Apple devices supporting Apple Wallet (e.g., iPhone 6, iPhone 5, etc), but no longer supporting OS updates (iOS \u003c 13), users are unable to export their Apple Card statements as CSV.\n\nTo support these older devices, this package reads and parses exported statement PDFs for subsequent CSV generation. \n\n\u003c/section\u003e\n\n\u003c!-- /.intro --\u003e\n\n\u003c!-- Package usage documentation. --\u003e\n\n\u003csection class=\"usage\"\u003e\n\n## Usage\n\n```javascript\nvar parse = require( 'apple-card-csv' );\n```\n\n#### parse( src, clbk )\n\nParses one or more statements.\n\n```javascript\nvar resolve = require( 'path' ).resolve;\nvar cwd = require( '@stdlib/process/cwd' );\nvar readFileSync = require( '@stdlib/fs/read-file' ).sync;\n\nvar fpath = resolve( cwd(), 'path', 'to', 'statement.pdf' );\nvar src = readFileSync( fpath );\n\nparse( src, done );\n\nfunction done( error, data ) {\n    if ( error ) {\n        return console.error( error.message );\n    }\n    console.log( data );\n}\n```\n\nTo parse more than one statement, provide an `Array` of statements, where each element is a `Uint8Array` containing statement binary data.\n\nReturned data has the following format:\n\n-   **Date**: transaction date. The field value has the following format: `MM/DD/YYYY`.\n-   **Type** transaction type; e.g., `'Transactions'`, `'Payments'`, `'Interest Charged'`.\n-   **Description**: transaction description.\n-   **Daily Cash (%)**: daily cash percentage.\n-   **Daily Cash ($)**: daily cash amount.\n-   **Amount**: transaction amount.\n\n```text\n[\n  {\n    'Date': '10/03/2019',\n    'Type': 'Transactions',\n    'Description': 'FOO BAR',\n    'Daily Cash (%)': '2%',\n    'Daily Cash ($)': '$1.29',\n    'Amount': '$64.31'\n  },\n  {\n    'Date': '10/04/2019',\n    'Type': 'Transactions',\n    'Description': 'BEEP BOOP',\n    'Daily Cash (%)': '2%',\n    'Daily Cash ($)': '$0.68',\n    'Amount': '$33.98'\n  },\n  ...\n]\n```\n\n\u003c/section\u003e\n\n\u003c!-- /.usage --\u003e\n\n\u003c!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. --\u003e\n\n\u003csection class=\"notes\"\u003e\n\n\u003c/section\u003e\n\n\u003c!-- /.notes --\u003e\n\n\u003c!-- Package usage examples. --\u003e\n\n\u003csection class=\"examples\"\u003e\n\n## Examples\n\n\u003c!-- eslint no-undef: \"error\" --\u003e\n\n```javascript\nvar join = require( 'path' ).join;\nvar readFileSync = require( '@stdlib/fs/read-file' ).sync;\nvar parse = require( 'apple-card-csv' );\n\nvar fpath = join( __dirname, 'examples', 'fixtures', 'statement.pdf' );\nvar src = readFileSync( fpath );\n\nparse( src, done );\n\nfunction done( error, data ) {\n    if ( error ) {\n        return console.error( error.message );\n    }\n    console.log( data );\n}\n```\n\n\u003c/section\u003e\n\n\u003c!-- /.examples --\u003e\n\n\u003c!-- Section for describing a command-line interface. --\u003e\n\n* * *\n\n\u003csection class=\"cli\"\u003e\n\n## CLI\n\n\u003c!-- CLI usage documentation. --\u003e\n\n\u003csection class=\"usage\"\u003e\n\n### Usage\n\n```text\nUsage: apple-card-csv [options] [\u003cfile1\u003e \u003cfile2\u003e ...]\n\nOptions:\n\n  -h,    --help                Print this message.\n  -V,    --version             Print the package version.\n```\n\n\u003c/section\u003e\n\n\u003c!-- /.usage --\u003e\n\n\u003c!-- CLI usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. --\u003e\n\n\u003csection class=\"notes\"\u003e\n\n### Notes\n\n-   File paths may be either absolute or relative and are resolved relative to the current working directory.\n\n\u003c/section\u003e\n\n\u003c!-- /.notes --\u003e\n\n\u003c!-- CLI usage examples. --\u003e\n\n\u003csection class=\"examples\"\u003e\n\n### Examples\n\n```bash\n$ apple-card-csv ./path/to/statement.pdf\nDate,Type,Description,Daily Cash (%),Daily Cash ($),Amount\n\"10/03/2019\",\"Transactions\",\"FOO BAR\",\"2%\",\"$1.29\",\"$64.31\"\n\"10/04/2019\",\"Transactions\",\"BEEP BOOP\",\"2%\",\"$0.68\",\"$33.98\"\n...\n```\n\nTo use as a [standard stream][standard-streams],\n\n```bash\n$ cat ./path/to/statement.pdf | apple-card-csv\n\"10/03/2019\",\"Transactions\",\"FOO BAR\",\"2%\",\"$1.29\",\"$64.31\"\n\"10/04/2019\",\"Transactions\",\"BEEP BOOP\",\"2%\",\"$0.68\",\"$33.98\"\n...\n```\n\n\u003c/section\u003e\n\n\u003c!-- /.examples --\u003e\n\n\u003c/section\u003e\n\n\u003c!-- /.cli --\u003e\n\n\u003c!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. --\u003e\n\n\u003csection class=\"references\"\u003e\n\n\u003c/section\u003e\n\n\u003c!-- /.references --\u003e\n\n\u003c!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. --\u003e\n\n\u003csection class=\"links\"\u003e\n\n[standard-streams]: https://en.wikipedia.org/wiki/Standard_streams\n\n\u003c/section\u003e\n\n\u003c!-- /.links --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgryte%2Fapple-card-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkgryte%2Fapple-card-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgryte%2Fapple-card-csv/lists"}