Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major simplification #27

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions ADLCore.nimble
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
# Package

version = "0.2.0"
version = "0.2.1"
author = "ShujianDou"
description = "Novel, Video, and Anime scraper"
license = "GPLv3"
srcDir = "src"

# Tasks
task test, "Test ADLCore Functionality":
exec "rm -rf ~/.nimble/pkgs2/ADLCore-0.2.*"
exec "rm -rf ~/.cache/nim/tester_d/*"
exec "nimble install -Y" # Install latest version
withDir "tests":
exec "nim c -d:ssl --threads:on -r tester"

task dbg, "Build ADLCore for debugging":
withDir "src":
exec "nim c -d:ssl --threads:on ADLCore.nim"
# Dependencies

requires "nim >= 1.6.6"
requires "halonium == 0.2.6"
requires "EPUB == 0.3.0"
requires "HLSManager"
requires "halonium"
requires "https://github.com/ShujianDou/nim-epub"
requires "https://github.com/ShujianDou/nim-HLSManager"
requires "nimcrypto"
requires "nimscripter == 1.1.1"
requires "https://github.com/vrienstudios/zippy"
requires "checksums"
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# ADLCore
The main backing library of the new [anime-dl](https://github.com/vrienstudios/anime-dl).<br>
This project mainly handles web scraping, decrypting video streams, and interacting with sites' APIs while anime-dl handles the CLI/TUI/UI side of things.<br>
The main backing library of [anime-dl](https://github.com/vrienstudios/anime-dl).<br>

You can use this easily expandable lib to interact with websites.
55 changes: 4 additions & 51 deletions src/ADLCore.nim
Original file line number Diff line number Diff line change
@@ -1,51 +1,4 @@
import ./ADLCore/Novel/NovelHall
import ./ADLCore/Video/VidStream, ./ADLCore/Video/Membed, ./ADLCore/Video/HAnime, ./ADLCore/Novel/MangaKakalot
import ./ADLCore/genericMediaTypes
import ADLCore/DownloadManager

export genericMediaTypes
export DownloadManager

proc GenerateNewNovelInstance*(site: string, uri: string): Novel {.exportc,dynlib.} =
var novelObj: Novel
case site:
of "NovelHall":
let hTuple = NovelHall.Init(uri)
novelObj = Novel()
novelObj.Init(hTuple)
of "MangaKakalot":
let hTuple = MangaKakalot.Init(uri)
novelObj = Novel()
novelObj.Init(hTuple)
else:
discard
assert novelObj != nil
return novelObj
proc GenerateNewVideoInstance*(site: string, uri: string): Video =
var aniObj: Video
case site:
of "vidstreamAni":
let hTup = VidStream.Init(uri)
aniObj = Video()
aniObj.Init(hTup)
of "Membed":
let hTup = Membed.Init(uri)
aniObj = Video()
aniObj.Init(hTup)
of "HAnime":
let hTup = HAnime.Init(uri)
aniObj = Video()
aniObj.Init(hTup)
else: discard
assert aniObj != nil
return aniObj

#let script = GenNewScript(ScanForScriptsInfoTuple("/mnt/General/work/Programming/ADLCore/src/")[0])
#let mdata = script[0].GetMetaData("https://www.volarenovels.com/novel/physician-not-a-consort")
#echo mdata.name
#echo mdata.author

# Testing code for scripts (do NOT build projects with this code included)
#var lam = ScanForScriptsInfoTuple("./")
#for l in lam:
# var sc = GenNewScript("./" & l.name & ".nims")
import ADLCore/[utils, hls, epub, context]
import ADLCore/sites/[embtaku, hanime, novelhall, generic]
export context
export epub
157 changes: 0 additions & 157 deletions src/ADLCore/DownloadManager.nim

This file was deleted.

Loading