Skip to content

add more published doc formats (pdf, epub) #1029

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

Closed
c33s opened this issue Jan 25, 2012 · 91 comments
Closed

add more published doc formats (pdf, epub) #1029

c33s opened this issue Jan 25, 2012 · 91 comments
Labels

Comments

@c33s
Copy link
Contributor

c33s commented Jan 25, 2012

The documentation strategy (instead of a large book, the Symfony2 documentation is split into small chapters about specific topics);
Fabien Potencier
http://symfony.com/blog/symfony2-documentation

i think, it would be very important to also create and provide the symfony2 docs in "book" form -> pdf / epub.

why?

  • no, we don't have a internet connection everywhere
  • ebook reader doesn't handle rst
  • for people who want to print it out
  • ...

of course the format of the symfony docs opens all doors to do it myself (http://symfony.com/doc/2.0/contributing/documentation/format.html),
i only need Sphinx and then i can create pdfs. wait, i have to install rst2pdf. easy

ImportError: No module named setuptools
http://www.happylife.sg/index.php/2010/04/25/importerror-no-module-named-setuptools/

and so on...

what i want to say is, that its not a 5 minute act to create a pdf and if i just want to learn a framework it doesn't mean i want to learn how to convert rst in pdf (or have the time to).

it would be a great thing, to add the conversion to pdf/epub to the docment website build/deploy process, so the problem is solved one time and the users of symfony can focus on symfony instead of building pdf files.

before anyone answer with "we don't need that", "it is ok how it is",... don't forget we are talking about digital/virtual stuff, so if i would ask to print a book in paperback insted of hardcover this would be a decision where only one way would be possible course you can if you look at the costs but in the virtual world we just can deploy both with nearly no overhead.
we don't need to choose between this or that way, we can take both ways at the same time.

to provide a one (all the docs) or three (book, cookbook, components) file(s) doc would really help to use it mobile.

please help the developers to keep focus on developing with php and symfony not sphinx and other stuff.

@c33s
Copy link
Contributor Author

c33s commented Feb 9, 2012

@franek
Copy link

franek commented Apr 7, 2012

+1

I am looking for the Symfony2 Documentation in epub format (to read it on my ebook reader). I have tried to convert the doc via Sphinx (cf. http://symfony.com/doc/current/contributing/documentation/format.html and http://tech.rgou.net/en/symfony/documentacao-symfony2-em-html-local-epub-e-quase-pdf/) but the epub that I have generated just contains the table of contents and the index, but not the content (bugs ? ).

@fabpot
Copy link
Member

fabpot commented Apr 13, 2012

Everything is now available as PDFs... next stop: epub format.

@hhamon
Copy link
Contributor

hhamon commented Apr 13, 2012

Yes, epub format would be great :)

@JohnAlbin
Copy link

Thanks for the PDF! It's handy to have portable docs.

But I'm eagerly waiting the epub version since the PDF is not bookmarkable, which makes it cumbersome when note taking.

I'm leaving on Friday for a Drupal sprint to re-do its theming layer for D8, so I've copied the PDF to my Kindle Fire (text size is a bit too small for the kindle since the Fire is small) and I'll be reviewing these docs on the plane. Maybe I'll have an epub version by then? :-D

@weaverryan
Copy link
Member

+1 the PDF's look great by the way, nice job @fabot :).

@Naewis
Copy link

Naewis commented Jun 20, 2012

Hi,

Thanks for PDF's, but it seems that the render is not really great for some eReaders.
I'm interested in the ePub format too. Still planned ?

@c33s
Copy link
Contributor Author

c33s commented Jun 21, 2012

thx for the pdf
conversion in calibre to epub doesn't work to well. +1 for an official epub

@PhilKershaw
Copy link

ePub format of the book/docs would be very helpful. Count this as my +1

@pefferen
Copy link

pefferen commented Sep 5, 2012

+1 for ePub here aswell. I run into the same problems as Franek

@mailopl
Copy link

mailopl commented Sep 5, 2012

Another +1 for ePub, PDF is practically not readable on e-ink readers. :(

@teranex
Copy link

teranex commented Sep 13, 2012

+1 for ePub (and Mobi for Kindle)

@pxlcore
Copy link

pxlcore commented Nov 9, 2012

+1 for ePub. Please.

@robsonpeixoto
Copy link

+1 for ePub (and Mobi for Kindle)

@amiroff
Copy link

amiroff commented Jan 10, 2013

+1 for epub from mee too!

@robsonpeixoto
Copy link

The twig export the epub format. Maybe is "only" use the same script

@c33s
Copy link
Contributor Author

c33s commented Feb 8, 2013

@gkatsanos on http://twig.sensiolabs.org/documentation you have already a epub download. so using the same "script" to generate the epub for the symfony doc maybe would be quite easy

@c33s
Copy link
Contributor Author

c33s commented Feb 8, 2013

@gkatsanos please read the whole ticket.
it's not about converting pdf to epub, the base format is rst see http://symfony.com/doc/2.0/contributing/documentation/format.html
with sphinx it is possible to convert the base format to pdf and/or epub (and more).
as i opened the ticket, there was no pdf option. meanwhile the pdf download option is there (thanks for that), but epub is still missing.

hope that helped.

@wogong
Copy link

wogong commented Mar 9, 2013

+1 for the epub version. People will appreciate it.

@wouterj
Copy link
Member

wouterj commented Mar 9, 2013

I think it is clear that we need the epub format and I don't think it is usefull to add more useless +1 comments in here.

Just a simple ping @fabpot and wait until he gets time to do this, it is a busy time around a new release, so please be patient...

@weierophinney
Copy link

We have been publishing epub versions for ZF2, but only recently discovered that for many ereaders, only the TOC was loading. I was able to make a small change in our Sphinx toolchain to convert from epub to epub via Calibre (http://calibre-ebook.com/), and now the epub's are usable on all devices tested. (Basically, Calibre takes apart the epub and applies a number of compatibility passes to it before regenerating.)

You can see the change here: zendframework/zf2-documentation@3e11925 (look in docs/Makefile).

@fabpuc
Copy link

fabpuc commented May 28, 2013

Another +1 for ePub

@mykiwi
Copy link
Contributor

mykiwi commented May 29, 2013

+1 for Mobi / ePub

@csvan
Copy link

csvan commented Jun 11, 2013

+1 for ePub or Mobi

@garak
Copy link
Contributor

garak commented Jun 21, 2013

+1 for epub 👍

@fgm
Copy link

fgm commented Jun 22, 2013

+1 for ePub. Maybe pandoc can help in this case ? I'm using it on other documents to build both PDF and ePub from the same source.

@lucasaba
Copy link
Contributor

+1 for epub 👍

@matiux
Copy link

matiux commented Jun 27, 2013

+1 for epub!!

@promethean
Copy link

+1 epub / mobi

@gziolo
Copy link

gziolo commented Jul 5, 2013

+1 mobi

@Einenlum
Copy link
Contributor

Einenlum commented Nov 1, 2015

👍 @16nsk

@typomedia
Copy link

@fabpot , where is the promised epub now?

@typomedia
Copy link

Ok, this site still seems to work with daily builds: http://symfonyepub.gibilogic.com

@zanardigit
Copy link

@typomedia in fact I just noticed it's broken since a few weeks. I will fix it now, so I will also remove EOL versions and add 2.8.

@weaverryan
Copy link
Member

Thanks @zanardigit - that's awesome. @javiereguiluz could we link to that site for people who want ePub? It's great a community member solved this, I think we can help tell people about it.

@zanardigit
Copy link

@weaverryan glad to help. Before linking to the site please wait a couple of days so that I will be able to fix (I have a Sphinx version issue due to Ubuntu repo not being up-to-date).

@javiereguiluz
Copy link
Member

@weaverryan @zanardigit I'm sorry for telling you this and I hope you understand it well: we cannot link to this alternative version from the official website. The reason is the same we applied when we decided to not link to external blog posts: the site can be down or hacked, the content can be hacked or change without our knowledge, the site can suddenly change to include contents, ads, etc. that don't comply with our policies, etc.

We can't control a third-party website, that's why we cannot link to it. I'm only talking about "content websites". Obviously we link to official project pages, GitHub repositories, etc.

@wouterj
Copy link
Member

wouterj commented Nov 6, 2015

@javiereguiluz so then, isn't it possible to publish epub formats on symfony.com? @zanardigit seems to have a generation script that works good, can't this be integrated into the site the same way as PDFs are integrated?

@javiereguiluz
Copy link
Member

@wouterj if @zanardigit kindly shares his script with me (javier.eguiluz @ sensiolabs.com) I can try to use it or adapt it for symfony.com server. I can't promise a solution, but I can guarantee that I'll try it.

@zanardigit
Copy link

@javiereguiluz as I already mentioned before in this same issue, that site was meant to be temporary and I'm totally ok with your proposal.

To make things easier for you, what if I publish the resulting epubs on a GitHub repo? You could just get them without having to setup the whole build script.

@javiereguiluz
Copy link
Member

@zanardigit thanks for understanding this decision. To be honest it would be better to have the script, so we can add some book covers to the books and to update their styles when needed. Thanks!

@Einenlum
Copy link
Contributor

Einenlum commented Nov 6, 2015

@wouterj & @javiereguiluz 👍 for having the script directly on the official website.

@gaetan-petit
Copy link

Finally 👍 make it happen @javiereguiluz !

@zanardigit
Copy link

@javiereguiluz the script is available at https://gist.github.com/zanardigit/84f0bd8f2948c57d6d2d. If you need any additional info, let me know.

P.S. the rules about the style and covers are not actually part of my script; they are in the Makefile of the documentation repo.

@ethernal
Copy link

@zanardigit I noticed that the site is missing 2.8/3.0 version of the docs, any way you could provide us the files.

I tried building the docs myself (I have no access to proper Linux machine at the moment sadly).

Also when I tried building the docs with Jinja 2.8 manually I'm getting lots of errors due to Sphinx PHP extensions. If I comment 'from string import upper' in bestpractices.py

 File "d:\dev\tools\python\3.5\lib\site-packages\jinja2\compiler.py", line 427, in fail raise TemplateAssertionError(msg, lineno, self.name, self.filename) jinja2.exceptions.TemplateAssertionError: no test named 'index'

if I then change (in layout.html in _templates dir of docs)

{% set isIndex = pagename is index %}

to
{% set isIndex = pagename %}

this error shows up

File "[...........]\python\3.5\lib\site-packages\jinja2\compiler.py", line 427, in fail raise TemplateAssertionError(msg, lineno, self.name, self.filename) jinja2.exceptions.TemplateAssertionError: no filter named 'get_type'

I have no knowledge of Python so I'm not confident about the changes I make but it seems that the extensions are not compatible with versions of software I'm using or at least I hope that's all.

Using Phyton 3.5.1
Jinja 2.8

@zanardigit
Copy link

@ethernal since @javiereguiluz asked me the script I just assumed he would go on publishing it on the Symonfy site, so I stopped managing my temporary site (and in fact I will remove it shortly). I think you should ask him about the progress of the task.

@kamilsk
Copy link

kamilsk commented Apr 26, 2016

still open :(

@weaverryan
Copy link
Member

I'll bring this up at our next docs meeting :). It's out of the hands of most of us contributors because the logic would live on symfony.com itself.

@mitas
Copy link

mitas commented Jan 12, 2017

👍 epub

@michaelperrin
Copy link
Contributor

@mitas I opened a PR for epub: #7347

@NetaLev
Copy link

NetaLev commented Apr 19, 2017

+epub

Maybe an updated epub to symfony3, please?

Thanks!

@kkarkus
Copy link

kkarkus commented Oct 17, 2017

+epub

1 similar comment
@sadok-f
Copy link

sadok-f commented Aug 7, 2018

+epub

@michaelperrin
Copy link
Contributor

michaelperrin commented Aug 7, 2018

@sadok-f Since #9972 was merged, I realize it is quite easy to generate an ePub file!
Here is one that I have just generated for the master branch of the docs: http://www.michaelperrin.fr/SymfonyFrameworkDocumentation.epub

If anyone would like to know how I generated the file, feel free to ask me!

@sadok-f
Copy link

sadok-f commented Aug 7, 2018

@michaelperrin Thank for the link!
(it's missing an l in the url [michael])

@michaelperrin
Copy link
Contributor

@sadok-f Thanks, fixed!

@pawel-slowik
Copy link

The builder docker container currently supports and successfully builds docs in the EPUB format with make -C _build epub. I have tested the output file on a rather old e-reader (a Nook from 2011) and it is nearly perfect, with some very minor CSS issues.

I guess publishing the EPUB on the website is now mostly a matter of CI and procedural arrangements. For example, what do you do if the HTML build succeeds, but the EPUB fails? This should't really happen as Sphinx is quite reliable, but still...

For anyone wanting to generate the EPUB on their own, here's a recipe:

  1. Build the documentation:

     docker build . -t symfony-docs
    
  2. Find the builder docker image. It's the one that was created right before the symfony-docs image and has no repository name. For example:

     docker images
    

Output:

    REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
    symfony-docs        latest              a898d4c9dc74        25 minutes ago      155MB
    <none>              <none>              f82c133b78fc        26 minutes ago      1.12GB
    nginx               latest              5a3221f0137b        6 days ago          126MB
    python              2-stretch           62f3f5e37c61        7 days ago          916MB
    hello-world         latest              fce289e99eb9        7 months ago        1.84kB

In the above example f82c133b78fc is the ID of the builder image.

  1. Reuse the builder image to create an EPUB file:

     mkdir /tmp/epub_output
     docker run -i -t -v /tmp/epub_output:/tmp/epub_output f82c133b78fc /bin/bash
    

Inside the container:

    make -C _build epub
    cp _build/epub/SymfonyFrameworkDocumentation.epub /tmp/epub_output
    exit

The EPUB file is now in /tmp/epub_output/SymfonyFrameworkDocumentation.epub .

@javiereguiluz
Copy link
Member

We have an important update about this issue.

During the past SymfonyCon Amsterdam 2019 conference, the Symfony Docs Team held a meeting to discuss about Symfony Docs and make some decisions.

One of the most important decisions that we made was to no longer support alternative formats such as PDF (and to not introduce new formats such as ePub). The main reason was that we don't have the resources to make this work as good as it should work. The second reason is that most of Symfony developers don't need that because they have a reliable Internet connection whenever they need to look for the Symfony Docs. A final reason is that given the huge activity of this repository, any downloaded PDF/ePub doc is "wrong" (contains bugs or it's incomplete) just a few hours after being downloaded (so you need to download it again continuously).

In addition to closing this issue, we're locking it. We rarely lock issues, but this kind of decisions usually lead to heated reactions, so we'd like to prevent that. If you want to freely express your opinion about this (including your strong disagreement, if that's what you think), please use Symfony's Slack: https://symfony.com/slack Thank you!

@symfony symfony locked as resolved and limited conversation to collaborators Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests