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

automatic export of pdf using cron - partial solution - featurerequest #116

Closed
ibschreiber opened this issue Jun 5, 2018 · 3 comments
Closed

Comments

@ibschreiber
Copy link

Hi,
to achieve a weekly export of a PDF using CRON, I did the following things:

  1. Logged in with browser using the "keep me logged in" function and a special user for this purpose
  2. Exported the cookie to cookies.txt
  3. Downloaded the Ebook, viewed the raw data of the request (body) and saved it to a file
  4. used curl curl --cookie cookies.txt --data-binary @params.txt "http://dwserver.my.domain/doku.php?id=wiki:ebook&do=export_pdfbook" >test.pdf

Well, this worked, but:
as soon as the book changes (added pages, page order, etc.), I have to do it again.
The functions are all there to make it working: I'd like to have a parameter called useSavedSelection which allows to export a pdf using the name of a saved selection. This would mean:
curl --cookie cookies.txt "http://dwserver.my.domain/doku.php?id=wiki:ebook&do=export_pdfbook&useSavedSelection=mysavedbook" > test.pdf

And: One last thing: If there was an API-TOKEN like "ASWXAWERNTDSRTGSXENSEXGRSRZNMDRTGXT" we even could skip the user login:
curl "http://dwserver.my.domain/doku.php?id=wiki:ebook&do=export_pdfbook&useSavedSelection=mysavedbook&AUTHTOKEN=ASWXAWERNTDSRTGSXENSEXGRSRZNMDRTGXT" > test.pdf

But maybe I'm missing something and it is already possible in a much easier way?

Ideas? Suggestions?
Kind Regards,
Michael

@Klap-in
Copy link
Owner

Klap-in commented Jan 17, 2021

The token thing is difficult. Better to have there a general mechanism. For example, this issue could result in such a mechanism: dokuwiki/dokuwiki#2431

Exporting saved selections is also suggested in: #97

@ibschreiber
Copy link
Author

Hi,
This general approach would be perfect!
Michael

@Klap-in
Copy link
Owner

Klap-in commented Jul 15, 2023

Exporting save selections is already implemented, see #97. Implementing tokens for access is out of scope for this plugin.

@Klap-in Klap-in closed this as completed Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants