Skip to content

Commit 640306c

Browse files
committed
Add additional default content types, improve formatting
1 parent 3c02496 commit 640306c

File tree

2 files changed

+96
-90
lines changed

2 files changed

+96
-90
lines changed

Formatters/GitHubReleases.Format.ps1xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
<Label>Committish</Label>
2323
</TableColumnHeader>
2424
<TableColumnHeader>
25-
<Label>Is Draft</Label>
25+
<Label>Draft</Label>
2626
</TableColumnHeader>
2727
<TableColumnHeader>
28-
<Label>Is PreRelease</Label>
28+
<Label>PreRelease</Label>
2929
</TableColumnHeader>
3030
<TableColumnHeader>
31-
<Label>Creation Date</Label>
31+
<Label>Created</Label>
3232
</TableColumnHeader>
3333
<TableColumnHeader>
34-
<Label>Published Date</Label>
34+
<Label>Published</Label>
3535
</TableColumnHeader>
3636
</TableHeaders>
3737
<TableRowEntries>
@@ -90,13 +90,13 @@
9090
<Label>Content Type</Label>
9191
</TableColumnHeader>
9292
<TableColumnHeader>
93-
<Label>Download Count</Label>
93+
<Label>Downloads</Label>
9494
</TableColumnHeader>
9595
<TableColumnHeader>
96-
<Label>Creation Date</Label>
96+
<Label>Created</Label>
9797
</TableColumnHeader>
9898
<TableColumnHeader>
99-
<Label>Updated Date</Label>
99+
<Label>Updated</Label>
100100
</TableColumnHeader>
101101
</TableHeaders>
102102
<TableRowEntries>

GitHubCore.ps1

Lines changed: 89 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,90 +1124,96 @@ function Get-MediaAcceptHeader
11241124

