Compare commits

...

11 commits
v0.1.0 ... main

Author SHA1 Message Date
a5e29f3b15 feat: remove openssl transitive dependency
All checks were successful
Test / build (map[name:stable]) (push) Successful in 2m12s
Test / build (map[name:nightly]) (push) Successful in 2m25s
Release Please / Release-plz (push) Successful in 17s
2025-01-18 20:56:12 +00:00
6c6184ae49 fix: elide lifetimes
All checks were successful
Test / build (map[name:stable]) (push) Successful in 2m37s
Test / build (map[name:nightly]) (push) Successful in 3m47s
Release Please / Release-plz (push) Successful in 9s
Closes kemitix/trello-to-deck#21
2025-01-18 08:33:47 +00:00
Renovate Bot
a0bdb7a999 fix(deps): update rust crate kameo to 0.14
All checks were successful
Test / build (map[name:nightly]) (pull_request) Successful in 2m58s
Test / build (map[name:stable]) (pull_request) Successful in 3m35s
Release Please / Release-plz (push) Successful in 17s
Test / build (map[name:nightly]) (push) Successful in 2m48s
Test / build (map[name:stable]) (push) Successful in 3m13s
2025-01-16 17:44:21 +00:00
Renovate Bot
6b706b21b5 chore(deps): update git.kemitix.net/kemitix/rust docker tag to v4
All checks were successful
Test / build (map[name:nightly]) (push) Successful in 3m39s
Test / build (map[name:stable]) (push) Successful in 3m34s
Release Please / Release-plz (push) Successful in 11s
2025-01-16 13:27:44 +00:00
3b04b0d969 build: check for ignored files being included in repo
All checks were successful
Test / build (map[name:nightly]) (push) Successful in 1m5s
Test / build (map[name:stable]) (push) Successful in 1m16s
Release Please / Release-plz (push) Successful in 10s
2025-01-13 08:30:14 +00:00
cd9994d0d0 build: upgrade kemitix/rust v3
All checks were successful
Test / build (map[name:nightly]) (push) Successful in 1m8s
Test / build (map[name:stable]) (push) Successful in 1m9s
Release Please / Release-plz (push) Successful in 10s
2025-01-12 14:37:17 +00:00
Renovate Bot
1ef7b3268e chore(deps): update https://git.kemitix.net/kemitix/rust action to v2.6.0
All checks were successful
Test / build (map[name:nightly]) (pull_request) Successful in 1m24s
Test / build (map[name:stable]) (pull_request) Successful in 1m31s
Release Please / Release-plz (push) Successful in 12s
Test / build (map[name:nightly]) (push) Successful in 1m31s
Test / build (map[name:stable]) (push) Successful in 1m22s
2025-01-11 20:44:12 +00:00
Renovate Bot
0cafe41f50 chore(deps): update https://git.kemitix.net/kemitix/rust action to v2.5.1
Some checks failed
Test / build (map[name:nightly]) (pull_request) Successful in 1m55s
Test / build (map[name:stable]) (pull_request) Successful in 2m32s
Release Please / Release-plz (push) Failing after 28s
Test / build (map[name:nightly]) (push) Successful in 2m22s
Test / build (map[name:stable]) (push) Successful in 2m24s
2025-01-09 17:44:19 +00:00
Renovate Bot
8e2d99de67 chore(deps): update rust crate rstest to 0.24
All checks were successful
Test / build (map[name:stable]) (pull_request) Successful in 20m16s
Test / build (map[name:nightly]) (pull_request) Successful in 22m39s
Release Please / Release-plz (push) Successful in 1m11s
Test / build (map[name:nightly]) (push) Successful in 3m47s
Test / build (map[name:stable]) (push) Successful in 4m6s
2025-01-01 19:19:41 +00:00
9b931e315f docs: add Import section to readme
All checks were successful
Test / build (map[name:nightly]) (push) Successful in 4m16s
Test / build (map[name:stable]) (push) Successful in 4m33s
Release Please / Release-plz (push) Successful in 1m24s
Remove development notes
2024-12-31 19:20:04 +00:00
1348db25d9 docs: add CHANGELOG.md
All checks were successful
Test / build (map[name:nightly]) (push) Successful in 4m43s
Test / build (map[name:stable]) (push) Successful in 5m6s
Release Please / Release-plz (push) Successful in 1m31s
2024-12-31 19:13:46 +00:00
8 changed files with 382 additions and 273 deletions

