Need help with simple Python project
- or -
Post a project like this2222
$15
- Posted:
- Proposals: 1
- Remote
- #1937177
- Awarded
Description
Experience Level: Entry
Estimated project duration: 1 day or less
I have a project I'm working on using a .txt file of the novel Dracula. I have to:
1. Parse through the document to find the individual chapters
2. Write those chapters out as separate files
3. Each chapter should start with "CHAPTER ..." and then the text from that chapter.
4. Chapter file names should be in the format of Dracula-Chapter-#.txt, such as Dracula-Chapter-1.txt, Dracula-Chapter-2.txt, etc. Roman numerals should not be converted, instead using a counter to number the chapters.
5. Finally, I have to find a way to detect chapter titles from the beginning of the file and use them in file names. Note: punctuation should be removed and spaces should be replaced by underscores, so the end result chapter file names should look like:
Dracula-Chapter-1-Jonathan_Harkers_Journal.txt
Dracula-Chapter-2-Jonathan_Harkers_Journal.txt
Dracula-Chapter-3-Jonathan_Harkers_Journal.txt
Dracula-Chapter-4-Jonathan_Harkers_Journal.txt
Dracula-Chapter-5-LettersLucy_and_Mina.txt
Etc…
Note: this short program should not utilize functions, regex, or other more "advanced" methods. The code should mainly consist of for loops, string methods, and, if necessary, if/else decision structures.
Attached is the text document in question.
I estimate this project would take a decent Python programmer less than 20 minutes, so my budget reflects that estimate. Thanks for your time!
1. Parse through the document to find the individual chapters
2. Write those chapters out as separate files
3. Each chapter should start with "CHAPTER ..." and then the text from that chapter.
4. Chapter file names should be in the format of Dracula-Chapter-#.txt, such as Dracula-Chapter-1.txt, Dracula-Chapter-2.txt, etc. Roman numerals should not be converted, instead using a counter to number the chapters.
5. Finally, I have to find a way to detect chapter titles from the beginning of the file and use them in file names. Note: punctuation should be removed and spaces should be replaced by underscores, so the end result chapter file names should look like:
Dracula-Chapter-1-Jonathan_Harkers_Journal.txt
Dracula-Chapter-2-Jonathan_Harkers_Journal.txt
Dracula-Chapter-3-Jonathan_Harkers_Journal.txt
Dracula-Chapter-4-Jonathan_Harkers_Journal.txt
Dracula-Chapter-5-LettersLucy_and_Mina.txt
Etc…
Note: this short program should not utilize functions, regex, or other more "advanced" methods. The code should mainly consist of for loops, string methods, and, if necessary, if/else decision structures.
Attached is the text document in question.
I estimate this project would take a decent Python programmer less than 20 minutes, so my budget reflects that estimate. Thanks for your time!
Taylor S.
100% (1)Projects Completed
1
Freelancers worked with
1
Projects awarded
100%
Last project
16 Mar 2018
United States
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies