Skip to content

Commit da33048

Browse files
committed
simple script to produce simple gallery page bavc#34
1 parent 0fabd9b commit da33048

File tree

6 files changed

+151
-18
lines changed

6 files changed

+151
-18
lines changed

Gemfile

-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
source "https://rubygems.org"
2-
ruby RUBY_VERSION
3-
4-
# Hello! This is where you manage which Jekyll version is used to run.
5-
# When you want to use a different version, change it below, save the
6-
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
7-
#
8-
# bundle exec jekyll serve
9-
#
10-
# This will help ensure the proper Jekyll version is running.
11-
# Happy Jekylling!
122
gem "jekyll", "3.3.1"
13-
14-
# This is the default theme for new Jekyll sites. You may change this to anything you like.
153
gem "minima", "~> 2.0"
16-
17-
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
18-
# uncomment the line below. To upgrade, run `bundle update github-pages`.
19-
# gem "github-pages", group: :jekyll_plugins
20-
21-
# If you have any plugins, put them here!
224
group :jekyll_plugins do
235
gem "jekyll-feed", "~> 0.6"
246
end

_data/gallery.yaml

+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
- for_page: ac_beat.html
2+
file: EGLI_AC_Beat_Flat.jpg
3+
- for_page: analogue_slip.html
4+
file: analogue_slip.gif
5+
- for_page: audio_phase_error.html
6+
file: Audio_phase_error.png
7+
- for_page: bearding.html
8+
file: Beardingsmall.jpg
9+
- for_page: carrier_leak.html
10+
file: CarrierLeak_Flat.jpg
11+
- for_page: chrominance_noise.html
12+
file: ChromaNoise_Flat.jpg
13+
- for_page: crushed_setup.html
14+
file: SetupIsCrushed_Flat.jpg
15+
- for_page: crushed_setup.html
16+
file: SetupIsCrushedCorrected_Flat.jpg
17+
- for_page: crushed_setup.html
18+
file: Crushed_Setup_Waveform_Flat.jpg
19+
- for_page: crushed_setup.html
20+
file: Crushed_Setup_Waveform_Fixed_Flat.jpg
21+
- for_page: digital_clipping.html
22+
file: Levels_Too_Hot.png
23+
- for_page: dot_crawl.html
24+
file: DotCrawl_Flat.jpg
25+
- for_page: duplicated_frames.html
26+
file: missing_duplicated.gif
27+
- for_page: dv_quilting.html
28+
file: Quilting_Flat.jpg
29+
- for_page: dv_record_head_clog.html
30+
file: DV_Bad_Overwrite_Flat.jpg
31+
- for_page: fluorescent_strobing.html
32+
file: Fluorescent_Strobing_Flat.jpg
33+
- for_page: head_equalization_error.html
34+
file: HeadEQ_FLAT_.jpg
35+
- for_page: head_switching_noise.html
36+
file: HeadSwitch_Butterfly_SLV-779HF_Sharp1_XCard.jpg
37+
- for_page: head_switching_noise.html
38+
file: HeadSwitch_Butterfly_BR-S525U_VC500.jpg
39+
- for_page: herringbone.html
40+
file: 800px-Visible_frame_line.jpg
41+
- for_page: high_video_level.html
42+
file: VideoIsHigh_Waveform_flat_v1.jpg
43+
- for_page: high_video_level.html
44+
file: VideoIsHigh_WaveformFixed_flat_v1.jpg
45+
- for_page: interstitial_error.html
46+
file: Interstitial_Error.jpg
47+
- for_page: missing_frames.html
48+
file: missing_duplicated.gif
49+
- for_page: moire_effect.html
50+
file: Moire_640x480.jpg
51+
- for_page: muffled_sound.html
52+
file: Shedding_Oxide-Cassette_Head.jpg
53+
- for_page: muffled_sound.html
54+
file: Fc922zv0190_04_a-oxide_out-waveform.png
55+
- for_page: noise_reduction.html
56+
file: Mandelbrot_dolbyB.png
57+
- for_page: noise_reduction.html
58+
file: Mandelbrot_flat.png
59+
- for_page: noise_reduction.html
60+
file: Mandelbrot_spectrum_dolbyb.jpg
61+
- for_page: noise_reduction.html
62+
file: Mandelbrot_spectrum_flat.jpg
63+
- for_page: oversaturation.html
64+
file: Oversaturated_Flat.jpg
65+
- for_page: oversaturation.html
66+
file: OversaturatedFixed_Flat.jpg
67+
- for_page: poor_yc_decoding.html
68+
file: YCSeparation_1_Flat.jpg
69+
- for_page: poor_yc_decoding.html
70+
file: YCSeparation_2_Flat.jpg
71+
- for_page: ringing.html
72+
file: Ringing1_Flat.jpg
73+
- for_page: ringing.html
74+
file: Ringing2_Flat.jpg
75+
- for_page: sdi_spike.html
76+
file: SDISpike_Flat.jpg
77+
- for_page: sparkle.html
78+
file: sparkle_TheKiller_1989.gif
79+
- for_page: subcarrier_phase_error.html
80+
file: PhaseError_Flat.jpg
81+
- for_page: subcarrier_phase_error.html
82+
file: PhaseErrorCorrected_Flat.jpg
83+
- for_page: tape_deformation.html
84+
file: 450px-Before_v3.jpg
85+
- for_page: tape_deformation.html
86+
file: 450px-After_v3.jpg
87+
- for_page: tbc_processing_artifact.html
88+
file: TBCerror_compare_02.jpg
89+
- for_page: time_base_error.html
90+
file: FlagwavingSkewErrorTearing.png
91+
- for_page: tracking_error.html
92+
file: Tracking_error_qct2.png
93+
- for_page: tracking_error.html
94+
file: Trackingerror_qct.png
95+
- for_page: undersaturation.html
96+
file: Undersaturated_Flat.jpg
97+
- for_page: undersaturation.html
98+
file: UndersaturatedCorrected_Flat.jpg
99+
- for_page: vacuum_guide_adjustment_error.html
100+
file: VacuumGuideAdjustmentError_FLAT.jpg
101+
- for_page: vertical_smearing.html
102+
file: vertical_smearing.png
103+
- for_page: video_dropout.html
104+
file: 708px-DropoutDrawing.png
105+
- for_page: video_dropout.html
106+
file: Stepthroughprinteddropout250.gif
107+
- for_page: video_dropout.html
108+
file: TOUTgraph.jpg
109+
- for_page: video_dropout.html
110+
file: 3M_DebrisPerspectiveon1InchTapeTruncated.jpg
111+
- for_page: visible_frame_line.html
112+
file: 800px-Visible_frame_line.jpg
113+
- for_page: white_balance_error.html
114+
file: WhiteBalanceError_Flat.jpg
115+
- for_page: white_balance_error.html
116+
file: WhiteBalanceCorrected_Flat.jpg
117+
- for_page: yc_delay_error.html
118+
file: YCDelayError_Flat.jpg
119+
- for_page: yc_delay_error.html
120+
file: YCDelayErrorFixed_Flat.jpg

