-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
4e1c886
commit 5e0af1f
Showing
20 changed files
with
426 additions
and
205 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
root=true | ||
|
||
[*] | ||
indent_style = tab | ||
indent_size = 4 | ||
trim_trailing_whitespace = true |
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,8 +1,11 @@ | ||
# Story to ebook | ||
# [Story to ebook](https://github.com/GhostWriterTNCS/StoryToEbook) | ||
|
||
Download stories and convert them to ebook. | ||
|
||
[>> Download page <<](https://github.com/GhostWriterTNCS/StoryToEbook/releases) | ||
|
||
Requires [Calibre](https://calibre-ebook.com/) to convert the stories in ebook. | ||
|
||
Supported websites: | ||
* [EFP Fanfiction](http://www.efpfanfic.net/) | ||
* [Wattpad](https://www.wattpad.com/) |
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
Language: Cpp | ||
# BasedOnStyle: LLVM | ||
AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: false | ||
AlignConsecutiveDeclarations: false | ||
AlignEscapedNewlinesLeft: false | ||
AlignOperands: true | ||
AlignTrailingComments: true | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: Empty | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterDefinitionReturnType: None | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: true | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BraceWrapping: | ||
AfterClass: true | ||
AfterControlStatement: false | ||
AfterEnum: false | ||
AfterFunction: false | ||
AfterNamespace: false | ||
AfterObjCDeclaration: false | ||
AfterStruct: false | ||
AfterUnion: false | ||
BeforeCatch: false | ||
BeforeElse: false | ||
IndentBraces: false | ||
BreakBeforeBinaryOperators: None | ||
BreakBeforeBraces: Attach | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializersBeforeComma: false | ||
ColumnLimit: 100 | ||
CommentPragmas: '^ IWYU pragma:' | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
ConstructorInitializerIndentWidth: 4 | ||
ContinuationIndentWidth: 4 | ||
Cpp11BracedListStyle: true | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] | ||
IncludeCategories: | ||
- Regex: '^\<[^Q][^/.>]*\>' | ||
Priority: -2 | ||
- Regex: '^\<' | ||
Priority: -1 | ||
- Regex: '^\"' | ||
Priority: 0 | ||
IndentCaseLabels: false | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: false | ||
KeepEmptyLinesAtTheStartOfBlocks: true | ||
MacroBlockBegin: '' | ||
MacroBlockEnd: '' | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: None | ||
ObjCBlockIndentWidth: 2 | ||
ObjCSpaceAfterProperty: false | ||
ObjCSpaceBeforeProtocolList: true | ||
PenaltyBreakBeforeFirstCallParameter: 19 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyBreakString: 1000 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 150 | ||
PointerAlignment: Left | ||
ReflowComments: true | ||
SortIncludes: true | ||
SpaceAfterCStyleCast: false | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: false | ||
SpacesInContainerLiterals: true | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
Standard: Cpp11 | ||
TabWidth: 4 | ||
UseTab: Always | ||
... |
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
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,47 +1,50 @@ | ||
#include "MyCurl.h" | ||
|
||
namespace MyCurl { | ||
QString html; //will hold the url's contents | ||
size_t writeCallback(char* buf, size_t size, size_t nmemb, void* up) { //callback must have this declaration buf is a pointer to the data | ||
//that curl has for us, size*nmemb is the size of the buffer | ||
for (int c = 0; c<size*nmemb; c++) { | ||
html.push_back(buf[c]); | ||
} | ||
return size*nmemb; //tell curl how many bytes we handled | ||
} | ||
QString urlToString(QString url) { | ||
html = ""; | ||
CURL* curl; | ||
curl_global_init(CURL_GLOBAL_ALL); | ||
curl = curl_easy_init(); | ||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE); | ||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); | ||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 20L); | ||
curl_easy_setopt(curl, CURLOPT_URL, url.toStdString().c_str()); | ||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &writeCallback); | ||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); //tell curl to output its progress | ||
curl_easy_perform(curl); | ||
curl_easy_cleanup(curl); | ||
curl_global_cleanup(); | ||
return html; | ||
} | ||
|
||
QString decodeHtml(QString html) { | ||
html = html.replace("‘", "‘"); | ||
html = html.replace("’", "’"); | ||
html = html.replace("“", "“"); | ||
html = html.replace("”", "”"); | ||
html = html.replace("&", "&"); | ||
html = html.replace("–", "–"); | ||
html = html.replace("√", "v"); | ||
html = html.replace("!", "!"); | ||
html = html.replace("!", "!"); | ||
html = html.replace("&", "&"); | ||
html = html.replace("&", "&"); | ||
html = html.replace("'", "'"); | ||
html = html.replace("'", "'"); | ||
html = html.replace("ō", "ō"); | ||
html = html.replace("√", "v"); | ||
return html; | ||
std::string html; // will hold the url's contents | ||
size_t writeCallback(char* buf, size_t size, size_t nmemb, | ||
void* up) { // callback must have this declaration buf is a pointer to the data | ||
// that curl has for us, size*nmemb is the size of the buffer | ||
for (int c = 0; c < size * nmemb; c++) { | ||
html.push_back(buf[c]); | ||
} | ||
} | ||
return size * nmemb; // tell curl how many bytes we handled | ||
} | ||
QString urlToString(QString url) { | ||
html = ""; | ||
CURL* curl; | ||
curl_global_init(CURL_GLOBAL_ALL); | ||
curl = curl_easy_init(); | ||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE); | ||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); | ||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 20L); | ||
curl_easy_setopt(curl, CURLOPT_URL, url.toStdString().c_str()); | ||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &writeCallback); | ||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); // tell curl to output its progress | ||
curl_easy_perform(curl); | ||
curl_easy_cleanup(curl); | ||
curl_global_cleanup(); | ||
return QString::fromLocal8Bit(html.c_str()); | ||
} | ||
|
||
QString decodeHtml(QString html) { | ||
html = html.replace("‘", "‘"); | ||
html = html.replace("’", "’"); | ||
html = html.replace("“", "“"); | ||
html = html.replace("”", "”"); | ||
html = html.replace("&", "&"); | ||
html = html.replace("–", "–"); | ||
html = html.replace("√", "v"); | ||
html = html.replace("!", "!"); | ||
html = html.replace("!", "!"); | ||
html = html.replace("&", "&"); | ||
html = html.replace("&", "&"); | ||
html = html.replace("'", "'"); | ||
html = html.replace("'", "'"); | ||
html = html.replace("ō", "ō"); | ||
html = html.replace("√", "√"); | ||
return html; | ||
} | ||
|
||
} // namspace MyCurl |
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
Oops, something went wrong.