command-line-tool

How can I add OS X “tags” to files programmatically?

别说谁变了你拦得住时间么 提交于 2019-12-03 00:29:55
问题 Since Mavericks, OS X has had the ability to tag & colour files in Finder. Is there any way to add tags to files through Cocoa APIs or via a shell command? 回答1: Sorry for adding another answer, but the one related to setting Label colors was pretty long already. Here is an excerpt from a python script that I use to set the User Tags. It seems to work to make things searchable, but not sure if the tags will show up correctly. Usage is basically: tagfile.py "Tag Name" FileOrFolderName Code

Error Message “Xcode alone is not sufficient on Sierra”

我怕爱的太早我们不能终老 提交于 2019-12-02 21:46:21
I'd like to install openCV to vectorize image, but there's a series error message regarding Xcode and Ruby. First, I use terminal to install openCV, brew install opencv . Then, I got error message indicating that the system doesn't like my ruby version. /usr/local/Homebrew/Library/Homebrew/brew.rb:12:in `<main>': Homebrew must be run under Ruby 2.3! You're running 2.0.0. (RuntimeError) So, I want to upgrade my ruby. I followed several update strategy from this post. First ruby upgrade trial: brew link --overwrite ruby & brew unlink ruby && brew link ruby and get Error: No such keg: /usr/local

macOS 10.14(beta) How to install Command_Line_Tools_macOS_10.14_for_Xcode_10_Beta

只谈情不闲聊 提交于 2019-12-02 19:04:07
As the Title of my question, I don't know how to install the Command_Line_Tools_macOS_10.14_for_Xcode_10_Beta for my mac, please help. What I did: run command "brew install carthage" to install the Carthage, get errors: Error: Your Xcode (9.4.1) is too outdated. Please update to Xcode 10.0 (or delete it). Xcode can be updated from https://developer.apple.com/download/more/ run command "xcode-select --install" in Terminal as the second answer from @Dev , but I still get the same errors after "brew install carthage"; download the .dmg file from Apple site , I got too many tools after I opened it

How can I add OS X “tags” to files programmatically?

旧时模样 提交于 2019-12-02 14:07:09
Since Mavericks, OS X has had the ability to tag & colour files in Finder. Is there any way to add tags to files through Cocoa APIs or via a shell command? Sorry for adding another answer, but the one related to setting Label colors was pretty long already. Here is an excerpt from a python script that I use to set the User Tags. It seems to work to make things searchable, but not sure if the tags will show up correctly. Usage is basically: tagfile.py "Tag Name" FileOrFolderName Code below. #! /usr/bin/env python # -*- coding: utf-8 -*- """ Write tags to file Usage: tagfile.py "TagName"

Xcode GM: no swift language for OS X command line tool project?

我是研究僧i 提交于 2019-12-02 07:40:57
问题 I had a command line tool project in swift. after upgraded to Xcode GM. It doesn't work anymore. Furthermore, It seems the Swift language choice is removed from the create project wizard? Is this temporarily in GM, or I missed some news that Apple decide to? 回答1: Xcode 6 GM is for iOS Swift development. Xcode 6.1 Beta is for OS X / iOS Swift development. Release Notes 来源: https://stackoverflow.com/questions/25812032/xcode-gm-no-swift-language-for-os-x-command-line-tool-project

How do you create new windows workspace with TFS command line client that is running on unix

白昼怎懂夜的黑 提交于 2019-12-01 03:14:37
问题 How would I work with the TFS command line client that is running on a aix/unix box to run the tf commands. For example I'm unable to create local windows workspaces that connect to the tfs version control folders that are on a windows server. The version of command line client that is running on the unix box is (/TFS/TEE-CLC-12.0.0). I can't find any documentation how the client can be used when running on unix to connect local windows files to the version control files on a server. 回答1:

How do you create new windows workspace with TFS command line client that is running on unix

浪子不回头ぞ 提交于 2019-11-30 21:33:41
How would I work with the TFS command line client that is running on a aix/unix box to run the tf commands. For example I'm unable to create local windows workspaces that connect to the tfs version control folders that are on a windows server. The version of command line client that is running on the unix box is (/TFS/TEE-CLC-12.0.0). I can't find any documentation how the client can be used when running on unix to connect local windows files to the version control files on a server. Getting source files down from the server requires three steps on any platform: Create a workspace on your

Pod file not being initialized?

谁都会走 提交于 2019-11-30 12:39:50
问题 When i try to initialize pod file to use cocoapods via terminal, it gives me this error. How to fix it. /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:128:in `verify_minimum_git_version!': [!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative) 回答1: I encounter the same problem and solve it by using the following command: sudo xcode-select --switch /Applications/Xcode.app As the error message in terminal shows, something with my git goes wrong. And,

Pod file not being initialized?

筅森魡賤 提交于 2019-11-30 04:50:54
When i try to initialize pod file to use cocoapods via terminal, it gives me this error. How to fix it. /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:128:in `verify_minimum_git_version!': [!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative) Guohua Cheng I encounter the same problem and solve it by using the following command: sudo xcode-select --switch /Applications/Xcode.app As the error message in terminal shows, something with my git goes wrong. And, it has to do with the command line tool. I was having an issue while trying to install

Extract text between HTML tags

夙愿已清 提交于 2019-11-29 07:58:42
I have many HTML files from which I need to extract text. If it's all on one line, I can do that quite easily but if the tag wraps around or is on multiple lines I can't figure how to do this. Here's what I mean: <section id="MySection"> Some text here another line here <br> last line of text. </section> I'm not concerned about the <br> text, unless it will help wrap the text around. The area that I want always begins with "MySection" and then is ended with </section> . What I'd like to end up with is something like this: Some text here another line here last line of text. I'd prefer something