|
Gainer
Syzurp



Registered: 10/20/04
Posts: 1,468
Loc: Ðirty §outh
Last seen: 8 days, 1 hour
|
Read your ebooks on your iPod
#7802614 - 12/27/07 12:44 AM (16 years, 1 month ago) |
|
|
Log in to view attachment
Ever wanted to read books on your ipod, but irritated the notes viewer on your ipod can only handle 4kb size files? Well I wrote a program to split large text files into smaller files. There is at least one web script that I know of that will do this for you but I thought it would be more convenient to have a program on your computer that would do this.
To convert your ebook just copy your .pdf file into a .txt file and move it into the folder where you have the program run the program type in the name of the .txt file and your off. After the program splits the file up just copy them over into the notes folder of your ipod now you can read your ebooks anywhere.
Here's the source code if anyone is interested. Its a pretty simple file I/O program basically. Code:
//iBook.cpp //A program to split up a large .txt file into smaller ones for ipod notes.
#include <cstdlib> #include <iostream> #include <string> #include <cstring> #include <fstream> #include <stdio.h> #include <ctype.h> #include <sstream>
using namespace std;
int main(int argc, char *argv[]) { ifstream book; char fName[45]; cout << "Enter name of book you want to convert for iPod use: "; cin >> fName; book.open(fName); if(book.fail()){ cout << "Error file missing." << endl; system("PAUSE"); return EXIT_SUCCESS; } int j = 1; ofstream outFile; char temp[245]; char bookName[45]; char line[500]; string temp3; ostringstream oss; strncpy(bookName, fName, (strlen(fName) - 4)); strcat(bookName, "_iBook"); while(!book.eof()){ oss.str(""); oss << j; temp3 = bookName + oss.str() + ".txt"; outFile.open(temp3.c_str()); for(int i =0; i < 54; i++){ book.getline(line, 500); outFile << line << endl; } cout << "Chapter " << j << "created." << endl; j++; outFile.close(); } system("PAUSE"); return EXIT_SUCCESS; }
-------------------- "I mean, it's like a koala bear crapped a rainbow in my brain!" -Captain Murphy "Quit being a bitch and pill me up" -Dr. Quinn "Smoke that bitch" "I am not Stormy, I am He who smokes Bitches!" -Stormy
Edited by Gainer (08/22/17 12:13 PM)
|
flavoraid
now with twicethe ketamine andopiates!


Registered: 12/05/07
Posts: 1,678
|
Re: Read your ebooks on your iPod [Re: Gainer]
#7802623 - 12/27/07 12:48 AM (16 years, 1 month ago) |
|
|
neat
if only ipod screens were bigger than 2.5" or w.e they are
-------------------- coda said: imachavel, Man you really need to do some reading, the amount of bullshit you put into almost every single one of your posts is absolutely astounding.
|
Gainer
Syzurp



Registered: 10/20/04
Posts: 1,468
Loc: Ðirty §outh
Last seen: 8 days, 1 hour
|
Re: Read your ebooks on your iPod [Re: flavoraid]
#7802632 - 12/27/07 12:53 AM (16 years, 1 month ago) |
|
|
Its not too bad I been reading I am Legend on my ipod I've gotten to chapter 6 so far no excessive eye strain. By the way book way better and completely different than the movie.
-------------------- "I mean, it's like a koala bear crapped a rainbow in my brain!" -Captain Murphy "Quit being a bitch and pill me up" -Dr. Quinn "Smoke that bitch" "I am not Stormy, I am He who smokes Bitches!" -Stormy
|
Buzzwell420
Stranger

Registered: 12/20/07
Posts: 98
Last seen: 16 years, 1 month
|
Re: Read your ebooks on your iPod [Re: Gainer]
#7802746 - 12/27/07 02:18 AM (16 years, 1 month ago) |
|
|
hey wtf does that all mean. or should i just stick to books?
-------------------- you get out of life, what you pay attention to.
|
ravin0fff
Stranger

Registered: 10/17/07
Posts: 228
Last seen: 15 years, 8 months
|
Re: Read your ebooks on your iPod [Re: Buzzwell420]
#7806140 - 12/27/07 11:43 PM (16 years, 1 month ago) |
|
|
will i need this even if i have an ipod touch?
i'm asking because i haven't received it yet, and reading books was the main reason i went with the touch...
|
Gainer
Syzurp



Registered: 10/20/04
Posts: 1,468
Loc: Ðirty §outh
Last seen: 8 days, 1 hour
|
Re: Read your ebooks on your iPod [Re: ravin0fff]
#7806207 - 12/28/07 12:08 AM (16 years, 1 month ago) |
|
|
From what I read so far the iPod touch doesn't have the notes app but it does have safari and you shouldn't have any problems reading a .txt file in safari. Safari does have a size limit of 100mb which shouldn't be a problem with any books and I read somewhere that they bumped that limit up to a 1 gb after complaints. I'm not sure how reading .txt files in safari will work, but in theory it should work.
-------------------- "I mean, it's like a koala bear crapped a rainbow in my brain!" -Captain Murphy "Quit being a bitch and pill me up" -Dr. Quinn "Smoke that bitch" "I am not Stormy, I am He who smokes Bitches!" -Stormy
|
|