-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matthieu
committed
Apr 9, 2017
1 parent
67cf3c9
commit 027216a
Showing
42 changed files
with
543 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,40 @@ | ||
#!/usr/bin/env ruby | ||
# coding: utf-8 | ||
|
||
# thanks for downloading MangaScrap ! | ||
# if you have a question, please go here : | ||
# https://github.com/Hellfire01/MangaScrap | ||
# | ||
# Note : | ||
# MangaScrap will install it's databases and templates | ||
# in ~/.MangaScrap | ||
# | ||
# MangaScrap's return values :+ | ||
# 0 : good | ||
# 1 : fatal error ( ruby native code exceptions ) | ||
# 2 : db error | ||
# 3 : connection error | ||
# 4 : unexpected error ( not yet managed stuff ) | ||
# 5 : argument error | ||
# 6 : gem error | ||
=begin | ||
require 'singleton' | ||
require 'open-uri' | ||
require 'pp' | ||
thanks for downloading MangaScrap ! | ||
if you have a question, please go here : | ||
https://github.com/Hellfire01/MangaScrap | ||
def load_gem(gem) | ||
begin | ||
require gem | ||
rescue Exception => e | ||
puts '' | ||
puts "exception while trying to load #{gem}, please follow the installation instructions in the install directory" | ||
puts 'message is : ' + e.message | ||
puts 'please note that a ruby update may require a re-download of the gems' | ||
puts '' | ||
exit 6 | ||
end | ||
end | ||
Note : | ||
MangaScrap will install it's databases and templates | ||
in ~/.MangaScrap/ | ||
# gems | ||
load_gem 'colorize' | ||
load_gem 'nokogiri' | ||
load_gem 'sqlite3' | ||
MangaScrap's return values : | ||
0 : good | ||
1 : fatal error ( ruby native code exceptions ) | ||
2 : db error | ||
3 : connection error | ||
4 : unexpected error ( not yet managed stuff ) | ||
5 : argument error | ||
6 : gem error | ||
# files | ||
require_relative 'sources/init' | ||
require_relative 'sources/scan/scan' | ||
require_relative 'sources/scan/scan_utils' | ||
require_relative 'sources/instructions/delete_diff' | ||
require_relative 'sources/instructions/basic_instructions' | ||
require_relative 'sources/instructions/params' | ||
require_relative 'sources/instructions/redl' | ||
require_relative 'sources/utils/utils_file' | ||
require_relative 'sources/utils/utils_args' | ||
require_relative 'sources/utils/utils_co' | ||
require_relative 'sources/utils/utils_manga' | ||
require_relative 'sources/utils/utils_html' | ||
require_relative 'sources/utils/utils_debug' | ||
require_relative 'sources/Classes/html/html' | ||
require_relative 'sources/Classes/html/html_buffer' | ||
require_relative 'sources/Classes/Download/mangafox' | ||
require_relative 'sources/Classes/DownloadDisplay' | ||
require_relative 'sources/Classes/instructions/Parsers/Instruction_parser' | ||
require_relative 'sources/Classes/instructions/Parsers/Data_parser' | ||
require_relative 'sources/Classes/instructions/Parsers/Query_Parser' | ||
require_relative 'sources/Classes/instructions/Parsers/File_parser' | ||
require_relative 'sources/Classes/instructions/query' | ||
require_relative 'sources/Classes/instructions/Instructions_exec' | ||
require_relative 'sources/Classes/instructions/Manga_data_filter' | ||
require_relative 'sources/Classes/DB/Manga_data' | ||
require_relative 'sources/Classes/DB/Manga_database' | ||
require_relative 'sources/Classes/DB/Params' | ||
API : | ||
should you want to use your own gui or use MangaScrap your own way, | ||
the api can be found in ./sources/api/ | ||
=end | ||
|
||
require_relative 'sources/init' | ||
initialize_mangascrap | ||
|
||
# if ARGV.size == 0 | ||
# note : instruction_exec posses this comparison | ||
args = Instructions_exec.new | ||
args.run | ||
# else | ||
# gui | ||
# end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# MangaScrap's API | ||
|
||
All of MangaScrap passes through the methods that are in the api directory<br /> | ||
Here you can use MangaScrap directly to ( example ) build your own GUI or your own instruction<br /> | ||
Please note that these methods are called from the argument parser witch is at ./sources/instructions/Instructions_exec.rb | ||
( you will have to add the call to your instruction there and follow the directions there )<br /> | ||
|
||
There are 4 files containing the API : | ||
- _mangas.rb_<br /> | ||
Allows you to manipulate the mangas database ( add / update / download / ... )<br /> | ||
**methods**: add, update, download, data, clear, delete | ||
- _oher.rb_<br /> | ||
contains any part of the API that could not be sorted as they are too small to justify having a file of their own<br /> | ||
**methods**: html | ||
- _ouput.rb_<br /> | ||
Reading from the database<br /> | ||
**methods**: details, output, help and version | ||
- _params_<br /> | ||
Configuring MangaScrap using it's parameters<br /> | ||
**methods**: get_params_list, set_param, reset_params | ||
|
||
**Important** :<br /> | ||
To manipulate mangas, MangaScrap uses the Manga_Data class witch you can find here : ./sources/DB/Manga_data.rb.<br /> | ||
The class works by giving to it's constructor the name and site or the link and the calling the **resolve** method witch | ||
will return true or false depending on if it could find / use the given information. |
Oops, something went wrong.