Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nokigiri #2

Merged
merged 8 commits into from
Sep 4, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@

#### [Current]


#### v0.1.3
* [f970a4f](../../commit/f970a4f) table of contents support __(Ruben Espinosa)__
* [d440443](../../commit/d440443) Bump to 0.1.3 __(Ruben Espinosa)__
* [2a6eaca](../../commit/2a6eaca) Bump to 0.1.2 __(Ruben Espinosa)__
* [7b6af43](../../commit/7b6af43) changelog __(Ruben Espinosa)__
* [3408a4c](../../commit/3408a4c) Bump to 0.1.1 __(Ruben Espinosa)__
* [5b05208](../../commit/5b05208) delete serach and header __(Ruben Espinosa)__

#### v0.1.0
* [56a9f6a](../../commit/56a9f6a) changelog __(Ruben Espinosa)__
* [fe4b8e8](../../commit/fe4b8e8) readme updated __(Ruben Espinosa)__
* [508405c](../../commit/508405c) changelog __(Ruben Espinosa)__
* [dd02d98](../../commit/dd02d98) cleaning html, colorized output __(Ruben Espinosa)__
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ Now it looks cleanner :D

The pdf file is saved in your application root


## PDF Layout

All the pages include the number of the page, the format is page/total i.e (12/100)

Table of content
![Imgur](http://i.imgur.com/riQ0xqZ.png)

Class Documentation
![Imgur](http://i.imgur.com/dwU3TBD.png)

## Recomendations

* use annotate to comment your models and routes files, [please take a look](https://github.com/ctran/annotate_models)
Expand Down
2 changes: 1 addition & 1 deletion lib/doc_to_pdf/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module DocToPdf
VERSION = "0.1.0"
VERSION = "0.1.3"
end
6 changes: 4 additions & 2 deletions lib/tasks/doc_to_pdf.rake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def create(name, clean)
if files.empty?
puts "Documentation not found in doc/ folder, please create it with rake doc:app or rdoc".orange
else
`wkhtmltopdf -O Landscape #{files.join(" ")} #{name}.pdf`
`wkhtmltopdf -t --footer-center [page]/[topage] -O Landscape #{files.join(" ")} #{name}.pdf`
end

end
Expand All @@ -47,6 +47,8 @@ def clean_html(path)
doc.search("#classindex-section").try(:remove)
doc.search("#project-metadata").try(:remove)
doc.search("#home-metadata").try(:remove)
doc.search("#search-metadata").try(:remove)
doc.search("#search-section").try(:remove)
doc.search("#home-section").try(:remove)

File.open(path, "w"){|f| f.puts(doc)}
end