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

adds .webloc support #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

kristofer
Copy link

Adds .webloc support for dropping a web url from browser into a .stapled file. Launching works as well without mods.

It allows a user to include web bookmarks into Stapler files, along with the local files.

Adds .webloc support for dropping a web url from browser into a .stapled file. Launching works as well without mods.
@kristofer
Copy link
Author

I guess I should add, I was unable to get the weblog stuff to work on 13.6 Ventura. But I see your example in the readme has a weblog item in it.

@gingerbeardman
Copy link
Owner

gingerbeardman commented Aug 19, 2024

Thanks for this!

I'd love it if you could remove unrelated files from this commit, to make it easier for me to merge.

  • .pbxproj
  • IDEWorkspaceChecks.plist
  • .xcbkptlist
  • .xcuserstate
  • etc.

The goal would be to keep it as minimal as possible! Thanks @kristofer

@gingerbeardman gingerbeardman requested review from gingerbeardman and removed request for gingerbeardman August 19, 2024 12:34
@gingerbeardman
Copy link
Owner

Also, sorry this will need to be rebased as I've just implemented some changes to how things are added and launched—sorry!

Copy link
Owner

@gingerbeardman gingerbeardman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make changes to StaplerApp.swift based on the current source.

And please remove all other files that are unrelated to the .webloc change — thanks!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file from the PR

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file from the PR

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file from the PR

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file from the PR

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file from the PR

.DS_Store Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file from the PR

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase this against current source. Thanks!

@gingerbeardman
Copy link
Owner

I guess I should add, I was unable to get the weblog stuff to work on 13.6 Ventura. But I see your example in the readme has a weblog item in it.

My webloc item was dragged from Safari > Finder > Stapler

@kristofer
Copy link
Author

  • finally seeing this, will do. just give me a day or few. thanks! (ps and sorry, i thought i had reduced it to just the one file)

@gingerbeardman gingerbeardman linked an issue Aug 23, 2024 that may be closed by this pull request
@gingerbeardman
Copy link
Owner

No rush at all! I think this change will also get us the ability to drag and drop email addresses in the same way #36

@kristofer
Copy link
Author

Glad you asked me to clean this up.

So the .webloc I'm saving in the StaplerDoc is merely a file (containing the actual target URL) in the temporary directory of the app. SO, when that gets deleted, the weblog file is gone. Bad.

I think there are two options.

  • make AliasItem handle other things than just file-urls - like web urls and email addresses and what-not. the alias would have a content-type field, for each species (MIME types?)
  • make a place where .webloc (and other non-file-urls) get copied when created so they aren't lost when the TMP dir changes. (yuck!)

hmm.

@kristofer
Copy link
Author

kristofer commented Aug 27, 2024

Since the alias just gets JSON'd when saved, seems like adding typing to them makes the most sense.

@gingerbeardman
Copy link
Owner

gingerbeardman commented Aug 27, 2024

See #18 for an explanation of filesystem bookmarks and an example of the data they store.

I wonder if we can use webloc:// (or either http:// or https://) and mailto:// URLs?

I'll give it some thought. I might even test a hand-crafted bookmark.

@kristofer kristofer closed this Aug 27, 2024
@kristofer
Copy link
Author

lemme untangle this mess

@kristofer
Copy link
Author

kristofer commented Aug 27, 2024

okay, I think I've cleaned it all up, along with pulling in all your latest commits. @gingerbeardman

@gingerbeardman
Copy link
Owner

Will take a look ASAP!

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

Successfully merging this pull request may close these issues.

PR: adds .webloc support
2 participants