mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2026-03-21 21:38:56 +00:00
tools v2.0
Most tools now have plugins
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <conio.h>
|
||||
#include <fstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Variables
|
||||
int TopazTrue = 0;
|
||||
int strlength = 0;
|
||||
char uinfile[80];
|
||||
char outfile[80];
|
||||
char command[80];
|
||||
char buffer[80];
|
||||
|
||||
// String initialization
|
||||
strcpy(uinfile,"");
|
||||
strcpy(outfile,"");
|
||||
strcpy(buffer,"");
|
||||
strcpy(command,"skindle "); // string preloaded with "skindle "
|
||||
|
||||
|
||||
cout << "\n\n\n Please enter the name of the book to be converted:\n\n ";
|
||||
cout << " Don't forget the prc file extension!\n\n ";
|
||||
cout << " Watch out for zeros and Os. Zeros are skinny and Os are fat.\n\n\n ";
|
||||
|
||||
cin >> uinfile; // get file name of the book to be converted from user
|
||||
|
||||
|
||||
ifstream infile(uinfile);
|
||||
infile.getline(buffer,4);
|
||||
|
||||
|
||||
if (strncmp (buffer,"TPZ",3)==0) // open file and test first 3 char if TPZ then book is topaz
|
||||
{
|
||||
TopazTrue = 1; // This is a Topaz file
|
||||
}
|
||||
|
||||
|
||||
strlength = strlen(uinfile);
|
||||
|
||||
if(strlength > 13)
|
||||
{
|
||||
strncat(outfile,uinfile,10); // Create output file name using first 10 char of input file name
|
||||
}
|
||||
else
|
||||
{
|
||||
strncat(outfile,uinfile, (strlength - 4)); // If file name is less than 10 characters
|
||||
}
|
||||
if(TopazTrue == 1) // This is Topaz Book
|
||||
{
|
||||
strcat(command,"-d "); // Add the topaz switch to the command line
|
||||
|
||||
strcat(outfile,".tpz"); // give tpz file extension to topaz output file
|
||||
} // end of TopazTrue
|
||||
else
|
||||
{
|
||||
strcat(outfile,".azw");
|
||||
} // if not Topaz make it azw
|
||||
|
||||
strcat(command,"-i "); // Add the input switch to the command line
|
||||
strcat(command,uinfile); // add the input file name to the command line
|
||||
strcat(command," -o "); // add the output switch to the command line
|
||||
strcat(command,outfile); // Add the output file name to the command line
|
||||
|
||||
cout << "\n\n The skindle program is called here.\n";
|
||||
cout << " Any errors reported between here and \"The command line used was:\"\n";
|
||||
cout << " Are errors from the skindle program. Not EZskindle4PC.\n\n";
|
||||
|
||||
|
||||
system(command); // call skindle program to convert the book
|
||||
|
||||
|
||||
cout << "\n\n The command line used was:\n\n";
|
||||
cout << " " << command << "\n";
|
||||
cout << "\n\n\n Please note the output file is created from the input";
|
||||
cout << "\n file name. The file extension is changed to tpz for Topaz";
|
||||
cout << "\n files and to azw for non-Topaz files. Also, _EBOK is removed ";
|
||||
cout << "\n from the file name. This is to make it eaiser to identify ";
|
||||
cout << "\n the file with no DRM.";
|
||||
|
||||
|
||||
|
||||
system("PAUSE");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,44 @@
|
||||
LZskindle4PCv1_1 The Lazy skindle program for those who are typing impared
|
||||
|
||||
To setup:
|
||||
|
||||
1. Create a new folder: example C:\skindle
|
||||
|
||||
2. Place LZskindle4PCv1_1.exe and skindle.exe in this folder.
|
||||
|
||||
3. Create 2 subfolders: C:\skindle\input
|
||||
and C:\skindle\output
|
||||
|
||||
|
||||
To run:
|
||||
|
||||
1. Copy the book(s) you wish to remove DRM from into the input directory
|
||||
(leave the originals in my kindle folder).
|
||||
|
||||
2. Double click on LZskindle4PCv1_0.exe
|
||||
|
||||
3. A DOS window will open and will show skindle being called for
|
||||
each book in the input directory.
|
||||
|
||||
4. The books with the DRM removed will now be in the output directory.
|
||||
|
||||
Rev1_1
|
||||
|
||||
fixed program to allow any file extension. My testing indicates that
|
||||
skindle does not care what file extension a file has. If it is a file type
|
||||
that it can convert it will. If the file is not compatible it will close
|
||||
and give an unknown file type message.
|
||||
|
||||
Rev1_0
|
||||
|
||||
If the program is run with no files in the input directory you will get a
|
||||
<EFBFBD>File not Found<6E> error and the program will terminate.
|
||||
|
||||
PLEASE USE ONLY FOR YOUR PERSONAL USE <20> ON BOOKS YOU PAID FOR!!
|
||||
|
||||
This program is provided to allow you to archive your library in a format that
|
||||
will outlast the kindle. Technology moves on and you should not have to reinvest
|
||||
in an entire new library when the Kindle is obsolete. Please do not use this program
|
||||
for piracy.
|
||||
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
//#include <conio.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Variable Declarations ??
|
||||
char buffer[80];
|
||||
int error = 0;
|
||||
// int YesNo = 0;
|
||||
// int exit = 0;
|
||||
// Variables EZskindle4PC
|
||||
int TopazTrue = 0;
|
||||
int strlength = 0;
|
||||
char uinfile[80];
|
||||
char outfile[80];
|
||||
char command[80];
|
||||
char buffer2[20];
|
||||
char tempfile[80];
|
||||
|
||||
// Initialize strings
|
||||
strcpy(uinfile,"");
|
||||
strcpy(outfile,"");
|
||||
strcpy(buffer,"");
|
||||
strcpy(buffer2,"");
|
||||
strcpy(command,"skindle "); // string preloaded with "skindle "
|
||||
|
||||
|
||||
//// Beginning of program code ////////////////////////////////////////////////////////////
|
||||
|
||||
system("dir /b .\\input\\*.* > books.txt"); // Create txt file with list of books
|
||||
// No testing of file type being done
|
||||
// I am letting skindle determing if valid
|
||||
// file type
|
||||
// Read in the list of book file names
|
||||
|
||||
ifstream infile("books.txt");
|
||||
|
||||
do // while not end of file
|
||||
{
|
||||
infile.getline(buffer,50); // load the first 50 characters of the line to buffer
|
||||
|
||||
|
||||
if(strcmp(buffer, "")!= 0) // If there is file name in the buffer do this on last loop buffer will be empty
|
||||
{
|
||||
strcpy(uinfile,buffer); // load file name from buffer
|
||||
|
||||
strcpy(tempfile,".\\input\\"); // load directory name for input files
|
||||
strcat(tempfile,buffer); // load the file name
|
||||
ifstream infile2(tempfile); // open the book file for reading
|
||||
infile2.getline(buffer2,4); // load first 4 char from file
|
||||
|
||||
infile2.close(); // close the book file
|
||||
|
||||
|
||||
if (strncmp (buffer2,"TPZ",3)==0) // open file and test first 3 char if TPZ then book is topaz
|
||||
{
|
||||
TopazTrue = 1; // This is a Topaz file
|
||||
}
|
||||
|
||||
|
||||
strlength = strlen(uinfile);
|
||||
|
||||
if(strlength > 13)
|
||||
{
|
||||
strncat(outfile,uinfile,10); // Create output file name using first 10 char of input file name
|
||||
}
|
||||
else
|
||||
{
|
||||
strncat(outfile,uinfile, (strlength - 4)); // If file name is less than 10 characters
|
||||
}
|
||||
if(TopazTrue == 1) // This is Topaz Book
|
||||
{
|
||||
strcat(command,"-d "); // Add the topaz switch to the command line
|
||||
|
||||
strcat(outfile,".tpz"); // give tpz file extension to topaz output file
|
||||
} // end of TopazTrue
|
||||
else
|
||||
{
|
||||
strcat(outfile,".azw");
|
||||
} // if not Topaz make it azw
|
||||
|
||||
strcat(command,"-i "); // Add the input switch to the command line
|
||||
strcat(command,".\\input\\"); // Add the input directory to the command line
|
||||
strcat(command,uinfile); // add the input file name to the command line
|
||||
strcat(command," -o "); // add the output switch to the command line
|
||||
strcat(command,".\\output\\"); // Add directory for out files
|
||||
strcat(command,outfile); // Add the output file name to the command line
|
||||
|
||||
cout << "\n\n The skindle program is called here.\n";
|
||||
cout << " Any errors reported between here and \"The command line used was:\"\n";
|
||||
cout << " Are errors from the skindle program. Not EZskindle4PC.\n\n";
|
||||
|
||||
|
||||
system(command); // call skindle program to convert the book
|
||||
|
||||
|
||||
cout << "\n\n The command line used was:\n\n";
|
||||
cout << " " << command << "\n\n\n\n";
|
||||
|
||||
|
||||
}// end of file name in the buffer required to prevent execution on EOF
|
||||
|
||||
|
||||
|
||||
strcpy(command,"skindle "); // reset strings and variables for next book
|
||||
strcpy(outfile,"");
|
||||
strcpy(uinfile,"");
|
||||
strcpy(buffer,"");
|
||||
strcpy(buffer2,"");
|
||||
TopazTrue = 0;
|
||||
strlength = 0;
|
||||
|
||||
}while (! infile.eof() ); // no more books in the file
|
||||
|
||||
infile.close(); // close books.txt
|
||||
|
||||
|
||||
// cout << "\n\n\n Do you want to delete all of the books from the input directory?\n\n";
|
||||
// cout << " DO NOT DELETE IF THESE ARE ONLY COPY OF YOUR BOOKS!!!!\n\n";
|
||||
// cout << " Y or N: ";
|
||||
|
||||
|
||||
// do { // while not yes or no
|
||||
// YesNo = getch(); // This is a DOS/Windows console command not standard C may not be
|
||||
// // Usable under Unix or Mac implementations
|
||||
//
|
||||
// if((YesNo == 121)||(YesNo == 89)) // y or Y is true
|
||||
// {
|
||||
// exit = 1; // valid input exit do while loop
|
||||
// cout << "\n\n";
|
||||
// system("del .\\input\\*.*"); // delete everything in the input directory
|
||||
// cout << "\n\n";
|
||||
// }
|
||||
// if((YesNo == 110)||(YesNo == 78)) // n or N is true
|
||||
// {
|
||||
// exit = 1; // valid input exit do while loop
|
||||
// }
|
||||
//
|
||||
// }while (exit != 1);
|
||||
// cout << "\n\nYesNo = " << YesNo << "\n\n";
|
||||
|
||||
system("PAUSE");
|
||||
|
||||
system("del books.txt"); // Delete txt file with list of books
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Binary file not shown.
27
Kindle_4_PC_Tools/Other_Tools/LZskindle4PCv1_1/ReadMe.txt
Normal file
27
Kindle_4_PC_Tools/Other_Tools/LZskindle4PCv1_1/ReadMe.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
Ezskindle4PC.exe
|
||||
|
||||
This executable program makes using skindle easier for people using Windows PC<50>s.
|
||||
|
||||
I do not know if it will work under any other operating system, however, I have included
|
||||
the source code should anyone want to port it into other operating systems.
|
||||
|
||||
To use this program:
|
||||
|
||||
1. Copy the ezskindle4PC.exe into the same directory with the skindle files.
|
||||
2. Copy the kindle book into the same directory.
|
||||
3. double click the EZskindle4PCv1_0.exe file.
|
||||
a. A DOS window will open and you will be asked for the name of the file you want to work with.
|
||||
4. Type in the book<6F>s file name. (it will look something like B000WCTBTA_EBOK.prc)
|
||||
5. The program will then check if it is a Topaz file and then create the output file name using the
|
||||
first part of the input file name. It will use <20>tpz<70> file extension for Topaz books and will use <20>azw<7A>
|
||||
for non topaz books. The files with the <20>azw<7A> format can be converted to other ebook formats using
|
||||
Calibre. If you want to convert Topaz books to other formats you need to use Topaz tools not skindle.
|
||||
6. The program will then create a command line and call the skindle program to process the book and
|
||||
remove the DRM.
|
||||
7. The program will pause and allow you to see the result of the skindle process.
|
||||
8. Press any key to close the program.
|
||||
|
||||
version 1.1
|
||||
Ok
|
||||
|
||||
Found a new 32 bit compiler and I think I have worked out the kinks.
|
||||
Reference in New Issue
Block a user