小编use*_*894的帖子

从csv文件填充iTunes播放列表

任何人都可以提供一种方法来填充我的播放列表与csv文件/文本文件中的歌曲格式如下:歌曲标题,艺术家?我可以单独为标题做,但不能指定它必须有一定的艺术家.

编辑:以下是我如何通过标题获取它们的示例:

set TheFile to read file "Macintosh HD:Applications:Automator stuff:01b iTunes Scripts:SongList.txt"
tell application "iTunes"
    set thePlaylist to playlist "SongList"
    try
        delete every track of thePlaylist
    end try
    set MySongs to paragraphs of (TheFile) -- read artist names (separated by newlines) from the file
    repeat with AnItem in MySongs -- get all tracks from each artist
        set AnItem to (contents of AnItem)
        if AnItem is not "" then try -- don't bother with empty names
            set MyTracks to (location of …
Run Code Online (Sandbox Code Playgroud)

applescript itunes

8
推荐指数
1
解决办法
152
查看次数

如何在 Mac 上模拟“fn + shift + command + L”按键?

我需要它相当于同时按下这些键。

\n\n

我实际上认为\xe2\x80\x99s在AppleScript中是不可能的,我\xe2\x80\x99已经在互联网上搜索无济于事,但我又\xe2\x80\x99m是一个菜鸟,所以也许我错过了一些东西。

\n\n

如果在 AppleScript 中这是不可能的,我怎样才能在较低的级别上做到这一点。也许用C语言?

\n

c macos applescript

0
推荐指数
1
解决办法
2978
查看次数

有没有办法在单管道命令链中以有效的方式组合以下两个 UNIX 命令?

问题陈述

  1. 我想使用rpm -qi ${pkgName}.
  2. cat -n 在 (1) 的输出中会告诉我病房描述部分的哪一行开始。

    例如:- 第 15 行,以防 rpm 中的 atom IDE 编辑器。

  3. 我知道我可以使用此行号作为 rpm -qi atom | awk -v n=${lineNum} 'NR>=n'. 这lineNum将是 15。

这是低效的,我只想使用该rpm -qi命令一次,然后实现提取关于病房的描述部分。有没有人有办法做到这一点?

额外要求的输入

[anand@ldnpsr2937 ~]$rpm -qi atom
Name.       : atom
Version     : 1.42.0
Release     : 0.1
Architecture: x86_64
Install Date: Sun 12 Jan 2020 10:23:12 AM
Group       : Unspecified
Size        : 590646918
License     : MIT
Signature   : (none)
Source RPM  : atom-1.42.0-0.1.src.rpm
Build Date …
Run Code Online (Sandbox Code Playgroud)

unix awk sed rpm

0
推荐指数
1
解决办法
77
查看次数

标签 统计

applescript ×2

awk ×1

c ×1

itunes ×1

macos ×1

rpm ×1

sed ×1

unix ×1