View file

@ -16,21 +16,23 @@ jobs:
release-plz:
name: Release-plz
runs-on: docker
container:
image:
git.kemitix.net/kemitix/rust:v4.0.1
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run release-plz release-pr
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: release-plz release-pr --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Run release-plz release
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: release-plz release --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }}
run: release-plz release-pr --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Run release-plz release
run: release-plz release --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

View file

@ -16,6 +16,10 @@ jobs:
build:
runs-on: docker
container:
image:
git.kemitix.net/kemitix/rust:v4.0.1
strategy:
matrix:
toolchain:
@ -26,36 +30,35 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Ignored Files
run: |
IGNORED=$(git ls-files --cached -i --exclude-standard)
if [ -n "$IGNORED" ]
then
echo "Ignored files present:\n$IGNORED"
exit 1
fi
- name: Check TODOs
uses: kemitix/todo-checker@v1.2.0
uses: https://git.kemitix.net/kemitix/forgejo-todo-checker@v1.3.0
- name: Machete
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo machete
run: cargo +${{ matrix.toolchain.name }} machete
- name: Format
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo fmt --all -- --check
run: cargo +${{ matrix.toolchain.name }} fmt --all --check
- name: Clippy
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset clippy
run: cargo +${{ matrix.toolchain.name }} hack --feature-powerset clippy
- name: Build
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset build
run: cargo +${{ matrix.toolchain.name }} hack --feature-powerset build
- name: Test
uses: https://git.kemitix.net/kemitix/rust@v2.5.0
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset test
run: cargo +${{ matrix.toolchain.name }} hack --feature-powerset test
# TODO: (#17) enable mutation testing
# - name: Mutations
# uses: https://git.kemitix.net/kemitix/rust@v2.5.0
# with:
# args: ${{ matrix.toolchain.name }} cargo mutants -vV --in-place
# run: cargo +${{ matrix.toolchain.name }} mutants -vV --in-place

164
CHANGELOG.md Normal file
View file

