├── .github ├── FUNDING.yml └── workflows │ └── release.yml ├── .gitignore ├── .releaserc ├── .zip.sh ├── 474362A0-D044-4360-913E-BEA54A24A03E.png ├── 6842F50F-F7AC-41F5-9B9D-391841CEAABF.png ├── E46B6F22-840D-46D4-AA76-17CFBEAF8176.png ├── LICENSE ├── README.md ├── add-item.png ├── back.png ├── checked.png ├── configuration.png ├── create-new.png ├── delete.png ├── icon.png ├── info.plist ├── list-items.png ├── lists.png ├── markdown-link.png ├── parse_items.js ├── parse_list.sh └── unchecked.png /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: colomolo 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 15 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release Alfred Workflow 2 | on: 3 | push: 4 | branches: 5 | - main 6 | 7 | permissions: 8 | contents: read # for checkout 9 | 10 | jobs: 11 | release: 12 | name: Release 13 | runs-on: macos-latest 14 | permissions: 15 | contents: write 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v3 19 | with: 20 | fetch-depth: 0 21 | - name: Setup Node.js 22 | uses: actions/setup-node@v3 23 | with: 24 | node-version: "lts/*" 25 | - name: Release 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | run: npx -p @semantic-release/git -p @semantic-release/github -p @semantic-release/exec semantic-release 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | prefs.plist 3 | -------------------------------------------------------------------------------- /.releaserc: -------------------------------------------------------------------------------- 1 | { 2 | "branches": ["main"], 3 | "plugins": [ 4 | "@semantic-release/commit-analyzer", 5 | "@semantic-release/release-notes-generator", 6 | ["@semantic-release/exec", { 7 | "prepareCmd": "./.zip.sh ${nextRelease.version}" 8 | }], 9 | ["@semantic-release/git", { 10 | "assets": ["info.plist"], 11 | "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 12 | }], 13 | ["@semantic-release/github", { 14 | "assets": ["Bookmark-Vault.alfredworkflow"] 15 | }] 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /.zip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ----------------------- 4 | # new version number 5 | # ----------------------- 6 | 7 | # Prompt for version number, if not entered 8 | nextVersion="$*" 9 | currentVersion=$(plutil -extract 'version' raw -o - info.plist) 10 | echo "current version: $currentVersion" 11 | echo -n " next version: " 12 | if [[ -z "$nextVersion" ]]; then 13 | read -r nextVersion 14 | else 15 | echo "$nextVersion" 16 | fi 17 | 18 | # insert new version number 19 | plutil -replace version -string "$nextVersion" info.plist 20 | 21 | # ----------------------- 22 | # clean info.plist 23 | # ----------------------- 24 | 25 | # bkp info.plist 26 | cp -v info.plist info-original.plist 27 | 28 | # remove variables flagged as "no export" from info.plist 29 | if plutil -extract 'variablesdontexport' json -o - info.plist &>/dev/null; then 30 | excludedVars=$(plutil -extract variablesdontexport json -o - info.plist | tr -d "[]\"" | tr "," "\n") 31 | echo "$excludedVars" | tr "\n" "\0" | xargs -0 -I {} plutil -replace variables.{} -string "" info.plist 32 | 33 | exclusionNo=$(echo "$excludedVars" | wc -l | tr -d " ") 34 | echo "Removed $exclusionNo variables flagged as 'no export' removed from 'info.plist'." 35 | fi 36 | 37 | # ----------------------- 38 | # compile .alfredworkflow 39 | # ----------------------- 40 | 41 | # remove workflow file from previous release 42 | rm -fv ./*.alfredworkflow 43 | 44 | # zip 45 | workflowName=$(plutil -extract 'name' raw -o - info.plist | tr " " "-") 46 | # ".*" excludes the dotfiles (glob pattern, not regex) 47 | zip --quiet -r "$workflowName.alfredworkflow" . -x ".*" "doc*/*" "prefs.plist" "info-original.plist" "*.md" "*.alfredworkflow" "*.gif" 48 | echo "new $workflowName.alfredworkflow file created." 49 | 50 | # restore original 51 | rm -fv info.plist 52 | mv -fv info-original.plist info.plist 53 | echo 54 | -------------------------------------------------------------------------------- /474362A0-D044-4360-913E-BEA54A24A03E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/474362A0-D044-4360-913E-BEA54A24A03E.png -------------------------------------------------------------------------------- /6842F50F-F7AC-41F5-9B9D-391841CEAABF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/6842F50F-F7AC-41F5-9B9D-391841CEAABF.png -------------------------------------------------------------------------------- /E46B6F22-840D-46D4-AA76-17CFBEAF8176.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/E46B6F22-840D-46D4-AA76-17CFBEAF8176.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Yuri Mazursky 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Bookmark Vault](./icon.png) 2 | 3 | # Bookmark Vault 4 | Workflow that helps you manage your links and quick search notes. 5 | 6 | ## Working folder 7 | The main idea of Bookmark Vault is to have all your bookmarks locally on your computer and independent from any app. 8 | 9 | After installing the workflow you should specify the working folder in workflow configuration: 10 | ![Configuration](./configuration.png) 11 | 12 | Bookmark Vault will scan this folder and treat each .md file as a list. If for some reason you will delete Bookmarks or even Alfred, your once created lists will still stay with you. 13 | 14 | ## Usage 15 | `bk` to see your lists. 16 | 17 | `bkadd` to add item to one of the lists. 18 | 19 | `bktab` to add the current active tab of the frontmost browser to the list. 20 | 21 | ![Lists](./lists.png) 22 | 23 | ### List modifiers 24 | `⌘` to open list file in text editor. 25 | `⇧` to show checked items. 26 | `⌘⇧` to open all items of the list (excluding checked items). 27 | `⌘⌥⇧` to delete list permanently. 28 | 29 | ## List items 30 | There are two list item types – URLs and search queries. URLs are opened in the browser and plain text is used in web search. 31 | 32 | You also can add checkboxes to list items. This is handy when you want to open your bookmarks only once. For example, you can use it for a list of articles that you need to go through. Checkbox items will be checked on opening and hidden from the list. If you want to see checked items, hold `⇧` on list selection. 33 | 34 | You can convert plain items to checkbox items and vice versa by holding `⇧`. 35 | 36 | Use `⌘C` shortcut to copy item text or URL if it's a link. 37 | 38 | ![List items](./list-items.png) 39 | 40 | ### List item modifiers 41 | `⇧` to convert to checkbox/plain item. 42 | `⌘⇧` to check/uncheck checkbox item. 43 | `⌘⌥⇧` to delete item permanently. 44 | 45 | Bookmark Vault will try to present URLs in a convenient way. If it's possible to get page's title (by fetching the page), it will be shown as an item title. You can also specify it manually by formatting link in Markdown format. For example adding `[Transport Museum](https://www.ltmuseum.co.uk/)` as an argument to `bkadd` command will later be represented with a title and URL: 46 | 47 | ![Markdown link](./markdown-link.png) 48 | 49 | Happy bookmarking! 50 | 51 | ## Check out other workflows 52 | ### [Timer](https://github.com/colomolo/alfred-timer) 53 | Set up short timers with natural language as input or use presets with custom durations. 54 | 55 | ### [String Multitool](https://github.com/colomolo/alfred-string-multitool) 56 | Tools for string manipulation and transformation. 57 | 58 | ## Support development 59 | Buy Me a Coffee at ko-fi.com 60 | -------------------------------------------------------------------------------- /add-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/add-item.png -------------------------------------------------------------------------------- /back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/back.png -------------------------------------------------------------------------------- /checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/checked.png -------------------------------------------------------------------------------- /configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/configuration.png -------------------------------------------------------------------------------- /create-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/create-new.png -------------------------------------------------------------------------------- /delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/delete.png -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/icon.png -------------------------------------------------------------------------------- /info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bundleid 6 | com.colomolome.bookmarks 7 | category 8 | Productivity 9 | connections 10 | 11 | 040F31C0-FABD-49FE-B8BD-5EA505D53EE4 12 | 13 | 14 | destinationuid 15 | A3C6B4C8-860A-44C2-B3DE-6B7678DCD6FA 16 | modifiers 17 | 0 18 | modifiersubtext 19 | 20 | vitoclose 21 | 22 | 23 | 24 | 10901C44-E1B5-47A1-B5DE-70FA233D92A2 25 | 26 | 27 | destinationuid 28 | A0EC1E3A-A7D8-44BC-818B-4CBDA7F79166 29 | modifiers 30 | 0 31 | modifiersubtext 32 | 33 | vitoclose 34 | 35 | 36 | 37 | 1CBA405D-ADED-4171-9CF8-61791AFA0AA5 38 | 39 | 40 | destinationuid 41 | 7A76445F-1E80-4804-BFB6-661EE530E999 42 | modifiers 43 | 0 44 | modifiersubtext 45 | 46 | vitoclose 47 | 48 | 49 | 50 | 2F312EAC-80C9-4DE5-AD1C-7F30DF29B8A6 51 | 52 | 53 | destinationuid 54 | B3CE81EB-CBFD-404B-B8BF-3F8659F80DEC 55 | modifiers 56 | 0 57 | modifiersubtext 58 | 59 | vitoclose 60 | 61 | 62 | 63 | 2F77B88F-0DDA-45E8-901C-D634CFA40459 64 | 65 | 66 | destinationuid 67 | 302E1E16-91B8-4179-A372-083A10B4E6CE 68 | modifiers 69 | 0 70 | modifiersubtext 71 | 72 | vitoclose 73 | 74 | 75 | 76 | 302E1E16-91B8-4179-A372-083A10B4E6CE 77 | 78 | 79 | destinationuid 80 | 9E888CB9-4AB9-4E82-9A95-99DB3D88ECC0 81 | modifiers 82 | 0 83 | modifiersubtext 84 | 85 | vitoclose 86 | 87 | 88 | 89 | 406292A0-392D-4CF4-B1A3-C370AC62CDF1 90 | 91 | 92 | destinationuid 93 | 474362A0-D044-4360-913E-BEA54A24A03E 94 | modifiers 95 | 0 96 | modifiersubtext 97 | 98 | vitoclose 99 | 100 | 101 | 102 | 474362A0-D044-4360-913E-BEA54A24A03E 103 | 104 | 105 | destinationuid 106 | 5407019E-F89B-423E-9A9E-B6CDF12D14A3 107 | modifiers 108 | 0 109 | modifiersubtext 110 | 111 | vitoclose 112 | 113 | 114 | 115 | 5407019E-F89B-423E-9A9E-B6CDF12D14A3 116 | 117 | 118 | destinationuid 119 | F2779F39-D160-463F-A7FA-C6DA46262DB2 120 | modifiers 121 | 0 122 | modifiersubtext 123 | 124 | vitoclose 125 | 126 | 127 | 128 | 5C3950D1-71B8-4B80-AFDF-49BF85414871 129 | 130 | 131 | destinationuid 132 | DD30017C-8EA1-400A-964F-BC80E0BE7C3B 133 | modifiers 134 | 0 135 | modifiersubtext 136 | 137 | sourceoutputuid 138 | 19BDAD35-B622-49FE-89DF-A06AC3C86A21 139 | vitoclose 140 | 141 | 142 | 143 | destinationuid 144 | DD30017C-8EA1-400A-964F-BC80E0BE7C3B 145 | modifiers 146 | 0 147 | modifiersubtext 148 | 149 | sourceoutputuid 150 | 624A879E-7838-43DD-9D5C-5EC598219CA5 151 | vitoclose 152 | 153 | 154 | 155 | destinationuid 156 | DD30017C-8EA1-400A-964F-BC80E0BE7C3B 157 | modifiers 158 | 0 159 | modifiersubtext 160 | 161 | sourceoutputuid 162 | 93B6814D-DC48-43BE-81AE-F281EDBA9460 163 | vitoclose 164 | 165 | 166 | 167 | destinationuid 168 | DD30017C-8EA1-400A-964F-BC80E0BE7C3B 169 | modifiers 170 | 0 171 | modifiersubtext 172 | 173 | sourceoutputuid 174 | 8FF9FC34-7952-4085-BDF8-5BF8AF094B6F 175 | vitoclose 176 | 177 | 178 | 179 | destinationuid 180 | DD30017C-8EA1-400A-964F-BC80E0BE7C3B 181 | modifiers 182 | 0 183 | modifiersubtext 184 | 185 | sourceoutputuid 186 | 2A41A5F2-F784-4BED-ABD3-76EE65405932 187 | vitoclose 188 | 189 | 190 | 191 | destinationuid 192 | 234CC09E-2B28-4152-BE00-1104084F6E31 193 | modifiers 194 | 0 195 | modifiersubtext 196 | 197 | sourceoutputuid 198 | 93B6814D-DC48-43BE-81AE-F281EDBA9460 199 | vitoclose 200 | 201 | 202 | 203 | destinationuid 204 | 234CC09E-2B28-4152-BE00-1104084F6E31 205 | modifiers 206 | 0 207 | modifiersubtext 208 | 209 | sourceoutputuid 210 | 8FF9FC34-7952-4085-BDF8-5BF8AF094B6F 211 | vitoclose 212 | 213 | 214 | 215 | destinationuid 216 | 396091EF-7EF3-4395-9DC2-A20951D01CE2 217 | modifiers 218 | 0 219 | modifiersubtext 220 | 221 | sourceoutputuid 222 | 67B9B543-087C-4C74-B242-B3321934C013 223 | vitoclose 224 | 225 | 226 | 227 | destinationuid 228 | 5DA3225A-CFA9-481B-ACE0-C14F0327E9C8 229 | modifiers 230 | 0 231 | modifiersubtext 232 | 233 | sourceoutputuid 234 | A9276842-DE17-46C3-8D98-153B1FE53767 235 | vitoclose 236 | 237 | 238 | 239 | 60E66A3C-B7DB-4CE1-A705-0BDEC0AF0AC5 240 | 241 | 242 | destinationuid 243 | 6EA11B33-D4A6-4775-8543-C04B7602A99B 244 | modifiers 245 | 0 246 | modifiersubtext 247 | 248 | vitoclose 249 | 250 | 251 | 252 | 65379110-B872-4F23-87D6-CD0AD84F79FC 253 | 254 | 255 | destinationuid 256 | 1CBA405D-ADED-4171-9CF8-61791AFA0AA5 257 | modifiers 258 | 0 259 | modifiersubtext 260 | 261 | vitoclose 262 | 263 | 264 | 265 | 67C6BC64-F6DB-41C4-9815-499C6B712E7B 266 | 267 | 268 | destinationuid 269 | 2F312EAC-80C9-4DE5-AD1C-7F30DF29B8A6 270 | modifiers 271 | 0 272 | modifiersubtext 273 | 274 | vitoclose 275 | 276 | 277 | 278 | 6842F50F-F7AC-41F5-9B9D-391841CEAABF 279 | 280 | 281 | destinationuid 282 | 60E66A3C-B7DB-4CE1-A705-0BDEC0AF0AC5 283 | modifiers 284 | 0 285 | modifiersubtext 286 | 287 | vitoclose 288 | 289 | 290 | 291 | 7A76445F-1E80-4804-BFB6-661EE530E999 292 | 293 | 294 | destinationuid 295 | 8C10DDB1-AF6C-4DC0-A8A9-98AFBD5B8108 296 | modifiers 297 | 0 298 | modifiersubtext 299 | 300 | vitoclose 301 | 302 | 303 | 304 | 7BDA4EA1-7A0C-45E8-84AC-FF15C322DECF 305 | 306 | 307 | destinationuid 308 | 474362A0-D044-4360-913E-BEA54A24A03E 309 | modifiers 310 | 0 311 | modifiersubtext 312 | 313 | vitoclose 314 | 315 | 316 | 317 | 8F40CA58-2BC5-4379-A074-8147CA9A0D37 318 | 319 | 320 | destinationuid 321 | 6EA11B33-D4A6-4775-8543-C04B7602A99B 322 | modifiers 323 | 0 324 | modifiersubtext 325 | 326 | vitoclose 327 | 328 | 329 | 330 | 9E888CB9-4AB9-4E82-9A95-99DB3D88ECC0 331 | 332 | 333 | destinationuid 334 | EED2114B-0E25-4079-A422-29B807720A11 335 | modifiers 336 | 0 337 | modifiersubtext 338 | 339 | sourceoutputuid 340 | 19BDAD35-B622-49FE-89DF-A06AC3C86A21 341 | vitoclose 342 | 343 | 344 | 345 | destinationuid 346 | EED2114B-0E25-4079-A422-29B807720A11 347 | modifiers 348 | 0 349 | modifiersubtext 350 | 351 | sourceoutputuid 352 | 2A41A5F2-F784-4BED-ABD3-76EE65405932 353 | vitoclose 354 | 355 | 356 | 357 | destinationuid 358 | EED2114B-0E25-4079-A422-29B807720A11 359 | modifiers 360 | 0 361 | modifiersubtext 362 | 363 | sourceoutputuid 364 | 624A879E-7838-43DD-9D5C-5EC598219CA5 365 | vitoclose 366 | 367 | 368 | 369 | 9EF6472F-2234-419F-890C-2B6891C56718 370 | 371 | 372 | destinationuid 373 | A0EC1E3A-A7D8-44BC-818B-4CBDA7F79166 374 | modifiers 375 | 0 376 | modifiersubtext 377 | 378 | vitoclose 379 | 380 | 381 | 382 | A013A9B4-3B19-4889-A859-092BEB536969 383 | 384 | 385 | destinationuid 386 | B6784D37-3559-4C4D-8A34-4C740D03C8FE 387 | modifiers 388 | 0 389 | modifiersubtext 390 | 391 | vitoclose 392 | 393 | 394 | 395 | A0EC1E3A-A7D8-44BC-818B-4CBDA7F79166 396 | 397 | 398 | destinationuid 399 | A28A9626-BA46-4966-9442-987A799F8472 400 | modifiers 401 | 0 402 | modifiersubtext 403 | 404 | vitoclose 405 | 406 | 407 | 408 | A28A9626-BA46-4966-9442-987A799F8472 409 | 410 | 411 | destinationuid 412 | E147BFDE-A3FD-42BC-9100-029FF6E2D4BE 413 | modifiers 414 | 0 415 | modifiersubtext 416 | 417 | sourceoutputuid 418 | B181B300-51E2-451B-B4C5-D2731D42A361 419 | vitoclose 420 | 421 | 422 | 423 | destinationuid 424 | 67C6BC64-F6DB-41C4-9815-499C6B712E7B 425 | modifiers 426 | 0 427 | modifiersubtext 428 | 429 | sourceoutputuid 430 | D9A26F88-1609-472E-ADAC-34355AC93C0B 431 | vitoclose 432 | 433 | 434 | 435 | destinationuid 436 | 6842F50F-F7AC-41F5-9B9D-391841CEAABF 437 | modifiers 438 | 0 439 | modifiersubtext 440 | 441 | sourceoutputuid 442 | 50619372-75EE-44A5-AABD-FF32BD044700 443 | vitoclose 444 | 445 | 446 | 447 | destinationuid 448 | 8F40CA58-2BC5-4379-A074-8147CA9A0D37 449 | modifiers 450 | 0 451 | modifiersubtext 452 | 453 | sourceoutputuid 454 | BE521F56-BDA0-4D7F-B71F-504774358F1C 455 | vitoclose 456 | 457 | 458 | 459 | destinationuid 460 | 5E0CFAC8-AA68-4BAA-8B45-2CE0707D96E8 461 | modifiers 462 | 0 463 | modifiersubtext 464 | 465 | sourceoutputuid 466 | FCD59321-D478-4406-93FB-E27B6B333FFC 467 | vitoclose 468 | 469 | 470 | 471 | A3C6B4C8-860A-44C2-B3DE-6B7678DCD6FA 472 | 473 | 474 | destinationuid 475 | 65379110-B872-4F23-87D6-CD0AD84F79FC 476 | modifiers 477 | 0 478 | modifiersubtext 479 | 480 | vitoclose 481 | 482 | 483 | 484 | AA4A5176-93BC-4BA7-B097-293FF93F007D 485 | 486 | 487 | destinationuid 488 | FEAF9D6C-A10E-4BD7-AE09-6B8F101BDF4F 489 | modifiers 490 | 0 491 | modifiersubtext 492 | 493 | vitoclose 494 | 495 | 496 | 497 | B0F8418E-4678-4367-9FA8-AC52CDDD026C 498 | 499 | 500 | destinationuid 501 | F3D37694-B5B4-486E-8621-AD1B525510F5 502 | modifiers 503 | 0 504 | modifiersubtext 505 | 506 | vitoclose 507 | 508 | 509 | 510 | B6784D37-3559-4C4D-8A34-4C740D03C8FE 511 | 512 | 513 | destinationuid 514 | E8BADEFB-E178-4BE6-B35A-F2A5A9A1EF17 515 | modifiers 516 | 0 517 | modifiersubtext 518 | 519 | vitoclose 520 | 521 | 522 | 523 | D7C794C6-A937-4498-B344-EBBC1130D11A 524 | 525 | 526 | destinationuid 527 | 7A76445F-1E80-4804-BFB6-661EE530E999 528 | modifiers 529 | 0 530 | modifiersubtext 531 | 532 | vitoclose 533 | 534 | 535 | 536 | DD30017C-8EA1-400A-964F-BC80E0BE7C3B 537 | 538 | 539 | destinationuid 540 | 2F77B88F-0DDA-45E8-901C-D634CFA40459 541 | modifiers 542 | 0 543 | modifiersubtext 544 | 545 | vitoclose 546 | 547 | 548 | 549 | E147BFDE-A3FD-42BC-9100-029FF6E2D4BE 550 | 551 | 552 | destinationuid 553 | 8E691172-7E11-4FAD-9202-D82211748E00 554 | modifiers 555 | 0 556 | modifiersubtext 557 | 558 | vitoclose 559 | 560 | 561 | 562 | E46B6F22-840D-46D4-AA76-17CFBEAF8176 563 | 564 | 565 | destinationuid 566 | A3C6B4C8-860A-44C2-B3DE-6B7678DCD6FA 567 | modifiers 568 | 0 569 | modifiersubtext 570 | 571 | vitoclose 572 | 573 | 574 | 575 | EEEB93F3-C8DD-4165-BD54-E0F4BFDDBFB4 576 | 577 | 578 | destinationuid 579 | 474362A0-D044-4360-913E-BEA54A24A03E 580 | modifiers 581 | 0 582 | modifiersubtext 583 | 584 | vitoclose 585 | 586 | 587 | 588 | F2779F39-D160-463F-A7FA-C6DA46262DB2 589 | 590 | 591 | destinationuid 592 | D7C794C6-A937-4498-B344-EBBC1130D11A 593 | modifiers 594 | 0 595 | modifiersubtext 596 | 597 | sourceoutputuid 598 | 6415A710-2A3F-48CB-B274-09B374142BC2 599 | vitoclose 600 | 601 | 602 | 603 | destinationuid 604 | 1CBA405D-ADED-4171-9CF8-61791AFA0AA5 605 | modifiers 606 | 0 607 | modifiersubtext 608 | 609 | vitoclose 610 | 611 | 612 | 613 | F3D37694-B5B4-486E-8621-AD1B525510F5 614 | 615 | 616 | destinationuid 617 | 5C3950D1-71B8-4B80-AFDF-49BF85414871 618 | modifiers 619 | 0 620 | modifiersubtext 621 | 622 | vitoclose 623 | 624 | 625 | 626 | FEAF9D6C-A10E-4BD7-AE09-6B8F101BDF4F 627 | 628 | 629 | destinationuid 630 | B0F8418E-4678-4367-9FA8-AC52CDDD026C 631 | modifiers 632 | 0 633 | modifiersubtext 634 | 635 | vitoclose 636 | 637 | 638 | 639 | 640 | createdby 641 | Yuri Mazursky 642 | description 643 | 644 | disabled 645 | 646 | name 647 | Bookmark Vault 648 | objects 649 | 650 | 651 | config 652 | 653 | concurrently 654 | 655 | escaping 656 | 68 657 | script 658 | function run(argv) { 659 | ObjC.import('stdlib'); 660 | const pageTitle = $.getenv('page_title') || ''; 661 | const isCheckbox = $.getenv('as_checkbox') === '1'; 662 | const input = $.getenv('add_item'); 663 | 664 | let arg = input.trim().replace(/\s/g, ' '); 665 | 666 | if (pageTitle) { 667 | arg = `[${pageTitle}](${arg})`; 668 | } 669 | 670 | if (isCheckbox) { 671 | arg = `${isCheckbox ? '- [ ] ' : ''}${arg}`; 672 | } 673 | 674 | return arg; 675 | } 676 | scriptargtype 677 | 1 678 | scriptfile 679 | 680 | type 681 | 7 682 | 683 | type 684 | alfred.workflow.action.script 685 | uid 686 | D7C794C6-A937-4498-B344-EBBC1130D11A 687 | version 688 | 2 689 | 690 | 691 | config 692 | 693 | concurrently 694 | 695 | escaping 696 | 102 697 | script 698 | #!/bin/bash 699 | 700 | if [ "$action" != "add" ]; then 701 | IFS=$'\n' 702 | 703 | files=($(ls "${folder_path}"/*.md)) 704 | files_list=$(printf '%s\\n' "${files[@]}") 705 | fi 706 | 707 | if [ "$is_url" = "1" ]; then 708 | title=$(curl -s ${add_item} | grep -o '<title>[^<]*</title>' | head -n 1 | sed -e 's/<title>\(.*\)<\/title>/\1/' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') 709 | fi 710 | 711 | printf '{"alfredworkflow": {"arg": "", "variables": {"page_title": "%s", "files_list": "%s"}}}' "$title" "$files_list" 712 | scriptargtype 713 | 1 714 | scriptfile 715 | 716 | type 717 | 0 718 | 719 | type 720 | alfred.workflow.action.script 721 | uid 722 | 5407019E-F89B-423E-9A9E-B6CDF12D14A3 723 | version 724 | 2 725 | 726 | 727 | config 728 | 729 | alfredfiltersresults 730 | 731 | alfredfiltersresultsmatchmode 732 | 0 733 | argumenttreatemptyqueryasnil 734 | 735 | argumenttrimmode 736 | 0 737 | argumenttype 738 | 0 739 | escaping 740 | 68 741 | keyword 742 | {var:keyword}add 743 | queuedelaycustom 744 | 3 745 | queuedelayimmediatelyinitially 746 | 747 | queuedelaymode 748 | 0 749 | queuemode 750 | 1 751 | runningsubtext 752 | 753 | script 754 | function run(argv) { 755 | ObjC.import('stdlib'); 756 | let action = ''; 757 | let filepath = ''; 758 | try { 759 | action = $.getenv('action'); 760 | filepath = $.getenv('file_path'); 761 | } catch {} 762 | const input = argv[0].trim(); 763 | const items = []; 764 | 765 | const url = "https?:\\/\\/(?:[\\w-]+(\\.[\\w-]+)+|localhost|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})(:\\d+)?\\S*"; 766 | const urlRegex = new RegExp(`^${url}$`, 'i'); 767 | 768 | const isURL = urlRegex.test(input); 769 | 770 | const listName = filepath.match(/.+\/(.+)\.md/i)?.[1]; 771 | 772 | let title = `Add item '${input || ''}'`; 773 | 774 | if (action === 'add' && listName) { 775 | title = `${title} to '${listName}'`; 776 | } else { 777 | title = `${title}…`; 778 | } 779 | 780 | items.push({ 781 | title, 782 | subtitle: 'Hold ⇧ to add as checkbox item', 783 | arg: input, 784 | mods: { 785 | 'shift': { 786 | arg: input, 787 | subtitle: '⇧: as checkbox item', 788 | icon: { 789 | path: './unchecked.png', 790 | }, 791 | variables: { 792 | add_item: input, 793 | as_checkbox: true, 794 | is_url: isURL, 795 | }, 796 | }, 797 | }, 798 | }); 799 | 800 | return JSON.stringify({ 801 | skipknowledge: true, 802 | items, 803 | variables: { 804 | add_item: input, 805 | as_checkbox: false, 806 | is_url: isURL, 807 | }, 808 | }); 809 | } 810 | 811 | 812 | scriptargtype 813 | 1 814 | scriptfile 815 | 816 | subtext 817 | 818 | title 819 | Add item to list… 820 | type 821 | 7 822 | withspace 823 | 824 | 825 | type 826 | alfred.workflow.input.scriptfilter 827 | uid 828 | 474362A0-D044-4360-913E-BEA54A24A03E 829 | version 830 | 3 831 | 832 | 833 | config 834 | 835 | availableviaurlhandler 836 | 837 | triggerid 838 | add_item 839 | 840 | type 841 | alfred.workflow.trigger.external 842 | uid 843 | 7BDA4EA1-7A0C-45E8-84AC-FF15C322DECF 844 | version 845 | 1 846 | 847 | 848 | config 849 | 850 | adduuid 851 | 852 | allowemptyfiles 853 | 854 | createintermediatefolders 855 | 856 | filename 857 | {var:file_path} 858 | filetext 859 | {query} 860 | ignoredynamicplaceholders 861 | 862 | relativepathmode 863 | 1 864 | type 865 | 2 866 | 867 | type 868 | alfred.workflow.output.writefile 869 | uid 870 | 8C10DDB1-AF6C-4DC0-A8A9-98AFBD5B8108 871 | version 872 | 1 873 | 874 | 875 | config 876 | 877 | conditions 878 | 879 | 880 | inputstring 881 | {var:action} 882 | matchcasesensitive 883 | 884 | matchmode 885 | 0 886 | matchstring 887 | add 888 | outputlabel 889 | list already selected 890 | uid 891 | 6415A710-2A3F-48CB-B274-09B374142BC2 892 | 893 | 894 | elselabel 895 | select list 896 | hideelse 897 | 898 | 899 | type 900 | alfred.workflow.utility.conditional 901 | uid 902 | F2779F39-D160-463F-A7FA-C6DA46262DB2 903 | version 904 | 1 905 | 906 | 907 | config 908 | 909 | type 910 | 0 911 | 912 | type 913 | alfred.workflow.utility.transform 914 | uid 915 | 7A76445F-1E80-4804-BFB6-661EE530E999 916 | version 917 | 1 918 | 919 | 920 | config 921 | 922 | alfredfiltersresults 923 | 924 | alfredfiltersresultsmatchmode 925 | 0 926 | argumenttreatemptyqueryasnil 927 | 928 | argumenttrimmode 929 | 0 930 | argumenttype 931 | 2 932 | escaping 933 | 68 934 | queuedelaycustom 935 | 3 936 | queuedelayimmediatelyinitially 937 | 938 | queuedelaymode 939 | 0 940 | queuemode 941 | 1 942 | runningsubtext 943 | Add to list 944 | script 945 | function run(argv) { 946 | ObjC.import('stdlib'); 947 | const pageTitle = $.getenv('page_title') || ''; 948 | const filesList = ($.getenv('files_list') || '').trim().split('\n'); 949 | const isCheckbox = $.getenv('as_checkbox') === '1'; 950 | const input = $.getenv('add_item'); 951 | let arg = input.trim().replace(/\s/g, ' '); 952 | const subtitle = `as '${pageTitle || arg}'`; 953 | 954 | if (pageTitle) { 955 | arg = `[${pageTitle}](${arg})`; 956 | } 957 | 958 | if (isCheckbox) { 959 | arg = `${isCheckbox ? '- [ ] ' : ''}${arg}`; 960 | } 961 | 962 | const items = filesList.map((filepath) => { 963 | const filename = filepath.match(/.+\/(.+)\.md/i)[1]; 964 | 965 | return { 966 | title: `→ ${filename}`, 967 | subtitle, 968 | arg, 969 | variables: { 970 | file_path: filepath, 971 | }, 972 | }; 973 | }); 974 | 975 | // items.push({ 976 | // arg: '', 977 | // valid: 'yes', 978 | // title:'Create new list', 979 | // icon:{path: './create-new.png'}, 980 | // mods:{ 981 | // 'cmd': {'subtitle': '', 'valid': 'no', 'arg': ''}, 982 | // 'shift': {'subtitle': '', 'valid': 'no', 'arg': ''}, 983 | // 'cmd+alt+shift': {'subtitle': '', 'valid': 'no', 'arg': ''} 984 | // }, 985 | // variables:{ 986 | // list_action: 'create' 987 | // } 988 | // }); 989 | 990 | return JSON.stringify({ 991 | skipknowledge: true, 992 | items, 993 | }); 994 | } 995 | scriptargtype 996 | 1 997 | scriptfile 998 | 999 | subtext 1000 | 1001 | title 1002 | Add to list 1003 | type 1004 | 7 1005 | withspace 1006 | 1007 | 1008 | type 1009 | alfred.workflow.input.scriptfilter 1010 | uid 1011 | 1CBA405D-ADED-4171-9CF8-61791AFA0AA5 1012 | version 1013 | 3 1014 | 1015 | 1016 | config 1017 | 1018 | action 1019 | 0 1020 | argument 1021 | 0 1022 | focusedappvariable 1023 | 1024 | focusedappvariablename 1025 | 1026 | hotkey 1027 | 0 1028 | hotmod 1029 | 0 1030 | hotstring 1031 | 1032 | leftcursor 1033 | 1034 | modsmode 1035 | 0 1036 | relatedAppsMode 1037 | 0 1038 | 1039 | type 1040 | alfred.workflow.trigger.hotkey 1041 | uid 1042 | 406292A0-392D-4CF4-B1A3-C370AC62CDF1 1043 | version 1044 | 2 1045 | 1046 | 1047 | config 1048 | 1049 | action 1050 | 0 1051 | argument 1052 | 1 1053 | focusedappvariable 1054 | 1055 | focusedappvariablename 1056 | 1057 | hotkey 1058 | 0 1059 | hotmod 1060 | 0 1061 | hotstring 1062 | 1063 | leftcursor 1064 | 1065 | modsmode 1066 | 0 1067 | relatedAppsMode 1068 | 0 1069 | 1070 | type 1071 | alfred.workflow.trigger.hotkey 1072 | uid 1073 | EEEB93F3-C8DD-4165-BD54-E0F4BFDDBFB4 1074 | version 1075 | 2 1076 | 1077 | 1078 | config 1079 | 1080 | tasksettings 1081 | 1082 | out_format 1083 | title_tab_url 1084 | 1085 | taskuid 1086 | com.alfredapp.automation.extras/web-browsers/frontmost-browser/frontmost.tabs.current 1087 | 1088 | type 1089 | alfred.workflow.automation.task 1090 | uid 1091 | A3C6B4C8-860A-44C2-B3DE-6B7678DCD6FA 1092 | version 1093 | 1 1094 | 1095 | 1096 | config 1097 | 1098 | concurrently 1099 | 1100 | escaping 1101 | 102 1102 | script 1103 | #!/bin/bash 1104 | 1105 | IFS=$'\n' 1106 | 1107 | files=($(ls "${folder_path}"/*.md)) 1108 | files_list=$(printf '%s\\n' "${files[@]}") 1109 | 1110 | IFS=$'\t' read -r title url <<< "{query}" 1111 | 1112 | printf '{"alfredworkflow": {"arg": "", "variables": {"page_title": "%s", "add_item": "%s", "files_list": "%s", "as_checkbox": "false"}}}' "$title" "$url" "$files_list" 1113 | scriptargtype 1114 | 0 1115 | scriptfile 1116 | 1117 | type 1118 | 0 1119 | 1120 | type 1121 | alfred.workflow.action.script 1122 | uid 1123 | 65379110-B872-4F23-87D6-CD0AD84F79FC 1124 | version 1125 | 2 1126 | 1127 | 1128 | config 1129 | 1130 | argumenttype 1131 | 2 1132 | keyword 1133 | {var:keyword}tab 1134 | subtext 1135 | Currently opened tab in a frontmost browser 1136 | text 1137 | Add tab to list 1138 | withspace 1139 | 1140 | 1141 | type 1142 | alfred.workflow.input.keyword 1143 | uid 1144 | E46B6F22-840D-46D4-AA76-17CFBEAF8176 1145 | version 1146 | 1 1147 | 1148 | 1149 | config 1150 | 1151 | action 1152 | 0 1153 | argument 1154 | 0 1155 | focusedappvariable 1156 | 1157 | focusedappvariablename 1158 | 1159 | hotkey 1160 | 0 1161 | hotmod 1162 | 1703936 1163 | hotstring 1164 | A 1165 | leftcursor 1166 | 1167 | modsmode 1168 | 0 1169 | relatedAppsMode 1170 | 0 1171 | 1172 | type 1173 | alfred.workflow.trigger.hotkey 1174 | uid 1175 | 040F31C0-FABD-49FE-B8BD-5EA505D53EE4 1176 | version 1177 | 2 1178 | 1179 | 1180 | config 1181 | 1182 | externaltriggerid 1183 | open_list 1184 | passinputasargument 1185 | 1186 | passvariables 1187 | 1188 | workflowbundleid 1189 | self 1190 | 1191 | type 1192 | alfred.workflow.output.callexternaltrigger 1193 | uid 1194 | 8E691172-7E11-4FAD-9202-D82211748E00 1195 | version 1196 | 1 1197 | 1198 | 1199 | config 1200 | 1201 | concurrently 1202 | 1203 | escaping 1204 | 103 1205 | script 1206 | #!/bin/bash 1207 | 1208 | items=$(./parse_list.sh) 1209 | 1210 | printf '{ "alfredworkflow": { "arg": "", "variables": { "items": "%s" } } }' "$items" 1211 | scriptargtype 1212 | 1 1213 | scriptfile 1214 | 1215 | type 1216 | 0 1217 | 1218 | type 1219 | alfred.workflow.action.script 1220 | uid 1221 | 2F312EAC-80C9-4DE5-AD1C-7F30DF29B8A6 1222 | version 1223 | 2 1224 | 1225 | 1226 | config 1227 | 1228 | externaltriggerid 1229 | open_item 1230 | passinputasargument 1231 | 1232 | passvariables 1233 | 1234 | workflowbundleid 1235 | self 1236 | 1237 | type 1238 | alfred.workflow.output.callexternaltrigger 1239 | uid 1240 | B3CE81EB-CBFD-404B-B8BF-3F8659F80DEC 1241 | version 1242 | 1 1243 | 1244 | 1245 | config 1246 | 1247 | argument 1248 | 1249 | passthroughargument 1250 | 1251 | variables 1252 | 1253 | file_path 1254 | {query} 1255 | 1256 | 1257 | type 1258 | alfred.workflow.utility.argument 1259 | uid 1260 | E147BFDE-A3FD-42BC-9100-029FF6E2D4BE 1261 | version 1262 | 1 1263 | 1264 | 1265 | config 1266 | 1267 | conditions 1268 | 1269 | 1270 | inputstring 1271 | {var:list_action} 1272 | matchcasesensitive 1273 | 1274 | matchmode 1275 | 0 1276 | matchstring 1277 | open 1278 | outputlabel 1279 | open 1280 | uid 1281 | B181B300-51E2-451B-B4C5-D2731D42A361 1282 | 1283 | 1284 | inputstring 1285 | {var:list_action} 1286 | matchcasesensitive 1287 | 1288 | matchmode 1289 | 0 1290 | matchstring 1291 | open_all 1292 | outputlabel 1293 | open all 1294 | uid 1295 | D9A26F88-1609-472E-ADAC-34355AC93C0B 1296 | 1297 | 1298 | inputstring 1299 | {var:list_action} 1300 | matchcasesensitive 1301 | 1302 | matchmode 1303 | 0 1304 | matchstring 1305 | create 1306 | outputlabel 1307 | create 1308 | uid 1309 | 50619372-75EE-44A5-AABD-FF32BD044700 1310 | 1311 | 1312 | inputstring 1313 | {var:list_action} 1314 | matchcasesensitive 1315 | 1316 | matchmode 1317 | 0 1318 | matchstring 1319 | delete 1320 | outputlabel 1321 | delete 1322 | uid 1323 | BE521F56-BDA0-4D7F-B71F-504774358F1C 1324 | 1325 | 1326 | inputstring 1327 | {var:list_action} 1328 | matchcasesensitive 1329 | 1330 | matchmode 1331 | 0 1332 | matchstring 1333 | external 1334 | outputlabel 1335 | external 1336 | uid 1337 | FCD59321-D478-4406-93FB-E27B6B333FFC 1338 | 1339 | 1340 | elselabel 1341 | create 1342 | hideelse 1343 | 1344 | 1345 | type 1346 | alfred.workflow.utility.conditional 1347 | uid 1348 | A28A9626-BA46-4966-9442-987A799F8472 1349 | version 1350 | 1 1351 | 1352 | 1353 | config 1354 | 1355 | action 1356 | 0 1357 | argument 1358 | 0 1359 | focusedappvariable 1360 | 1361 | focusedappvariablename 1362 | 1363 | hotkey 1364 | 0 1365 | hotmod 1366 | 0 1367 | hotstring 1368 | 1369 | leftcursor 1370 | 1371 | modsmode 1372 | 0 1373 | relatedAppsMode 1374 | 0 1375 | 1376 | type 1377 | alfred.workflow.trigger.hotkey 1378 | uid 1379 | 10901C44-E1B5-47A1-B5DE-70FA233D92A2 1380 | version 1381 | 2 1382 | 1383 | 1384 | config 1385 | 1386 | alfredfiltersresults 1387 | 1388 | alfredfiltersresultsmatchmode 1389 | 0 1390 | argumenttreatemptyqueryasnil 1391 | 1392 | argumenttrimmode 1393 | 0 1394 | argumenttype 1395 | 1 1396 | escaping 1397 | 102 1398 | keyword 1399 | {var:keyword} 1400 | queuedelaycustom 1401 | 3 1402 | queuedelayimmediatelyinitially 1403 | 1404 | queuedelaymode 1405 | 0 1406 | queuemode 1407 | 1 1408 | runningsubtext 1409 | Loading lists… 1410 | script 1411 | #!/bin/bash 1412 | 1413 | if [[ -z $folder_path ]]; then 1414 | printf '{"items":[ 1415 | { 1416 | "arg":"", 1417 | "valid":"no", 1418 | "title":"Please specify existing folder in workflow config" 1419 | } 1420 | ]}' 1421 | exit 1422 | fi 1423 | 1424 | IFS=$'\n' 1425 | 1426 | files=($(ls "${folder_path}"/*.md)) 1427 | 1428 | printf '{"items":[' 1429 | 1430 | for file in "${files[@]}"; do 1431 | filename=$(basename $file) 1432 | count=$(grep -vcE '^(-|\*) \[x\]' $file) 1433 | count_all=$(grep -cE '^(-|\*) \[x\]' $file) 1434 | 1435 | printf '{ 1436 | "arg":"%s", 1437 | "valid":"yes", 1438 | "title":"%s [%s]", 1439 | "mods":{ 1440 | "cmd":{ 1441 | "subtitle":"⌘: Open in editor", 1442 | "variables":{ 1443 | "list_action":"external" 1444 | } 1445 | }, 1446 | "shift":{ 1447 | "subtitle":"⇧: Show with checked items [%s]", 1448 | "variables":{ 1449 | "list_action":"open", 1450 | "show_checked":"true" 1451 | } 1452 | }, 1453 | "cmd+shift":{ 1454 | "subtitle":"⌘⇧: Open all items", 1455 | "variables":{ 1456 | "list_action":"open_all" 1457 | } 1458 | }, 1459 | "cmd+alt+shift":{ 1460 | "subtitle":"⌘⌥⇧: DELETE list permanently", 1461 | "icon": { 1462 | "path":"./delete.png" 1463 | }, 1464 | "variables":{ 1465 | "list_action":"delete" 1466 | } 1467 | } 1468 | }, 1469 | "variables":{ 1470 | "list_action":"open", 1471 | "show_checked":"false" 1472 | } 1473 | },' "$file" "${filename%.*}" "$count" "$count_all" 1474 | done 1475 | 1476 | printf '{ 1477 | "arg":"", 1478 | "valid":"yes", 1479 | "title":"Create new list", 1480 | "icon":{"path":"./create-new.png"}, 1481 | "mods":{ 1482 | "cmd":{"subtitle":"", "valid":"no", "arg":""}, 1483 | "shift":{"subtitle":"", "valid":"no", "arg":""}, 1484 | "cmd+shift":{"subtitle":"", "valid":"no", "arg":""}, 1485 | "cmd+alt+shift":{"subtitle":"", "valid":"no", "arg":""} 1486 | }, 1487 | "variables":{ 1488 | "list_action":"create" 1489 | } 1490 | }' 1491 | 1492 | printf ']}' 1493 | scriptargtype 1494 | 0 1495 | scriptfile 1496 | 1497 | skipuniversalaction 1498 | 1499 | subtext 1500 | 1501 | title 1502 | Bookmark Vault 1503 | type 1504 | 0 1505 | withspace 1506 | 1507 | 1508 | type 1509 | alfred.workflow.input.scriptfilter 1510 | uid 1511 | A0EC1E3A-A7D8-44BC-818B-4CBDA7F79166 1512 | version 1513 | 3 1514 | 1515 | 1516 | config 1517 | 1518 | argument 1519 | 1520 | passthroughargument 1521 | 1522 | variables 1523 | 1524 | file_path 1525 | {query} 1526 | 1527 | 1528 | type 1529 | alfred.workflow.utility.argument 1530 | uid 1531 | 67C6BC64-F6DB-41C4-9815-499C6B712E7B 1532 | version 1533 | 1 1534 | 1535 | 1536 | config 1537 | 1538 | concurrently 1539 | 1540 | escaping 1541 | 103 1542 | script 1543 | #!/bin/bash 1544 | 1545 | touch "${folder_path}/${1}.md" 1546 | scriptargtype 1547 | 1 1548 | scriptfile 1549 | 1550 | type 1551 | 0 1552 | 1553 | type 1554 | alfred.workflow.action.script 1555 | uid 1556 | 60E66A3C-B7DB-4CE1-A705-0BDEC0AF0AC5 1557 | version 1558 | 2 1559 | 1560 | 1561 | config 1562 | 1563 | argumenttype 1564 | 0 1565 | skipuniversalaction 1566 | 1567 | subtext 1568 | 1569 | text 1570 | Create '{query}.md' 1571 | withspace 1572 | 1573 | 1574 | inboundconfig 1575 | 1576 | externalid 1577 | create_list 1578 | 1579 | type 1580 | alfred.workflow.input.keyword 1581 | uid 1582 | 6842F50F-F7AC-41F5-9B9D-391841CEAABF 1583 | version 1584 | 1 1585 | 1586 | 1587 | config 1588 | 1589 | availableviaurlhandler 1590 | 1591 | triggerid 1592 | show_lists 1593 | 1594 | type 1595 | alfred.workflow.trigger.external 1596 | uid 1597 | 9EF6472F-2234-419F-890C-2B6891C56718 1598 | version 1599 | 1 1600 | 1601 | 1602 | config 1603 | 1604 | concurrently 1605 | 1606 | escaping 1607 | 102 1608 | script 1609 | #!/bin/bash 1610 | 1611 | rm "{query}" 1612 | scriptargtype 1613 | 0 1614 | scriptfile 1615 | 1616 | type 1617 | 0 1618 | 1619 | type 1620 | alfred.workflow.action.script 1621 | uid 1622 | 8F40CA58-2BC5-4379-A074-8147CA9A0D37 1623 | version 1624 | 2 1625 | 1626 | 1627 | config 1628 | 1629 | externaltriggerid 1630 | show_lists 1631 | passinputasargument 1632 | 1633 | passvariables 1634 | 1635 | workflowbundleid 1636 | self 1637 | 1638 | type 1639 | alfred.workflow.output.callexternaltrigger 1640 | uid 1641 | 6EA11B33-D4A6-4775-8543-C04B7602A99B 1642 | version 1643 | 1 1644 | 1645 | 1646 | config 1647 | 1648 | openwith 1649 | 1650 | sourcefile 1651 | 1652 | 1653 | type 1654 | alfred.workflow.action.openfile 1655 | uid 1656 | 5E0CFAC8-AA68-4BAA-8B45-2CE0707D96E8 1657 | version 1658 | 3 1659 | 1660 | 1661 | config 1662 | 1663 | concurrently 1664 | 1665 | escaping 1666 | 68 1667 | script 1668 | function run(argv) { 1669 | ObjC.import('stdlib'); 1670 | const searchEngine = $.getenv('search_engine'); 1671 | const items = JSON.parse($.getenv('items')); 1672 | 1673 | const searchEnginesMap = (query) => { 1674 | const map = { 1675 | google: `https://google.com/search?q=${query}`, 1676 | duckduckgo: `https://duckduckgo.com/?q=${query}`, 1677 | }; 1678 | 1679 | return map[searchEngine]; 1680 | }; 1681 | 1682 | const getUrl = (item) => { 1683 | if (item.href) { 1684 | return item.href 1685 | } 1686 | 1687 | return searchEnginesMap(item.text); 1688 | }; 1689 | 1690 | const urls = Array.isArray(items) ? items.map(getUrl) : getUrl(items); 1691 | 1692 | return JSON.stringify({ 1693 | alfredworkflow: { 1694 | arg: urls, 1695 | }, 1696 | }); 1697 | } 1698 | scriptargtype 1699 | 1 1700 | scriptfile 1701 | 1702 | type 1703 | 7 1704 | 1705 | type 1706 | alfred.workflow.action.script 1707 | uid 1708 | B6784D37-3559-4C4D-8A34-4C740D03C8FE 1709 | version 1710 | 2 1711 | 1712 | 1713 | config 1714 | 1715 | browser 1716 | 1717 | skipqueryencode 1718 | 1719 | skipvarencode 1720 | 1721 | spaces 1722 | 1723 | url 1724 | {query} 1725 | 1726 | type 1727 | alfred.workflow.action.openurl 1728 | uid 1729 | E8BADEFB-E178-4BE6-B35A-F2A5A9A1EF17 1730 | version 1731 | 1 1732 | 1733 | 1734 | config 1735 | 1736 | availableviaurlhandler 1737 | 1738 | triggerid 1739 | open_item 1740 | 1741 | type 1742 | alfred.workflow.trigger.external 1743 | uid 1744 | A013A9B4-3B19-4889-A859-092BEB536969 1745 | version 1746 | 1 1747 | 1748 | 1749 | config 1750 | 1751 | conditions 1752 | 1753 | 1754 | inputstring 1755 | {var:action} 1756 | matchcasesensitive 1757 | 1758 | matchmode 1759 | 0 1760 | matchstring 1761 | delete 1762 | outputlabel 1763 | delete 1764 | uid 1765 | 19BDAD35-B622-49FE-89DF-A06AC3C86A21 1766 | 1767 | 1768 | inputstring 1769 | {var:action} 1770 | matchcasesensitive 1771 | 1772 | matchmode 1773 | 0 1774 | matchstring 1775 | convert 1776 | outputlabel 1777 | convert 1778 | uid 1779 | 2A41A5F2-F784-4BED-ABD3-76EE65405932 1780 | 1781 | 1782 | inputstring 1783 | {var:action} 1784 | matchcasesensitive 1785 | 1786 | matchmode 1787 | 0 1788 | matchstring 1789 | toggle 1790 | outputlabel 1791 | toggle 1792 | uid 1793 | 624A879E-7838-43DD-9D5C-5EC598219CA5 1794 | 1795 | 1796 | inputstring 1797 | {var:action} 1798 | matchcasesensitive 1799 | 1800 | matchmode 1801 | 0 1802 | matchstring 1803 | open 1804 | outputlabel 1805 | open 1806 | uid 1807 | 93B6814D-DC48-43BE-81AE-F281EDBA9460 1808 | 1809 | 1810 | inputstring 1811 | {var:action} 1812 | matchcasesensitive 1813 | 1814 | matchmode 1815 | 0 1816 | matchstring 1817 | search 1818 | outputlabel 1819 | search 1820 | uid 1821 | 8FF9FC34-7952-4085-BDF8-5BF8AF094B6F 1822 | 1823 | 1824 | inputstring 1825 | {var:action} 1826 | matchcasesensitive 1827 | 1828 | matchmode 1829 | 0 1830 | matchstring 1831 | add 1832 | outputlabel 1833 | add 1834 | uid 1835 | 67B9B543-087C-4C74-B242-B3321934C013 1836 | 1837 | 1838 | inputstring 1839 | {var:action} 1840 | matchcasesensitive 1841 | 1842 | matchmode 1843 | 0 1844 | matchstring 1845 | back 1846 | outputlabel 1847 | back 1848 | uid 1849 | A9276842-DE17-46C3-8D98-153B1FE53767 1850 | 1851 | 1852 | elselabel 1853 | open 1854 | hideelse 1855 | 1856 | 1857 | type 1858 | alfred.workflow.utility.conditional 1859 | uid 1860 | 5C3950D1-71B8-4B80-AFDF-49BF85414871 1861 | version 1862 | 1 1863 | 1864 | 1865 | config 1866 | 1867 | concurrently 1868 | 1869 | escaping 1870 | 68 1871 | script 1872 | function run(argv) { 1873 | ObjC.import('stdlib'); 1874 | const item = JSON.parse($.getenv('items')); 1875 | const list = $.getenv('items_list').split('\n'); 1876 | const action = $.getenv('action'); 1877 | 1878 | switch (action) { 1879 | case 'delete': 1880 | return list.filter((i) => i !== item.raw).join('\n'); 1881 | case 'convert': 1882 | for (let index = 0; index < list.length; index++) { 1883 | if (list[index] === item.raw) { 1884 | list[index] = item.isCheckbox ? item.checkboxLabel : `- [ ] ${item.raw}`; 1885 | return list.join('\n'); 1886 | } 1887 | }; 1888 | case 'toggle': 1889 | if (!item.isCheckbox) { 1890 | return list.join('\n'); 1891 | } 1892 | for (let index = 0; index < list.length; index++) { 1893 | if (list[index] === item.raw) { 1894 | list[index] = `- [${item.isChecked ? ' ' : 'x'}] ${item.checkboxLabel}`; 1895 | return list.join('\n'); 1896 | } 1897 | }; 1898 | case 'open': 1899 | case 'search': 1900 | if (!item.isCheckbox) { 1901 | return list.join('\n'); 1902 | } 1903 | for (let index = 0; index < list.length; index++) { 1904 | if (list[index] === item.raw) { 1905 | list[index] = `- [x] ${item.checkboxLabel}`; 1906 | return list.join('\n'); 1907 | } 1908 | }; 1909 | default: 1910 | return list.join('\n'); 1911 | } 1912 | } 1913 | scriptargtype 1914 | 1 1915 | scriptfile 1916 | 1917 | type 1918 | 7 1919 | 1920 | type 1921 | alfred.workflow.action.script 1922 | uid 1923 | DD30017C-8EA1-400A-964F-BC80E0BE7C3B 1924 | version 1925 | 2 1926 | 1927 | 1928 | config 1929 | 1930 | adduuid 1931 | 1932 | allowemptyfiles 1933 | 1934 | createintermediatefolders 1935 | 1936 | filename 1937 | {var:file_path} 1938 | filetext 1939 | {query} 1940 | ignoredynamicplaceholders 1941 | 1942 | relativepathmode 1943 | 1 1944 | type 1945 | 1 1946 | 1947 | type 1948 | alfred.workflow.output.writefile 1949 | uid 1950 | 302E1E16-91B8-4179-A372-083A10B4E6CE 1951 | version 1952 | 1 1953 | 1954 | 1955 | config 1956 | 1957 | externaltriggerid 1958 | open_list 1959 | passinputasargument 1960 | 1961 | passvariables 1962 | 1963 | workflowbundleid 1964 | self 1965 | 1966 | type 1967 | alfred.workflow.output.callexternaltrigger 1968 | uid 1969 | EED2114B-0E25-4079-A422-29B807720A11 1970 | version 1971 | 1 1972 | 1973 | 1974 | config 1975 | 1976 | conditions 1977 | 1978 | 1979 | inputstring 1980 | {var:action} 1981 | matchcasesensitive 1982 | 1983 | matchmode 1984 | 0 1985 | matchstring 1986 | delete 1987 | outputlabel 1988 | delete 1989 | uid 1990 | 19BDAD35-B622-49FE-89DF-A06AC3C86A21 1991 | 1992 | 1993 | inputstring 1994 | {var:action} 1995 | matchcasesensitive 1996 | 1997 | matchmode 1998 | 0 1999 | matchstring 2000 | convert 2001 | outputlabel 2002 | convert 2003 | uid 2004 | 2A41A5F2-F784-4BED-ABD3-76EE65405932 2005 | 2006 | 2007 | inputstring 2008 | {var:action} 2009 | matchcasesensitive 2010 | 2011 | matchmode 2012 | 0 2013 | matchstring 2014 | toggle 2015 | outputlabel 2016 | toggle 2017 | uid 2018 | 624A879E-7838-43DD-9D5C-5EC598219CA5 2019 | 2020 | 2021 | elselabel 2022 | open 2023 | hideelse 2024 | 2025 | 2026 | type 2027 | alfred.workflow.utility.conditional 2028 | uid 2029 | 9E888CB9-4AB9-4E82-9A95-99DB3D88ECC0 2030 | version 2031 | 1 2032 | 2033 | 2034 | config 2035 | 2036 | type 2037 | 0 2038 | 2039 | type 2040 | alfred.workflow.utility.transform 2041 | uid 2042 | 2F77B88F-0DDA-45E8-901C-D634CFA40459 2043 | version 2044 | 1 2045 | 2046 | 2047 | config 2048 | 2049 | alfredfiltersresults 2050 | 2051 | alfredfiltersresultsmatchmode 2052 | 2 2053 | argumenttreatemptyqueryasnil 2054 | 2055 | argumenttrimmode 2056 | 0 2057 | argumenttype 2058 | 2 2059 | escaping 2060 | 68 2061 | queuedelaycustom 2062 | 3 2063 | queuedelayimmediatelyinitially 2064 | 2065 | queuedelaymode 2066 | 0 2067 | queuemode 2068 | 1 2069 | runningsubtext 2070 | Getting list... 2071 | script 2072 | function run(argv) { 2073 | ObjC.import('stdlib'); 2074 | const showChecked = $.getenv('show_checked') === 'true'; 2075 | const list = $.getenv('items_list').split('\n'); 2076 | const items = []; 2077 | 2078 | const mdCheckboxMatch = /(?:-|\*) \[(x| )\] (.+)$/i; 2079 | const url = "https?:\\/\\/(?:[\\w-]+(\\.[\\w-]+)+|localhost|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})(:\\d+)?\\S*"; 2080 | const urlRegex = new RegExp(`^${url}$`, 'i'); 2081 | const mdLinkRegex = new RegExp(`\\[(.*)\]\\((${url})\\)`, 'i'); 2082 | 2083 | function getItemParts(str) { 2084 | const checkboxedMatch = str.match(mdCheckboxMatch); 2085 | 2086 | const result = { 2087 | raw: str, 2088 | text: str, 2089 | href: null, 2090 | iconPath: null, 2091 | isCheckbox: false, 2092 | isChecked: false, 2093 | checkboxLabel: null, 2094 | }; 2095 | 2096 | if (checkboxedMatch) { 2097 | result.isCheckbox = true; 2098 | result.isChecked = checkboxedMatch[1] === 'x'; 2099 | result.checkboxLabel = checkboxedMatch[2]; 2100 | result.text = checkboxedMatch[2]; 2101 | } 2102 | 2103 | const isURL = urlRegex.test(result.text); 2104 | const mdLinkMatch = result.text.match(mdLinkRegex); 2105 | 2106 | result.iconPath = result.isCheckbox 2107 | ? result.isChecked 2108 | ? './checked.png' 2109 | : './unchecked.png' 2110 | : null; 2111 | 2112 | if (isURL) { 2113 | result.href = result.text; 2114 | } else if (mdLinkMatch) { 2115 | result.text = mdLinkMatch[1]; 2116 | result.href = mdLinkMatch[2]; 2117 | } 2118 | 2119 | return result; 2120 | } 2121 | 2122 | list.filter((item) => item.trim()).forEach((item) => { 2123 | const itemParts = getItemParts(item); 2124 | const { text, iconPath, href, isCheckbox, isChecked } = itemParts; 2125 | const parsedItem = JSON.stringify(itemParts, null, 0); 2126 | 2127 | if (isChecked && !showChecked) { 2128 | return; 2129 | } 2130 | 2131 | const currentItem = { 2132 | title: text, 2133 | subtitle: href === text ? '' : href || '', 2134 | text: { 2135 | copy: href || text, 2136 | }, 2137 | quicklookurl: href || '', 2138 | arg: text, 2139 | mods: { 2140 | 'cmd+alt+shift': { 2141 | subtitle: '⌘⌥⇧: DELETE permanently', 2142 | icon: { 2143 | path: './delete.png', 2144 | }, 2145 | variables: { 2146 | action: 'delete', 2147 | items: parsedItem, 2148 | }, 2149 | }, 2150 | 'shift': { 2151 | subtitle: isCheckbox ? '⇧: Convert to plain item' : '⇧: Convert to checkbox item', 2152 | variables: { 2153 | action: 'convert', 2154 | items: parsedItem, 2155 | }, 2156 | }, 2157 | }, 2158 | icon: { 2159 | path: iconPath, 2160 | }, 2161 | variables: { 2162 | action: href ? 'open' : 'search', 2163 | items: parsedItem, 2164 | }, 2165 | }; 2166 | 2167 | if (isCheckbox) { 2168 | currentItem.mods['cmd+shift'] = { 2169 | valid: isCheckbox, 2170 | subtitle: isChecked ? '⌘⇧: Uncheck item' : '⌘⇧: Check item', 2171 | variables: { 2172 | action: 'toggle', 2173 | items: parsedItem 2174 | }, 2175 | }; 2176 | } 2177 | 2178 | items.push(currentItem); 2179 | }); 2180 | 2181 | items.push({ 2182 | title: 'Add item…', 2183 | icon: { 2184 | path: './create-new.png', 2185 | }, 2186 | variables: { 2187 | action: 'add', 2188 | } 2189 | }); 2190 | 2191 | items.push({ 2192 | title: 'Go back', 2193 | icon: { 2194 | path: './back.png', 2195 | }, 2196 | variables: { 2197 | action: 'back', 2198 | } 2199 | }); 2200 | 2201 | return JSON.stringify({ 2202 | skipknowledge: true, 2203 | items, 2204 | }); 2205 | } 2206 | scriptargtype 2207 | 1 2208 | scriptfile 2209 | 2210 | subtext 2211 | 2212 | title 2213 | Reading list 2214 | type 2215 | 7 2216 | withspace 2217 | 2218 | 2219 | type 2220 | alfred.workflow.input.scriptfilter 2221 | uid 2222 | F3D37694-B5B4-486E-8621-AD1B525510F5 2223 | version 2224 | 3 2225 | 2226 | 2227 | config 2228 | 2229 | concurrently 2230 | 2231 | escaping 2232 | 102 2233 | script 2234 | #!/bin/bash 2235 | 2236 | cat "${file_path}" 2237 | scriptargtype 2238 | 1 2239 | scriptfile 2240 | 2241 | type 2242 | 0 2243 | 2244 | type 2245 | alfred.workflow.action.script 2246 | uid 2247 | FEAF9D6C-A10E-4BD7-AE09-6B8F101BDF4F 2248 | version 2249 | 2 2250 | 2251 | 2252 | config 2253 | 2254 | availableviaurlhandler 2255 | 2256 | triggerid 2257 | open_list 2258 | 2259 | type 2260 | alfred.workflow.trigger.external 2261 | uid 2262 | AA4A5176-93BC-4BA7-B097-293FF93F007D 2263 | version 2264 | 1 2265 | 2266 | 2267 | config 2268 | 2269 | argument 2270 | 2271 | passthroughargument 2272 | 2273 | variables 2274 | 2275 | items_list 2276 | {query} 2277 | 2278 | 2279 | type 2280 | alfred.workflow.utility.argument 2281 | uid 2282 | B0F8418E-4678-4367-9FA8-AC52CDDD026C 2283 | version 2284 | 1 2285 | 2286 | 2287 | config 2288 | 2289 | externaltriggerid 2290 | open_item 2291 | passinputasargument 2292 | 2293 | passvariables 2294 | 2295 | workflowbundleid 2296 | self 2297 | 2298 | type 2299 | alfred.workflow.output.callexternaltrigger 2300 | uid 2301 | 234CC09E-2B28-4152-BE00-1104084F6E31 2302 | version 2303 | 1 2304 | 2305 | 2306 | config 2307 | 2308 | externaltriggerid 2309 | add_item 2310 | passinputasargument 2311 | 2312 | passvariables 2313 | 2314 | workflowbundleid 2315 | self 2316 | 2317 | type 2318 | alfred.workflow.output.callexternaltrigger 2319 | uid 2320 | 396091EF-7EF3-4395-9DC2-A20951D01CE2 2321 | version 2322 | 1 2323 | 2324 | 2325 | config 2326 | 2327 | externaltriggerid 2328 | show_lists 2329 | passinputasargument 2330 | 2331 | passvariables 2332 | 2333 | workflowbundleid 2334 | self 2335 | 2336 | type 2337 | alfred.workflow.output.callexternaltrigger 2338 | uid 2339 | 5DA3225A-CFA9-481B-ACE0-C14F0327E9C8 2340 | version 2341 | 1 2342 | 2343 | 2344 | readme 2345 | ![Bookmark Vault](./icon.png) 2346 | 2347 | # Bookmark Vault 2348 | Workflow that helps you manage your links and quick search notes. 2349 | 2350 | [Description](https://github.com/colomolo/alfred-bookmarks) 2351 | uidata 2352 | 2353 | 040F31C0-FABD-49FE-B8BD-5EA505D53EE4 2354 | 2355 | note 2356 | Add frontmost browser's tab url to the list 2357 | xpos 2358 | 180 2359 | ypos 2360 | 510 2361 | 2362 | 10901C44-E1B5-47A1-B5DE-70FA233D92A2 2363 | 2364 | xpos 2365 | 30 2366 | ypos 2367 | 775 2368 | 2369 | 1CBA405D-ADED-4171-9CF8-61791AFA0AA5 2370 | 2371 | xpos 2372 | 690 2373 | ypos 2374 | 180 2375 | 2376 | 234CC09E-2B28-4152-BE00-1104084F6E31 2377 | 2378 | colorindex 2379 | 5 2380 | xpos 2381 | 1645 2382 | ypos 2383 | 1605 2384 | 2385 | 2F312EAC-80C9-4DE5-AD1C-7F30DF29B8A6 2386 | 2387 | xpos 2388 | 565 2389 | ypos 2390 | 725 2391 | 2392 | 2F77B88F-0DDA-45E8-901C-D634CFA40459 2393 | 2394 | xpos 2395 | 1800 2396 | ypos 2397 | 1510 2398 | 2399 | 302E1E16-91B8-4179-A372-083A10B4E6CE 2400 | 2401 | colorindex 2402 | 2 2403 | xpos 2404 | 1870 2405 | ypos 2406 | 1480 2407 | 2408 | 396091EF-7EF3-4395-9DC2-A20951D01CE2 2409 | 2410 | colorindex 2411 | 7 2412 | xpos 2413 | 1645 2414 | ypos 2415 | 1740 2416 | 2417 | 406292A0-392D-4CF4-B1A3-C370AC62CDF1 2418 | 2419 | xpos 2420 | 30 2421 | ypos 2422 | 240 2423 | 2424 | 474362A0-D044-4360-913E-BEA54A24A03E 2425 | 2426 | colorindex 2427 | 7 2428 | xpos 2429 | 180 2430 | ypos 2431 | 115 2432 | 2433 | 5407019E-F89B-423E-9A9E-B6CDF12D14A3 2434 | 2435 | xpos 2436 | 340 2437 | ypos 2438 | 115 2439 | 2440 | 5C3950D1-71B8-4B80-AFDF-49BF85414871 2441 | 2442 | note 2443 | Item actions 2444 | xpos 2445 | 1515 2446 | ypos 2447 | 1470 2448 | 2449 | 5DA3225A-CFA9-481B-ACE0-C14F0327E9C8 2450 | 2451 | colorindex 2452 | 11 2453 | xpos 2454 | 1645 2455 | ypos 2456 | 1880 2457 | 2458 | 5E0CFAC8-AA68-4BAA-8B45-2CE0707D96E8 2459 | 2460 | xpos 2461 | 565 2462 | ypos 2463 | 1145 2464 | 2465 | 60E66A3C-B7DB-4CE1-A705-0BDEC0AF0AC5 2466 | 2467 | xpos 2468 | 720 2469 | ypos 2470 | 855 2471 | 2472 | 65379110-B872-4F23-87D6-CD0AD84F79FC 2473 | 2474 | xpos 2475 | 495 2476 | ypos 2477 | 385 2478 | 2479 | 67C6BC64-F6DB-41C4-9815-499C6B712E7B 2480 | 2481 | xpos 2482 | 495 2483 | ypos 2484 | 815 2485 | 2486 | 6842F50F-F7AC-41F5-9B9D-391841CEAABF 2487 | 2488 | note 2489 | Create list 2490 | xpos 2491 | 565 2492 | ypos 2493 | 855 2494 | 2495 | 6EA11B33-D4A6-4775-8543-C04B7602A99B 2496 | 2497 | colorindex 2498 | 11 2499 | xpos 2500 | 875 2501 | ypos 2502 | 1005 2503 | 2504 | 7A76445F-1E80-4804-BFB6-661EE530E999 2505 | 2506 | xpos 2507 | 905 2508 | ypos 2509 | 145 2510 | 2511 | 7BDA4EA1-7A0C-45E8-84AC-FF15C322DECF 2512 | 2513 | colorindex 2514 | 7 2515 | xpos 2516 | 30 2517 | ypos 2518 | 115 2519 | 2520 | 8C10DDB1-AF6C-4DC0-A8A9-98AFBD5B8108 2521 | 2522 | colorindex 2523 | 2 2524 | xpos 2525 | 970 2526 | ypos 2527 | 115 2528 | 2529 | 8E691172-7E11-4FAD-9202-D82211748E00 2530 | 2531 | colorindex 2532 | 3 2533 | xpos 2534 | 565 2535 | ypos 2536 | 590 2537 | 2538 | 8F40CA58-2BC5-4379-A074-8147CA9A0D37 2539 | 2540 | xpos 2541 | 565 2542 | ypos 2543 | 1005 2544 | 2545 | 9E888CB9-4AB9-4E82-9A95-99DB3D88ECC0 2546 | 2547 | xpos 2548 | 2020 2549 | ypos 2550 | 1485 2551 | 2552 | 9EF6472F-2234-419F-890C-2B6891C56718 2553 | 2554 | colorindex 2555 | 11 2556 | xpos 2557 | 30 2558 | ypos 2559 | 915 2560 | 2561 | A013A9B4-3B19-4889-A859-092BEB536969 2562 | 2563 | colorindex 2564 | 5 2565 | xpos 2566 | 1125 2567 | ypos 2568 | 1255 2569 | 2570 | A0EC1E3A-A7D8-44BC-818B-4CBDA7F79166 2571 | 2572 | colorindex 2573 | 11 2574 | xpos 2575 | 180 2576 | ypos 2577 | 775 2578 | 2579 | A28A9626-BA46-4966-9442-987A799F8472 2580 | 2581 | note 2582 | List actions 2583 | xpos 2584 | 379 2585 | ypos 2586 | 765 2587 | 2588 | A3C6B4C8-860A-44C2-B3DE-6B7678DCD6FA 2589 | 2590 | xpos 2591 | 340 2592 | ypos 2593 | 385 2594 | 2595 | AA4A5176-93BC-4BA7-B097-293FF93F007D 2596 | 2597 | colorindex 2598 | 3 2599 | xpos 2600 | 970 2601 | ypos 2602 | 1525 2603 | 2604 | B0F8418E-4678-4367-9FA8-AC52CDDD026C 2605 | 2606 | xpos 2607 | 1270 2608 | ypos 2609 | 1555 2610 | 2611 | B3CE81EB-CBFD-404B-B8BF-3F8659F80DEC 2612 | 2613 | colorindex 2614 | 5 2615 | xpos 2616 | 720 2617 | ypos 2618 | 725 2619 | 2620 | B6784D37-3559-4C4D-8A34-4C740D03C8FE 2621 | 2622 | xpos 2623 | 1300 2624 | ypos 2625 | 1255 2626 | 2627 | D7C794C6-A937-4498-B344-EBBC1130D11A 2628 | 2629 | xpos 2630 | 690 2631 | ypos 2632 | 50 2633 | 2634 | DD30017C-8EA1-400A-964F-BC80E0BE7C3B 2635 | 2636 | xpos 2637 | 1645 2638 | ypos 2639 | 1480 2640 | 2641 | E147BFDE-A3FD-42BC-9100-029FF6E2D4BE 2642 | 2643 | xpos 2644 | 485 2645 | ypos 2646 | 760 2647 | 2648 | E46B6F22-840D-46D4-AA76-17CFBEAF8176 2649 | 2650 | xpos 2651 | 180 2652 | ypos 2653 | 385 2654 | 2655 | E8BADEFB-E178-4BE6-B35A-F2A5A9A1EF17 2656 | 2657 | xpos 2658 | 1455 2659 | ypos 2660 | 1255 2661 | 2662 | EED2114B-0E25-4079-A422-29B807720A11 2663 | 2664 | colorindex 2665 | 3 2666 | xpos 2667 | 2130 2668 | ypos 2669 | 1480 2670 | 2671 | EEEB93F3-C8DD-4165-BD54-E0F4BFDDBFB4 2672 | 2673 | note 2674 | Add selection 2675 | xpos 2676 | 30 2677 | ypos 2678 | 370 2679 | 2680 | F2779F39-D160-463F-A7FA-C6DA46262DB2 2681 | 2682 | xpos 2683 | 490 2684 | ypos 2685 | 135 2686 | 2687 | F3D37694-B5B4-486E-8621-AD1B525510F5 2688 | 2689 | note 2690 | Items 2691 | xpos 2692 | 1340 2693 | ypos 2694 | 1525 2695 | 2696 | FEAF9D6C-A10E-4BD7-AE09-6B8F101BDF4F 2697 | 2698 | xpos 2699 | 1125 2700 | ypos 2701 | 1525 2702 | 2703 | 2704 | userconfigurationconfig 2705 | 2706 | 2707 | config 2708 | 2709 | default 2710 | bk 2711 | placeholder 2712 | 2713 | required 2714 | 2715 | trim 2716 | 2717 | 2718 | description 2719 | 2720 | label 2721 | Keyword 2722 | type 2723 | textfield 2724 | variable 2725 | keyword 2726 | 2727 | 2728 | config 2729 | 2730 | default 2731 | 2732 | filtermode 2733 | 1 2734 | placeholder 2735 | 2736 | required 2737 | 2738 | 2739 | description 2740 | Markdown files will be created here 2741 | label 2742 | Working folder 2743 | type 2744 | filepicker 2745 | variable 2746 | folder_path 2747 | 2748 | 2749 | config 2750 | 2751 | default 2752 | duckduckgo 2753 | pairs 2754 | 2755 | 2756 | DuckDuckGo 2757 | duckduckgo 2758 | 2759 | 2760 | Google 2761 | google 2762 | 2763 | 2764 | 2765 | description 2766 | 2767 | label 2768 | Search with 2769 | type 2770 | popupbutton 2771 | variable 2772 | search_engine 2773 | 2774 | 2775 | version 2776 | 1.4.2 2777 | webaddress 2778 | http://colomolome.com 2779 | 2780 | 2781 | -------------------------------------------------------------------------------- /list-items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/list-items.png -------------------------------------------------------------------------------- /lists.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/lists.png -------------------------------------------------------------------------------- /markdown-link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/markdown-link.png -------------------------------------------------------------------------------- /parse_items.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env osascript -l JavaScript 2 | 3 | function run(argv) { 4 | const list = argv[0].split('\n'); 5 | const showChecked = argv[1] === 'true'; 6 | const items = []; 7 | 8 | const mdCheckboxMatch = /(?:-|\*) \[(x| )\] (.+)$/i; 9 | const url = 10 | 'https?:\\/\\/(?:[\\w-]+(\\.[\\w-]+)+|localhost|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})(:\\d+)?\\S*'; 11 | const urlRegex = new RegExp(`^${url}$`, 'i'); 12 | const mdLinkRegex = new RegExp(`\\[(.*)\]\\((${url})\\)`, 'i'); 13 | 14 | function parseItem(str) { 15 | const checkboxedMatch = str.match(mdCheckboxMatch); 16 | 17 | const result = { 18 | raw: str, 19 | text: str, 20 | href: null, 21 | iconPath: null, 22 | isCheckbox: false, 23 | isChecked: false, 24 | checkboxLabel: null, 25 | }; 26 | 27 | if (checkboxedMatch) { 28 | result.isCheckbox = true; 29 | result.isChecked = checkboxedMatch[1] === 'x'; 30 | result.checkboxLabel = checkboxedMatch[2]; 31 | result.text = checkboxedMatch[2]; 32 | } 33 | 34 | const isURL = urlRegex.test(result.text); 35 | const mdLinkMatch = result.text.match(mdLinkRegex); 36 | 37 | result.iconPath = result.isCheckbox 38 | ? result.isChecked 39 | ? './checked.png' 40 | : './unchecked.png' 41 | : null; 42 | 43 | if (isURL) { 44 | result.href = result.text; 45 | } else if (mdLinkMatch) { 46 | result.text = mdLinkMatch[1]; 47 | result.href = mdLinkMatch[2]; 48 | } 49 | 50 | return result; 51 | } 52 | 53 | list 54 | .filter((item) => item.trim()) 55 | .forEach((item) => { 56 | const parsedItem = parseItem(item); 57 | 58 | if (parsedItem.isChecked && !showChecked) { 59 | return; 60 | } 61 | 62 | items.push(parsedItem); 63 | }); 64 | 65 | return JSON.stringify(items); 66 | } 67 | -------------------------------------------------------------------------------- /parse_list.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | list=$(cat "${file_path}") 4 | items=$(./parse_items.js "$list" "$show_checked") 5 | 6 | printf "%s" "${items//\"/\\\"}" 7 | -------------------------------------------------------------------------------- /unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/colomolo/alfred-bookmarks/61f554fd234c26da980db4528ed4f6efd7b5b58c/unchecked.png --------------------------------------------------------------------------------