deanishe / alfred-safari-assistant

Alfred 3+ workflow to search and use Safari bookmarks, history, reading list and tabs.
MIT License
191 stars 16 forks source link

Release workflow on http://www.packal.org #3

Closed riddla closed 6 years ago

riddla commented 6 years ago

I was just blasted by this great workflow, very nice work! I would have discovered it before, when it would have been listed on http://www.packal.org. Do you plan to do that?

deanishe commented 6 years ago

very nice work!

Thanks.

Do you plan to do that?

Nope. Packal is unmaintained, and has been for some time.

Adding new workflows is partially broken (and thus a PITA), other features are completely broken, and it's likely only a matter of time before it falls over completely.

riddla commented 6 years ago

Thanks for the heads up. I wasn't aware of the packal issues. What do you personally use for discovering Alfred workflows then? Is there an alternative?

I was thinking about a some clean search interface using the Github API looking for 'Alfred workflow' tags, titles, descriptions or something like that ...

deanishe commented 6 years ago

What do you personally use for discovering Alfred workflows then? Is there an alternative?

I was thinking about a some clean search interface using the Github API looking for 'Alfred workflow' tags, titles, descriptions or something like that

I've been thinking about the same thing for a while. The question is what extra value can a search engine offer beyond what a plain GitHub search does, and how?

Crawling the repos is a bit tricky, as not everybody uses the same layout. My workflows—and most others built on my libraries—are simple enough to crawl (one repo per workflow, source code in the repo, built .alfredworkflow files in releases). Other folks, like @vitorgalvao, keep all their workflows in a single repo, and there isn't a universal structure they follow.

riddla commented 6 years ago

I did some test crawling using https://developer.github.com/v4/explorer/:

{
  "data": {
    "search": {
      "repositoryCount": 340,
      "edges": [
        {
          "node": {
            "nameWithOwner": "willfarrell/alfred-workflows",
            "name": "alfred-workflows",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "gharlan/alfred-github-workflow",
            "name": "alfred-github-workflow",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Version 1.6.1",
                    "publishedAt": "2017-09-23T11:20:26Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "deanishe/alfred-workflow",
            "name": "alfred-workflow",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Improve appinfo",
                    "publishedAt": "2017-12-18T12:11:02Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "sindresorhus/alfy",
            "name": "alfy",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "derimagia/awesome-alfred-workflows",
            "name": "awesome-alfred-workflows",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "ruedap/alfred-font-awesome-workflow",
            "name": "alfred-font-awesome-workflow",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "4.7.0.1",
                    "publishedAt": "2017-10-11T13:43:33Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "franzheidl/alfred-workflows",
            "name": "alfred-workflows",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "learn-anything/alfred-workflows",
            "name": "alfred-workflows",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "vdesabou/alfred-spotify-mini-player",
            "name": "alfred-spotify-mini-player",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Version 7.6",
                    "publishedAt": "2017-11-07T22:56:36Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "idpaterson/alfred-wunderlist-workflow",
            "name": "alfred-wunderlist-workflow",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Add a note while creating a task",
                    "publishedAt": "2017-11-01T20:33:39Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "liszd/whyliam.workflows.youdao",
            "name": "whyliam.workflows.youdao",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "有道翻译 workflow v2.1.1",
                    "publishedAt": "2017-08-30T16:09:06Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "sindresorhus/alfred-npms",
            "name": "alfred-npms",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "yannickglt/alfred-devdocs",
            "name": "alfred-devdocs",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "hujiaweibujidao/Gank-Alfred-Workflow",
            "name": "Gank-Alfred-Workflow",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Gank-Alfred-Workflow v2.0.0",
                    "publishedAt": "2016-06-23T17:29:21Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "deanishe/alfred-convert",
            "name": "alfred-convert",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Handle negative numbers",
                    "publishedAt": "2017-12-27T00:12:10Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "benknight/hue-alfred-workflow",
            "name": "hue-alfred-workflow",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "v3.0",
                    "publishedAt": "2017-08-20T04:23:24Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "ethan-funny/Google-Alfred3-Workflow",
            "name": "Google-Alfred3-Workflow",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Google-Alfred3-Workflow",
                    "publishedAt": "2016-10-30T01:14:16Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "mdreizin/chrome-bookmarks-alfred-workflow",
            "name": "chrome-bookmarks-alfred-workflow",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "0.1.8",
                    "publishedAt": "2017-02-09T12:43:55Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "sindresorhus/alfred-emoj",
            "name": "alfred-emoj",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "bchatard/jetbrains-alfred-workflow",
            "name": "jetbrains-alfred-workflow",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "spamwax/alfred-pinboard",
            "name": "alfred-pinboard",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "v0.5.0",
                    "publishedAt": "2017-12-08T08:38:56Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "deanishe/alfred-fixum",
            "name": "alfred-fixum",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Don't trust Alfred's \"syncfolder\" setting",
                    "publishedAt": "2017-12-04T22:28:47Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "deanishe/alfred-searchio",
            "name": "alfred-searchio",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Update icons & fix Kinopoisk.ru",
                    "publishedAt": "2017-12-11T22:43:29Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "deanishe/alfred-stackoverflow",
            "name": "alfred-stackoverflow",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Fix Sierra bug",
                    "publishedAt": "2017-06-15T18:40:31Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "steyep/alfred-jira",
            "name": "alfred-jira",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "deanishe/alfred-repos",
            "name": "alfred-repos",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Fix updates",
                    "publishedAt": "2017-08-02T09:04:33Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "moul/alfred-workflow-gauth",
            "name": "alfred-workflow-gauth",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "sindresorhus/alfred-dark-mode",
            "name": "alfred-dark-mode",
            "releases": {
              "edges": []
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "yourtion/Alfred_ShadowsocksController",
            "name": "Alfred_ShadowsocksController",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "BugFix",
                    "publishedAt": "2016-11-20T13:06:40Z"
                  }
                }
              ]
            }
          }
        },
        {
          "node": {
            "nameWithOwner": "deanishe/alfred-pwgen",
            "name": "alfred-pwgen",
            "releases": {
              "edges": [
                {
                  "node": {
                    "name": "Update Alfred-Workflow",
                    "publishedAt": "2017-12-10T22:40:22Z"
                  }
                }
              ]
            }
          }
        }
      ]
    }
  }
}

Some repositories would fit really good for a mini search engine, as you can extract the latest version, release date etc. Might it be an option to talk about a possible layout default respectively universal workflows on the Alfred forums? Tagging a release should be easy for everybody.

Multi repos on the other hand might be tricky. But they all have a plist in common ...

vitorgalvao commented 6 years ago

@riddla I see several issues:

If you ask for a consistent layout for releasing Workflows on the forums, I’d say you might get maybe five different developers answering, ten if I’m being really generous (to be honest, I already think five might be a stretch). And those are replies, not agreements to follow a layout.

Heck, we’ve been telling people to stay away from Packal for a while and I still see new users releasing new Workflows there and many exist only there.

deanishe commented 6 years ago

To expand on what @vitorgalvao said:

Assuming you seed your crawler with GitHub searches for a few Alfred-related tags and, say, all the GitHub links from Packal (I already have a rudimentary crawler for Packal), you're going to run into 3 kinds of reasonably formatted, easy-enough-to-deal-with repos:

  1. Lists of other workflows, e.g. willfarrell/alfred-workflow or derimagia/awesome-alfred-workflows. Okay, it's relatively straightforward to extract links to GitHub repos from them and add them to the crawl queue.
  2. "Canonical" repos that more or less follow the structure you might expect, with the source code in the repo and .alfredworkflow files in releases.
  3. Sensibly-structured "mono-repos", like vitorgalvao/alfred-workflows, which contain multiple workflows, but all logically organised in their own subdirectories, containing a single .alfredworkflow file and the source code.

But then there are the rest, and there are a lot of them.

You can't extract much useful, structured information from repos that don't contain an info.plist. So you'd have to download the .alfredworkflow file and extract info.plist from it (or ignore the repo).

And there are very many repos that only contain the built workflow, not the source code.

Some people are new to sharing their stuff, and if asked, will often put the source in the repo. Others, like these guys, are dead-set against having info.plist in the repo because it conflicts with the unusual way they've chosen to build their workflow.

(I dare say they'd change their minds, however, if the indexer were (semi-)official and/or were the place to find Alfred workflows, and your workflow isn't getting listed without an info.plist.)

Finally, what do you do about workflows written in JavaScript that require Node? There are quite a few of them, they don't provide .alfredworkflow files (you're supposed to install them with npm), and it's tricky to capture the Node requirement. (Can you just check if there's a package.json alongside info.plist and assume Node is necessary?)

It's self-evident that a workflow called search-omnifocus requires OmniFocus.

It's not obvious that a workflow called alfred-Loremipsum requires you to install Homebrew and Node, but that's a heavyweight, and complex requirement that really ought to be mentioned.

Should an indexer just ignore them? As I say, it's not an insignificant number of workflows.

deanishe commented 6 years ago

Heck, we’ve been telling people to stay away from Packal for a while and I still see new users releasing new Workflows there and many exist only there.

If I did build an indexer, I'd probably crawl Packal. The frontend may be dying on its arse, but all the workflows are stored on GitHub.

Any workflow without a GitHub link would probably have to be tagged as "legacy" in some way.

Going forward, I'd want the indexer to support OAuth login via GitHub so people can do "stuff" (not clear what yet) with their own workflows. The only concrete idea I have there is installing a webhook, so the indexer automatically crawls your repo again after a release/push.

I'm not sure I would want to support anything outside of GitHub (or similar services, like Bitbucket). Things people have put on other hosting "solutions" have had a nasty tendency to disappear (I'm thinking of Dropbox and wherever it was that David uploaded his plugins etc.).