Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ What if you want to just have one folder with all photos, in chronological order

This script does just that - it organizes and cleans up your Takeout for you 🧹😌

It will take all of those folders, find all photos in them, set their and `file last modified` correctly, and put it in one big folder (or folders divided by a month) 🗄
It will take all of those folders, find all photos in them, set their `file last modified` correctly, and put it in one big folder (or folders divided by a month) 🗄

## How to use:
Since `v3.2.0`, `gpth` is interactive 🎉 - you don't need to type any complicated arguments - just get your takeout, run gpth, and follow prompted instructions 💃
Expand Down
8 changes: 8 additions & 0 deletions lib/date_extractors/json_extractor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Future<File?> _jsonForFile(File file, {required bool tryhard}) async {
// test: combining this with _shortenName?? which way around?
_bracketSwap,
_removeExtra,
_noExtension,
// use those two only with tryhard
// look at https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper/issues/175
// thanks @denouche for reporting this!
Expand All @@ -54,6 +55,13 @@ Future<File?> _jsonForFile(File file, {required bool tryhard}) async {
return null;
}

// if the originally file was uploaded without an extension,
// (for example, "20030616" (jpg but without ext))
// it's json won't have the extension ("20030616.json"), but the image
// itself (after google proccessed it) - will ("20030616.jpg" tadam)
String _noExtension(String filename) =>
p.basenameWithoutExtension(File(filename).path);

String _removeDigit(String filename) =>
filename.replaceAll(RegExp(r'\(\d\)\.'), '.');

Expand Down
2 changes: 1 addition & 1 deletion lib/grouping.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extension Group on Iterable<Media> {

/// Removes duplicate media from list of media
///
/// This is ment to be used *early*, and it's aware of un-merged albums.
/// This is meant to be used *early*, and it's aware of un-merged albums.
/// Meaning, it will leave duplicated files if they have different
/// [Media.albums] value
///
Expand Down
Loading