-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--copyfrom gets companion parameter what to copy: all, all-dates, comments, tags, date-created, date-modified, date-last-opened #71
Comments
You're right that There are other ways to achieve this, for example,
If implemented, it might make sense to simple do what
By the way, Click to expand list of copied attributeskMDItemAppleLoopDescriptors: Specifies multiple pieces of descriptive information about a loop. kMDItemAppleLoopsKeyFilterType: Specifies key filtering information about a loop. Loops are matched against projects that often in a major or minor key. kMDItemAppleLoopsLoopMode: Specifies how a file should be played. kMDItemAppleLoopsRootKey: Specifies the loop's original key. The key is the root note or tonic for the loop, and does not include the scale type. kMDItemAudioChannelCount: Number of channels in the audio data contained in the file. kMDItemAudioEncodingApplication: The name of the application that encoded the data contained in the audio file. kMDItemAudioSampleRate: Sample rate of the audio data contained in the file. The sample rate is a float value representing hz (audio_frames/second). For example: 44100. 0, 22254. 54. kMDItemAudioTrackNumber: The track number of a song or composition when it is part of an album. kMDItemComposer: The composer of the music contained in the audio file. kMDItemIsGeneralMIDISequence: Indicates whether the MIDI sequence contained in the file is setup for use with a General MIDI device. kMDItemKeySignature: The key of the music contained in the audio file. For example: C, Dm, F#m, Bb. kMDItemLyricist: The lyricist, or text writer, of the music contained in the audio file. kMDItemMusicalGenre: The musical genre of the song or composition contained in the audio file. For example: Jazz, Pop, Rock, Classical. kMDItemMusicalInstrumentCategory: Specifies the category of an instrument. kMDItemMusicalInstrumentName: Specifies the name of instrument relative to the instrument category. kMDItemRecordingDate: The recording date of the song or composition. kMDItemRecordingYear: Indicates the year the item was recorded. For example, 1964, 2003, etc. kMDItemTempo: A float value that specifies the beats per minute of the music contained in the audio file. kMDItemTimeSignature: The time signature of the musical composition contained in the audio/MIDI file. For example: "4/4", "7/8". kMDItemAudiences: The audience for which the file is intended. The audience may be determined by the creator or the publisher or by a third party. kMDItemAuthors: The author, or authors, of the contents of the file. kMDItemAuthorAddresses: This attribute indicates the author addresses of the document. kMDItemCity: Identifies city of origin according to guidelines established by the provider. kMDItemComment: A comment related to the file. This differs from the Finder comment, kMDItemFinderComment. kMDItemContactKeywords: A list of contacts that are associated with this document, not including the authors. kMDItemContributors: The entities responsible for making contributions to the content of the resource. kMDItemCopyright: The copyright owner of the file contents. kMDItemCountry: The full, publishable name of the country or region where the intellectual property of the item was created, according to guidelines of the provider. kMDItemCoverage: The extent or scope of the content of the resource. kMDItemCreator: Application used to create the document content (for example "Word", "Pages", and so on). kMDItemDescription: A description of the content of the resource. The description may include an abstract, table of contents, reference to a graphical representation of content or a free-text account of the content. kMDItemDueDate: Date this item is due. kMDItemDurationSeconds: The duration, in seconds, of the content of file. A value of 10. 5 represents media that is 10 and 1/2 seconds long. kMDItemEmailAddresses: Email addresses related to this item. kMDItemEncodingApplications: Application used to convert the original content into it's current form. For example, a PDF file might have an encoding application set to "Distiller". kMDItemFinderComment: Finder comments for this file. kMDItemFonts: Fonts used in this item. You should store the font's full name, the postscript name, or the font family name, based on the available information. kMDItemHeadline: A publishable entry providing a synopsis of the contents of the file. For example, "Apple Introduces the iPod Photo". kMDItemIdentifier: A formal identifier used to reference the resource within a given context. kMDItemInstantMessageAddresses: Instant message addresses related to this item. kMDItemInstructions: Editorial instructions concerning the use of the item, such as embargoes and warnings. For example, "Second of four stories". kMDItemKeywords: Keywords associated with this file. For example, "Birthday", "Important", etc. kMDItemLanguages: Indicates the languages of the intellectual content of the resource. Recommended best practice for the values of the Language element is defined by RFC 3066. kMDItemNumberOfPages: Number of pages in the document. kMDItemOrganizations: The company or organization that created the document. kMDItemPageHeight: Height of the document page, in points (72 points per inch). For PDF files this indicates the height of the first page only. kMDItemPageWidth: Width of the document page, in points (72 points per inch). For PDF files this indicates the width of the first page only. kMDItemParticipants: The list of people who are visible in an image or movie or written about in a document. kMDItemPhoneNumbers: Phone numbers related to this item. kMDItemProjects: The list of projects that this file is part of. For example, if you were working on a movie all of the files could be marked as belonging to the project "My Movie". kMDItemPublishers: The entity responsible for making the resource available. For example, a person, an organization, or a service. Typically, the name of a publisher should be used to indicate the entity. kMDItemRecipients: Recipients of this item. kMDItemRecipientAddresses: This attribute indicates the recipient addresses of the document. kMDItemRights: Provides a link to information about rights held in and over the resource. kMDItemStarRating: User rating of this item. For example, the stars rating of an iTunes track. kMDItemStateOrProvince: Identifies the province or state of origin according to guidelines established by the provider. For example, "CA", "Ontario", or "Sussex". kMDItemTitle: The title of the file. For example, this could be the title of a document, the name of a song, or the subject of an email message. kMDItemVersion: The version number of this file. kMDItemWhereFroms: Describes where the file was obtained from. kMDItemAuthorEmailAddresses: This attribute indicates the author of the emails message addresses. (This is always the email address, and not the human readable version). kMDItemRecipientEmailAddresses: This attribute indicates the recipients email addresses. (This is always the email address, and not the human readable version). kMDItemTheme: Theme of the this item. kMDItemSubject: Subject of the this item. kMDItemCFBundleIdentifier: If this item is a bundle, then this is the CFBundleIdentifier. kMDItemInformation: Information about the item. kMDItemURL: Url of the item. kMDItemPixelHeight: The height, in pixels, of the contents. For example, the image height or the video frame height. kMDItemPixelWidth: The width, in pixels, of the contents. For example, the image width or the video frame width. kMDItemPixelCount: The total number of pixels in the contents. Same as kMDItemPixelWidth x kMDItemPixelHeight. kMDItemColorSpace: The color space model used by the document contents. For example, "RGB", "CMYK", "YUV", or "YCbCr". kMDItemBitsPerSample: The number of bits per sample. For example, the bit depth of an image (8-bit, 16-bit etc. . . ) or the bit depth per audio sample of uncompressed audio data (8, 16, 24, 32, 64, etc. . ). kMDItemFlashOnOff: Indicates if a camera flash was used. kMDItemFocalLength: The actual focal length of the lens, in millimeters. kMDItemAcquisitionMake: The manufacturer of the device used to aquire the document contents. kMDItemAcquisitionModel: The model of the device used to aquire the document contents. For example, 100, 200, 400, etc. kMDItemISOSpeed: The ISO speed used to acquire the document contents. kMDItemOrientation: The orientation of the document contents. Possible values are 0 (landscape) and 1 (portrait). kMDItemLayerNames: The names of the layers in the file. kMDItemWhiteBalance: The white balance setting used to acquire the document contents. Possible values are 0 (auto white balance) and 1 (manual). kMDItemAperture: The aperture setting used to acquire the document contents. This unit is the APEX value. kMDItemProfileName: The name of the color profile used by the document contents. kMDItemResolutionWidthDPI: Resolution width, in DPI, of this image. kMDItemResolutionHeightDPI: Resolution height, in DPI, of this image. kMDItemExposureMode: The exposure mode used to acquire the document contents. kMDItemExposureTimeSeconds: The exposure time, in seconds, used to acquire the document contents. kMDItemEXIFVersion: The version of the EXIF header used to generate the metadata. kMDItemAlbum: The title for a collection of media. This is analagous to a record album, or photo album. kMDItemHasAlphaChannel: Indicates if this image file has an alpha channel. kMDItemRedEyeOnOff: Indicates if red-eye reduction was used to take the picture. kMDItemMeteringMode: The metering mode used to take the image. kMDItemMaxAperture: The smallest f-number of the lens. Ordinarily it is given in the range of 00. 00 to 99. 99. kMDItemFNumber: The diameter of the diaphragm aperture in terms of the effective focal length of the lens. kMDItemExposureProgram: The class of the exposure program used by the camera to set exposure when the image is taken. Possible values include: Manual, Normal, and Aperture priority. kMDItemExposureTimeString: The time of the exposure. kMDItemEXIFGPSVersion: The version of GPSInfoIFD in EXIF used to generate the metadata. kMDItemAltitude: The altitude of the item in meters above sea level, expressed using the WGS84 datum. Negative values lie below sea level. kMDItemLatitude: The latitude of the item in degrees north of the equator, expressed using the WGS84 datum. Negative values lie south of the equator. kMDItemLongitude: The longitude of the item in degrees east of the prime meridian, expressed using the WGS84 datum. Negative values lie west of the prime meridian. kMDItemTimestamp: The timestamp on the item. This generally is used to indicate the time at which the event captured by the item took place. kMDItemSpeed: The speed of the item, in kilometers per hour. kMDItemGPSTrack: The direction of travel of the item, in degrees from true north. kMDItemImageDirection: The direction of the item's image, in degrees from true north. kMDItemNamedLocation: The name of the location or point of interest associated with the item. The name may be user provided. kMDItemAudioBitRate: The audio bit rate. kMDItemCodecs: The codecs used to encode/decode the media. kMDItemDeliveryType: The delivery type. Values are "Fast start" or "RTSP". kMDItemMediaTypes: The media types present in the content. kMDItemStreamable: Whether the content is prepared for streaming. kMDItemTotalBitRate: The total bit rate, audio and video combined, of the media. kMDItemVideoBitRate: The video bit rate. kMDItemDirector: Directory of the movie. kMDItemProducer: Producer of the content. kMDItemGenre: Genre of the movie. kMDItemPerformers: Performers in the movie. kMDItemOriginalFormat: Original format of the movie. kMDItemOriginalSource: Original source of the movie. kMDItemDownloadedDate: Date the item was downloaded. _kFinderColor: Color label in the Finder _kFinderStationeryPad: Whether or not item is a Stationary Pad item in Finder _kMDItemUserTags: Finder tags |
|
|
I think that adding the ability to restore time (and maybe permissions) does make sense but that functionality should be added also to the backup/restore. I'll take a look at implementing this but it'll be a while as I've got a number of other projects I'm working on at the moment. |
I inspected the JSON and now realized that timestamps and permissions were indeed not backed up.
For all use cases (
So the companion parameter originally suggested as |
User Story
my-video.mp4
is a fresh file and all its metadata (Finder tags, Spotlight comment, file timestamps) is blank/initialized.Existing capabilities
osxmeta --copyfrom my-video.m4v my-video.mp4
copies over Finder tags and Spotlight comments fine,Proposed new feature
-f, --copyfrom SOURCE_FILE
stays as is but gets a companion parameter for fine grained control for what filesystem attributes to copy over:-F, --copy attr1[,attr2,attr3,…]
accepts: all, all-dates, comments, tags, xattr, date-created, date-modified, date-last-openedall
is a shorthand to all attributesall-dates
a shorthand to all timestampscomments,tags
is what--copyfrom
currently does from what I could observeThe text was updated successfully, but these errors were encountered: