Skip to content

Support for .wpress archive — Wordpress Backup made with All-in-One WP Migration #919

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
porg opened this issue Oct 8, 2021 · 24 comments

Comments

@porg
Copy link

porg commented Oct 8, 2021

Foreword

Feature Request

Would be cool if Keka as my favorite Mac archiving app could:

  • Add decompression support
  • Add support to also decompress automatically if wrapped in another archive, i.e. backup.wpress.7z
    • Because the .wpress is
      • a) uncompressed,
      • b) has some null-character-padding,
      • c) maybe also additionaly metadata/revision info etc,
    • which in total makes it even significantly larger than the uncompressed folder! See here:

wPress Archive

@porg porg changed the title Support for .wpress archive (Wordpress Backup made with All-in-One WP Migration) Support for .wpress archive — Wordpress Backup made with All-in-One WP Migration Oct 8, 2021
@aonez
Copy link
Owner

aonez commented Oct 9, 2021

@porg are you abre to provide an example .wpress backup file?

@aonez aonez added this to the Look at milestone Oct 9, 2021
@porg
Copy link
Author

porg commented Oct 11, 2021

Yes, but I prefer to not post this publicly as it shows the whole Wordpress configuration.
Could you provide me a private email address or file upload form somewhere?

@aonez
Copy link
Owner

aonez commented Oct 11, 2021

Sure! info@keka.io

@porg
Copy link
Author

porg commented Oct 11, 2021

Sent a sample file to you via email.

@aonez
Copy link
Owner

aonez commented Oct 13, 2021

Missing the format icon yet, but here a build that supports wpress extraction: https://github.com/aonez/Keka/releases/download/dev-test-builds/Keka-v1.2.19-r4664.7z

  • Add support to also decompress automatically if wrapped in another archive

This one will eventually be implemented in #337, but no timeline for it.

@porg
Copy link
Author

porg commented Oct 13, 2021

Downloaded and tested

  • In Finder select a .wpress file and open its Info dialog (CMD-I)
    • ✅ Keka is listed as a capable handler application.
  • In Finder double click a .wpress file
    • ✅ Opens Keka and decompresses completely into a folder of the same name near the file as per my preference.
  • Drag .wpress file onto Keka's main action window, in the "Drop here to extract" zone.
    • ✅ Opens Keka and decompresses completely into a folder of the same name near the file as per my preference.

Feedback

Followup regarding the icon

  • There are ready graphic assets for consideration. We would need to check the copyright.
  • I could support you in this and communicate with ServMask, the makers of All-in-One WP Migration, whether they would grant you permission to include their artwork into Keka, and also to announce Keka as as .wpress capable app (if you would like to advertise that).
  • The readily available graphics I found would be

@aonez
Copy link
Owner

aonez commented Oct 13, 2021

The icon will be made using the current Keka style, plain icon with the extension on bottom. I could use that blue from the ServMask icon :)

By the way I was unable to use the time information in the .wpress. It's informed for every entry in a format I did not quickly recognized and all implementations I've seen (Traktor included) just ignore that information. Maybe you could let me know the modification date of "package.json" (in the server) so I can do some more tests knowing the actual data. Any other included file will do too, just "package.json" is the first one in the backup.

@porg
Copy link
Author

porg commented Oct 13, 2021

Icon is two-fold here

  • On the one side the icon you may use in-app
  • and on the other side what icon the Finder (and other integrations of icon via API such as in window titles) shows for a certain file type (Uniform Type Identifier).

Please help me clarify

  • AFAIR on macOS certain general public filetypes (i.e. RTF, JPG, MP4) get their Finder file type icons from the OS. And then apps themselves can provide icons for file-types in their manifest, which Finder then utilizes, if the app is set as the default or specific file handler.
  • At first glance Traktor.app does not look like a native macOS app, but rather as if an app-wrapper built by some cross platform app builder. With indications like i.e. in this my request Improvements for Mac regarding file opening + chooser servmask/Qtraktor#1
  • Ofc if would be better if Qtraktor as the official .wpress decompressing app would offer the proper manifest+icons, but I doubt this to happen quickly.
  • So if the author agrees, could you include Finder file-type icons and also the string how the Finder refers to this file type? So instead of generically being called "Keka Document" could it be shown as "Wordpress All-in-One Backup" ?

