mirror of
https://github.com/scito/extract_otp_secrets.git
synced 2025-12-13 18:30:26 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4bff86a5c | ||
|
|
cff5fe1cda | ||
|
|
576b1e68c5 |
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -9,6 +9,7 @@ on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**.md'
|
||||
# pull_request:
|
||||
schedule:
|
||||
# Run daily on default branch
|
||||
|
||||
1
.github/workflows/ci_docker.yml
vendored
1
.github/workflows/ci_docker.yml
vendored
@@ -13,6 +13,7 @@ on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '**.md'
|
||||
tags-ignore:
|
||||
- '**'
|
||||
# branches is needed if tags-ignore is used
|
||||
|
||||
43
.github/workflows/ci_release.yml
vendored
43
.github/workflows/ci_release.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
id: meta
|
||||
# Writing to env with >> $GITHUB_ENV is an alternative
|
||||
run: |
|
||||
echo "date=$(TZ=Europe/Bern date +'%d.%m.%Y')" >> $GITHUB_OUTPUT
|
||||
echo "date=$(TZ=Europe/Zurich date +'%d.%m.%Y')" >> $GITHUB_OUTPUT
|
||||
echo "version=${TAG_NAME/v/}" >> $GITHUB_OUTPUT
|
||||
echo "tag_name=${{ github.ref_name }}" >> $GITHUB_OUTPUT
|
||||
echo "tag_message=$(git tag -l --format='%(contents:subject)' ${{ github.ref_name }})" >> $GITHUB_OUTPUT
|
||||
@@ -68,11 +68,17 @@ jobs:
|
||||
-d '{"tag_name":"${{ github.ref }}","target_commitish":"master","name":"${{ steps.meta.outputs.version }} - ${{ steps.meta.outputs.date }}","body":"${{ steps.meta.outputs.tag_message }}","draft":true,"prerelease":false,"generate_release_notes":true}')
|
||||
echo upload_url=$(jq '.upload_url' <<< "$response") >> $GITHUB_OUTPUT
|
||||
echo $(jq -r '.upload_url' <<< "$response") > release_url.txt
|
||||
echo $(jq -r '.id' <<< "$response") > release_id.txt
|
||||
- name: Save Release URL File for publish
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: release_url
|
||||
path: release_url.txt
|
||||
- name: Save asset upload id for publish
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: release_id
|
||||
path: release_id.txt
|
||||
|
||||
build-and-push-docker-image:
|
||||
name: Build Linux release in docker container
|
||||
@@ -151,6 +157,7 @@ jobs:
|
||||
|
||||
- name: Smoke tests
|
||||
run: |
|
||||
dist/extract_otp_secrets_linux_x86_64 -V
|
||||
dist/extract_otp_secrets_linux_x86_64 -h
|
||||
dist/extract_otp_secrets_linux_x86_64 example_export.png
|
||||
dist/extract_otp_secrets_linux_x86_64 - < example_export.txt
|
||||
@@ -163,7 +170,6 @@ jobs:
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
# TODO only for tags
|
||||
shell: bash
|
||||
run: |
|
||||
response=$(curl \
|
||||
-X POST \
|
||||
@@ -245,11 +251,12 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p build/
|
||||
VERSION_STR=$(setuptools-git-versioning) VERSION_MAJOR=$(cut -d '.' -f 1 <<< "$(setuptools-git-versioning)") VERSION_MINOR=$(cut -d '.' -f 2 <<< "$(setuptools-git-versioning)") VERSION_PATCH=$(echo $(cut -d '.' -f 3 <<< "$(setuptools-git-versioning)") | sed -E "s/^([0-9]+).*/\1/") VERSION_BUILD=$(($(git rev-list --count $(git tag | sort -V -r | sed '1!d')..HEAD))) YEARS='2020-2023' envsubst < file_version_info_template.txt > build/file_version_info.txt
|
||||
VERSION_STR=$(setuptools-git-versioning) VERSION_MAJOR=$(cut -d '.' -f 1 <<< "$(setuptools-git-versioning)") VERSION_MINOR=$(cut -d '.' -f 2 <<< "$(setuptools-git-versioning)") VERSION_PATCH=$(echo $(cut -d '.' -f 3 <<< "$(setuptools-git-versioning)") | sed -E -n "s/^([0-9]+).*/\1/p") VERSION_BUILD=$(echo $(cut -d '.' -f 3 <<< "$(setuptools-git-versioning)") | sed -E -n -e"s/^[0-9]+.+/99/p")$(($(git rev-list --count $(git tag | sort -V -r | sed '1!d')..HEAD))) YEARS='2020-2023' envsubst < file_version_info_template.txt > build/file_version_info.txt
|
||||
- name: Build with pyinstaller for ${{ matrix.TARGET }}
|
||||
run: ${{ matrix.CMD_BUILD }}
|
||||
- name: Smoke tests for generated exe (general)
|
||||
run: |
|
||||
dist/${{ matrix.OUT_FILE_NAME }} -V
|
||||
dist/${{ matrix.OUT_FILE_NAME }} -h
|
||||
dist/${{ matrix.OUT_FILE_NAME }} example_export.png
|
||||
- name: Smoke tests for generated exe (stdin)
|
||||
@@ -260,22 +267,22 @@ jobs:
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: release_url
|
||||
- name: Load Release Id File from release job
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: release_id
|
||||
- name: Display structure of files
|
||||
run: ls -R
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
# TODO only for tags
|
||||
if: ${{ matrix.UPLOAD }}
|
||||
- name: Set meta data
|
||||
id: meta
|
||||
shell: bash
|
||||
run: |
|
||||
response=$(curl \
|
||||
-X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Content-Type: ${{ matrix.ASSET_MIME }}" \
|
||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
--silent \
|
||||
--show-error \
|
||||
--data-binary @dist/${{ matrix.OUT_FILE_NAME }} \
|
||||
$(cat release_url.txt)=${{ matrix.ASSET_NAME }})
|
||||
|
||||
cat release_url.txt
|
||||
echo "release_url=$(cat release_url.txt)" >> $GITHUB_OUTPUT
|
||||
echo "release_id=$(cat release_id.txt)" >> $GITHUB_OUTPUT
|
||||
echo "upload_url=https://uploads.github.com/repos/scito/extract_otp_secrets/releases/$(cat release_id.txt)/assets?name=" >> $GITHUB_OUTPUT
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
if: ${{ matrix.UPLOAD }}
|
||||
run: |
|
||||
curl -X POST -H "Accept: application/vnd.github+json" -H "Content-Type: ${{ matrix.ASSET_MIME }}" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" --show-error --data-binary @dist/${{ matrix.OUT_FILE_NAME }} ${{ steps.meta.outputs.upload_url }}=${{ matrix.ASSET_NAME }}
|
||||
|
||||
35
README.md
35
README.md
@@ -35,13 +35,12 @@ The secrets can be exported to JSON or CSV, or printed as QR codes to console or
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [Download binary executable (🆕 since v2.1)](#download-binary-executable--since-v21)
|
||||
- [Usage](#usage)
|
||||
- [Capture QR codes from camera (🆕 since version 2.0)](#capture-qr-codes-from-camera--since-version-20)
|
||||
- [With builtin QR decoder from image files (🆕 since version 2.0)](#with-builtin-qr-decoder-from-image-files--since-version-20)
|
||||
- [With external QR decoder app from text files](#with-external-qr-decoder-app-from-text-files)
|
||||
- [Installation](#installation)
|
||||
- [Download binary executable (🆕 since v2.1)](#download-binary-executable--since-v21)
|
||||
- [Run as script (recommend for developers or advanced users)](#run-as-script-recommend-for-developers-or-advanced-users)
|
||||
- [Installation of Python script (recommend for developers or advanced users)](#installation-of-python-script-recommend-for-developers-or-advanced-users)
|
||||
- [Installation of shared system libraries](#installation-of-shared-system-libraries)
|
||||
- [Program help: arguments and options](#program-help-arguments-and-options)
|
||||
- [Examples](#examples)
|
||||
@@ -86,6 +85,15 @@ The secrets can be exported to JSON or CSV, or printed as QR codes to console or
|
||||
- [Related projects](#related-projects)
|
||||
</details>
|
||||
|
||||
## Download binary executable (🆕 since v2.1)
|
||||
|
||||
1. Download executable for your platform from [latest release](https://github.com/scito/extract_otp_secrets/releases/latest), see assets
|
||||
2. Start executable by clicking or from command line
|
||||
|
||||
✅ Everything is just packed in one executable.
|
||||
✅ No installation needed, neither Python nor dependencies have to be installed.
|
||||
✅ Easy and convenient
|
||||
|
||||
## Usage
|
||||
|
||||
### Capture QR codes from camera (🆕 since version 2.0)
|
||||
@@ -97,10 +105,6 @@ The secrets can be exported to JSON or CSV, or printed as QR codes to console or
|
||||
```
|
||||
extract_otp_secrets
|
||||
```
|
||||
or
|
||||
```
|
||||
python src/extract_otp_secrets.py
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -120,7 +124,7 @@ The secrets are printed by default to the console. [Set program parameters](#pro
|
||||
4. Transfer the images files to the computer where his script is installed.
|
||||
5. Call this script with the file as input:
|
||||
```
|
||||
python src/extract_otp_secrets.py example_export.png
|
||||
extract_otp_secrets example_export.png
|
||||
```
|
||||
6. Remove unencrypted files with secrets from your computer and mobile.
|
||||
|
||||
@@ -133,22 +137,11 @@ python src/extract_otp_secrets.py example_export.png
|
||||
5. Transfer the file to the computer where his script is installed.
|
||||
6. Call this script with the file as input:
|
||||
```
|
||||
python src/extract_otp_secrets.py example_export.txt
|
||||
extract_otp_secrets example_export.txt
|
||||
```
|
||||
7. Remove unencrypted files with secrets from your computer and mobile.
|
||||
|
||||
## Installation
|
||||
|
||||
### Download binary executable (🆕 since v2.1)
|
||||
|
||||
1. Download executable for your platform from [latest release](https://github.com/scito/extract_otp_secrets/releases/latest), see assets
|
||||
2. Start executable by clicking or from command line
|
||||
|
||||
✅ Everything is just packed in one executable.
|
||||
✅ No installation needed, neither Python nor dependencies have to be installed.
|
||||
✅ Easy and convenient
|
||||
|
||||
### Run as script (recommend for developers or advanced users)
|
||||
## Installation of Python script (recommend for developers or advanced users)
|
||||
|
||||
```bash
|
||||
git clone https://github.com/scito/extract_otp_secrets.git
|
||||
|
||||
@@ -3,13 +3,12 @@ Generate from file: README.md
|
||||
## Table of contents
|
||||
|
||||
- [Table of contents](#table-of-contents)
|
||||
- [Download binary executable (🆕 since v2.1)](#download-binary-executable--since-v21)
|
||||
- [Usage](#usage)
|
||||
- [Capture QR codes from camera (🆕 since version 2.0)](#capture-qr-codes-from-camera--since-version-20)
|
||||
- [With builtin QR decoder from image files (🆕 since version 2.0)](#with-builtin-qr-decoder-from-image-files--since-version-20)
|
||||
- [With external QR decoder app from text files](#with-external-qr-decoder-app-from-text-files)
|
||||
- [Installation](#installation)
|
||||
- [Download binary executable (🆕 since v2.1)](#download-binary-executable--since-v21)
|
||||
- [Run as script (recommend for developers or advanced users)](#run-as-script-recommend-for-developers-or-advanced-users)
|
||||
- [Installation of Python script (recommend for developers or advanced users)](#installation-of-python-script-recommend-for-developers-or-advanced-users)
|
||||
- [Installation of shared system libraries](#installation-of-shared-system-libraries)
|
||||
- [Program help: arguments and options](#program-help-arguments-and-options)
|
||||
- [Examples](#examples)
|
||||
|
||||
Reference in New Issue
Block a user