Skip to content

Commit

Permalink
markdown tabbed extensions
Browse files Browse the repository at this point in the history
pipx install instructions
make docs for any lang
  • Loading branch information
andgineer committed Mar 27, 2024
1 parent 50087e7 commit 08fe2e1
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 13 deletions.
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ VERSION := $(shell grep '__version__' src/bitwarden_import_msecure/__about__.py
export VERSION
unexport CONDA_PREFIX # if conda is installed, it will mess with the virtual env

# If the first argument is "docs" treat additional "targets" as parameters
ifeq (docs,$(firstword $(MAKECMDGOALS)))
DOCS_LANGUAGE := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# turn the parameters into do-nothing targets
$(eval $(RUN_ARGS):;@:)
endif

.HELP: version ## Show the current version
version:
echo ${VERSION}
Expand All @@ -26,18 +33,10 @@ reqs:
uv pip install -r requirements.dev.txt

.PHONY: docs # mark as phony so it always runs even we have a docs folder
.HELP: docs ## Docs preview English
.HELP: docs ## Docs preview for the language specified (bg de en es fr ru)
docs:
./scripts/docstrings.sh
open -a "Google Chrome" http://127.0.0.1:8000/bitwarden-import-msecure/
scripts/docs-render-config.sh en
mkdocs serve -f docs/_mkdocs.yml

.HELP: docs-ru ## Docs preview Russian
docs-ru:
./scripts/docstrings.sh
open -a "Google Chrome" http://127.0.0.1:8000/bitwarden-import-msecure/
scripts/docs-render-config.sh ru
scripts/docs-render-config.sh $(DOCS_LANGUAGE)
mkdocs serve -f docs/_mkdocs.yml

.HELP: help ## Display this message
Expand Down
2 changes: 2 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ plugins:
lang: LANGUAGE

markdown_extensions:
- pymdownx.tabbed:
alternate_style: true
- abbr
- attr_list
- pymdownx.details
Expand Down
37 changes: 37 additions & 0 deletions docs/src/en/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# bitwarden-import-msecure

Migration from mSecure to Bitwarden


## Installation

## Installing pipx
[`pipx`](https://pypa.github.io/pipx/) creates isolated environments to avoid conflicts with existing system packages.

=== "MacOS"
In the terminal, execute:
```bash
brew install pipx
pipx ensurepath
```

=== "Linux"
First, ensure Python is installed.

Enter in the terminal:
```bash
python3 -m pip install --user pipx
python3 -m pipx ensurepath
```

=== "Windows"
First, install Python if it's not already installed.

In the command prompt, type (if Python was installed from the Microsoft Store, use `python3` instead of `python`):
```bash
python -m pip install --user pipx
```

## Installing `bitwarden-import-msecure`:
In the terminal (command prompt), execute:

```bash
pipx install bitwarden-import-msecure
```
41 changes: 41 additions & 0 deletions docs/src/ru/index.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,43 @@
# bitwarden-import-msecure

Переход с mSecure на Bitwarden

## Установка

## Установка pipx
[`pipx`](https://pypa.github.io/pipx/) создает изолированные среды, чтобы избежать конфликтов с
существующими системными пакетами.

=== "MacOS"
В терминале выполните:

```bash
brew install pipx
pipx ensurepath
```

=== "Linux"
Сначала убедитесь, что Python установлен.

Введите в терминал:

```bash
python3 -m pip install --user pipx
python3 -m pipx ensurepath
```

=== "Windows"
Сначала установите Python, если он еще не установлен.

В командной строке введите (если Python был установлен из Microsoft Store, используйте `python3` вместо `python`):

```bash
python -m pip install --user pipx
```

## Установка `bitwarden-import-msecure`:
В терминале (командной строке) выполните:

```bash
pipx install bitwarden-import-msecure
```
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ build-backend = "hatchling.build"
name = "bitwarden-import-msecure"
dynamic = [ "version",]
description = "Migration from mSecure to Bitwarden"
keywords = [ "bitwarden", "mSecure", "migration", "export", "passwords", "import" ]
keywords = [ "bitwarden", "mSecure", "migration", "export", "passwords", "import",]
classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent",]
readme = "README.md"
requires-python = ">=3.9"
dependencies = []
dependencies = [ "click",]
[[project.authors]]
name = "Andrey Sorokin"
email = "andrey@sorokin.engineer"
Expand Down
4 changes: 3 additions & 1 deletion requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ cfgv==3.4.0
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via mkdocs
# via
# bitwarden-import-msecure
# mkdocs
colorama==0.4.6
# via mkdocs-material
coverage==7.3.2
Expand Down
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
click
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements.in --output-file=requirements.txt
click==8.1.7

0 comments on commit 08fe2e1

Please sign in to comment.