@porg
Copy link
Author

porg commented Oct 13, 2021

  1. Even better as the tinting-color of your Keka-file-icon-template is the only type specific hint we don't have to ask for copyright-permission at all. Yes the blue from ServMask should work. Its hue should be somewhere inbetween BZIP2 and ZSTD, hopefully still distinguishable enough.
  2. So this icon will be used both in-app (destination format chooser) and for its Finder file type representation then?
  • If so please name it "Wordpress All-in-One Backup" in the manifest.
  1. If we have compiled and tested another version, would you like me to communicate to ServMask?

@porg
Copy link
Author

porg commented Oct 13, 2021

Note package.json is NOT in the webserver root, but seems to be sort of an added manifest file of the archive itself.

But I offer an alternative for you: The file /readme.html has a mod-date of 2021-10-08 00:17 AM CEST which was the sandbox server creation time, so it has never changed since then. Hope that helps you to understand/verify the timestamp format in the .wpress archive.

@aonez
Copy link
Owner

aonez commented Oct 13, 2021

I'm not sure I get all of that. I'm only missing the icon in that build because the workflow I use for Keka icons is broken right now but wanted to share the build right away.

  • So instead of generically being called "Keka Document" could it be shown as "Wordpress All-in-One Backup" ?

Already did that in the build, you should see "WordPress Backup" in Finder's Kind column. Maybe you need to restart Finder if you see "Keka Document". Should I add "All-in-On" too?

Screen Shot 2021-10-13 at 19 30 12

2. So this icon will be used both in-app (destination format chooser) and for its Finder file type representation then?

It depends on the user configuration but quick answer is yes. By default .wpress is not a recognized format in macOS, so no icon. A third party application that recognizes it can set the icon, the one that Finder will display. The build I've shared already has all info needed for .wpress to be recognized and with Keka's assigned icon, but does not contain the actual icon file.


Traktor could include icons too, just needs to set the document type in the project plist. For example:

<dict>
	<key>CFBundleTypeExtensions</key>
	<array>
		<string>wpress</string>
	</array>
	<key>CFBundleTypeIconFile</key>
	<string>wpress</string>
	<key>CFBundleTypeName</key>
	<string>WordPress Backup</string>
</dict>

Other than that I've never used the Qt framework, so I'm not sure how or where they should set that information. The developers used it in Traktor so it is a cross platform application with UI.

@aonez
Copy link
Owner

aonez commented Oct 13, 2021

file /readme.html

That file does not exists in the provided sample. Those are:

Screen Shot 2021-10-13 at 19 44 20

@porg
Copy link
Author

porg commented Oct 13, 2021

  • Please call it "Wordpress All-in-One Backup" specifically as there are different Wordpress backup formats on the market.
  • Regarding /readme.html
    • Realized that some files are excluded from the AIO-backup which makes sense given its workflow which is:
    1. Install a fresh Wordpress.
    • There you get all the core files (readme.html among them)! No need to include them in the backup.
    1. Install the WP-AIO plugin
    2. Restore from your backup file.
    • So I provide more timestamps: /index.phpand /wp-content/index.php also have the mod-date 2021-10-08 00:17 AM CEST which corresponds to the sandbox creation time.
  • After force-restarting Finder.app "Type" is still shown as "Keka document". Will later tell you whether relogin or a macOS restart solves it.
  • For now, good news. Did a thorough diff, and besides the timestamp, your decompression creates exactly the same result as Traktor.app:
    Diff of Keka vs Traktor result

@aonez
Copy link
Owner

