diff --git a/src/main.rs b/src/main.rs index 84b04a0..ba6cb90 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,8 @@ use clap::{App, Arg}; const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION"); +mod model; + fn main() { let matches = App::new("AnimeBoxes Sync") .version(VERSION.unwrap_or("UNKNOWN")) diff --git a/src/model.rs b/src/model.rs new file mode 100644 index 0000000..bfac319 --- /dev/null +++ b/src/model.rs @@ -0,0 +1,93 @@ +struct AnimeBoxesBackup { + backupTime: String, + backupVersion: String, + bannedTags: Vec, + creatorName: String, + creatorVersion: String, + favorites: Vec, + searchHistory: Vec, + servers: Vec, +} + +struct AnimeBoxesFavorite { + dateAdded: String, + disableStorage: bool, + enforceOriginalImage: bool, + file: AnimeBoxesFavoriteFile, + has_children: bool, + has_comments: bool, + has_notes: bool, + imageIsVisible: bool, + isFavorite: bool, + isVisible: bool, + jpeg: Option, + md5: String, + parent_id: String, + ppost_id: String, + ppostUrl: String, + preview: AnimeBoxesFavoritePreview, + rating: String, + sample: AnimeBoxesFavoriteSample, + score: i16, + source: String, + tag_artist: String, + tag_character: String, + tag_copyright: String, + tag_general: String, + tags: String, +} + +struct AnimeBoxesFavoriteFile { + contentType: i8, + ext: String, + height: i16, + url: String, + width: i16, +} + +struct AnimeBoxesFavoriteJpeg { + contentType: i8, + ext: String, + height: i16, + url: String, + width: i16, +} + +struct AnimeBoxesFavoritePreview { + contentType: i8, + ext: String, + height: i16, + url: String, + width: i16, +} + +struct AnimeBoxesFavoriteSample { + contentType: i8, + ext: String, + height: i16, + url: String, + width: i16, +} + +struct AnimeBoxesSearch { + itemId: i32, + searchDate: String, + searchText: String, + starred: bool, +} + +struct AnimeBoxesServer { + apikey: String, + isDefault: bool, + isSelected: bool, + password: String, + passwordKey: String, + ratingFilterEnabled: bool, + realURL: String, + serverId: i16, + serverName: String, + type_: i16, + url: String, + useNativeAutocomplete: bool, + userName: String, +}