_layouts/default.html

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ <h1 class="title"><a href="{{ site.baseurl }}/index.html"><img id="logo" src="{{
5353
<li><a href="{{ site.baseurl }}/about.html">About AVAA</a></li>
5454
<li><a href="{{ site.baseurl }}/tags.html">Browse Artifacts by Tags</a></li>
5555
<li><a href="{{ site.baseurl }}/categories.html">Browse Artifacts by Categories</a></li>
56+
<li><a href="{{ site.baseurl }}/gallery.html">Gallery</a></li>
5657
<li><a href="{{ site.baseurl }}/unknown.html">Unknown Artifacts</a></li>
5758
<li><a href="{{ site.baseurl }}/contributors_guide.html">Contributor's Guide</a></li>
5859
<li><a href="{{ site.baseurl }}/preservation_glossary.html">AV Preservation Glossary</a>

css/main.css

+6
Original file line numberDiff line numberDiff line change
@@ -319,3 +319,9 @@ button {
319319
#also li {
320320
padding-left:33px;
321321
}
322+
323+
.gallery {
324+
max-width: 200px;
325+
padding: 20px;
326+
float: left;
327+
}

gallery.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
layout: page
3+
title: Gallery
4+
---
5+
6+
Below are all the images used and hosted on the AVAA. To browse videos, please see our videos hosted at the [AV Artifact Atlas Collection on Internet Archive](https://archive.org/details/avartifactatlas?sort=-date). To browse audio samples, please see our audio hosted on Soundcloud [here](https://soundcloud.com/av_artifact_atlas).
7+
8+
9+
{% for page in site.data.gallery %}
10+
<a href="{{ site.baseurl }}/artifacts/{{ page.for_page }}"><img class="gallery" src="{{ site.baseurl }}/images/{{ page.file }}"/></a>
11+
{% endfor %}

scripts/gallery_grabber.rb

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
require 'nokogiri'
2+
# This will continually append data to _data/gallery.yaml, so please
3+
# delete or empty the file before running this update operation
4+
images = Array.new
5+
Dir.glob('_artifacts/*.md') do |md_file|
6+
md = Nokogiri::HTML(open(md_file))
7+
images = md.css('img').map{ |i| i['src'].gsub("{{ site.baseurl }}/images/","") }
8+
if images.any?
9+
File.open("_data/gallery.yaml", 'a') do |f|
10+
images.each{|i| f.write("- for_page: " + md_file.gsub("_artifacts/","").gsub(".md",".html") + "\n file: " + i + "\n")}
11+
end
12+
end
13+
end

0 commit comments

Comments
 (0)