Commit graph

58 commits

Author SHA1 Message Date
1e02dd2d1f ScanElement now owns the Element
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-24 11:54:23 +02:00
d97bc62121 Add Entity and Context types
Scansion supports declaring components in addition to clients. We don't
support components yet but with this change it's not far off anymore.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-24 11:54:23 +02:00
0b7718ff43 Cargo.toml: Update project name and description
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-24 11:54:23 +02:00
7cf6ae2e0d
Cargo.toml: Update project name and description
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-19 14:11:10 +02:00
e39be87498
README: Add note about ScanElement
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-19 14:08:56 +02:00
c05dda0c08
Update README
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-19 13:40:59 +02:00
7c6298ca50
ScanNodes: Remove _with_context methods, make them the default
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-19 13:32:37 +02:00
af9e47f0a8
ScanElement: Propagate context
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-19 13:21:03 +02:00
6ede9da169
cargo fmt
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-18 17:48:22 +02:00
c847ceb3bf
Implement variables in attributes
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-18 17:47:26 +02:00
1f0a7e4e18
Implement scansion:any in attr
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-17 23:42:06 +02:00
f5ac2d7ec6
Remove debug prints
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-17 23:40:09 +02:00
2f082be1f6
element: Remove unused pub structs
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-15 19:14:04 +02:00
974a942f5a
Implement scansion:strict
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-04-15 19:08:25 +02:00
e9c6d32445
Don't convert XML to minidom::Element anymore
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-17 18:46:51 +01:00
309be31d45
Split into modules
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-17 18:32:51 +01:00
7314127763
Actions are parsed until the end of the line only
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-17 10:30:28 +01:00
12299c5898
Cargo.toml: minidom 0.15.1 was released with the necessary changes
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-16 14:40:19 +01:00
f3b47b157d
Small clippy run
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-14 18:53:50 +01:00
cb3c18c1c6
README: Update progress
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-14 12:28:37 +01:00
efb69345d8
Implement 'receives: nothing' as Action::ReceiveNone
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-14 12:26:41 +01:00
66a611fa6e
Add failure tests for parse_meta
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-13 21:38:36 +01:00
5293048580
Ensure metadata title and desc aren't tags
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-13 19:57:52 +01:00
015a6c97e3 README: compat with upstream
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-13 18:29:57 +01:00
581c8b14d7 README: reword
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-13 18:29:57 +01:00
5863adc174 Parse metadata tags
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-13 18:29:57 +01:00
ab40eb688b Add metadata support
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-13 18:29:57 +01:00
54debb3e2f Rename Account to Client
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-13 18:29:57 +01:00
ab24ddf14c README: Add progress
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-13 18:29:57 +01:00
6bdc20bc53 Provide scansion namespace for minidom::Element
It went undetected until now as these attributes only seem to be on
child elements which aren't parsed yet. Not having this NS available
should cause issues though when the user explores the element.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-13 18:29:57 +01:00
98174ec66b
Allow Jid instead of BareJid to replace 'resource'
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-12 20:12:09 +01:00
d1d3c57af9
Add support for custom_host and custom_port with helper methods
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-12 19:46:03 +01:00
b985906d6d
Add nom-locate, ground for more detailed errors
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-11 23:22:31 +01:00
e626352e87
Implement support for multiline comments
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-11 18:41:05 +01:00
692cb204ac
Comments can also be //
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-11 18:24:02 +01:00
4fdc467cf2
Example/spec: Allow folders to be specified
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-11 18:09:28 +01:00
80bd6c281f
Add resource attr to Account
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-11 18:03:21 +01:00
c522257e8c
Implement take_until_tags parser to make it slightly more nom idiomatic
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-11 15:46:32 +01:00
0747db35ee
Parse accounts: Parse identifiers until the end of the line
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-11 15:36:24 +01:00
1cb94ccfaf
parse_action: everything before keyword is an identifier
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-11 11:18:57 +01:00
0aec3cea6e
New Action::Disconnect
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-10 14:25:06 +01:00
41849edbb9
test_parse_spec
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-10 14:18:02 +01:00
b57b36f81a
rustfmt pass
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-10 14:14:33 +01:00
bb08011d6f
Remove single parse_action, move into parse_actions
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-09 18:17:04 +01:00
1c3865d8dd
Remove duplicate account test
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-09 18:15:43 +01:00
22f12b2b10
parse_receive now correctly returns Action::Receive
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-09 18:13:10 +01:00
413e1b4560
Only test Action::connect in test_action_connect
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-09 16:59:59 +01:00
4c326b4ca5
parse_receive
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-09 16:55:44 +01:00
cb7382a941
parse_send
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-09 16:48:46 +01:00
0ed53d0775
Remove dep on xmpp-parsers, add jid and minidom
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-09 14:20:23 +01:00