FlorianWoelki / obsidian-iconize

Simply add icons to anything you want in Obsidian.
https://florianwoelki.github.io/obsidian-iconize/
MIT License
808 stars 55 forks source link

Automatic Updates for Icon Packs #195

Open segsmachine opened 1 year ago

segsmachine commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, users of the Obsidian Icon Folder plugin have to manually update their installed icon packs. This can be time-consuming and inconvenient, especially when new versions of the icon packs are released frequently. In addition, the names aren't the same

Describe the solution you'd like I would like to suggest the addition of a new feature, the ability to automatically update installed icon packs. This feature would enhance the usability and convenience of the plugin by ensuring that users always have access to the latest version of their chosen icon packs without the need for manual updates.

Describe alternatives you've considered Alternatively, more frequent updates to src/iconPacks.ts can be implemented. For example, Lucide is one hundred twenty-nine updates behind, Simple Icons is twenty-four updates behind, Remix is six updates behind, and Font-Awesome icons are seven updates behind

Additional context Due to how small SVGs files are, storage should never become an issue. However, having an option to disable updates should be an option due to the internet access required.

Notifications may become intrusive so a silent update feature would be very useful to those who don't mind.

Updated src/iconPacks.ts

export interface IconPack {
  name: string;
  displayName: string;
  path: string;
  downloadLink: string;
}

export default {
  faBrands: {
    name: 'font-awesome-brands',
    displayName: 'FontAwesome Brands',
    path: 'fontawesome-free-6.4.0-web/svgs/brands/',
    downloadLink: 'https://github.com/FortAwesome/Font-Awesome/releases/download/6.4.0/fontawesome-free-6.4.0-web.zip',
  },
  faRegular: {
    name: 'font-awesome-regular',
    displayName: 'FontAwesome Regular',
    path: 'fontawesome-free-6.4.0-web/svgs/regular/',
    downloadLink: 'https://github.com/FortAwesome/Font-Awesome/releases/download/6.4.0/fontawesome-free-6.4.0-web.zip',
  },
  faSolid: {
    name: 'font-awesome-solid',
    displayName: 'FontAwesome Solid',
    path: 'fontawesome-free-6.4.0-web/svgs/solid/',
    downloadLink: 'https://github.com/FortAwesome/Font-Awesome/releases/download/6.4.0/fontawesome-free-6.4.0-web.zip',
  },
  remixIcons: {
    name: 'remix-icons',
    displayName: 'Remix Icons',
    path: '',
    downloadLink: 'https://github.com/Remix-Design/RemixIcon/releases/download/v3.3.0/RemixIcon_SVG_v3.3.0.zip',
  },
  iconBrew: {
    name: 'icon-brew',
    displayName: 'Icon Brew',
    path: '',
    downloadLink: 'https://github.com/FlorianWoelki/obsidian-icon-folder/raw/main/iconPacks/icon-brew.zip',
  },
  /* https://simpleicons.org/ */
  simpleIcons: {
    name: 'simple-icons',
    displayName: 'Simple Icons',
    path: 'icons',
    downloadLink: 'https://github.com/simple-icons/simple-icons/archive/refs/tags/9.0.0.zip',
  },
  lucide: {
    name: 'lucide-icons',
    displayName: 'Lucide',
    path: 'icons',
    downloadLink: 'https://github.com/lucide-icons/lucide/archive/refs/tags/v0.241.0.zip',
  },
  tablerIcons: {
    name: 'tabler-icons',
    displayName: 'Tabler Icons',
    path: 'svg',
    downloadLink: 'https://github.com/tabler/tabler-icons/releases/download/v2.22.0/tabler-icons-2.22.0.zip',
  },
} as { [key: string]: IconPack };

iconPacks-ts.zip

tyler-dot-earth commented 7 months ago

Currently, users of the Obsidian Icon Folder plugin have to manually update their installed icon packs.

Ahh, I was wondering why my plugin only showed a few dozen icons vs Lucide's 1300 icons.

Mitigation path for those that end up here — removing the installed icon pack (the trashcan icon) and re-adding it via Browse icon packs got me a bunch that I wanted.

UX feedback — I was hesitant to click the trash icon because I wasn't sure if all of my existing icon data would be lost. I didn't want to have to re-set each icon.

While automatic updates would be appreciated, another suggestion if it's easier to implement: a command palette option and/or button to perform the update rather than trash/re-add the pack.