Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Set Creation Date of PDF to date of addition / modification in main repo. #7

Open
adamrusted opened this issue Jun 27, 2021 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@adamrusted
Copy link
Member

Discussed in #4 - look to set the Creation Date based on when the SVG was last modified within the main repo.
This is likely to be quite a large job to extract the timestamp from the main repo via the API - unless anyone else can figure out an easier way to update the files.

@ericcornelissen ericcornelissen added enhancement New feature or request help wanted Extra attention is needed labels Jun 27, 2021
@mondeja
Copy link
Member

mondeja commented Aug 31, 2021

This is likely to be quite a large job to extract the timestamp from the main repo via the API - unless anyone else can figure out an easier way...

Let's go, in a Debian/Ubuntu environment this works:

sudo apt install git-restore-mtime
git clone https://github.com/simple-icons/simple-icons.git
cd simple-icons
git restore-mtime
git ls-tree -r --name-only HEAD | while read filename; do echo "$(git log -1 --format="%ad" -- $filename) $filename"; done
cd ..
rm -rf simple-icons

Keep in mind that the repository must be fetched entirely, with all commits (don't use --depth=1). The current simple-icons repository, including all history, occupies 57.70 Mbs, so this is not a problem. See the documentation of git-restore-mtime for more details.

@ericcornelissen
Copy link
Contributor

Pretty cool @mondeja, thanks for investigating this 😄

occupies 57.70 Mbs, so this is not a problem.

Still, that's not as small as it should be. Honestly, I wouldn't mind nuking the entire history created by the svg-to-pdf-bot 🙃

@mondeja
Copy link
Member

mondeja commented Sep 1, 2021

Honestly, I wouldn't mind nuking the entire history created by the svg-to-pdf-bot 🙃

Definitely, that would be very cool.

@ericcornelissen
Copy link
Contributor

ericcornelissen commented Sep 1, 2021

I read that wrong. I was talking about the history of simple-icons-pdf but you were talking about simple-icons. I don't think we should throw away the entire history of the simple-icons repository so we can't do much about those 57.70 Mbs... Still, we can just throw away the entire history here if we want.

@mondeja
Copy link
Member

mondeja commented Sep 1, 2021

Ahm, fine, I thought you were referring to old commits in the simple-icons repository. Anyways, as Github Actions usually maintains download speeds between 50 and 100 mb/sec, I'm not worried about that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants