Removed Old CMS Files
This commit is contained in:
parent
5fc1f68119
commit
f8b2c5bd92
3 changed files with 7 additions and 47 deletions
10
.gitignore
vendored
10
.gitignore
vendored
|
@ -1,3 +1,7 @@
|
|||
chapters
|
||||
tmp
|
||||
*.epub
|
||||
# Local files
|
||||
# **/.*
|
||||
# **/_*
|
||||
# **/_assets
|
||||
*.code-workspace
|
||||
.DS_Store
|
||||
.cache
|
38
build_epub
38
build_epub
|
@ -1,38 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'pathname'
|
||||
|
||||
chapters = %w(
|
||||
Races
|
||||
Classes
|
||||
Characterizations
|
||||
Gameplay
|
||||
Equipment
|
||||
Gamemastering
|
||||
Spells\ (Alt)
|
||||
Treasure\ (Alt)
|
||||
Monsters\ (Alt)
|
||||
)
|
||||
|
||||
# chapter = h1
|
||||
# file = h2
|
||||
|
||||
`rm chapters/*.md`
|
||||
|
||||
chapters.each_with_index do |chapter, i|
|
||||
s = "# #{chapter.split.first}\n\n" +
|
||||
Pathname(chapter).children.sort.map do |f|
|
||||
data = f.read
|
||||
data[/^#+ /] = '' # remove initial heading (it will be re-added as h2)
|
||||
hs = data.scan(/^#+ /).sort.uniq.map {|hdg| hdg.size - 1 }
|
||||
(hs.length - 1).downto(0) do |h|
|
||||
data.gsub! /^\#{#{hs[h]}}/, '#' * (h + 3)
|
||||
end
|
||||
"\n\n## " + data
|
||||
end.join
|
||||
File.write "chapters/#{i+1}_#{chapter.split.first}.md", s
|
||||
end
|
||||
|
||||
pandoc_cmd = "pandoc -o Dungeons_and_Dragons_SRD_5.1.epub title.txt chapters/*"
|
||||
puts pandoc_cmd
|
||||
system pandoc_cmd
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: Dungeons and Dragons SRD 5.1
|
||||
author: Wizards of the Coast
|
||||
rights: CC-BY-4.0
|
||||
language: en-US
|
||||
---
|
Loading…
Add table
Reference in a new issue