org_social_lib_rs/lib.rs
1//! # org-social-lib-rs
2//!
3//! A Rust library for parsing and interacting with [Org-social](https://github.com/tanrax/org-social) decentralized social networks.
4//!
5//! ## Overview
6//!
7//! org-social-lib-rs provides the core functionality for working with org-social feeds. It handles parsing org-mode social files,
8//! tokenizing different org mode elements, and managing using the social network. It basically constitutes the backend of any org-social application.
9//!
10//! ## Features
11//!
12//! - **Org-social Parsing**: Parse org-social files into profiles and posts
13//! - **Network Fetching**: Asynchronous fetching of remote org-social feeds
14//! - **Threading System**: Build threaded conversation view from reply relationships
15//! - **Feed Aggregation**: Combine multiple feeds into a unified, chronologically sorted feed
16//! - **Post Management**: Create, parse, and manage social posts with metadata
17//! - **Reply Handling**: Parse and create replies between posts
18//!
19//! ## Quick Start
20//!
21//! ```rust,no_run
22//! use org_social_lib_rs::parser;
23//!
24//! fn main() -> Result<(), Box<dyn std::error::Error>> {
25//! // Parse a local org-social file
26//! let content = std::fs::read_to_string("social.org")?;
27//! let (profile, posts) = parser::parse_file(&content, Some("https://example.com/social.org".to_string()));
28//!
29//! // Access posts and profile information
30//! println!("Feed author: {}", profile.title());
31//! for post in posts {
32//! println!("Post: {} - {}", post.id(), post.content());
33//! }
34//!
35//! Ok(())
36//! }
37//! ```
38
39pub mod blocks;
40pub mod feed;
41pub mod feed_view;
42#[cfg(feature = "fetch")]
43pub mod network;
44pub mod new_post;
45pub mod notifications;
46pub mod parser;
47pub mod poll;
48pub mod post;
49pub mod profile;
50pub mod threading;
51pub mod tokenizer;
52pub mod util;