Update to include new barcodeencoding field

This commit is contained in:
Sylvia van Os
2025-12-25 18:01:47 +01:00
parent 1a8c6d6e90
commit 2e51bd1ffa
2 changed files with 23 additions and 22 deletions

View File

@@ -4,18 +4,19 @@ These are the fields available in a card.
An [export](./EXPORT_FORMAT.md) always contains all values. A [card sharing URL](./CARD_SHARING_URL_FORMAT.md) only contains some of the values.
| Key | In sharing URL | Valid values | Explanation |
| ----------- | -------------- | ------------ | ----------- |
| store | Required | Any string | Name of the store this card belongs to |
| note | Required | Any string | An optional note for the end-user |
| validfrom | Optional | Any UNIX timestamp | When the loyalty card starts being valid |
| expiry | Optional | Any UNIX timestamp | When the loyalty card expires |
| balance | Optional | Any string value accepted by Java's BigDecimal constructor | The balance available in the loyalty card |
| balancetype | Optional | Any valid ISO 4217 value or unset for "Points" | The balance currency (USD, EUR, etc.) or "points" |
| cardid | Required | Any string | The loyalty card ID |
| barcodeid | Optional | Any string | The value of the loyalty card barcode, if different from the loyalty card ID |
| barcodetype | Optional | AZTEC, CODABAR, CODE_39, CODE_93, CODE_128, DATA_MATRIX, EAN_8, EAN_13, ITF, MAXICODE, PDF_417, QR_CODE, RSS_14, RSS_EXPANDED, UPC_A, UPC_E | The type of loyalty card barcode used |
| headercolor | Optional | A valid Android color value (https://developer.android.com/reference/android/graphics/Color) | The color to use in the header and card background |
| starstatus | Ignored | 0,1 | If the card is "starred" |
| lastused | Ignored | Any UNIX timestamp | When the loyalty card was last opened |
| archive | Ignored | 0,1 | If the card should be marked as archived |
| Key | In sharing URL | Valid values | Explanation |
| --------------- | -------------- | ------------ | ----------- |
| store | Required | Any string | Name of the store this card belongs to |
| note | Required | Any string | An optional note for the end-user |
| validfrom | Optional | Any UNIX timestamp | When the loyalty card starts being valid |
| expiry | Optional | Any UNIX timestamp | When the loyalty card expires |
| balance | Optional | Any string value accepted by Java's BigDecimal constructor | The balance available in the loyalty card |
| balancetype | Optional | Any valid ISO 4217 value or unset for "Points" | The balance currency (USD, EUR, etc.) or "points" |
| cardid | Required | Any string | The loyalty card ID |
| barcodeid | Optional | Any string | The value of the loyalty card barcode, if different from the loyalty card ID |
| barcodetype | Optional | AZTEC, CODABAR, CODE_39, CODE_93, CODE_128, DATA_MATRIX, EAN_8, EAN_13, ITF, MAXICODE, PDF_417, QR_CODE, RSS_14, RSS_EXPANDED, UPC_A, UPC_E | The type of loyalty card barcode used |
| barcodeencoding | Optional | Either `null` (automatic detection using zxing's `guessEncoding` function) or any [StandardCharset](https://developer.android.com/reference/java/nio/charset/StandardCharsets)'s `.name()` output. Only `ISO-8859-1` and `UTF-8` are user selectable | The encoding used to render the loyalty card barcode |
| headercolor | Optional | A valid Android color value (https://developer.android.com/reference/android/graphics/Color) | The color to use in the header and card background |
| starstatus | Ignored | 0,1 | If the card is "starred" |
| lastused | Ignored | Any UNIX timestamp | When the loyalty card was last opened |
| archive | Ignored | 0,1 | If the card should be marked as archived |

View File

@@ -36,13 +36,13 @@ Health
Food
Fashion
_id,store,note,validfrom,expiry,balance,balancetype,cardid,barcodeid,barcodetype,headercolor,starstatus,lastused,archive
1,Clothing Store,Note about store,,,0,,qw,,,-45147,1,1730493938,0
2,Department Store,,,,0,,A,,,-1499549,0,1730493491,0
3,Grocery Store,,,1453633200000,50,,dhd,,,-11751600,0,1730493369,0
4,Pharmacy,,,,0,,dhshsvshs,,,-16766866,0,1684347330,1
5,Restaurant,Note about restaurant here,,,0,,98765432,,CODE_128,-10902850,0,1730493357,0
6,Shoe Store,,,,0,,zhxbx,,AZTEC,-6543440,0,1684347744,0
_id,store,note,validfrom,expiry,balance,balancetype,cardid,barcodeid,barcodetype,barcodeencoding,headercolor,starstatus,lastused,archive
1,Clothing Store,Note about store,,,0,,qw,,,,-45147,1,1730493938,0
2,Department Store,,,,0,,A,,,,-1499549,0,1730493491,0
3,Grocery Store,,,1453633200000,50,,dhd,,,,-11751600,0,1730493369,0
4,Pharmacy,,,,0,,dhshsvshs,,,,-16766866,0,1684347330,1
5,Restaurant,Note about restaurant here,,,0,,98765432,,CODE_128,UTF-8,-10902850,0,1730493357,0
6,Shoe Store,,,,0,,zhxbx,,AZTEC,ISO-8859-1,-6543440,0,1684347744,0
cardId,groupId
8,Fashion