11251125
# Compiled mostly from https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
11261126
extensionToContentType = @{
1127-
'.3gp' = 'video/3gpp' # 3GPP audio/video container
1128-
'.3g2' = 'video/3gpp2' # 3GPP2 audio/video container
1129-
'.7z' = 'application/x-7z-compressed' # 7-zip archive
1130-
'.aac' = 'audio/aac' # AAC audio
1131-
'.abw' = 'application/x-abiword' # AbiWord document
1132-
'.arc' = 'application/x-freearc' # Archive document (multiple files embedded)
1133-
'.avi' = 'video/x-msvideo' # AVI: Audio Video Interleave
1134-
'.azw' = 'application/vnd.amazon.ebook' # Amazon Kindle eBook format
1135-
'.bin' = 'application/octet-stream' # Any kind of binary data
1136-
'.bmp' = 'image/bmp' # Windows OS/2 Bitmap Graphics
1137-
'.bz' = 'application/x-bzip' # BZip archive
1138-
'.bz2' = 'application/x-bzip2' # BZip2 archive
1139-
'.csh' = 'application/x-csh' # C-Shell script
1140-
'.css' = 'text/css' # Cascading Style Sheets (CSS)
1141-
'.csv' = 'text/csv' # Comma-separated values (CSV)
1142-
'.doc' = 'application/msword' # Microsoft Word
1143-
'.docx' = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' # Microsoft Word (OpenXML)
1144-
'.eot' = 'application/vnd.ms-fontobject' # MS Embedded OpenType fonts
1145-
'.epub' = 'application/epub+zip' # Electronic publication (EPUB)
1146-
'.exe' = 'application/vnd.microsoft.portable-executable' # Microsoft application executable
1147-
'.gz' = 'application/gzip' # GZip Compressed Archive
1148-
'.gif' = 'image/gif' # Graphics Interchange Format (GIF)
1149-
'.htm' = 'text/html' # HyperText Markup Language (HTML)
1150-
'.html' = 'text/html' # HyperText Markup Language (HTML)
1151-
'.ico' = 'image/vnd.microsoft.icon' # Icon format
1152-
'.ics' = 'text/calendar' # iCalendar format
1153-
'.ini' = 'text/plain' # Text-based configuration file
1154-
'.jar' = 'application/java-archive' # Java Archive (JAR)
1155-
'.jpeg' = 'image/jpeg' # JPEG images
1156-
'.jpg' = 'image/jpeg' # JPEG images
1157-
'.js' = 'text/javascript' # JavaScript
1158-
'.json' = 'application/json' # JSON format
1127+
'.3gp' = 'video/3gpp' # 3GPP audio/video container
1128+
'.3g2' = 'video/3gpp2' # 3GPP2 audio/video container
1129+
'.7z' = 'application/x-7z-compressed' # 7-zip archive
1130+
'.aac' = 'audio/aac' # AAC audio
1131+
'.abw' = 'application/x-abiword' # AbiWord document
1132+
'.arc' = 'application/x-freearc' # Archive document (multiple files embedded)
1133+
'.avi' = 'video/x-msvideo' # AVI: Audio Video Interleave
1134+
'.azw' = 'application/vnd.amazon.ebook' # Amazon Kindle eBook format
1135+
'.bin' = 'application/octet-stream' # Any kind of binary data
1136+
'.bmp' = 'image/bmp' # Windows OS/2 Bitmap Graphics
1137+
'.bz' = 'application/x-bzip' # BZip archive
1138+
'.bz2' = 'application/x-bzip2' # BZip2 archive
1139+
'.csh' = 'application/x-csh' # C-Shell script
1140+
'.css' = 'text/css' # Cascading Style Sheets (CSS)
1141+
'.csv' = 'text/csv' # Comma-separated values (CSV)
1142+
'.deb' = 'application/octet-stream' # Standard Uix archive format
1143+
'.doc' = 'application/msword' # Microsoft Word
1144+
'.docx' = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' # Microsoft Word (OpenXML)
1145+
'.eot' = 'application/vnd.ms-fontobject' # MS Embedded OpenType fonts
1146+
'.epub' = 'application/epub+zip' # Electronic publication (EPUB)
1147+
'.exe' = 'application/vnd.microsoft.portable-executable' # Microsoft application executable
1148+
'.gz' = 'application/x-gzip' # GZip Compressed Archive
1149+
'.gif' = 'image/gif' # Graphics Interchange Format (GIF)
1150+
'.htm' = 'text/html' # HyperText Markup Language (HTML)
1151+
'.html' = 'text/html' # HyperText Markup Language (HTML)
1152+
'.ico' = 'image/vnd.microsoft.icon' # Icon format
1153+
'.ics' = 'text/calendar' # iCalendar format
1154+
'.ini' = 'text/plain' # Text-based configuration file
1155+
'.jar' = 'application/java-archive' # Java Archive (JAR)
1156+
'.jpeg' = 'image/jpeg' # JPEG images
1157+
'.jpg' = 'image/jpeg' # JPEG images
1158+
'.js' = 'text/javascript' # JavaScript
1159+
'.json' = 'application/json' # JSON format
11591160
'.jsonld' = 'application/ld+json' # JSON-LD format
1160-
'.mid' = 'audio/midi' # Musical Instrument Digital Interface (MIDI)
1161-
'.midi' = 'audio/midi' # Musical Instrument Digital Interface (MIDI)
1162-
'.mjs' = 'text/javascript' # JavaScript module
1163-
'.mp3' = 'audio/mpeg' # MP3 audio
1164-
'.mp4' = 'video/mp4' # MP3 video
1165-
'.mov' = 'video/quicktime' # Quicktime video
1166-
'.mpeg' = 'video/mpeg' # MPEG Video
1167-
'.mpg' = 'video/mpeg' # MPEG Video
1168-
'.mpkg' = 'application/vnd.apple.installer+xml' # Apple Installer Package
1169-
'.mkv' = 'video/x-matroska' # Matroska Multimedia Container
1170-
'.odp' = 'application/vnd.oasis.opendocument.presentation' # OpenDocument presentation document
1171-
'.ods' = 'application/vnd.oasis.opendocument.spreadsheet' # OpenDocument spreadsheet document
1172-
'.odt' = 'application/vnd.oasis.opendocument.text' # OpenDocument text document
1173-
'.oga' = 'audio/ogg' # OGG audio
1174-
'.ogg' = 'application/ogg' # OGG audio or video
1175-
'.ogv' = 'video/ogg' # OGG video
1176-
'.ogx' = 'application/ogg' # OGG
1177-
'.opus' = 'audio/opus' # Opus audio
1178-
'.otf' = 'font/otf' # OpenType font
1179-
'.png' = 'image/png' # Portable Network Graphics
1180-
'.pdf' = 'application/pdf' # Adobe Portable Document Format (PDF)
1181-
'.php' = 'application/x-httpd-php' # Hypertext Preprocessor (Personal Home Page)
1182-
'.ps1' = 'text/plain' # PowerShell script file
1183-
'.psd1' = 'text/plain' # PowerShell module definition file
1184-
'.psm1' = 'text/plain' # PowerShell module file
1185-
'.ppt' = 'application/vnd.ms-powerpoint' # Microsoft PowerPoint
1186-
'.pptx' = 'application/vnd.openxmlformats-officedocument.presentationml.presentation' # Microsoft PowerPoint (OpenXML)
1187-
'.rar' = 'application/vnd.rar' # RAR archive
1188-
'.rtf' = 'application/rtf' # Rich Text Format (RTF)
1189-
'.sh' = 'application/x-sh' # Bourne shell script
1190-
'.svg' = 'image/svg+xml' # Scalable Vector Graphics (SVG)
1191-
'.swf' = 'application/x-shockwave-flash' # Small web format (SWF) or Adobe Flash document
1192-
'.tar' = 'application/x-tar' # Tape Archive (TAR)
1193-
'.tif' = 'image/tiff' # Tagged Image File Format (TIFF)
1194-
'.tiff' = 'image/tiff' # Tagged Image File Format (TIFF)
1195-
'.ts' = 'video/mp2t' # MPEG transport stream
1196-
'.ttf' = 'font/ttf' # TrueType Font
1197-
'.txt' = 'text/plain' # Text (generally ASCII or ISO 8859-n)
1198-
'.vsd' = 'application/vnd.visio' # Microsoft Visio
1199-
'.wav' = 'audio/wav' # Waveform Audio Format
1200-
'.weba' = 'audio/webm' # WEBM audio
1201-
'.webm' = 'video/webm' # WEBM video
1202-
'.webp' = 'image/webp' # WEBP image
1203-
'.woff' = 'font/woff' # Web Open Font Format (WOFF)
1204-
'.woff2' = 'font/woff2' # Web Open Font Format (WOFF)
1205-
'.xhtml' = 'application/xhtml+xml' # XHTML
1206-
'.xls' = 'application/vnd.ms-excel' # Microsoft Excel
1207-
'.xlsx' = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' # Microsoft Excel (OpenXML)
1208-
'.xml' = 'application/xml' # XML
1209-
'.xul' = 'application/vnd.mozilla.xul+xml' # XUL
1210-
'.zip' = 'application/zip' # ZIP archive
1161+
'.mid' = 'audio/midi' # Musical Instrument Digital Interface (MIDI)
1162+
'.midi' = 'audio/midi' # Musical Instrument Digital Interface (MIDI)
1163+
'.mjs' = 'text/javascript' # JavaScript module
1164+
'.mp3' = 'audio/mpeg' # MP3 audio
1165+
'.mp4' = 'video/mp4' # MP3 video
1166+
'.mov' = 'video/quicktime' # Quicktime video
1167+
'.mpeg' = 'video/mpeg' # MPEG Video
1168+
'.mpg' = 'video/mpeg' # MPEG Video
1169+
'.mpkg' = 'application/vnd.apple.installer+xml' # Apple Installer Package
1170+
'.msi' = 'application/octet-stream' # Windows Installer package
1171+
'.msix' = 'application/octet-stream' # Windows Installer package
1172+
'.mkv' = 'video/x-matroska' # Matroska Multimedia Container
1173+
'.odp' = 'application/vnd.oasis.opendocument.presentation' # OpenDocument presentation document
1174+
'.ods' = 'application/vnd.oasis.opendocument.spreadsheet' # OpenDocument spreadsheet document
1175+
'.odt' = 'application/vnd.oasis.opendocument.text' # OpenDocument text document
1176+
'.oga' = 'audio/ogg' # OGG audio
1177+
'.ogg' = 'application/ogg' # OGG audio or video
1178+
'.ogv' = 'video/ogg' # OGG video
1179+
'.ogx' = 'application/ogg' # OGG
1180+
'.opus' = 'audio/opus' # Opus audio
1181+
'.otf' = 'font/otf' # OpenType font
1182+
'.png' = 'image/png' # Portable Network Graphics
1183+
'.pdf' = 'application/pdf' # Adobe Portable Document Format (PDF)
1184+
'.php' = 'application/x-httpd-php' # Hypertext Preprocessor (Personal Home Page)
1185+
'.pkg' = 'application/octet-stream' # mac OS X installer file
1186+
'.ps1' = 'text/plain' # PowerShell script file
1187+
'.psd1' = 'text/plain' # PowerShell module definition file
1188+
'.psm1' = 'text/plain' # PowerShell module file
1189+
'.ppt' = 'application/vnd.ms-powerpoint' # Microsoft PowerPoint
1190+
'.pptx' = 'application/vnd.openxmlformats-officedocument.presentationml.presentation' # Microsoft PowerPoint (OpenXML)
1191+
'.rar' = 'application/vnd.rar' # RAR archive
1192+
'.rtf' = 'application/rtf' # Rich Text Format (RTF)
1193+
'.rpm' = 'application/octet-stream' # Red Hat Linux package format
1194+
'.sh' = 'application/x-sh' # Bourne shell script
1195+
'.svg' = 'image/svg+xml' # Scalable Vector Graphics (SVG)
1196+
'.swf' = 'application/x-shockwave-flash' # Small web format (SWF) or Adobe Flash document
1197+
'.tar' = 'application/x-tar' # Tape Archive (TAR)
1198+
'.tif' = 'image/tiff' # Tagged Image File Format (TIFF)
1199+
'.tiff' = 'image/tiff' # Tagged Image File Format (TIFF)
1200+
'.ts' = 'video/mp2t' # MPEG transport stream
1201+
'.ttf' = 'font/ttf' # TrueType Font
1202+
'.txt' = 'text/plain' # Text (generally ASCII or ISO 8859-n)
1203+
'.vsd' = 'application/vnd.visio' # Microsoft Visio
1204+
'.vsix' = 'application/zip' # Visual Studio application package archive
1205+
'.wav' = 'audio/wav' # Waveform Audio Format
1206+
'.weba' = 'audio/webm' # WEBM audio
1207+
'.webm' = 'video/webm' # WEBM video
1208+
'.webp' = 'image/webp' # WEBP image
1209+
'.woff' = 'font/woff' # Web Open Font Format (WOFF)
1210+
'.woff2' = 'font/woff2' # Web Open Font Format (WOFF)
1211+
'.xhtml' = 'application/xhtml+xml' # XHTML
1212+
'.xls' = 'application/vnd.ms-excel' # Microsoft Excel
1213+
'.xlsx' = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' # Microsoft Excel (OpenXML)
1214+
'.xml' = 'application/xml' # XML
1215+
'.xul' = 'application/vnd.mozilla.xul+xml' # XUL
1216+
'.zip' = 'application/zip' # ZIP archive
12111217
}
12121218
}.GetEnumerator() | ForEach-Object {
12131219
Set-Variable -Scope Script -Option ReadOnly -Name $_.Key -Value $_.Value

0 commit comments

Comments
 (0)