Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
zrg1993 committed Dec 23, 2015
0 parents commit 6904c99
Show file tree
Hide file tree
Showing 16 changed files with 9,703 additions and 0 deletions.
Empty file.
89 changes: 89 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Created by http://www.gitignore.io

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Rope
.ropeproject

# Django stuff:
*.log
*.pot

# Sphinx documentation
docs/_build/



### PyCharm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode

## Directory-based project format
.idea/
# if you remove the above rule, at least ignore user-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# and these sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml

## File-based project format
*.ipr
*.iws
*.iml

## Additional for IntelliJ
out/

# generated by mpeltonen/sbt-idea plugin
.idea_modules/

# generated by JIRA plugin
atlassian-ide-plugin.xml

# generated by Crashlytics plugin (for Android Studio and Intellij)
com_crashlytics_export_strings.xml

22 changes: 22 additions & 0 deletions 3-readingCsv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os

count = 0
total = 0
inFile = open('content.csv', 'r')
chapter = inFile.readline()
OUTPUT = os.path.join(os.path.dirname(os.path.realpath(__file__)),"OUT/")
while (chapter):
if chapter.startswith("chapter"):
print(chapter)
pagedir = OUTPUT+"chapter"+str(count+1)+"/"
os.makedirs(pagedir)
count = count+1

else:
filename = pagedir+chapter+".txt"
open(filename,'a')


chapter = inFile.readline()

print("Total chapters: " + str(count))
Loading

0 comments on commit 6904c99

Please sign in to comment.