Support more formats & cleanup
This commit is contained in:
parent
8181da421e
commit
84ebdcc9a8
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -1,3 +1,4 @@
|
||||
#file: noinspection SpellCheckingInspection
|
||||
|
||||
name: CI-Android APK
|
||||
|
||||
@ -9,7 +10,7 @@ on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
tags:
|
||||
- '**'
|
||||
- '**'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
@ -1,3 +1,7 @@
|
||||
<!--suppress ALL -->
|
||||
|
||||
|
||||
|
||||
<div align="center">
|
||||
<h1>Keepass Fidelity</h1>
|
||||
<p>A minimalist fidelity/loyalty card plugin</p>
|
||||
@ -28,6 +32,7 @@
|
||||
- Recently used history for fast access
|
||||
- Protect entries from caching
|
||||
- Minimalist design and features
|
||||
- Supported Formats: CODE_39, CODE_93, CODE_128, EAN_8, EAN_13, UPC_A, UPC_E, UPC_EAN, CODE_QR, PDF_417, AZTEC, CODABAR, MAXICODE, DATA_MATRIX, ITF, RSS_14, RSS_EXPANDED
|
||||
|
||||
## 📳 Installation
|
||||
|
||||
@ -54,7 +59,6 @@ Keepass-Fidelity is a user-driven project. We welcome any contribution, big or s
|
||||
|
||||
Thanks to all contributors, the developers of our dependencies, and our users.
|
||||
|
||||
|
||||
## 📝 License
|
||||
|
||||
```
|
||||
|
@ -65,17 +65,13 @@ android {
|
||||
|
||||
|
||||
dependencies {
|
||||
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.4'
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.core:core-ktx:1.12.0'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.camera:camera-camera2:1.3.2'
|
||||
|
||||
implementation 'androidx.camera:camera-lifecycle:1.3.2'
|
||||
implementation 'androidx.camera:camera-view:1.3.2'
|
||||
runtimeOnly 'androidx.camera:camera-camera2:1.3.2'
|
||||
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
implementation 'com.google.android.material:material:1.11.0'
|
||||
implementation 'com.google.zxing:core:3.5.3'
|
||||
|
||||
}
|
@ -15,22 +15,40 @@ object BarcodeFormatConverter {
|
||||
"UPC_A" -> BarcodeFormat.UPC_A
|
||||
"UPC_E" -> BarcodeFormat.UPC_E
|
||||
"PDF_417" -> BarcodeFormat.PDF_417
|
||||
"AZTEC" -> BarcodeFormat.AZTEC
|
||||
"CODABAR" -> BarcodeFormat.CODABAR
|
||||
"MAXICODE" -> BarcodeFormat.MAXICODE
|
||||
"DATA_MATRIX" -> BarcodeFormat.DATA_MATRIX
|
||||
"ITF" -> BarcodeFormat.ITF
|
||||
"RSS_14" -> BarcodeFormat.RSS_14
|
||||
"RSS_EXPANDED" -> BarcodeFormat.RSS_EXPANDED
|
||||
"UPC_EAN" -> BarcodeFormat.UPC_EAN_EXTENSION
|
||||
else -> throw Exception("Unsupported Format: $f")
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun formatToString(f: BarcodeFormat): String {
|
||||
return when (f) {
|
||||
BarcodeFormat.CODE_128 -> "CODE_128"
|
||||
BarcodeFormat.CODE_39 -> "CODE_39"
|
||||
BarcodeFormat.CODE_93 -> "CODE_93"
|
||||
BarcodeFormat.CODE_128 -> "CODE_128"
|
||||
BarcodeFormat.EAN_8 -> "EAN_8"
|
||||
BarcodeFormat.EAN_13 -> "EAN_13"
|
||||
BarcodeFormat.QR_CODE -> "CODE_QR"
|
||||
BarcodeFormat.UPC_A -> "UPC_A"
|
||||
BarcodeFormat.UPC_E -> "UPC_E"
|
||||
BarcodeFormat.PDF_417 -> "PDF_417"
|
||||
BarcodeFormat.AZTEC -> "AZTEC"
|
||||
BarcodeFormat.CODABAR -> "CODABAR"
|
||||
BarcodeFormat.MAXICODE -> "MAXICODE"
|
||||
BarcodeFormat.DATA_MATRIX -> "DATA_MATRIX"
|
||||
BarcodeFormat.ITF -> "ITF"
|
||||
BarcodeFormat.RSS_14 -> "RSS_14"
|
||||
BarcodeFormat.RSS_EXPANDED -> "RSS_EXPANDED"
|
||||
BarcodeFormat.UPC_EAN_EXTENSION -> "UPC_EAN"
|
||||
else -> throw Exception("Unsupported Format: $f")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,14 +16,22 @@
|
||||
<string name="format">Format</string>
|
||||
<string name="save">Save</string>
|
||||
<string-array name="format_array">
|
||||
<item>CODE_128</item>
|
||||
<item>CODE_39</item>
|
||||
<item>CODE_93</item>
|
||||
<item>CODE_128</item>
|
||||
<item>EAN_8</item>
|
||||
<item>EAN_13</item>
|
||||
<item>CODE_QR</item>
|
||||
<item>UPC_A</item>
|
||||
<item>UPC_E</item>
|
||||
<item>PDF_417</item>
|
||||
<item>AZTEC</item>
|
||||
<item>CODABAR</item>
|
||||
<item>MAXICODE</item>
|
||||
<item>DATA_MATRIX</item>
|
||||
<item>ITF</item>
|
||||
<item>RSS_14</item>
|
||||
<item>RSS_EXPANDED</item>
|
||||
<item>UPC_EAN</item>
|
||||
</string-array>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user