@ -0,0 +1,164 @@
# Changelog
All notable changes to this project will be documented in this file.
## [0.1.0] - 2024-12-31
### 🚀 Features
- Make main tokio async
- Start empty lib
- Define Ctx to hold context (e.g. fs and net handles)
- Define command arguments to parse
- Install error trap from color_eyre
- Create Ctx instance
- Add helper macros
- Parse command line
- Add const NAME
- Command to write initial config file
- Load config file
- Add APIResult
- *(trello)* Add basics of trello config model
- *(nextcloud)* Add basics of nextcloud config model client
- Add kxio printer to context
- *(nextcloud)* DeckClient hold reference to FullCtx
- *(nextcloud)* Add deck_client to FullCtx
- *(nextcloud)* Add command 'nextcloud board list'
- *(nextcloud)* Add command 'nextcloud stack list'
- *(trello)* Add command 'trello board list'
- *(nextcloud)* Add command 'nextcloud card list'
- Add command 'check'
- *(nextcloud)* Add command 'nextcloud card get'
- Enable trace logging support
- *(nextcloud)* Add command 'nextcloud card create'
- *(nextcloud)* Add command 'nextcloud card add-label'
- *(trello)* Add command 'trello stack list'
- *(trello)* Add command 'trello card get'
- *(trello)* Add command 'trello attachement get'
- *(trello)* Add command 'trello attachement save'
- *(nextcloud)* Add commnad 'nextcloud deck get'
- Check command lists trello boards
- Use more non-String types
- Add command 'nextcloud board get'
- Add command 'nextcloud stack get'
- Add command 'nextcloud card add-attachment'
- *(nextcloud)* Add command 'nextcloud board labels'
- *(nextcloud)* Add command 'nextcloud stack create'
- *(nextcloud)* Add command 'nextcloud board create-label'
- Add command 'import'
- Split into actors
- *(trello)* Support exponential backoff with jitter
- *(nextcloud)* Support exponential backoff with jitter
- Add support for tokio-console
- Write downloaded attachments to temp directory
- Make best-effort to maintain order of stacks and cards
- Add Rate Limits on trello API and own parallisation
- Impl From<i64> for TrelloCardPosition
- Improved APIResult error reporting and use tracing
- Store attachments with the card rather than as a file
- Add trello card id to trello long card
- Revert: store attachments with the card rather than as a file
- Migrate card position and due date
### 🐛 Bug Fixes
- *(deps)* Update rust crate kxio to v4
- Install color_eyre error handler in main
- *(trello)* Parse labels on cards
- Improve exponential backup detection of 429 error
- Stop zombie actors
- Only upload attachments that are files
- Always remove child actors regardless of how they exit
- *(trello)* Detect trello 429 responses correctly
- Import labels lookup label properly
- Upload attachments with unique filename
- Import*Actor shutsdown properly on error
### 💼 Other
- Initial ci setup
- Jj-next
- Jj-next can ignore immutable main on start and can move next anywhere
- Disable mutation testing in new tests are in place
- Clippy will apply any fixes it can
### 🚜 Refactor
- Add FullCtx which is Ctx with AppConfig
- Rearrange command dispatcher
- Reshuffling and extracting Executor trait
- *(trello)* Rename module types as model
- *(trello)* Rename 'trello boards list' as 'trello member get'
- *(trello)* Rewrite trello module and rename commands
- Extract inline module tests::config
- Extract inline module tests::init
- Extract inline module tests::template
- Extract inline module tests::given
- Replace Ctx::new with Ctx::From<PathBuf>
- Pass context by reference
- Execute::execute passes itself by ref
- Pass parsed Commands from main
- Remove command 'nextcloud card list'
- Command 'nextcloud card get' takes board id from parameters
- Command 'nextcloud card create'
- Command 'nextcloud card add-label'
- Remove board_id and board_name from config file
- *(trello)* Rearrange model
- Remove dead code
- *(trello)* Pin down parameter types for create_card
- Split import into smaller functions
- Move spawn and spawn_in_thread macros to macros module
- Import/card: remove creating trello or deck client variables
- Create missing stacks
- Nextcloud client: request takes Bytes
- Trello client: specify query parameters
- Trello client: clean up headers
### 📚 Documentation
- Add Readme
- Add plan to readme
- Add nextcloud credentials instructions
- Add supported features list to README
### 🧪 Testing
- *(nextcloud)* Add new tests
- *(nextcloud)* Enable tests
- Nextcloud card create - with/without description
- *(trello)* Add tests for 'trello member get'
- Add tests for 'trello board get'
- Add tests for 'trello card get'
- Add tests for APIResult
- Use variable in expected url
- Add tests for 'trello stack get'
- Add tests for commands 'trello attachment get' and 'trello attachment save'
- Add test for TrelloBoards::find_by_name()
- Added for 'check' command
- Add tests for importing
### ⚙️ Miscellaneous Tasks
- Remove hello world
- *(nextcloud)* Strip out old tests
- *(nextcloud)* Remove duplicate client
- Remove dead code
- Code coverage configuration
- Ignore coverage data
- Remove old unlinked file
- Drop old unlinked file
- Remove unused trello boards list command
- Remove unlinked file: trello::model::new_card
- Remove unused From implementations for TrelloAuth
- Remove dead code: trello::url()
- Remove dead code
- Log spawned actor details on single line
- Notes on fixmes to improve error handling
- Add more tracing messages
- Include file name and line number in tracing output
- Upgrade kxio to v5.0
- Remove unused temp_fs from FullCtx
- Update gitignore and add Cargo.lock
- Remove trash
<!-- generated by git-cliff -->

351
Cargo.lock generated
View file

