spotlight

Spotlight for Help in localized Java Swing applications on macOS

♀尐吖头ヾ 提交于 2019-12-23 10:06:45
问题 In Java Swing applications on macOS, Cocoa automatically binds a search field called Spotlight for Help to the first menu labelled “Help” in a frame’s menu bar, when using the macOS look and feel and a screen menu bar. System.setProperty("apple.laf.useScreenMenuBar", "true"); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { e.printStackTrace(); } JFrame frame = new JFrame(); JMenuBar menuBar = new JMenuBar(); JMenu helpMenu = new JMenu("Help")

Custom Spotlight Importer and Finder's Get Info “More Info” section

老子叫甜甜 提交于 2019-12-21 05:12:19
问题 I have written a Spotlight Importer for the custom document type my application defines. Everything is working fine, the metadata fields are correctly indexed by Spotlight (verified using mdls command), and a Spotlight search reveals my documents. The only problem I have is that items I specify in the <displayattrs> section of the schema.xml file aren't displayed in the "More Info" section when I ask for informations about a file (Cmd+I in the Finder). I expected these fields to appear there

Using multiple keywords in xattr via _kMDItemUserTags or kMDItemOMUserTags

时间秒杀一切 提交于 2019-12-20 09:45:53
问题 While reorganizing my images, in anticipation of OSX Mavericks I am writing a script to insert tags into the xattr fields of my image files, so I can search them with Spotlight. (I am also editing the EXIF just to be safe.) My questions are: Which attribute is the best to use? _kMDItemUserTags seems to be the OSX version, but kMDItemOMUserTags is already in use by OpenMeta. I would ideally like something that will be Linux and OSX forward compatible. How do I set multiple tags? Are the comma-

Mac OS X : add a custom meta data field to any file

坚强是说给别人听的谎言 提交于 2019-12-20 08:39:12
问题 I would like to me able to set (and get) a custom metadata attribute for any file. What is the best way to do this? Thanks 回答1: The OpenMeta framework is a de-facto third-party standard for adding metadata to OS X files using extended attributes. It is used by a number of third-party applications. 回答2: Custom attribute names work for me: $ xattr -w com.apple.metadata:MyAttribute gfdylvyieo a.txt $ mdls -n MyAttribute a.txt MyAttribute = "gfdylvyieo" $ mdfind gfdylvyieo /private/tmp/a.txt $

Spotlight search with PHP

霸气de小男生 提交于 2019-12-20 04:57:10
问题 I want to add a spotlight search functionality - search results being displayed with rich contents like thumbnail etc in a drop down menu changing on each keyup event - just like the apple.com search - to a site, having data in MySQL InnoDB tables. So basically that is displaying search results based on the part of the query that has already been input (so not autocomplete). The data is spread into separate tables for categories, help pages, blog pages and so on. The search script must take

How can I tell Spotlight to index my .dSYM bundles?

人盡茶涼 提交于 2019-12-18 12:26:15
问题 Today was the first time that I tried - and failed - to symbolicate a crash log on a newly bought MacBook (let's call this machine MB1). MB1 came with Mac OS X 10.9 pre-installed. I tracked the problem of the failing symbolication down to Spotlight not indexing any of my .dSYM bundles (without the Spotlight index, Apple's symbolicatecrash script fails to locate the .dSYM bundle that matches the crash log). I came to my conclusion because mdfind "com_apple_xcode_dsym_uuids == *" does not print

MAC快捷键大全

瘦欲@ 提交于 2019-12-17 19:19:48
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 快捷键,又叫快速键或热键,指通过某些特定的按键、按键顺序或按键组合来完成一个操作。我们用的最多的就是window上的快捷键了,其中在Mac系统也由很多常用快捷键,可能会有很多的朋友对于mac快捷键了解的不是很多,今天坚果云网盘干货为大家分享一批mac快捷键。所谓快捷键就是使用键盘上某一个或某几个键的组合完成一条功能命令,从而达到提高操作速度的目的。快捷键的使用可以让你的工作效率翻倍,但对于mac快捷键,你了解多少呢?接下来跟着我一起来看看 MAC 的快捷键是如何组合使用的。 坚果云网盘干货分享:MAC快捷键大全 1、Command + delete:删除文件 2、Shift + Command + delete:清空废纸篓 3、Command + A:全选 4、Ctrl + Command + F:打开/关闭应用全屏 5、Command + 空格:切换输入法 6、在 Finder 中 Command + [ 或 ] :后退或前进 7、Command + 空格:打开 Spotlight 搜索 8、Shift + Command + 3:全屏幕截图并且保存在桌面 9、Shift + Command + 4(+空格):自由范围截图(选中窗口截图)并且保存在桌面 10、Command + Q:退出程序 11

Java Textfield in PopupMenu

那年仲夏 提交于 2019-12-14 02:46:54
问题 I am trying to add a TextField to a PopupMenu in Java. (similar to Spotlight Feature in Mac OS X) But i can't add it to as an item because the PopupMenu only accepts MenuItem. Please help me. That's the code I currently have: import java.awt.AWTException; import java.awt.CheckboxMenuItem; import java.awt.Frame; import java.awt.Menu; import java.awt.MenuItem; import java.awt.PopupMenu; import java.awt.SystemTray; import java.awt.Toolkit; import java.awt.TrayIcon; import java.awt.event

Identify directories that are packages in Mac OS X with Python

亡梦爱人 提交于 2019-12-12 17:12:38
问题 The Mac OS X Finder uses the concept of "packages" to make the contents of certain folders opaque to the user. I'm using os.walk() to enumerate a directory tree and I want to skip enumeration on packages such as application bundles. The mdls commandline utility can be used to check whether com.apple.package is in the kMDItemContentTypeTree attribute. Is the only/best way to detect whether a folder is a package to drop into os.system and use mdls after detecting that the OS is indeed darwin?

Using Spotlight in Cocoa

混江龙づ霸主 提交于 2019-12-12 12:35:24
问题 Can I use the Spotlight APIs (they exist, right?) in Cocoa to determine if Spotlight (in the upper-right corner) would match a given filePath with a given string? In other words, given a filePath such as "/Users/enchilada/Desktop/MapOfUSA.pdf", and a string such as "Virginia", how would I tell if Spotlight would show this file when "Virginia" would have been typed in the upper-right Spotlight search? (As you can imagine, in the example shown, it would probably be matched, because a PDF map of