I have had this problem for a very long time, had several discussions with friends, and tried searching relating info online. All efforts were in vain so I decide to give a shot here.

I have lots of files that I would like to annotate. Not necessarily are they pictures or documents, but also audio/video files. Now, I understand that there are ways to annotate a PDF, and there are ways to add metadata to PDF/mp3/mp4.., but those methods are not enough for me.

More specifically, when it comes to PDF files, usually I would like to take some notes in my favorite format. The current best way I can think of is to create another file with the same name and put them in the same directory (or tar them together), e.g. Learn-How-to-Learn.pdf Learn-How-to-Learn.pdf.note.md. However, I found this method cumbersome, for instance it is hard to always link them together and with their names synced.

When it comes to mp3/mp4 files, I also want to link them to other files that contain my notes. For example,

00:45:37,I would like to listen to this part again,20190610T19:03:56
01:03:55,Donald Knuth made a good point on blah blah,20190610T20:00:03

These examples go on and on.. I feel that this is very useful, and there must be some clever solutions out there. But to my surprise, I haven't found any! Please let me know if I should be clearer.. sincerely I would like to have a beautiful solution. Thank you in advance!


Based on your question, it would be something like https://github.com/ljmdullaart/a-notate. Yes, it is written (by me) after you asked this question, and it is inspired on your question.

  • It's thrilling to hear that you write a script for my question. I am still testing it, but perhaps a minor suggestion will be helpful: file2do=$(pwd)/$1. Other than that, I am still testing it (and having fun). Also, I really like the way you shell script. Would you mind sharing Andreas Kusalananda Khäri's lesson in cleaner shell programming? I cannot find it online.
    – Student
    Jun 21 '19 at 20:12
  • Another feature (bug?) that I found confusing in the script is that around line 40, using grep -q blahblab seems not enough for me. The file overview will not be updated if the name of file is changed to a substring of the original one. For example, changing README.md to README.m is not a good idea under this system. Instead, regex saves the day by adding $ in the end of the string to be matched: grep -q ":$file2do"$.
    – Student
    Jun 23 '19 at 16:18
  • Some updates done; please let further comment on the script go via git. Jun 26 '19 at 12:41
  • Thank you for introducing me into hashing. I believe that's the only thing I missed for making such a script come true. I did also branch your repo and make some change, and will keep working on that.
    – Student
    Jun 27 '19 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.