tag (function)¶
- fundamentals.files.tag(log, filepath, tags=False, rating=False, wherefrom=False)[source][source]¶
Add tags and ratings to your macOS files and folders
Key Arguments
log– loggerfilepath– the path to the file needing taggedtags– comma or space-separated string, or list of tags. Use False to leave file tags as they are. Use “” or [] to remove tags. Default False.rating– a rating to add to the file. Use 0 to remove rating or False to leave file rating as it is. Default False.wherefrom– add a URL to indicate where the file come from. Use False to leave file location as it is. Use “” to remove location. Default False.
Return
None
Usage
To add any combination of tags, rating and a source URL to a file on macOS, use the following:
```python from fundamentals.files.tag import tag tag(
log=log, filepath=”/path/to/my.file”, tags=”test,tags, fundamentals”, rating=3, wherefrom=”http://www.thespacedoctor.co.uk”
)¶