aonez commented Oct 13, 2021

Probably going with the grey/blue, since the blue from the logo is very similar to BZIP2 icon.

2

1

@porg
Copy link
Author

porg commented Oct 13, 2021

Proposal: If a gradient then better the blue on bottom (nice contrast with the white text) and fading out to gray to the top.

@aonez
Copy link
Owner

aonez commented Oct 13, 2021

The ones below are grey on plugin blue and ServMask logo's blue on blue.

This one is grey on WordPress blue:

Screen Shot 2021-10-13 at 21 20 12

@porg
Copy link
Author

porg commented Oct 13, 2021

Great, let's take this one.

@aonez
Copy link
Owner

aonez commented Oct 13, 2021

Last but not least, grey on ServMask blue 😂 Probably this will be the one

Screen Shot 2021-10-13 at 21 38 18

@porg
Copy link
Author

porg commented Oct 13, 2021

Yes, ok, take that one!

@porg
Copy link
Author

porg commented Oct 13, 2021

Finder File type name is generic instead of specific

❌ Persists also after a restart of macOS (11.6):

wpress File Type Long Name in Finder is generic instead of specific

Further investigation

This is what mdls says:

mdls archive.wpress
_kMDItemDisplayNameWithExtensions      = "archive.wpress"
kMDItemContentCreationDate             = 2021-10-13 11:02:23 +0000
kMDItemContentCreationDate_Ranking     = 2021-10-13 00:00:00 +0000
kMDItemContentModificationDate         = 2021-10-13 11:02:23 +0000
kMDItemContentModificationDate_Ranking = 2021-10-13 00:00:00 +0000
kMDItemContentType                     = "dyn.ah62d4rv4ge81s6dwqz31g"
kMDItemContentTypeTree                 = (
    "public.item",
    "dyn.ah62d4rv4ge81s6dwqz31g",
    "public.data"
)
kMDItemDateAdded                       = 2021-10-13 16:55:18 +0000
kMDItemDateAdded_Ranking               = 2021-10-13 00:00:00 +0000
kMDItemDisplayName                     = "archive.wpress"
kMDItemDocumentIdentifier              = 0
kMDItemFSContentChangeDate             = 2021-10-13 11:02:23 +0000
kMDItemFSCreationDate                  = 2021-10-13 11:02:23 +0000
kMDItemFSCreatorCode                   = ""
kMDItemFSFinderFlags                   = 0
kMDItemFSHasCustomIcon                 = (null)
kMDItemFSInvisible                     = 0
kMDItemFSIsExtensionHidden             = 0
kMDItemFSIsStationery                  = (null)
kMDItemFSLabel                         = 0
kMDItemFSName                          = "archive.wpress"
kMDItemFSNodeCount                     = (null)
kMDItemFSOwnerGroupID                  = 20
kMDItemFSOwnerUserID                   = 501
kMDItemFSSize                          = 105253355
kMDItemFSTypeCode                      = ""
kMDItemInterestingDate_Ranking         = 2021-10-13 00:00:00 +0000
kMDItemKind                            = "Document"
kMDItemLogicalSize                     = 105253355
kMDItemPhysicalSize                    = 105254912

@aonez aonez modified the milestones: Look at, 1.2.19 Oct 21, 2021
@aonez
Copy link
Owner

aonez commented Oct 25, 2021

@aonez
Copy link
Owner

aonez commented Oct 26, 2021

I do see:

aone@aONe-M1 Tests % mdls a.wpress                
_kMDItemDisplayNameWithExtensions      = "a.wpress"
kMDItemContentCreationDate             = 2021-10-08 15:23:15 +0000
kMDItemContentCreationDate_Ranking     = 2021-10-08 00:00:00 +0000
kMDItemContentModificationDate         = 2021-10-08 15:23:15 +0000
kMDItemContentModificationDate_Ranking = 2021-10-08 00:00:00 +0000
kMDItemContentType                     = "com.servmask.wpress-backup"
kMDItemContentTypeTree                 = (
    "com.servmask.wpress-backup",
    "public.data",
    "public.item",
    "public.archive"
)
kMDItemDateAdded                       = 2021-10-26 11:44:26 +0000
kMDItemDateAdded_Ranking               = 2021-10-26 00:00:00 +0000
kMDItemDisplayName                     = "a.wpress"
kMDItemDocumentIdentifier              = 8005
kMDItemFSContentChangeDate             = 2021-10-08 15:23:15 +0000
kMDItemFSCreationDate                  = 2021-10-08 15:23:15 +0000
kMDItemFSCreatorCode                   = ""
kMDItemFSFinderFlags                   = 0
kMDItemFSHasCustomIcon                 = (null)
kMDItemFSInvisible                     = 0
kMDItemFSIsExtensionHidden             = 0
kMDItemFSIsStationery                  = (null)
kMDItemFSLabel                         = 0
kMDItemFSName                          = "a.wpress"
kMDItemFSNodeCount                     = (null)
kMDItemFSOwnerGroupID                  = 20
kMDItemFSOwnerUserID                   = 501
kMDItemFSSize                          = 33358356
kMDItemFSTypeCode                      = ""
kMDItemInterestingDate_Ranking         = 2021-10-08 00:00:00 +0000
kMDItemKind                            = "WordPress All-in-One Backup"
kMDItemLogicalSize                     = 33358356
kMDItemPhysicalSize                    = 33361920
aone@aONe-M1 Tests % 

@porg
Copy link
Author

porg commented Oct 27, 2021

✅ With this your new build my archive.wpress filetype displays nicely in mdls and Finder's "Kind" info too:

mdls archive.wpress 
_kMDItemDisplayNameWithExtensions      = "archive.wpress"
kMDItemContentCreationDate             = 2021-10-14 22:27:19 +0000
kMDItemContentCreationDate_Ranking     = 2021-10-14 00:00:00 +0000
kMDItemContentModificationDate         = 2021-10-14 22:27:19 +0000
kMDItemContentModificationDate_Ranking = 2021-10-14 00:00:00 +0000
kMDItemContentType                     = "com.servmask.wpress-backup"
kMDItemContentTypeTree                 = (
    "com.servmask.wpress-backup",
    "public.data",
    "public.item",
    "public.archive"
)
kMDItemDateAdded                       = 2021-10-27 12:13:22 +0000
kMDItemDateAdded_Ranking               = 2021-10-27 00:00:00 +0000
kMDItemDisplayName                     = "archive.wpress"
kMDItemDocumentIdentifier              = 0
kMDItemFSContentChangeDate             = 2021-10-14 22:27:19 +0000
kMDItemFSCreationDate                  = 2021-10-14 22:27:19 +0000
kMDItemFSCreatorCode                   = ""
kMDItemFSFinderFlags                   = 0
kMDItemFSHasCustomIcon                 = (null)
kMDItemFSInvisible                     = 0
kMDItemFSIsExtensionHidden             = 0
kMDItemFSIsStationery                  = (null)
kMDItemFSLabel                         = 0
kMDItemFSName                          = "archive.wpress"
kMDItemFSNodeCount                     = (null)
kMDItemFSOwnerGroupID                  = 20
kMDItemFSOwnerUserID                   = 501
kMDItemFSSize                          = 107270138
kMDItemFSTypeCode                      = ""
kMDItemInterestingDate_Ranking         = 2021-10-14 00:00:00 +0000
kMDItemKind                            = "WordPress All-in-One Backup"
kMDItemLogicalSize                     = 107270138
kMDItemPhysicalSize                    = 107270144

aonez added a commit that referenced this issue Nov 5, 2021
@porg
Copy link
Author

porg commented Nov 24, 2021

Closing: This feature was included in release 1.2.50 (4808)

@porg porg closed this as completed Nov 24, 2021
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