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

One-Click Quick Create Project and Export #102

Closed
mnelson4 opened this issue Aug 30, 2018 · 5 comments
Closed

One-Click Quick Create Project and Export #102

mnelson4 opened this issue Aug 30, 2018 · 5 comments

Comments

@mnelson4
Copy link
Contributor

mnelson4 commented Aug 30, 2018

Short story: I'd like to have a one-click option to dynamically create a project, add all the site's blog posts to it, order them by date published, then export to a PDF. I'm thinking that, at least initially, this would probably best start as a separate plugin that piggy-backs on Anthologize, but it could later be merged into the main plugin.

I'm creating an issue here to see if there's any suggestions on how to do this.

Background: there seem to be quite a few low-tech bloggers interested in printing off their entire blogroll as a means of preserving it (eg see https://www.retirementreflections.com/how-will-you-preserve-your-blog/). They're wanting it as a physical backup which they can store in an attic or vault somewhere, and people can still read it in 50 years, by which time their WordPress website may have been taken down and it may even be hard to read a database backup. They're mostly just interested in a simple one-click solution. At least initially, they're probably not interested in too many options. (And if they do become interested in customizing it, etc, that's when they should use the regular project manager and exporter.)

@boonebgorges
Copy link
Collaborator

Thanks for your patience as I got around to giving this ticket some thought :)

Anthologize may be overkill for what you want to do here. Anthologize puts a bunch of infrastructure between WordPress and TCPDF (in addition to other export formats, but you're just interested in PDF). From a technical point of view, the easiest thing is probably to use TCPDF directly. You can crib a lot of the process from https://github.com/chnm/anthologize/blob/master/templates/pdf/class-pdf-anthologizer.php.

If you want to build on top of Anthologize so that you can gradually add features in the future, the best way is probably to generate an 'anth_project' programatically, then add 'anth_part' and 'anth_library_item' items as needed, and send the whole thing to the PDF exporter. See https://github.com/chnm/anthologize/blob/master/templates/pdf/base.php;

@mnelson4
Copy link
Contributor Author

Thanks for your patience as I got around to giving this ticket some thought :)

No worries, I realize I can't expect overnight turnaround for free!

I bet some folks will want other export formats than PDF, so it would be nice to piggy back on Anthologize for that.

I think I'll try creating an anth_project etc. I'll update this ticket with a link to the repo once I have one 🙂

@mnelson4
Copy link
Contributor Author

mnelson4 commented Oct 30, 2018

FYI so far, I ended up taking your advice that Anthologize might be overkill, and I’ve ended up making a separate plugin: https://github.com/mnelson4/printmyblog
It just sends the admin to a front end page, shows a “preparing blog for printing...” message, uses the rest api to load all the blog’s posts in the background, and then provides a button to print the page (uses some print css so the print button isn’t in the printed page).
I realized that, for my use-case, even PDF wasn’t necessary! I just want to facilitate exporting a digital blog to a physical copy (print). So, I think my scope is much narrower than Anthologize’s.
If anyone ever uses the plugin. and they start asking for all the same features as Anthologize, my plan is to just refer them here.
I blogged some initial plans about it here: https://cmljnelson.wordpress.com/2018/10/09/how-to-print-your-blog
So I think that will satisfy my need, so, for now, closing this issue.
Thanks for the tips @boonebgorges!

@boonebgorges
Copy link
Collaborator

Awesome, this is a nice clean implementation! Thanks for sharing your work back - I may leverage what you've built in future projects, as one-click printability is something that lots of clients ask for.

@mnelson4
Copy link
Contributor Author

🤩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants