├── .github └── workflows │ ├── ci.yml │ ├── release-preview.yml │ └── release.yml ├── .gitignore ├── .vscode ├── launch.json └── tasks.json ├── FB2Library.sln ├── FB2Library.sln.DotSettings ├── LICENSE.md ├── README.md ├── files └── test.fb2 ├── images └── icon.png ├── samples ├── FB2Library.Sample.UWP │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ ├── FB2Library.Sample.UWP.csproj │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Package.appxmanifest │ └── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml ├── FB2Sample.XF │ ├── FB2Sample.XF.Droid │ │ ├── Assets │ │ │ └── AboutAssets.txt │ │ ├── FB2Sample.XF.Droid.csproj │ │ ├── MainActivity.cs │ │ ├── Properties │ │ │ ├── AndroidManifest.xml │ │ │ └── AssemblyInfo.cs │ │ ├── Resources │ │ │ ├── AboutResources.txt │ │ │ ├── Resource.Designer.cs │ │ │ ├── drawable-hdpi │ │ │ │ └── icon.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── icon.png │ │ │ ├── drawable-xxhdpi │ │ │ │ └── icon.png │ │ │ └── drawable │ │ │ │ └── icon.png │ │ └── packages.config │ ├── FB2Sample.XF.UWP │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Assets │ │ │ ├── LockScreenLogo.scale-200.png │ │ │ ├── SplashScreen.scale-200.png │ │ │ ├── Square150x150Logo.scale-200.png │ │ │ ├── Square44x44Logo.scale-200.png │ │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ │ ├── StoreLogo.png │ │ │ └── Wide310x150Logo.scale-200.png │ │ ├── FB2Sample.XF.UWP.csproj │ │ ├── FB2Sample.XF.UWP.nuget.targets │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ │ └── project.json │ ├── FB2Sample.XF.WinPhone │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Assets │ │ │ ├── Logo.scale-240.png │ │ │ ├── SmallLogo.scale-240.png │ │ │ ├── SplashScreen.scale-240.png │ │ │ ├── Square71x71Logo.scale-240.png │ │ │ ├── StoreLogo.scale-240.png │ │ │ └── WideLogo.scale-240.png │ │ ├── FB2Sample.XF.WinPhone.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── packages.config │ ├── FB2Sample.XF.Windows │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Assets │ │ │ ├── Logo.scale-100.png │ │ │ ├── SmallLogo.scale-100.png │ │ │ ├── SplashScreen.scale-100.png │ │ │ └── StoreLogo.scale-100.png │ │ ├── FB2Sample.XF.Windows.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── packages.config │ ├── FB2Sample.XF.iOS │ │ ├── AppDelegate.cs │ │ ├── Entitlements.plist │ │ ├── FB2Sample.XF.iOS.csproj │ │ ├── Info.plist │ │ ├── Main.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Resources │ │ │ ├── Default-568h@2x.png │ │ │ ├── Default-Portrait.png │ │ │ ├── Default-Portrait@2x.png │ │ │ ├── Default.png │ │ │ ├── Default@2x.png │ │ │ ├── Icon-60@2x.png │ │ │ ├── Icon-60@3x.png │ │ │ ├── Icon-76.png │ │ │ ├── Icon-76@2x.png │ │ │ ├── Icon-Small-40.png │ │ │ ├── Icon-Small-40@2x.png │ │ │ ├── Icon-Small-40@3x.png │ │ │ ├── Icon-Small.png │ │ │ ├── Icon-Small@2x.png │ │ │ ├── Icon-Small@3x.png │ │ │ └── LaunchScreen.storyboard │ │ ├── iTunesArtwork │ │ ├── iTunesArtwork@2x │ │ └── packages.config │ └── FB2Sample.XF │ │ ├── App.cs │ │ ├── FB2Sample.XF.csproj │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── packages.config └── FBLibrary.Sample.ConsoleApp │ ├── FBLibrary.Sample.ConsoleApp.csproj │ ├── Program.cs │ └── runtimeconfig.template.json └── src ├── Elements ├── AnnotationItem.cs ├── AnnotationType.cs ├── AuthorItem.cs ├── AuthorType.cs ├── BinaryItem.cs ├── BodyItem.cs ├── CiteItem.cs ├── CustomTextFieldType.cs ├── DateItem.cs ├── EmptyLineItem.cs ├── EpigraphItem.cs ├── FB2Const.cs ├── FB2TextItem.cs ├── GenreType.cs ├── ImageItem.cs ├── InlineImageItem.cs ├── InternalLinkItem.cs ├── OutPutDocumentType.cs ├── ParagraphItem.cs ├── PartShareInstructionType.cs ├── Poem │ ├── PoemItem.cs │ ├── StanzaItem.cs │ └── VPoemParagraph.cs ├── SectionItem.cs ├── SequenceType.cs ├── ShareInstructionType.cs ├── SimpleText.cs ├── StyleElement.cs ├── StyleItem.cs ├── SubTitleItem.cs ├── Table │ ├── BaseCellElement.cs │ ├── TableCellItem.cs │ ├── TableHeadingItem.cs │ ├── TableItem.cs │ └── TableRowItem.cs ├── TextAuthorItem.cs ├── TextFieldType.cs └── TitleItem.cs ├── FB2File.cs ├── FB2Library.csproj ├── FB2Reader.cs ├── HeaderItems ├── CoverPage.cs ├── CustomInfo.cs ├── ItemDocumentInfo.cs ├── ItemInfoBase.cs ├── ItemPublishInfo.cs └── ItemTitleInfo.cs ├── IFB2Reader.cs └── XmlLoadSettings.cs /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: 4 | - master 5 | pull_request: 6 | branches: 7 | - master 8 | env: 9 | DOTNET_NOLOGO: true 10 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true 11 | DOTNET_CLI_TELEMETRY_OPTOUT: true 12 | jobs: 13 | build: 14 | runs-on: ${{ matrix.os }} 15 | strategy: 16 | matrix: 17 | os: [ ubuntu-latest, windows-latest, macos-latest ] 18 | timeout-minutes: 10 19 | steps: 20 | - name: Checkout 21 | uses: actions/checkout@v2 22 | - name: Build All 23 | if: matrix.os == 'ubuntu-latest' 24 | run: dotnet build --configuration Release 25 | - name: Build Library 26 | run: dotnet build src --configuration Release -------------------------------------------------------------------------------- /.github/workflows/release-preview.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | tags: 4 | - "v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+" 5 | env: 6 | DOTNET_NOLOGO: true 7 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true 8 | DOTNET_CLI_TELEMETRY_OPTOUT: true 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | timeout-minutes: 10 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v2 16 | - name: Set VERSION variable from tag 17 | run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV 18 | - name: Pack 19 | run: | 20 | dotnet pack src \ 21 | -p:PackageVersion="${VERSION}" \ 22 | --configuration Release \ 23 | --verbosity normal \ 24 | --output . 25 | - name: Upload Artifact 26 | uses: actions/upload-artifact@v3 27 | with: 28 | name: nupkg 29 | path: | 30 | *.nupkg 31 | *.snupkg 32 | 33 | deploy-github: 34 | needs: build 35 | runs-on: ubuntu-latest 36 | steps: 37 | - name: Download Artifact 38 | uses: actions/download-artifact@v1 39 | with: 40 | name: nupkg 41 | - name: Push to GitHub 42 | run: | 43 | dotnet nuget push ./nupkg/*.nupkg \ 44 | --source ${FEED_URL} \ 45 | --api-key ${FEED_KEY} \ 46 | --no-symbols true \ 47 | --skip-duplicate 48 | env: 49 | FEED_URL: https://nuget.pkg.github.com/wcoder/index.json \ 50 | FEED_KEY: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | tags: 4 | - "v[0-9]+.[0-9]+.[0-9]+" 5 | env: 6 | DOTNET_NOLOGO: true 7 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true 8 | DOTNET_CLI_TELEMETRY_OPTOUT: true 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | timeout-minutes: 10 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v2 16 | - name: Verify commit exists in origin/master 17 | run: | 18 | git fetch --no-tags --prune --depth=1 origin '+refs/heads/*:refs/remotes/origin/*' 19 | git branch --remote --contains | grep origin/master 20 | - name: Set VERSION variable from tag 21 | run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV 22 | - name: Pack 23 | run: | 24 | dotnet pack src \ 25 | -p:PackageVersion="${VERSION}" \ 26 | --configuration Release \ 27 | --verbosity normal \ 28 | --output . 29 | - name: Upload Artifact 30 | uses: actions/upload-artifact@v3 31 | with: 32 | name: nupkg 33 | path: | 34 | *.nupkg 35 | *.snupkg 36 | 37 | deploy-nuget: 38 | needs: build 39 | runs-on: ubuntu-latest 40 | steps: 41 | - name: Download Artifact 42 | uses: actions/download-artifact@v1 43 | with: 44 | name: nupkg 45 | - name: Push to NuGet 46 | run: | 47 | dotnet nuget push ./nupkg/* \ 48 | --source ${FEED_URL} \ 49 | --api-key ${FEED_KEY} \ 50 | --skip-duplicate 51 | env: 52 | FEED_URL: https://api.nuget.org/v3/index.json 53 | FEED_KEY: ${{ secrets.NUGET_KEY }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/is,visualstudio,xamarinstudio 2 | #!! ERROR: is is undefined. Use list command to see defined gitignore types !!# 3 | ### VisualStudio ### 4 | ## Ignore Visual Studio temporary files, build results, and 5 | ## files generated by popular Visual Studio add-ons. 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | # User-specific files (MonoDevelop/Xamarin Studio) 12 | *.userprefs 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | # Visual Studio 2015 cache/options directory 25 | .vs/ 26 | # Uncomment if you have tasks that create the project's static files in wwwroot 27 | #wwwroot/ 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | # NUNIT 32 | *.VisualState.xml 33 | TestResult.xml 34 | # Build Results of an ATL Project 35 | [Dd]ebugPS/ 36 | [Rr]eleasePS/ 37 | dlldata.c 38 | # DNX 39 | project.lock.json 40 | artifacts/ 41 | *_i.c 42 | *_p.c 43 | *_i.h 44 | *.ilk 45 | *.meta 46 | *.obj 47 | *.pch 48 | *.pdb 49 | *.pgc 50 | *.pgd 51 | *.rsp 52 | *.sbr 53 | *.tlb 54 | *.tli 55 | *.tlh 56 | *.tmp 57 | *.tmp_proj 58 | *.log 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.svclog 64 | *.scc 65 | # Chutzpah Test files 66 | _Chutzpah* 67 | # Visual C++ cache files 68 | ipch/ 69 | *.aps 70 | *.ncb 71 | *.opendb 72 | *.opensdf 73 | *.sdf 74 | *.cachefile 75 | # Visual Studio profiler 76 | *.psess 77 | *.vsp 78 | *.vspx 79 | *.sap 80 | # TFS 2012 Local Workspace 81 | $tf/ 82 | # Guidance Automation Toolkit 83 | *.gpState 84 | # ReSharper is a .NET coding add-in 85 | _ReSharper*/ 86 | *.[Rr]e[Ss]harper 87 | *.DotSettings.user 88 | # JustCode is a .NET coding add-in 89 | .JustCode 90 | # TeamCity is a build add-in 91 | _TeamCity* 92 | # DotCover is a Code Coverage Tool 93 | *.dotCover 94 | # NCrunch 95 | _NCrunch_* 96 | .*crunch*.local.xml 97 | nCrunchTemp_* 98 | # MightyMoose 99 | *.mm.* 100 | AutoTest.Net/ 101 | # Web workbench (sass) 102 | .sass-cache/ 103 | # Installshield output folder 104 | [Ee]xpress/ 105 | # DocProject is a documentation generator add-in 106 | DocProject/buildhelp/ 107 | DocProject/Help/*.HxT 108 | DocProject/Help/*.HxC 109 | DocProject/Help/*.hhc 110 | DocProject/Help/*.hhk 111 | DocProject/Help/*.hhp 112 | DocProject/Help/Html2 113 | DocProject/Help/html 114 | # Click-Once directory 115 | publish/ 116 | # Publish Web Output 117 | *.[Pp]ublish.xml 118 | *.azurePubxml 119 | # TODO: Comment the next line if you want to checkin your web deploy settings 120 | # but database connection strings (with potential passwords) will be unencrypted 121 | *.pubxml 122 | *.publishproj 123 | # NuGet Packages 124 | *.nupkg 125 | *.snupkg 126 | # The packages folder can be ignored because of Package Restore 127 | **/packages/* 128 | # except build/, which is used as an MSBuild target. 129 | !**/packages/build/ 130 | # Uncomment if necessary however generally it will be regenerated when needed 131 | #!**/packages/repositories.config 132 | # Windows Azure Build Output 133 | csx/ 134 | *.build.csdef 135 | # Windows Azure Emulator 136 | ecf/ 137 | rcf/ 138 | # Windows Store app package directory 139 | AppPackages/ 140 | # Visual Studio cache files 141 | # files ending in .cache can be ignored 142 | *.[Cc]ache 143 | # but keep track of directories ending in .cache 144 | !*.[Cc]ache/ 145 | # Others 146 | ClientBin/ 147 | [Ss]tyle[Cc]op.* 148 | ~$* 149 | *~ 150 | *.dbmdl 151 | *.dbproj.schemaview 152 | *.pfx 153 | *.publishsettings 154 | node_modules/ 155 | orleans.codegen.cs 156 | # RIA/Silverlight projects 157 | Generated_Code/ 158 | # Backup & report files from converting an old project file 159 | # to a newer Visual Studio version. Backup files are not needed, 160 | # because we have git ;-) 161 | _UpgradeReport_Files/ 162 | Backup*/ 163 | UpgradeLog*.XML 164 | UpgradeLog*.htm 165 | # SQL Server files 166 | *.mdf 167 | *.ldf 168 | # Business Intelligence projects 169 | *.rdl.data 170 | *.bim.layout 171 | *.bim_*.settings 172 | # Microsoft Fakes 173 | FakesAssemblies/ 174 | # GhostDoc plugin setting file 175 | *.GhostDoc.xml 176 | # Node.js Tools for Visual Studio 177 | .ntvs_analysis.dat 178 | # Visual Studio 6 build log 179 | *.plg 180 | # Visual Studio 6 workspace options file 181 | *.opt 182 | # Visual Studio LightSwitch build output 183 | **/*.HTMLClient/GeneratedArtifacts 184 | **/*.DesktopClient/GeneratedArtifacts 185 | **/*.DesktopClient/ModelManifest.xml 186 | **/*.Server/GeneratedArtifacts 187 | **/*.Server/ModelManifest.xml 188 | _Pvt_Extensions 189 | # Paket dependency manager 190 | .paket/paket.exe 191 | # FAKE - F# Make 192 | .fake/ 193 | ### XamarinStudio ### 194 | bin/ 195 | obj/ 196 | *.userprefs 197 | 198 | # Idea 199 | .idea/ 200 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": ".NET Launch (ConsoleApp)", 9 | "type": "coreclr", 10 | "request": "launch", 11 | "preLaunchTask": "build", 12 | "program": "${workspaceFolder}/FBLibrary.Sample.ConsoleApp/bin/Debug/net6.0/FBLibrary.Sample.ConsoleApp.dll", 13 | "args": [], 14 | "cwd": "${workspaceFolder}/FBLibrary.Sample.ConsoleApp", 15 | "console": "internalConsole", 16 | "stopAtEntry": false 17 | }, 18 | { 19 | "name": ".NET Core Attach", 20 | "type": "coreclr", 21 | "request": "attach" 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "process", 8 | "args": [ 9 | "build", 10 | "${workspaceFolder}/FBLibrary.Sample.ConsoleApp/FBLibrary.Sample.ConsoleApp.csproj", 11 | "/property:GenerateFullPaths=true", 12 | "/consoleloggerparameters:NoSummary" 13 | ], 14 | "problemMatcher": "$msCompile" 15 | }, 16 | { 17 | "label": "publish", 18 | "command": "dotnet", 19 | "type": "process", 20 | "args": [ 21 | "publish", 22 | "${workspaceFolder}/FBLibrary.Sample.ConsoleApp/FBLibrary.Sample.ConsoleApp.csproj", 23 | "/property:GenerateFullPaths=true", 24 | "/consoleloggerparameters:NoSummary" 25 | ], 26 | "problemMatcher": "$msCompile" 27 | }, 28 | { 29 | "label": "watch", 30 | "command": "dotnet", 31 | "type": "process", 32 | "args": [ 33 | "watch", 34 | "run", 35 | "--project", 36 | "${workspaceFolder}/FBLibrary.Sample.ConsoleApp/FBLibrary.Sample.ConsoleApp.csproj" 37 | ], 38 | "problemMatcher": "$msCompile" 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /FB2Library.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26430.14 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FB2Library", "src\FB2Library.csproj", "{718CE136-BCDC-4BF8-9863-ADC7633EB2CA}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FB2Library.Sample.UWP", "samples\FB2Library.Sample.UWP\FB2Library.Sample.UWP.csproj", "{9E25F85E-486A-4B68-AF44-3E47CA962433}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FBLibrary.Sample.ConsoleApp", "samples\FBLibrary.Sample.ConsoleApp\FBLibrary.Sample.ConsoleApp.csproj", "{6D8B892A-DDE9-4860-94DD-B567D431CA7D}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Debug|ARM = Debug|ARM 16 | Debug|x64 = Debug|x64 17 | Debug|x86 = Debug|x86 18 | Release|Any CPU = Release|Any CPU 19 | Release|ARM = Release|ARM 20 | Release|x64 = Release|x64 21 | Release|x86 = Release|x86 22 | EndGlobalSection 23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 24 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Debug|ARM.ActiveCfg = Debug|Any CPU 27 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Debug|ARM.Build.0 = Debug|Any CPU 28 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Debug|x64.ActiveCfg = Debug|Any CPU 29 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Debug|x64.Build.0 = Debug|Any CPU 30 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Debug|x86.ActiveCfg = Debug|Any CPU 31 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Debug|x86.Build.0 = Debug|Any CPU 32 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Release|ARM.ActiveCfg = Release|Any CPU 35 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Release|ARM.Build.0 = Release|Any CPU 36 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Release|x64.ActiveCfg = Release|Any CPU 37 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Release|x64.Build.0 = Release|Any CPU 38 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Release|x86.ActiveCfg = Release|Any CPU 39 | {718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Release|x86.Build.0 = Release|Any CPU 40 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|Any CPU.ActiveCfg = Debug|x86 41 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|Any CPU.Build.0 = Debug|x86 42 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|Any CPU.Deploy.0 = Debug|x86 43 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|ARM.ActiveCfg = Debug|ARM 44 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|ARM.Build.0 = Debug|ARM 45 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|ARM.Deploy.0 = Debug|ARM 46 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x64.ActiveCfg = Debug|x64 47 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x64.Build.0 = Debug|x64 48 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x64.Deploy.0 = Debug|x64 49 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x86.ActiveCfg = Debug|x86 50 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x86.Build.0 = Debug|x86 51 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x86.Deploy.0 = Debug|x86 52 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|Any CPU.ActiveCfg = Release|x86 53 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|ARM.ActiveCfg = Release|ARM 54 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|ARM.Build.0 = Release|ARM 55 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|ARM.Deploy.0 = Release|ARM 56 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x64.ActiveCfg = Release|x64 57 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x64.Build.0 = Release|x64 58 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x64.Deploy.0 = Release|x64 59 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x86.ActiveCfg = Release|x86 60 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x86.Build.0 = Release|x86 61 | {9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x86.Deploy.0 = Release|x86 62 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 63 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Debug|Any CPU.Build.0 = Debug|Any CPU 64 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Debug|ARM.ActiveCfg = Debug|Any CPU 65 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Debug|ARM.Build.0 = Debug|Any CPU 66 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Debug|x64.ActiveCfg = Debug|Any CPU 67 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Debug|x64.Build.0 = Debug|Any CPU 68 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Debug|x86.ActiveCfg = Debug|Any CPU 69 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Debug|x86.Build.0 = Debug|Any CPU 70 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Release|Any CPU.ActiveCfg = Release|Any CPU 71 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Release|Any CPU.Build.0 = Release|Any CPU 72 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Release|ARM.ActiveCfg = Release|Any CPU 73 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Release|ARM.Build.0 = Release|Any CPU 74 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Release|x64.ActiveCfg = Release|Any CPU 75 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Release|x64.Build.0 = Release|Any CPU 76 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Release|x86.ActiveCfg = Release|Any CPU 77 | {6D8B892A-DDE9-4860-94DD-B567D431CA7D}.Release|x86.Build.0 = Release|Any CPU 78 | EndGlobalSection 79 | GlobalSection(SolutionProperties) = preSolution 80 | HideSolutionNode = FALSE 81 | EndGlobalSection 82 | EndGlobal 83 | -------------------------------------------------------------------------------- /FB2Library.sln.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | FB 3 | XML 4 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | #Microsoft Public License (Ms-PL) 2 | 3 | Copyright (c) 2009-2015 lordkiron / 2016 Yauheni Pakala 4 | 5 | This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 6 | 7 | ##1. Definitions 8 | 9 | The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. 10 | 11 | A "contribution" is the original software, or any additions or changes to the software. 12 | 13 | A "contributor" is any person that distributes its contribution under this license. 14 | 15 | "Licensed patents" are a contributor's patent claims that read directly on its contribution. 16 | 17 | ##2. Grant of Rights 18 | 19 | * (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. 20 | 21 | * (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 22 | 23 | ##3. Conditions and Limitations 24 | 25 | * (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. 26 | 27 | * (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. 28 | 29 | * (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. 30 | 31 | * (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. 32 | 33 | * (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FB2Library [![NuGet Badge](https://buildstats.info/nuget/FB2Library)](https://www.nuget.org/packages/FB2Library/) 2 | 3 | This project provides .Net library to help developers load .FB2 (Fiction Book: http://en.wikipedia.org/wiki/FictionBook ) ebook files. This ebook files format is widely acceptable in Russia. If you doing some converter, reader or editor for ebooks and you using one of the .Net languages - this project for you. 4 | 5 | > The original library automatically exported from http://code.google.com/p/fb2librarynet and placed [here](https://github.com/wcoder/FB2Library). 6 | 7 | ## Installation 8 | 9 | * Available on NuGet: https://www.nuget.org/packages/FB2Library 10 | * Install into your PCL project or Client projects. 11 | 12 | ``` 13 | Install-Package FB2Library 14 | ``` 15 | or 16 | ``` 17 | dotnet add package FB2Library 18 | ``` 19 | 20 | ## Usage 21 | 22 | * [Gettings started](https://github.com/wcoder/FB2Library/wiki/Usage) 23 | * [How to make book for reading](https://github.com/wcoder/FB2Library/wiki/How-to-make-book) 24 | 25 | ## Platform Support 26 | 27 | Everything that supports [.NET Standard 1.0](https://github.com/dotnet/standard/blob/master/docs/versions/netstandard1.0.md): 28 | 29 | * .NET Core 1.0+ 30 | * .NET Framework 4.5+ 31 | * .NET 6 32 | * .NET 7 33 | * Mono 34 | * Xamarin.iOS 35 | * Xamarin.Android 36 | * Universal Windows Platform 10 37 | * Windows 8.0 38 | * Windows Phone 8.1 39 | * Windows Phone Silverlight 8.0 40 | 41 | ## Authors 42 | 43 | * [lordkiron](https://github.com/lordkiron) - developed original library 44 | * [Yauheni Pakala](https://github.com/wcoder) - porting to PCL/NetStandard 45 | 46 | --- 47 | Microsoft Public License 48 | -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wcoder/FB2Library/776fd30e5c44d10db857d53574860beb13a5fb99/images/icon.png -------------------------------------------------------------------------------- /samples/FB2Library.Sample.UWP/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/FB2Library.Sample.UWP/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.ApplicationModel; 7 | using Windows.ApplicationModel.Activation; 8 | using Windows.Foundation; 9 | using Windows.Foundation.Collections; 10 | using Windows.UI.Xaml; 11 | using Windows.UI.Xaml.Controls; 12 | using Windows.UI.Xaml.Controls.Primitives; 13 | using Windows.UI.Xaml.Data; 14 | using Windows.UI.Xaml.Input; 15 | using Windows.UI.Xaml.Media; 16 | using Windows.UI.Xaml.Navigation; 17 | 18 | namespace FB2Library.Sample.UWP 19 | { 20 | /// 21 | /// Provides application-specific behavior to supplement the default Application class. 22 | /// 23 | sealed partial class App : Application 24 | { 25 | /// 26 | /// Initializes the singleton application object. This is the first line of authored code 27 | /// executed, and as such is the logical equivalent of main() or WinMain(). 28 | /// 29 | public App() 30 | { 31 | this.InitializeComponent(); 32 | this.Suspending += OnSuspending; 33 | } 34 | 35 | /// 36 | /// Invoked when the application is launched normally by the end user. Other entry points 37 | /// will be used such as when the application is launched to open a specific file. 38 | /// 39 | /// Details about the launch request and process. 40 | protected override void OnLaunched(LaunchActivatedEventArgs e) 41 | { 42 | Frame rootFrame = Window.Current.Content as Frame; 43 | 44 | // Do not repeat app initialization when the Window already has content, 45 | // just ensure that the window is active 46 | if (rootFrame == null) 47 | { 48 | // Create a Frame to act as the navigation context and navigate to the first page 49 | rootFrame = new Frame(); 50 | 51 | rootFrame.NavigationFailed += OnNavigationFailed; 52 | 53 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 54 | { 55 | //TODO: Load state from previously suspended application 56 | } 57 | 58 | // Place the frame in the current Window 59 | Window.Current.Content = rootFrame; 60 | } 61 | 62 | if (e.PrelaunchActivated == false) 63 | { 64 | if (rootFrame.Content == null) 65 | { 66 | // When the navigation stack isn't restored navigate to the first page, 67 | // configuring the new page by passing required information as a navigation 68 | // parameter 69 | rootFrame.Navigate(typeof(MainPage), e.Arguments); 70 | } 71 | // Ensure the current window is active 72 | Window.Current.Activate(); 73 | } 74 | } 75 | 76 | /// 77 | /// Invoked when Navigation to a certain page fails 78 | /// 79 | /// The Frame which failed navigation 80 | /// Details about the navigation failure 81 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 82 | { 83 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 84 | } 85 | 86 | /// 87 | /// Invoked when application execution is being suspended. Application state is saved 88 | /// without knowing whether the application will be terminated or resumed with the contents 89 | /// of memory still intact. 90 | /// 91 | /// The source of the suspend request. 92 | /// Details about the suspend request. 93 | private void OnSuspending(object sender, SuspendingEventArgs e) 94 | { 95 | var deferral = e.SuspendingOperation.GetDeferral(); 96 | //TODO: Save application state and stop any background activity 97 | deferral.Complete(); 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /samples/FB2Library.Sample.UWP/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wcoder/FB2Library/776fd30e5c44d10db857d53574860beb13a5fb99/samples/FB2Library.Sample.UWP/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /samples/FB2Library.Sample.UWP/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wcoder/FB2Library/776fd30e5c44d10db857d53574860beb13a5fb99/samples/FB2Library.Sample.UWP/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /samples/FB2Library.Sample.UWP/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wcoder/FB2Library/776fd30e5c44d10db857d53574860beb13a5fb99/samples/FB2Library.Sample.UWP/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/FB2Library.Sample.UWP/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wcoder/FB2Library/776fd30e5c44d10db857d53574860beb13a5fb99/samples/FB2Library.Sample.UWP/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /samples/FB2Library.Sample.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wcoder/FB2Library/776fd30e5c44d10db857d53574860beb13a5fb99/samples/FB2Library.Sample.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /samples/FB2Library.Sample.UWP/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wcoder/FB2Library/776fd30e5c44d10db857d53574860beb13a5fb99/samples/FB2Library.Sample.UWP/Assets/StoreLogo.png -------------------------------------------------------------------------------- /samples/FB2Library.Sample.UWP/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wcoder/FB2Library/776fd30e5c44d10db857d53574860beb13a5fb99/samples/FB2Library.Sample.UWP/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/FB2Library.Sample.UWP/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |