Browse Source

Added a basic model for the anime backup files

master
Drew Short 4 years ago
parent
commit
9e84b24434
  1. 2
      src/main.rs
  2. 93
      src/model.rs

2
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"))

93
src/model.rs

@ -0,0 +1,93 @@
struct AnimeBoxesBackup {
backupTime: String,
backupVersion: String,
bannedTags: Vec<String>,
creatorName: String,
creatorVersion: String,
favorites: Vec<AnimeBoxesFavorite>,
searchHistory: Vec<AnimeBoxesSearch>,
servers: Vec<AnimeBoxesServer>,
}
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<AnimeBoxesFavoriteJpeg>,
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,
}
Loading…
Cancel
Save