@ -295,6 +295,12 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cfg_aliases"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "clap"
version = "4.5.23"
@ -407,22 +413,6 @@ dependencies = [
"tracing-subscriber",
]
[[package]]
name = "core-foundation"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "cpufeatures"
version = "0.2.16"
@ -551,15 +541,6 @@ version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "encoding_rs"
version = "0.8.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
dependencies = [
"cfg-if",
]
[[package]]
name = "env_filter"
version = "0.1.2"
@ -629,21 +610,6 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "foreign-types"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
dependencies = [
"foreign-types-shared",
]
[[package]]
name = "foreign-types-shared"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "form_urlencoded"
version = "1.2.1"
@ -783,8 +749,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"js-sys",
"libc",
"wasi",
"wasm-bindgen",
]
[[package]]
@ -943,6 +911,7 @@ dependencies = [
"tokio",
"tokio-rustls",
"tower-service",
"webpki-roots",
]
[[package]]
@ -958,22 +927,6 @@ dependencies = [
"tower-service",
]
[[package]]
name = "hyper-tls"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
dependencies = [
"bytes",
"http-body-util",
"hyper",
"hyper-util",
"native-tls",
"tokio",
"tokio-native-tls",
"tower-service",
]
[[package]]
name = "hyper-util"
version = "0.1.10"
@ -1225,13 +1178,12 @@ dependencies = [
[[package]]
name = "kameo"
version = "0.13.0"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62237a96597618543798a36ec723eb75c5ac301e2690243fd600be1f5eb3dd2d"
checksum = "c1542e1113415cdfd5dac5f663cb69f6be472cff28e90adf6e284e520e399312"
dependencies = [
"dyn-clone",
"futures",
"itertools",
"kameo_macros",
"once_cell",
"serde",
@ -1242,9 +1194,9 @@ dependencies = [
[[package]]
name = "kameo_macros"
version = "0.13.0"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bbbd8e8d7b02bc67eae0dcbdb82c0a71cc7cc61734059ee3e7439a1ee1e0e85"
checksum = "8d7adf8a6a19b8582095d1819f4e992817f7dce2b85cd205b6386f9079a2cc81"
dependencies = [
"heck",
"proc-macro2",
@ -1255,9 +1207,9 @@ dependencies = [
[[package]]
name = "kxio"
version = "5.0.0"
version = "5.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec15c915b6fb790d4dac6c1c101c01d29bd4701e5d55e48ae47bad69356eb7b4"
checksum = "92eaa78014d241ca18f3af63e67a0b395ba7fb52a87a986dd9c3f136eda032ff"
dependencies = [
"base64 0.22.1",
"bytes",
@ -1401,23 +1353,6 @@ version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc0287524726960e07b119cebd01678f852f147742ae0d925e6a520dca956126"
[[package]]
name = "native-tls"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466"
dependencies = [
"libc",
"log",
"openssl",
"openssl-probe",
"openssl-sys",
"schannel",
"security-framework",
"security-framework-sys",
"tempfile",
]
[[package]]
name = "newline-converter"
version = "0.3.0"
@ -1471,50 +1406,6 @@ version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "openssl"
version = "0.10.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5"
dependencies = [
"bitflags 2.6.0",
"cfg-if",
"foreign-types",
"libc",
"once_cell",
"openssl-macros",
"openssl-sys",
]
[[package]]
name = "openssl-macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "openssl-probe"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-sys"
version = "0.9.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741"
dependencies = [
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "overload"
version = "0.1.1"
@ -1594,12 +1485,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
[[package]]
name = "ppv-lite86"
version = "0.2.20"
@ -1669,6 +1554,58 @@ dependencies = [
"prost",
]
[[package]]
name = "quinn"
version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef"
dependencies = [
"bytes",
"pin-project-lite",
"quinn-proto",
"quinn-udp",
"rustc-hash",
"rustls",
"socket2",
"thiserror",
"tokio",
"tracing",
]
[[package]]
name = "quinn-proto"
version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d"
dependencies = [
"bytes",
"getrandom",
"rand",
"ring",
"rustc-hash",
"rustls",
"rustls-pki-types",
"slab",
"thiserror",
"tinyvec",
"tracing",
"web-time",
]
[[package]]
name = "quinn-udp"
version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904"
dependencies = [
"cfg_aliases",
"libc",
"once_cell",
"socket2",
"tracing",
"windows-sys 0.59.0",
]
[[package]]
name = "quote"
version = "1.0.37"
@ -1775,34 +1712,32 @@ checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f"
dependencies = [
"base64 0.22.1",
"bytes",
"encoding_rs",
"futures-core",
"futures-util",
"h2",
"http",
"http-body",
"http-body-util",
"hyper",
"hyper-rustls",
"hyper-tls",
"hyper-util",
"ipnet",
"js-sys",
"log",
"mime",
"mime_guess",
"native-tls",
"once_cell",
"percent-encoding",
"pin-project-lite",
"quinn",
"rustls",
"rustls-pemfile",
"rustls-pki-types",
"serde",
"serde_json",
"serde_urlencoded",
"sync_wrapper",
"system-configuration",
"tokio",
"tokio-native-tls",
"tokio-rustls",
"tokio-util",
"tower-service",
"url",
@ -1810,6 +1745,7 @@ dependencies = [
"wasm-bindgen-futures",
"wasm-streams",
"web-sys",
"webpki-roots",
"windows-registry",
]
@ -1830,21 +1766,21 @@ dependencies = [
[[package]]
name = "rstest"
version = "0.23.0"
version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a2c585be59b6b5dd66a9d2084aa1d8bd52fbdb806eafdeffb52791147862035"
checksum = "03e905296805ab93e13c1ec3a03f4b6c4f35e9498a3d5fa96dc626d22c03cd89"
dependencies = [
"futures",
"futures-timer",
"futures-util",
"rstest_macros",
"rustc_version",
]
[[package]]
name = "rstest_macros"
version = "0.23.0"
version = "0.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "825ea780781b15345a146be27eaefb05085e337e869bff01b4306a4fd4a9ad5a"
checksum = "ef0053bbffce09062bee4bcc499b0fbe7a57b879f1efe088d6d8d4c7adcdef9b"
dependencies = [
"cfg-if",
"glob",
@ -1864,6 +1800,12 @@ version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
[[package]]
name = "rustc-hash"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
[[package]]
name = "rustc_version"
version = "0.4.1"
@ -1893,6 +1835,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b"
dependencies = [
"once_cell",
"ring",
"rustls-pki-types",
"rustls-webpki",
"subtle",
@ -1913,6 +1856,9 @@ name = "rustls-pki-types"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
dependencies = [
"web-time",
]
[[package]]
name = "rustls-webpki"
@ -1937,44 +1883,12 @@ version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "schannel"
version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
dependencies = [
"windows-sys 0.59.0",
]
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "security-framework"
version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
"bitflags 2.6.0",
"core-foundation",
"core-foundation-sys",
"libc",
"security-framework-sys",
]
[[package]]
name = "security-framework-sys"
version = "2.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]]
name = "semver"
version = "1.0.23"
@ -2176,27 +2090,6 @@ dependencies = [
"syn",
]
[[package]]
name = "system-configuration"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
dependencies = [
"bitflags 2.6.0",
"core-foundation",
"system-configuration-sys",
]
[[package]]
name = "system-configuration-sys"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]]
name = "tempfile"
version = "3.14.0"
@ -2232,6 +2125,26 @@ dependencies = [
"syn",
]
[[package]]
name = "thiserror"
version = "2.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "2.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "thread_local"
version = "1.1.8"
@ -2252,6 +2165,21 @@ dependencies = [
"zerovec",
]
[[package]]
name = "tinyvec"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8"
dependencies = [
"tinyvec_macros",
]
[[package]]
name = "tinyvec_macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.42.0"
@ -2282,16 +2210,6 @@ dependencies = [
"syn",
]
[[package]]
name = "tokio-native-tls"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
dependencies = [
"native-tls",
"tokio",
]
[[package]]
name = "tokio-rustls"
version = "0.26.1"
@ -2628,12 +2546,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
[[package]]
name = "vcpkg"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "version_check"
version = "0.9.5"
@ -2745,6 +2657,25 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "web-time"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
dependencies = [
"js-sys",
"wasm-bindgen",
]
[[package]]
name = "webpki-roots"
version = "0.26.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e"
dependencies = [
"rustls-pki-types",
]
[[package]]
name = "winapi"
version = "0.3.9"

View file

@ -19,11 +19,15 @@ derive_more = { version = "1.0", features = [
"from",
] }
inquire = "0.7"
kameo = "0.13"
kameo = "0.14"
# kxio = { path = "../kxio/" }
kxio = "5.0"
kxio = "5.1"
rand = "0.8"
reqwest = { version = "0.12", features = ["multipart", "stream"] }
reqwest = { version = "0.12", default-features = false, features = [
"multipart",
"rustls-tls",
"stream",
] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.41", features = ["full", "tracing"] }
@ -37,5 +41,5 @@ assert2 = "0.3"
http = "1.2"
mutants = "0.0"
pretty_assertions = "1.4"
rstest = "0.23"
rstest = "0.24"
test-log = { version = "0.2", features = ["trace"] }

View file

@ -22,6 +22,22 @@ This will create a `trello-to-deck.toml` file in the current directory.
Edit this file to add your Trello and Nextcloud credentials.
### Import
To import your Trello Board into Nextcloud Deck, use the command:
```bash
trello-2-deck import
```
This will read the credentials from the `trello-2-deck.toml` file in the current
directory. You will prompted to select a Trello Board, then some or all of the
Lists from that Board. To begin your import, select the Nextcloud Deck Board
to add the lists and cards to.
It is recommended to create a test board to confirm importing is working as you
expect.
### Trello Credentials
To autheniticate to Trello and be able to download the attachements for each card, you need to register a Power Up as a Developer.
@ -64,33 +80,16 @@ Run the `check` command to validate your configuration:
trello-to-deck check
```
## Support
## Support Features
| Feature | Supported |
|--------------------------|-------------|
| Stacks/Lists | y |
| Cards | y |
| Card Title | y |
| Card Description | y |
| Card Labels | y |
| Card Attachments (files) | y |
| Card Attachments (links) | n |
| Card Due Date | n (planned) |
## Development
As part of building the import server, the following commands exercise each operation involved:
- [x] trello member get - includes list of boards
- [x] trello board get - includes list of stacks
- [x] trello stack get - includes list of cards
- [x] trello card get - includes list of attachments
- [x] trello attachment get - includes download url
- [x] trello attachment save - saves to disk
- [x] nextcloud deck get - includes list of boards
- [x] nextcloud board get - includes list of stacks
- [x] nextcloud stack get - includes list of cards
- [x] nextcloud card get - shows card title
- [x] nextcloud card create
- [x] nextcloud card add-label
- [x] nextcloud card add-attachment
| Feature | Supported |
|--------------------------|-----------|
| Stacks/Lists | y |
| Cards | y |
| Card Title | y |
| Card Description | y |
| Card Labels | y |
| Card Attachments (files) | y |
| Card Attachments (links) | n |
| Card Due Date | y |
| Card Assignment | n |

View file

@ -13,6 +13,12 @@ build:
# cargo test
# cargo doc
# cargo test --example get
test-in-docker:
docker run --rm -v $PWD:/app/ git.kemitix.net/kemitix/rust:latest cargo test
shell-in-docker:
docker run --rm -it -v $PWD:/app/ git.kemitix.net/kemitix/rust:latest bash
build-mutations: build mutations

View file

@ -23,7 +23,7 @@ pub(crate) struct TrelloClient<'ctx> {
ctx: &'ctx FullCtx,
}
impl<'ctx> TrelloClient<'ctx> {
impl TrelloClient<'_> {
fn url(&self, path: impl Into<String>) -> String {
let path = path.into();
assert!(path.starts_with("/"));
@ -117,7 +117,7 @@ impl<'ctx> TrelloClient<'ctx> {
}
}
impl<'ctx> TrelloClient<'ctx> {
impl TrelloClient<'_> {
// https://developer.atlassian.com/cloud/trello/rest/api-group-members/#api-members-id-boards-get
pub(crate) async fn boards(&self) -> APIResult<Vec<TrelloBoard>> {
self.request("/members/me/boards", |net, url| {