Could we have an Export tab on the node edit page which gives the option to export that node as a flat html page and using the pathauto generated alias as the name of the page.

CommentFileSizeAuthor
#7 html_export.patch3.63 KBcoderintherye
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

btopro’s picture

Status: Active » Postponed
jinside’s picture

I think this issue touches on a few things..

1. Where would the exported file go? It would be nice to define the directory so the file can be integrated with an existing group of files.
2. Could this be integrated with revision moderation so you can post a specific revision?
3. Could export based on revision moderation tags. (Example all revisions tagged with production)
4. Many more

I know we should not replace version control systems.. but its awfully tempting to have their features. :)

btopro’s picture

I agree with not replacing the vcs. Some potential thoughts on handling issues:
1. Future development with selecting the directory to send things out to would be clutch. It would also be cool (I think) to be able to download the file as an option. Typically though when I think of exporting a single page I just hit the save button in my browser and it does this stuff client side.
2. I'd fully support an integration of that kind.
3. Seems the same as 2, definitely.
4. More issues - Instead of a tab on the node I think it would be sweet to have it integrated into something like the administration menu module where it's an option to export whatever's on screen. This could be useful for mocking up pages within the system as to usability improvements that could be done to make them more usable. Such as... You have some view of content and want to show a new jquery based way of displaying / making it easier to manage because of the size. You export that admin page with the view and then throw some jquery into it offline, post it on a server and link people over to it so that they can see exactly what the usability improvements could be.

again, seeking co-maintainers.

coderintherye’s picture

Btopro,

I'm willing to become a co-maintainer, sent you a message. This one might be the first one I would tackle.

Cheers.

btopro’s picture

You need a CVS account and I need your CVS name and I can get you access to comaintain

coderintherye’s picture

Assigned: Unassigned » coderintherye

I will work on this Friday or Saturday.

coderintherye’s picture

Version: 5.x-1.0-beta1 » 5.x-1.0
Status: Postponed » Patch (to be ported)
FileSize
3.63 KB
coderintherye’s picture

That's sad I wrote a long list of what I changed among other things but I guess it didn't get posted along with the patch.

Anyways, please try applying the patch, if you need help with that, see here: http://drupal.org/node/60108

Also, make sure you are updated first to the latest 5.x-1.0

If this patch works I will also port to 6.x. Please let me know if this meets the features you want.

iceaxe’s picture

i put "html_export.patch"file in my drupal root.

then i launch Command Prompt and point to my drupal root.
when i key patch -p0 < html_export.patch

i got this error msg
'patch' is not recognized as an internal or external command, operable program or batch file.

could someone please direct?? I'm running on Vista with Wamp.
thanks

coderintherye’s picture

iceaxe,

this http://drupal.org/node/60179 will tell you what you can use to apply patches on Windows. One way or another you will probably have to download a piece of software. I use Cygwin or TortoiseSVN for patching on Windows.

Thank for checking out the patch.

iceaxe’s picture

i tried using TortoiseSVN to apply the patch, direct it to my drupal-5.17 folder.
after that i got this error msg

"C:\wamp\www\drupal-5.17" is not a working copy

can you help me??

btopro’s picture

...anarch; you have CVS access to apply this to a release right? (pending review of course)

coderintherye’s picture

Yep! Just waiting for a good review, although if I get some time I am also going to look at "Import HTML" to see how they break up imports of large sites, to see if there is anyway we can get around the limitation of php timeout.

One possibility is we could have a hook_cron which automatically exports out the core files (since theoretically these won't be touched) and then we would only need to export the files in the sites folder.

Also, I would like to begin working on other issues, but fairly soon I am going to be working IT support on a ship which will have no internet access, so I will be out of touch for 2 months. After that though I will work on other issues.

coderintherye’s picture

Status: Patch (to be ported) » Needs review

Changing to patch needs review.

coderintherye’s picture

Well, I am back, but haven't had any review on this code. I'm probably going to try to make it better though as I think I have found some workarounds on the timeout issue. Hopefully, someone will offer up some review on this at some point.

btopro’s picture

Version: 5.x-1.0 » 6.x-2.0-alpha1
Status: Needs review » Needs work

currently there is an admin page for establishing settings of html_export but no link to the page. If you go to /html_export there is the selection form. Also if inside a spaces_og enhanced organic group then {purlpath}/html_export works.

coderintherye’s picture

Should I re-roll something for this?

btopro’s picture

Ahh sorry, misunderstood the original concept behind the patch (been awhile since I've worked on this project so I apologize). Yes please reroll and I'll add this functionality in. It would be nice to have this as an option on the admin/settings/html_export page. That way we could have the access callback route to a function which checks to make sure the user has permission to export to HTML as well as if the setting is activated globally. This would also play nicely with the OG extension module because then that module could perform a form and menu alter against the forms provided in this patch to have options only to show on organic groups pages.

btopro’s picture

checkout latest git repo. latest commits will make this easier to integrate

btopro’s picture

alpha2 will be live shortly and should be pretty easy to reuse functions instead of this being a larger patch

coderintherye’s picture

Sounds good I'll take a look at alpha2 and checkout the git code.