Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bilelmoussaoui/appstream
Appstream files parser
https://github.com/bilelmoussaoui/appstream
Last synced: 2 months ago
JSON representation
Appstream files parser
- Host: GitHub
- URL: https://github.com/bilelmoussaoui/appstream
- Owner: bilelmoussaoui
- License: mit
- Created: 2020-08-11T22:36:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T21:01:32.000Z (about 1 year ago)
- Last Synced: 2024-10-13T08:08:18.053Z (3 months ago)
- Language: Rust
- Homepage: https://bilelmoussaoui.github.io/appstream/appstream
- Size: 23.9 MB
- Stars: 10
- Watchers: 4
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# appstream
Appstream files parser using Rust & [xmltree](https://docs.rs/xmltree/)[![](https://docs.rs/appstream/badge.svg)](https://docs.rs/appstream/) [![](https://img.shields.io/crates/v/appstream)](https://crates.io/crates/appstream) ![](https://github.com/bilelmoussaoui/appstream/workflows/CI/badge.svg)
Specifications: [https://www.freedesktop.org/software/appstream/docs/](https://www.freedesktop.org/software/appstream/docs/)
How to use
```rust
use appstream::{Collection, Component, ParseError};fn main() -> Result<(), ParseError> {
let collection = Collection::from_path("/var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml".into())?;
// Find a specific application by id
println!("{:#?}", collection.find_by_id("org.gnome.design.Contrast".into()));// Find the list of gedit plugins
collection.components.iter()
.filter(|c| c.extends.contains(&"org.gnome.gedit".into()))
.collect::>();
Ok(())
}
```