Skip to content

Commit

Permalink
add previousVersions (#8)
Browse files Browse the repository at this point in the history
* process lastUpdated

* fix field name
  • Loading branch information
mingness authored Nov 1, 2024
1 parent 3cc4e7d commit 45273f7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 27 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ Additional fields are
* `override` - This is an object, where any component field values will replace the existing field values. For example, libraries in the `broken.conf` file are outdated, and we want to cap the
`maxRevision` to `228`. This cap can be applied by setting `override` to {`maxRevision`: `228`}
* `log` - Any notes of explanation, such as why a library was labeled `BROKEN`
* These fields are included, but the data is not comprehensive. It would require pulling data from the archives.
* `previousVersions` - a list of previous `prettyVersion` values. This will be added whenever a new
library is updated. To have complete data for this field will require some detective work into the archives.
* `dateAdded` - Date library was added to contributions. This will be added whenever a new library is
added. To have complete data for this field will require some detective work into the archives.
* `lastUpdated` - Date library was last updated in the repo. This will be added whenever a library is
updated. To have complete data for this field will require waiting for all libraries to be updated, or
will require some detective work into the archives.

## Scripts
The scripts folder contains scripts in Python for parsing, validating, and processing the database
Expand Down
33 changes: 8 additions & 25 deletions contributions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2042,8 +2042,7 @@ contributions:
prettyVersion: 0.7.0
minRevision: 0
maxRevision: 0
lastUpdated: '0'
download:
download:
https://github.com/cansik/opencv-processing/releases/download/contribution-manager/opencv_processing.zip
override:
categories:
Expand Down Expand Up @@ -2433,8 +2432,7 @@ contributions:
prettyVersion: 2.4.0
minRevision: 229
maxRevision: 0
lastUpdated: '0'
download:
download:
https://github.com/processing/processing-sound/releases/download/latest/sound.zip
override:
categories:
Expand Down Expand Up @@ -2565,7 +2563,6 @@ contributions:
prettyVersion: 0.2.2
minRevision: 242
maxRevision: 0
lastUpdated: '1443010051000'
download: https://github.com/joelmoniz/Git-Manager/releases/download/latest/GitManager.zip
- id: 161
source: http://codigogenerativo.com/KinectPV2.txt
Expand Down Expand Up @@ -2610,7 +2607,6 @@ contributions:
minRevision: 242
maxRevision: 0
imports: processing.mode.java.JavaMode
lastUpdated: '1443120511000'
download: https://github.com/joelmoniz/REPLmode/releases/download/latest/REPLMode.zip
- id: 163
source: http://shiffman.net/p5/examples/learningprocessing2.txt
Expand Down Expand Up @@ -2954,8 +2950,7 @@ contributions:
prettyVersion: 0.8.0
minRevision: 245
maxRevision: 0
lastUpdated: '1455510195000'
download:
download:
https://github.com/joelmoniz/Shape-Sketch/releases/download/latest/ShapeSketch.zip
- id: 182
source:
Expand Down Expand Up @@ -3189,7 +3184,6 @@ contributions:
prettyVersion: '1.0'
minRevision: 0
maxRevision: 0
lastUpdated: '0'
download: http://damellis.github.io/wovns-processing-examples/WOVNS.zip
- id: 195
source: http://culebra.technology/culebra.txt
Expand Down Expand Up @@ -3460,8 +3454,7 @@ contributions:
prettyVersion: 0.1.1
minRevision: 0
maxRevision: 0
lastUpdated: '0'
download:
download:
https://github.com/Lord-of-the-Galaxy/Timing-Utilities/releases/download/latest/timing_utils.zip
override:
categories:
Expand Down Expand Up @@ -3631,7 +3624,6 @@ contributions:
prettyVersion: '1.02'
minRevision: 0
maxRevision: 0
lastUpdated: '0'
download: http://maxlfarrell.gitlab.io/extruder/extruder.zip
override:
categories:
Expand Down Expand Up @@ -3865,8 +3857,7 @@ contributions:
prettyVersion: '1.0'
minRevision: 0
maxRevision: 0
lastUpdated: '0'
download:
download:
https://github.com/Apress/processing-for-android/releases/download/latest/processing-for-android-examples.zip
- id: 227
source:
Expand Down Expand Up @@ -4054,7 +4045,6 @@ contributions:
prettyVersion: 2.0.0
minRevision: 228
maxRevision: 0
lastUpdated: '0'
download: http://gicentre.org/handy/handy.zip
override:
categories:
Expand Down Expand Up @@ -4409,7 +4399,6 @@ contributions:
prettyVersion: v1.0.7
minRevision: 0
maxRevision: 0
lastUpdated: '0'
download: http://www.kramann.info/ComposingForEveryone.zip
override:
categories:
Expand Down Expand Up @@ -4598,7 +4587,6 @@ contributions:
prettyVersion: 2.0.0
minRevision: 0
maxRevision: 0
lastUpdated: '0'
download: https://codingart-book.github.io/examples/CodingArtBookExamples.zip
override:
categories:
Expand Down Expand Up @@ -4710,7 +4698,6 @@ contributions:
prettyVersion: 0.1.1
minRevision: 0
maxRevision: 0
lastUpdated: '0'
download: https://www.robertesler.com/software/Pd4P3.zip
override:
categories:
Expand All @@ -4734,8 +4721,7 @@ contributions:
prettyVersion: 1.0.0
minRevision: 266
maxRevision: 0
lastUpdated: '0'
download:
download:
https://fox-gieg.com/patches/processing/libraries/latkProcessing/latkProcessing.zip
override:
categories:
Expand Down Expand Up @@ -4979,7 +4965,6 @@ contributions:
prettyVersion: 1.0.0
minRevision: 266
maxRevision: 0
lastUpdated: '0'
download: https://fox-gieg.com/patches/processing/libraries/joons/joons.zip
override:
categories:
Expand Down Expand Up @@ -5090,8 +5075,7 @@ contributions:
prettyVersion: 1.1.0
minRevision: 400
maxRevision: 0
lastUpdated: '0'
download:
download:
https://github.com/letorbi/discord-rich-presence-for-processing/releases/latest/download/DiscordRichPresence.zip
- id: 289
source:
Expand Down Expand Up @@ -5170,8 +5154,7 @@ contributions:
prettyVersion: '2.0'
minRevision: 0
maxRevision: 0
lastUpdated: '0'
download:
download:
https://github.com/Apress/Processing-for-Android-Second-Edition/releases/download/latest/processing-for-android-examples.zip
override:
categories:
Expand Down
2 changes: 1 addition & 1 deletion scripts/add_new_contribution_to_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
contribution = {
'id': max_index + 1,
'status': 'VALID',
'date_added': datetime_today,
'dateAdded': datetime_today,
}
contribution.update(props)

Expand Down
9 changes: 8 additions & 1 deletion scripts/fetch_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

def update_contribution(contribution, props):
datetime_today = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S%z')
contribution['last_updated'] = datetime_today
contribution['lastUpdated'] = datetime_today
if 'previousVersions' not in contribution:
contribution['previousVersions'] = []
contribution['previousVersions'].append(contribution['prettyVersion'])

# update from online
for field in props.keys():
Expand Down Expand Up @@ -58,6 +61,10 @@ def process_contribution(contribution):
log_broken(contribution, f'invalid file, {date_today}')
return

# some library files have field lastUpdated. This also exists in the database, but is defined
# by our scripts, so remove this field.
contribution.pop('lastUpdated', None)

contribution['status'] = 'VALID'

if props['version'] != this_version:
Expand Down

0 comments on commit 45273f7

Please sign in to comment.