├── CREDITS.md
├── README.md
├── composer.json
├── demo.php
├── demo_files
├── demo.css
└── sh
│ ├── SyntaxHighlighter License.txt
│ ├── shBrushPhp.js
│ ├── shCore.css
│ ├── shCore.js
│ └── shThemeMidnight.css
└── dummy
├── assets
├── ad
│ ├── 120x30
│ │ ├── 120x30_1.gif
│ │ ├── 120x30_2.gif
│ │ ├── 120x30_3.gif
│ │ ├── 120x30_4.gif
│ │ ├── 120x30_5.jpg
│ │ └── 120x30_6.gif
│ ├── 120x90
│ │ ├── 120x90_1.jpg
│ │ ├── 120x90_2.jpg
│ │ └── 120x90_3.jpg
│ ├── 125x125
│ │ ├── 125x125_1.gif
│ │ ├── 125x125_2.gif
│ │ ├── 125x125_3.gif
│ │ ├── 125x125_4.gif
│ │ └── 125x125_5.gif
│ ├── 140x65
│ │ ├── sas_1.png
│ │ ├── sas_2.png
│ │ ├── sas_3.png
│ │ └── sas_4.png
│ ├── 150x60
│ │ ├── 150x60_1.gif
│ │ ├── 150x60_1.jpg
│ │ └── 150x60_2.jpg
│ ├── 160x600
│ │ ├── 160x600_1.gif
│ │ ├── 160x600_1.jpg
│ │ ├── 160x600_1.swf
│ │ └── 160x600_2.jpg
│ ├── 300x250
│ │ ├── 300x250_1.gif
│ │ ├── 300x250_1.jpg
│ │ ├── 300x250_1.swf
│ │ ├── 300x250_2.jpg
│ │ ├── 300x250_2.swf
│ │ ├── 300x250_3.swf
│ │ ├── 300x250_4.swf
│ │ ├── 300x250_5.swf
│ │ ├── 300x250_6.swf
│ │ └── 300x250_7.swf
│ ├── 336x280
│ │ ├── 336x280_1.swf
│ │ ├── 336x280_2.swf
│ │ ├── 336x280_3.swf
│ │ └── 336x280_4.swf
│ ├── 336x850
│ │ ├── 336x850_1.jpg
│ │ ├── 336x850_1.swf
│ │ └── 336x850_2.swf
│ ├── 640x480
│ │ ├── 640x480_1.swf
│ │ └── 640x480_2.swf
│ ├── 728x90
│ │ ├── 728x90_1.gif
│ │ ├── 728x90_1.swf
│ │ ├── 728x90_2.gif
│ │ ├── 728x90_2.swf
│ │ ├── 728x90_3.gif
│ │ ├── 728x90_3.swf
│ │ ├── 728x90_4.gif
│ │ ├── 728x90_4.swf
│ │ ├── 728x90_5.gif
│ │ ├── 728x90_5.swf
│ │ ├── 728x90_6.swf
│ │ ├── 728x90_7.swf
│ │ └── 728x90_8.swf
│ ├── 930x180
│ │ ├── 930x180_1.png
│ │ ├── 930x180_1.swf
│ │ ├── 930x180_2.swf
│ │ ├── 930x180_3.swf
│ │ ├── 930x180_4.swf
│ │ ├── 930x180_5.swf
│ │ └── 930x180_6.swf
│ ├── 950x200
│ │ ├── 950x200_1.swf
│ │ └── 950x200_2.swf
│ ├── 950x600
│ │ └── 950x600_1.swf
│ ├── flash.embed.php
│ └── image.embed.php
├── image
│ ├── !avatar
│ │ ├── avatar_jessica_mullen.jpg
│ │ ├── avatar_socialspace.gif
│ │ ├── bird_familymwr.jpg
│ │ ├── cliche_chris_nixon.jpg
│ │ ├── dl_DieEgg.gif
│ │ ├── fjgaylor_tsand.jpg
│ │ ├── garamon_ultra999.gif
│ │ ├── hepburn_jagelado.gif
│ │ ├── jack_ny_laverrue.jpg
│ │ ├── judd_avatar_chris_nixon.jpg
│ │ ├── kuwayama_balazsgardi.jpg
│ │ ├── owling_tsand.jpg
│ │ ├── pattern-language_jessica_mullen.jpg
│ │ ├── pilots_earlier.at.jpg
│ │ ├── shardrix_JenXer.jpg
│ │ ├── solar_flare_erupts_NASA_goddard.gif
│ │ ├── tcv_JenXer.jpg
│ │ └── twitter_dungeon_orkboi.gif
│ ├── landscape
│ │ ├── 2008_olympics_familymwr.jpg
│ │ ├── air_de_famille_untrained_eye.jpg
│ │ ├── belle_an_untrained_eye.jpg
│ │ ├── branson_jefffoust.jpg
│ │ ├── burj_al_arab_joi_ito.jpg
│ │ ├── centre_court_saragoldsmith.jpg
│ │ ├── compare_and_ contrast_an_untrained_eye.jpg
│ │ ├── duckhorn_vineyards_thenickstar.jpg
│ │ ├── eastern_airline_cogdogblog.jpg
│ │ ├── eyes_that_speak_familymwr.jpg
│ │ ├── face_to_face_an_untrained_eye.jpg
│ │ ├── fond_de tiroir_pierre metivier.jpg
│ │ ├── football_USMC.jpg
│ │ ├── futur_an_untrained_eye.jpg
│ │ ├── google_moon_nasa_hq_photo.jpg
│ │ ├── hat_tip_drew__.jpg
│ │ ├── hollande_jean_marc_ayrault.jpg
│ │ ├── italian_man_an_untrained_eye.jpg
│ │ ├── jobs_gates_joi_ito.jpg
│ │ ├── laughing_amir_kuckovic.jpg
│ │ ├── lee_rasmussen_korea.net.jpg
│ │ ├── mcdonalds_amir_kuckovic.jpg
│ │ ├── medvedev_land_dmitry_valberg.jpg
│ │ ├── mju_amir_kuckovic.jpg
│ │ ├── noma_marv_cyclonebill.jpg
│ │ ├── nonbeiyokocho_joi_ito.jpg
│ │ ├── obama_nasa_hq_photo.jpg
│ │ ├── operation_ice_bridge_NASA_goddard.jpg
│ │ ├── pingpong_foxxyz.jpg
│ │ ├── rania_world_economic_forum.jpg
│ │ ├── shibuya_center_joi_ito.jpg
│ │ ├── sony_center_1__chris_st.jpg
│ │ ├── tracey_overbeck_studio_flickr_avatar.jpg
│ │ ├── untitled_amir_kuckovic.jpg
│ │ ├── webb_actuators_NASA_goddard.jpg
│ │ └── what_is_photography_an_untrained_eye.jpg
│ ├── portrait
│ │ ├── 1238_amir_kuckovic.jpg
│ │ ├── clinton_world_economic_forum.jpg
│ │ ├── haughwout_building_ahisgett.jpg
│ │ ├── iris_stefan_kellner.jpg
│ │ ├── joi_ito_chiaki0808.jpg
│ │ ├── mariana_aydar_gerardo_lazzari.jpg
│ │ ├── medvedev_por_Dmitry_Valberg.jpg
│ │ ├── obama_backstage_the_white_house.jpg
│ │ ├── portland_diebmx.jpg
│ │ ├── prada_ivva.jpg
│ │ ├── sony_center_2__chris_st.jpg
│ │ ├── spellemann_dmitry_valberg.jpg
│ │ └── untitled_superbomba.jpg
│ └── retina
│ │ ├── 23_launch_day_nasa_hq_photo.jpg
│ │ ├── argus_c3_chris_friese.jpg
│ │ ├── best_of_USAF_expertinfantry.jpg
│ │ ├── blair_by_fortune_thenickster.jpg
│ │ ├── bokeh_hearts_fung.leo.jpg
│ │ ├── bokeh_siddy_lam.jpg
│ │ ├── borg_dmitry_valberg.jpg
│ │ ├── criolo_gerardo_lazzari.jpg
│ │ ├── dm_bar_drew__.jpg
│ │ ├── flotus_the_white_house.jpg
│ │ ├── green_room_dmitry_valberg.jpg
│ │ ├── hazy_day_ny_caruba.jpg
│ │ ├── hp_gas_siddy_lam.jpg
│ │ ├── james_laverrue.jpg
│ │ ├── kane5_drew__.jpg
│ │ ├── mascarado_eduardo_amorim.jpg
│ │ ├── move_to_hawaii_dmitry_valberg.jpg
│ │ ├── natasha_palmer_drew__.jpg
│ │ ├── obama_fatherhood_townhall.jpg
│ │ ├── opendays_eu_strategy_danube.jpg
│ │ ├── pusteblume_caruba.jpg
│ │ ├── sof_1946_familymwr.jpg
│ │ ├── tina_dmitry_valberg.jpg
│ │ ├── troy_at_twitter_scott_beale.jpg
│ │ └── view_over_shibuya_joi_ito.jpg
└── text
│ ├── author.txt
│ ├── blurb.txt
│ ├── city.txt
│ ├── date.txt
│ ├── headline.txt
│ ├── item.txt
│ ├── long-teaser.txt
│ ├── paragraph.txt
│ ├── short-teaser.txt
│ ├── teaser.txt
│ ├── time-ago.txt
│ ├── time.txt
│ ├── tweet.txt
│ ├── username.txt
│ └── walton.txt
├── cache
└── IMPORTANT.md
├── dummy.php
└── extras
├── Dummy.clips
├── Dummy.tmbundle
├── Snippets
│ ├── Add Dummy.tmSnippet
│ ├── Ask Dumb Question (Queries).tmSnippet
│ ├── Build Dummy Article.tmSnippet
│ ├── Insert Dummy Ad.tmSnippet
│ ├── Insert Dummy Asset.tmSnippet
│ ├── Insert Dummy Headline.tmSnippet
│ ├── Insert Dummy Image.tmSnippet
│ ├── Insert Dummy Paragraph.tmSnippet
│ ├── Insert Dummy Teaser.tmSnippet
│ ├── Insert Dummy Text.tmSnippet
│ ├── Insert Probability (alt).tmSnippet
│ ├── Insert Probability.tmSnippet
│ ├── Insert Variable Loop (alt).tmSnippet
│ ├── Insert Variable Loop.tmSnippet
│ ├── Insert Walton (Testing Column Measure).tmSnippet
│ ├── Wrap Selected in Loop Range.tmSnippet
│ └── Wrap Selected in Probability.tmSnippet
└── info.plist
└── optional.htaccess
/CREDITS.md:
--------------------------------------------------------------------------------
1 | ## Images
2 |
3 | ### Licensing
4 |
5 | Pete Souza's White House photography is provided under a U.S. Government Work U.S. license.
6 | + http://www.usa.gov/copyright.shtml
7 |
8 | All other images are provided under some form of Creative Commons license permitting non-commercial sharing and remixing in exchange for attribution.
9 |
10 | + http://creativecommons.org/licenses/by/2.0/deed.en
11 | + http://creativecommons.org/licenses/by-sa/2.0/deed.en
12 |
13 | ### Thanks
14 | Images bundled with Dummy (found in dummy/assets/images) are used gratefully with credit to the following:
15 |
16 | -----
17 |
18 | #### [an untrained eye] (http://www.flickr.com/photos/an_untrained_eye/)
19 | + Un Air de Famille – http://www.flickr.com/photos/an_untrained_eye/7088246747/
20 | + Italian Man – http://www.flickr.com/photos/an_untrained_eye/6109928269
21 | + Face to Face – http://www.flickr.com/photos/an_untrained_eye/2998277224/
22 | + Compare And Contrast – http://www.flickr.com/photos/an_untrained_eye/2478868523/
23 | + What is Photography? – http://www.flickr.com/photos/an_untrained_eye/4070489924/
24 | + Belle Of The Ball – http://www.flickr.com/photos/an_untrained_eye/4156634426/
25 | + Passé / Futur – http://www.flickr.com/photos/an_untrained_eye/3075008647/
26 |
27 | #### [Dmitry Valberg] (http://www.flickr.com/photos/gcardinal/)
28 | + Tina – http://www.flickr.com/photos/gcardinal/6952274180/
29 | + Tomorrow We Move To Hawaii – http://www.flickr.com/photos/gcardinal/6840380423/
30 | + Green Room – http://www.flickr.com/photos/gcardinal/6438818515/
31 | + Russian President Dmitry Medvedev on a state visit to Norway – http://www.flickr.com/photos/gcardinal/4555167784/
32 | + Björn Borg – http://www.flickr.com/photos/gcardinal/4916627066/
33 | + Spellemann 2011 – http://www.flickr.com/photos/gcardinal/5505739646/
34 |
35 | #### [Amir Kuckovic] (http://www.flickr.com/photos/childofwar/)
36 | + 12:38 – http://www.flickr.com/photos/childofwar/4378871291/
37 | + McDonalds – http://www.flickr.com/photos/childofwar/4852318441/
38 | + Laughing – http://www.flickr.com/photos/childofwar/4840768088
39 | + MJU II – http://www.flickr.com/photos/childofwar/5925910990/
40 | + Untitled – http://www.flickr.com/photos/childofwar/3767700499/
41 |
42 | #### [Joi Ito] (http://www.flickr.com/photos/joi/)
43 | + Steve Jobs and Bill Gates – http://www.flickr.com/photos/joi/522695099/
44 | + Shibuya Center Gai – http://www.flickr.com/photos/joi/1466127636/
45 | + View over Shibuya – http://www.flickr.com/photos/joi/1466158738/
46 | + Nonbeiyokocho – http://www.flickr.com/photos/joi/1974191475/
47 | + Burj Al Arab – http://www.flickr.com/photos/joi/2086020608/
48 |
49 | #### [familymwr] (http://www.flickr.com/photos/familymwr/)
50 | + 2008 Summer Olympics – http://www.flickr.com/photos/familymwr/4928323919/
51 | + SOF_1946 – http://www.flickr.com/photos/familymwr/6234519771/
52 | + Eyes that Speak – http://www.flickr.com/photos/familymwr/5546846883/
53 | + Bird – http://www.flickr.com/photos/familymwr/5548053768/
54 |
55 | #### [Andrew Kneebone] (http://www.flickr.com/photos/andrewkneebone/)
56 | + Kane5 – http://www.flickr.com/photos/andrewkneebone/6246521404/
57 | + Lick Live – http://www.flickr.com/photos/andrewkneebone/5084588415/
58 | + Natasha Palmer – http://www.flickr.com/photos/andrewkneebone/5314132766/
59 | + D&M Bar - http://www.flickr.com/photos/andrewkneebone/6846504494
60 |
61 | #### [The White House] (http://www.flickr.com/photos/whitehouse/)
62 | + FLOTUS on the Tarmac (P031612SH-0065) – http://www.flickr.com/photos/whitehouse/7051407739/
63 | + Obama Fatherhood Townhall (P061909PS-0657) – http://www.flickr.com/photos/whitehouse/3684022266/
64 | + Obama Backstage (P120609PS-0650) – http://www.flickr.com/photos/whitehouse/4191582882/
65 |
66 | #### [World Economic Forum] (http://www.flickr.com/photos/worldeconomicforum/)
67 | + Bill Clinton - World Economic Forum Annual Meeting Davos 2006 – http://www.flickr.com/photos/worldeconomicforum/345583530/
68 | + Queen Rania of Jordan, 2011 – http://www.flickr.com/photos/worldeconomicforum/6272860550/
69 |
70 | #### [Chris Stangier] (http://www.flickr.com/photos/chrisstangier/)
71 | + Sony Center 1 – http://www.flickr.com/photos/chrisstangier/4414107325/
72 | + Sony Center 2 – http://www.flickr.com/photos/chrisstangier/4414870758/
73 |
74 | #### [caruba] (http://www.flickr.com/photos/denial_land/)
75 | + A Hazy Day in New York City – http://www.flickr.com/photos/denial_land/3883242306/
76 | + Pusteblume – http://www.flickr.com/photos/denial_land/4675711474/
77 |
78 | #### [Gerardo Lazzari] (http://www.flickr.com/photos/gerardolazzari/)
79 | + CRIOLO – http://www.flickr.com/photos/gerardolazzari/7074852467/
80 | + Mariana Aydar – http://www.flickr.com/photos/gerardolazzari/7074787267/
81 |
82 | #### [nasa hq] (http://www.flickr.com/photos/nasahqphoto/)
83 | + Expedition 23 Launch Day – http://www.flickr.com/photos/nasahqphoto/4489986468/
84 | + Google Moon – http://www.flickr.com/photos/nasahqphoto/3815058710/
85 |
86 | #### [Siddy Lam] (http://www.flickr.com/photos/siddylam/)
87 | + Bokeh – http://www.flickr.com/photos/siddylam/4306121540/
88 | + HP Gas – http://www.flickr.com/photos/siddylam/4004470964/
89 |
90 | #### [ivva] (http://www.flickr.com/photos/ivva/)
91 | + Prada Tokyo – http://www.flickr.com/photos/ivva/852120668/
92 |
93 | #### [Eduardo Amorim] (http://www.flickr.com/photos/bombeador/)
94 | + Mascarado, boi... – http://www.flickr.com/photos/bombeador/4333920864/
95 |
96 | #### [foxxyz] (http://www.flickr.com/photos/foxxyz/)
97 | + Pong Ping Peking – http://www.flickr.com/photos/foxxyz/2088748696/
98 |
99 | #### [flickravatar] (http://www.flickr.com/photos/flickravatar/)
100 | + Tracey Overbeck Stead Design – http://www.flickr.com/photos/flickravatar/3062382723/
101 |
102 | #### [Chris Friese] (http://www.flickr.com/photos/free-zee/)
103 | + Argus C3 – http://www.flickr.com/photos/free-zee/3524932217/
104 |
105 | #### [fung.leo] (http://www.flickr.com/photos/fungleo/)
106 | + Bokeh Hearts – http://www.flickr.com/photos/fungleo/3650823900/
107 |
108 | #### [Rob Brown (Man & His Cam)] (http://www.flickr.com/photos/robbrown/)
109 | + London Night Time Shots – http://www.flickr.com/photos/robbrown/95984916/
110 |
111 | #### [European Week of Cities and Regions] (http://www.flickr.com/photos/opendays/)
112 | + Press panel on the EU Strategy for the Danube Region – http://www.flickr.com/photos/opendays/6079069959/
113 |
114 | #### [Jeff Foust] (http://www.flickr.com/photos/jfoust/)
115 | + Branson – http://www.flickr.com/photos/jfoust/5106238259/
116 |
117 | #### [Alan Levine] (http://www.flickr.com/photos/cogdog/)
118 | + China Eastern Airline Wing – http://www.flickr.com/photos/cogdog/2878441417/
119 |
120 | #### [chiaki0808] (http://www.flickr.com/photos/chiaki/)
121 | + Joi Ito – http://www.flickr.com/photos/chiaki/3359475417/
122 |
123 | #### [laverrue] (http://www.flickr.com/photos/23912576@N05/)
124 | + James, I think your cover's blown! – http://www.flickr.com/photos/23912576@N05/2962194797/
125 | + Jack – http://www.flickr.com/photos/23912576@N05/3357528015/
126 |
127 | #### [superbomba] (http://www.flickr.com/photos/superbomba/)
128 | + Untitled – http://www.flickr.com/photos/superbomba/3440539519/
129 |
130 | #### [Nicki Dugan] (http://www.flickr.com/photos/thenickster/4694337005/)
131 | + Tony Blair interviewed by Fortune – http://www.flickr.com/photos/thenickster/4694337005/
132 | + Duckhorn Vineyards – http://www.flickr.com/photos/thenickster/6829011764/
133 |
134 | #### [NASA Goddard Photo and Video] (http://www.flickr.com/photos/gsfc/)
135 | + Operation Ice Bridge – http://www.flickr.com/photos/gsfc/5175654017/
136 | + The Webb Telescope's Actuators – http://www.flickr.com/photos/gsfc/5249004551/
137 | + Solar Flare Erupts – http://www.flickr.com/photos/gsfc/4975115754/
138 |
139 | #### [Pierre Metivier] (http://www.flickr.com/photos/feuilllu/)
140 | + Fond de Tiroir – http://www.flickr.com/photos/feuilllu/3369035260/
141 |
142 | #### [Scott Beale] (http://www.flickr.com/photos/laughingsquid/)
143 | + @troy at Twitter – http://www.flickr.com/photos/laughingsquid/5301041649/
144 | + See also [laughingsquid.com] (http://laughingsquid.com/)
145 |
146 | #### [Jean-Marc Ayrault] (http://www.flickr.com/photos/jmayrault/)
147 | + Meeting François Hollande – http://www.flickr.com/photos/jmayrault/6171036892/
148 |
149 | #### [Sara Goldsmith] (http://www.flickr.com/photos/saragoldsmith/)
150 | + centre court – http://www.flickr.com/photos/saragoldsmith/3669413374/
151 |
152 | #### [Korea.net] (http://www.flickr.com/photos/koreanet/)
153 | + President Lee and Danish PM Rasmussen – http://www.flickr.com/photos/koreanet/4434586634/
154 |
155 | #### [ahisgett] (http://www.flickr.com/photos/hisgett/)
156 | + Haughwout Building – http://www.flickr.com/photos/hisgett/4683172769/
157 |
158 | #### [diebmx] (http://www.flickr.com/photos/diebmx/)
159 | + Portland – http://www.flickr.com/photos/diebmx/2169769011/
160 |
161 | #### [cyclonebill] (http://www.flickr.com/photos/cyclonebill/)
162 | + Restaurant Noma: Marv med syltede grøntsager – http://www.flickr.com/photos/cyclonebill/3678837304/
163 |
164 | #### [USMC] (http://www.flickr.com/photos/marine_corps/)
165 | + Marine Football – http://www.flickr.com/photos/marine_corps/4733392294/
166 |
167 | #### [expertinfantry] (http://www.flickr.com/photos/expertinfantry/)
168 | + Best of USAF – http://www.flickr.com/photos/expertinfantry/5416827865/
169 |
170 | #### [Stefan Kellner] (http://www.flickr.com/photos/skellner/)
171 | + Iris – http://www.flickr.com/photos/skellner/6201563772/
172 |
173 | #### [Jessica Mullen] (http://www.flickr.com/photos/jessicamullen/)
174 | + Avatar – http://www.flickr.com/photos/jessicamullen/3810562763/
175 | + Pattern Language – http://www.flickr.com/photos/jessicamullen/3795847498/
176 |
177 | #### [Chris Nixon] (http://www.flickr.com/photos/sansbury/)
178 | + Judd Avatar – http://www.flickr.com/photos/sansbury/4247378885/
179 | + Cliché – http://www.flickr.com/photos/sansbury/2396382339/
180 |
181 | #### [Jennifer Mathis] (http://www.flickr.com/photos/jenxer/4410923630/)
182 | + @shardrix – http://www.flickr.com/photos/jenxer/4410923630/
183 | + @tcv – http://www.flickr.com/photos/jenxer/4410923888
184 |
185 | #### [Todd Sanders] (http://www.flickr.com/photos/tsand/)
186 | + Owling – http://www.flickr.com/photos/tsand/6839850368/
187 |
188 | #### [EARLIER.at] (http://www.flickr.com/photos/early-photography/)
189 | + Pilots. – http://www.flickr.com/photos/early-photography/6046248933/
190 |
191 | #### [Tony Dowler] (http://www.flickr.com/photos/tonydowler/)
192 | + The Twitter Dungeon – http://www.flickr.com/photos/tonydowler/4112664024/
193 |
194 | #### [jagelado] (http://www.flickr.com/photos/jagelado/)
195 | + Hepburn – http://www.flickr.com/photos/jagelado/73262197/
196 |
197 | #### [Diego Lavecchia (DieEgg)] (http://www.flickr.com/photos/dieegg/)
198 | + DL logo – http://www.flickr.com/photos/dieegg/5202011824/
199 |
200 | #### Unsplash
201 | Support coming soon.
202 |
203 |
204 | ## Code
205 | Thanks to everyone that has contributed, with special thanks to Kean Pedersen for the initial architecture and for a boat-load of ongoing support.
206 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Dummy
2 |
3 | Dummy is a content generation toolkit designed to make the development, testing and presentation of web prototypes less time consuming and more realistic. It does so by making it easy to populate static HTML with dynamic content, and by randomizing elements within a layout on subsequent loads of a document, in a way, simulating connectivity to a live database.
4 |
5 | Originally conceived as a tool for helping to simulate the high volume, rapidly changing content characteristics of online newspapers and magazines, it's generalized enough to benefit the early stage front-end development of any website or application with content that frequently changes in length, form or nature.
6 |
7 | Dummy can be useful in the early stages of a project's development, where basic questions and assumptions about how to architect the front-end must be tested and resolved to conclusion before engineers further down the Gantt diagram can begin their work of obfuscating yours.
8 |
9 | It can also been seen as a support tool for designers and front-end artisans ready to embrace the dark art of designing in-browser, as vastly different layout permutations can be generated and evaluated rapidly with each load of the page. Problems and shortcommings can be more quickly exposed.
10 |
11 | ### Dummy can…
12 | + Insert randomly selected strings of placeholder text in various lengths and formats (e.g. headline, teaser, paragraph).
13 | + Automagically crop and size high quality, news worthy, Creative Commons licensed placeholder images from a default pool – or from a specific folder or subset of folders that you provide.
14 | + Flesh out highly variable, asset rich layouts quickly with friendly, human-readable logic for building loops and controlling probability.
15 | + Allow you to focus on the important things – namely, the design and the code – not on copying and pasting (static) Lorem Ipsum, or hunting down plausible placeholder images.
16 | + More. Not lots more, but a _bit_ more!
17 |
18 | ### You can…
19 | + Watch a screencast at https://vimeo.com/42252088
20 | + Ask questions and direct misgivings to http://twitter.com/kerns
21 | + Fork, follow or download via https://github.com/kerns/dummy
22 |
23 | ### More Info
24 | Dummy's primary goal is to provide tools that speed front-end prototyping and QA. Whether you're meticulously crafting a fully responsive site with a myriad of CSS breakpoints, or just slapping together a half-baked idea – using Dummy should make it easier _at the earliest stages of development_ to visualize, test and present something much closer to what your actual front-end will become under a variety of different conditions.
25 |
26 |
27 | **Dummy is for the front-end web worker who wonders…**
28 |
29 | + How does this layout hold up with and without an image, or with multiple images?
30 | + What is the maximum number of items that can appear in this list before it breaks the layout, or before it just stops looking good?
31 | + How do the columns align and balance as the amount of content changes – or what's the longest word that can fit into this column without triggering unwanted overflow?
32 | + What is the easiest way to demo the signed-in and signed-out states of this page?
33 | + Do these CSS breakpoints hold water?
34 | + How will this script perform within the DOM when it needs to process over 100 images? 1000 images?
35 |
36 | ### Why?
37 | Using Dummy in the early stages of front-end development can give you a new perspective on your work every time your document is reloaded in the browser, shortening and improving your test cycle by more quickly exposing weak-points or trouble areas as you go about marking up a new design. It's like watching a time-lapse video of your layout performing with real data.
38 |
39 | Subscribing to the belief that the earlier a problem can be made to surface, the easier and less painful it will be to deal with and debug, this is especially useful in projects with front-end code that should be delivered to another team for implementation as part of a phased hand-off.
40 |
41 | Dummy also supports designers and front-end artisans who find themselves increasingly attracted to In-Browser Design as a viable process for the creation, iteration, and client approval of their work. As does @beardedstudio. (http://blog.bearded.com/post/21447195970/mocking-up-is-hard-to-do)
42 |
43 | ### Requirements
44 | You need a development environment running Apache + PHP and compiled with support for GD (this covers most of them). If you want to play with URL segments or other advanced techniques then you'll need to have mod_rewrite enabled, and you'll need to enable the .htaccess file (included in /dummy/extras/), but again, this probably covers most local development environments. If you're not developing locally, …why aren't you developing locally?
45 |
46 | ### TODO
47 | + Optimize performance and memory usage.
48 | + Integrate a Lorem Ipsum generator, together with some intuitive syntax for specifying parameters of the text you want generated (length in chars or words, casing, etc)
49 | + Ability to call and define image crops from within CSS (i.e. ability to post image requests in the URL to dummy.php)
50 | + Develop an easy way to link our broadcast dumb_luck outcomes, so that one outcome could bubble-over to another.
51 | + Clean up the way errors and messages are formatted (i.e. abstract the HTML and inline styles that surround them)
52 | + The image assets that ship with Dummy are highly geared for usage in editorial design. One could imagine separate asset packages for different types of projects (e.g. a commerce package with commercial product shots, a portfolio or gallery package with images that showcase art, architecture, or design).
53 |
54 | ### License
55 | Dummy is released under a Creative Commons Attribution-Share Alike 3.0 United States license (http://creativecommons.org/licenses/by-sa/3.0/us/). Be a doll and let us know how you're using Dummy, or if you've used it to help build, test or demo anything interesting.
56 |
57 | ### Credits
58 | Credits and image license information can be found in dummy/CREDITS.md
59 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "kerns/dummy",
3 | "description": "A content generation toolkit for rapid prototyping and QA",
4 | "license": "Creative Commons Attribution-Share Alike 3.0 United States",
5 | "authors": [
6 | {
7 | "name": "David Kerns",
8 | "email": "david@kerns.dk"
9 | }
10 | ],
11 | "minimum-stability": "dev",
12 | "require": {
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/demo.php:
--------------------------------------------------------------------------------
1 | require_once("dummy/dummy.php") ?>
2 |
3 |
4 |
5 |
23 |
24 |
25 | Welcome to Dummy.
26 |
27 |
28 |
This document contains a few working demos, together with some light documentation to help get you started using Dummy. It also makes a suitable test page. If you can get it to operate without error then you're ready to start using it in your own project.
29 |
If you're unclear as to why you'd want to do this in the first place, then head over to the project page, or check out the README.md file included with this download.
30 |
31 |
32 | Getting Started
33 |
34 |
35 | Basic Requirements
36 | You'll need a development environment running Apache and PHP compiled with support for GD. Such an environment is provided out-of-the-box by Mac OS X. Alternatively, there are many MAMP and WAMP binaries available to both Mac and Windows users respectively. These are easy to install and configure and a good way to get started if you're on unfamiliar ground.
37 |
38 |
39 |
40 | Setup
41 |
42 | Move the main /dummy folder to the root level of your web project, and make sure any .html documents in which you plan to use Dummy are renamed with a .php extension (or enable the .htaccess file in dummy/extras to continue with a .html file extension).
43 |
44 | Make sure that any document in which you want to use Dummy has the following code on the opening line.
45 |
46 |
47 | <? require_once("dummy/dummy.php") ?>
48 |
49 |
50 |
51 | Finally, make the cache folder located at /dummy/cache writable by your web server. If you see an image immediately below this block of text, it's working. A new image should appear every time you reload the page.
52 |
53 |
54 |
55 |

" width="500" alt="A test image..." />
56 |
57 | $filename exists and seems to be writable.";
61 | } elseif (file_exists($filename)) {
62 | echo "$filename exists but it isn't writable by your web server. Please make it writable.";
63 | } else {
64 | echo "$filename does not seem to exist. Create it and make sure it is writable by your web server.";
65 | }
66 | ?>
67 |
68 |
69 |
70 |
71 |
72 | Troubleshooting
73 | If things are not working for you here are the first things to check...
74 |
75 | Double check that the path to /dummy/dummy.php in the top of your document is valid. This is the machine path (not the web path), so you might need to change it if you're using Dummy in a subfolder.
76 | Make sure the cache folder located at /dummy/cache is writable by your web server.
77 | If for some reason you're not using a virtual host, or you can't include /dummy on the root of your project, check the very first line of /dummy/dummy.php and make sure the path is valid. This sets the web path to images generated by Dummy.
78 |
79 |
80 |
81 |
82 | Tips
83 |
84 | The use of a virtual host for your web project is not only a solid best practice, it also makes Dummy a zero-config affair. For Mac users, Patrick Gibson's virtualhost.sh script for creating and managing virtual hosts is an excellent place to start. But there are lots of command line and GUI based alternatives across all platforms.
85 | If you prefer to keep your document file extensions as .html, enable the file located at /dummy/extras/optional.htaccess file by removing the "optional" prefix and moving it to the root of your web project. Doing so will ask Apache to parse HTML documents as if they were PHP.
86 |
87 |
88 |
89 |
90 |
91 | Dummy Assets
92 | The ability to select, manipulate, and insert different assets into your front-end project is a key feature of Dummy. All of the assets available to Dummy live in a folder located at dummy/assets/. It's a good idea to poke around in here and see how things are structured. The simple syntax used to request different assets relates very much to the structure of this directory.
93 |
94 |
95 | Dummy Text
96 | Dummy makes it easy to insert random strings of Lorem Ipsum that correspond to commonly needed lengths and formats. For example, the following snippet of code will produce a random string of Lorem Ipsum approximately the length of a headline.
97 |
98 |
99 |
100 | <? dummy("text@headline") ?>
101 |
102 |
103 |
104 | The exact result will be different every time you reload your document, but it should look something like this...
105 |
106 |
107 |
dummy("text@headline") ?>
108 |
109 |
110 | The following table is a catalog of Dummy's default assets, the snippet of code used to insert the asset, and a sample of actual output.
111 |
112 |
113 |
114 |
115 |
116 | Objective |
117 | Dummy Code |
118 | Output |
119 |
120 |
121 |
122 |
123 | Headline |
124 | <? dummy("text@headline") ?> |
125 | dummy("text@headline") ?> |
126 |
127 |
128 | Teaser |
129 | <? dummy("text@teaser") ?> |
130 | dummy("text@teaser") ?> |
131 |
132 |
133 | Short Teaser |
134 | <? dummy("text@short-teaser") ?> |
135 | dummy("text@short-teaser") ?> |
136 |
137 |
138 | Long Teaser |
139 | <? dummy("text@long-teaser") ?> |
140 | dummy("text@long-teaser") ?> |
141 |
142 |
143 | Item |
144 | <? dummy("text@item") ?> |
145 | dummy("text@item") ?> |
146 |
147 |
148 | Date |
149 | <? dummy("text@date") ?> |
150 | dummy("text@date") ?> |
151 |
152 |
153 | Time |
154 | <? dummy("text@time") ?> |
155 | dummy("text@time") ?> |
156 |
157 |
158 | Time ago (relative) |
159 | <? dummy("text@time-ago") ?> |
160 | dummy("text@time-ago") ?> |
161 |
162 |
163 | Author |
164 | <? dummy("text@author") ?> |
165 | dummy("text@author") ?> |
166 |
167 |
168 | Username |
169 | <? dummy("text@username") ?> |
170 | dummy("text@username") ?> |
171 |
172 |
173 | City |
174 | <? dummy("text@city") ?> |
175 | dummy("text@city") ?> |
176 |
177 |
178 | Paragraph |
179 | <? dummy("text@paragraph") ?> |
180 | dummy("text@paragraph") ?> |
181 |
182 |
183 |
184 |
Hint: Inside of dummy/assets/text/ you'll find a directory full of flat text files. These are the basis for organizing different text formats used by Dummy. You can edit these or add your own as you like.
185 |
186 |
187 |
188 |
189 | Dummy Images
190 | Dummy makes it easy to crop and size placeholder images on the fly. It ships with a starter pack of high-quality, newsworthy, Creative Commons licensed images, but like other assets it's easy to edit or expand these according to the needs of your project.
191 | The syntax for requesting an image is flexible. In a very basic example, you request an image with specific dimensions...
192 |
193 |
194 |
195 | <img src="<? dummy("image@480x320") ?>" />
196 |
197 |
198 |
199 | ...and the following is returned:
200 |
201 |
202 |

" />
203 |
204 |
205 | You can specify exact pixel dimensions or just an aspect ratio. You can also combine these parameters. For example, you can choose to specify just the width together with an aspect ratio. Dummy will return the path to an image that conforms to both requirements.
206 |
207 |
208 |
209 | <img src="<? dummy("image@640x,16:9") ?>" />
210 |
211 |
212 |
213 | Returns...
214 |
215 |
216 |

" />
217 |
Note: Dummy returns a URL path to an image, not the HTML needed to embed it.
218 |
219 |
220 | The following table provides some clues as to how you can structure your image requests.
221 |
222 |
223 |
224 |
225 |
226 | Objective |
227 | Dummy Code |
228 | Output |
229 |
230 |
231 |
232 |
233 | 100px square Classic. Square. |
234 | <? dummy("image@100x100") ?> |
235 | "> dummy("image@100x100") ?> |
236 |
237 |
238 | 100px square (Part II) A rather pointless way of generating the same result as above. Proving a point here. |
239 | <? dummy("image@100x,1:1") ?> |
240 | "> dummy("image@100x,1:1") ?> |
241 |
242 |
243 | 16:9 With a height of 200px. Pixel dimensions and aspect ratios must be separated with a comma. |
244 | <? dummy("image@16:9,x200") ?> |
245 | "> dummy("image@16:9,x200") ?> |
246 |
247 |
248 | 16:9 (Part II) Same as above. It doesn't matter which order you specify ratio or pixel dimensions. |
249 | <? dummy("image@x200,16:9") ?> |
250 | "> dummy("image@x200,16:9") ?> |
251 |
252 |
253 | 3:2 The Photographer's aspect! We'll ask for assets from a specific subdirectory of ‘dummy/assets/images/’ here to improve the odds of getting a suitable image. |
254 | <? dummy("image/landscape@3:2") ?> |
255 | "> dummy("image@3:2") ?> |
256 |
257 |
258 | !Avatar Subdirectories of ‘dummy/assets/images/’ that begin with a ‘!’ are exempted from normal random (and recursive) selection. You have to target them specifically. This is good. |
259 | <? dummy("image/!avatar@150x150") ?> |
260 | "> dummy("image/!avatar@150x150") ?> |
261 |
262 |
263 |
264 |
Note: When specifying dimensions, either as an exact pixel measurement or as an aspect ratio, describe the width first and height second (Width x Height).
265 |
266 |
267 | The basic model for how Dummy selects image assets is semi-random and recursive. It begins looking for assets on the root level of "assets/images" and drills down, only ignoring sub-folders with names that begin with a ‘!’. Dummy also works in the background to track which image was most recently selected, in order to minimize the odds of inserting the same image in succession or in close proximity.
268 |
269 |
270 |
271 | Dummy Ads
272 | Inside of /dummy/assets/ads you'll find a host of folders representing many of the popular formats as defined by the IAB. The dummy code used to request and insert an ad follows the now familiar model.
273 |
274 |
275 |
276 | <? dummy("ad@120x90") ?>
277 |
278 |
279 |
280 | Returns...
281 |
282 |
283 | dummy("ad@120x90") ?>
284 |
285 |
286 | Note that a request for an ad returns a pre-formatted block of embed code containing an ad, as opposed to just the URL path to the ad (as is done with images). The reason for this is that we often need blocks of repetitious, ancillary markup to surround ad placements, as is the case with regard to advertising in the Adobe® Flash® format.
287 | The default embed code for both standards compliant image based ads and ads in the Flash format can be found on the root level of /dummy/assets/ads in the form of two files — image.embed.php and flash.embed.php respectively. You can override the use of these defaults by placing an edited copy of one or both of these files in the folder of the format you wish to override.
288 |
289 | The folders containing different formats are also used to specify their dimensions (WxH). Dummy parses these folder names and interprets them as variables, which in turn can be used to set the width and height values of ads as they are parsed into the embed code. If you don't feel it necessary to pass these values to your embed code, you're free to add new formats in folders and name them however you like — just remember to create a custom embed for these formats.
290 |
291 | You may find it useful to enable or disable the insertion of Flash format ads under different testing scenarios. There is a global preference toggle in the top of dummy.php for controlling this. The default is disabled.
292 |
293 |
294 |
295 |
296 | Dumb Luck
297 | The ability to insert randomly selected assets into a layout is great, but it's Dummy's simple logic for controlling probability and creating loop ranges that make it possible to flesh out highly variable, asset rich layouts with very little code. The basis for this logic is contained in a function called dumb_luck.
298 |
299 |
300 | Controlling Probability
301 | A basic building block of Dummy driven layouts, dumb_luck can be used to influence the probability that something will happen when the document is rendered. This helps answer the age old question, “What does this layout look like with or without X ?”, where X could be an image, a special announcement, or a block of JavaScript that triggers some other chain of events.
302 |
303 |
304 |
305 | <? if (dumb_luck("50%")): ?>
306 | There is a 50/50 chance of this happening.
307 | <? endif ?>
308 |
309 |
310 |
311 | Jazz up your dumb_luck logic with fallback or alternative outcomes using standard PHP if/else statement structure.
312 |
313 |
314 |
315 | <? if (dumb_luck("95%")): ?>
316 | Pretty damn likely to happen.
317 | <? else: ?>
318 | This is a lot less likely.
319 | <? endif ?>
320 |
321 |
322 |
323 | You can also nest dumb_luck logic as needed, to test and explore more complex outcomes.
324 |
325 |
326 |
327 | <? if (dumb_luck("50%")): ?>
328 | <? if (dumb_luck("50%")): ?>
329 | Heads
330 | <? else: ?>
331 | Tails
332 | <? endif ?>
333 | <? else: ?>
334 | <? if (dumb_luck("33%")): ?>
335 | Rock
336 | <? elseif (dumb_luck("33%")): ?>
337 | Paper
338 | <? else: ?>
339 | Scissors
340 | <? endif ?>
341 | <? endif ?>
342 |
343 |
344 |
For the record... if (dumb_luck("50%")): ?> if (dumb_luck("50%")): ?>Heads else: ?>Tails endif ?> else: ?> if (dumb_luck("50%")): ?>Rock elseif (dumb_luck("50%")): ?>Paper else: ?>Scissors endif ?> endif ?>!
345 |
346 |
347 |
348 |
349 | Creating Loop Ranges
350 |
351 |
352 | while (dumb_luck("50-100")): ?>
353 |
" width="35" height="35" alt="A thumbnail..." />
354 | endwhile ?>
355 |
Dumb Luck's loop range takes whatever content you place inside of it and loops it within a range of two numbers that you specify. Inside of the loop range above, a single request for a 35x35 pixel thumbnail.
356 |
357 |
358 | Loop ranges make it possible to generate massive amounts of variable content very quickly. In the example above, there are two bits of Dummy code working together. A dumb_luck loop range of 50-100, and inside of that loop range, a single request for a 35x35 pixel thumbnail.
359 |
360 | The thumbnail will be rendered no less than 50 times, and up to 100. The Dummy code used to achieve this is compact and human readable:
361 |
362 |
363 |
364 | <? while (dumb_luck("50-100")): ?>
365 | <? dummy("image@35x35") ?>
366 | <? endwhile ?>
367 |
368 |
369 |
370 | Loop ranges are built on the same dumb_luck function used to control probability, only instead of passing in a % value we pass it a range of two numbers separated by a hyphen. These two values define the minimum and maximum number of times the loop should continue. In the example below, we ask for between 5 and 10 instances of a list item containing a headline.
371 |
372 |
373 |
374 |
375 | <? while (dumb_luck("5-10")): ?>
376 | - <? dummy("text@headline") ?>
377 | <? endwhile ?>
378 |
379 |
380 |
Note that the PHP syntax used with dumb_luck requires “WHILE” in association with loop ranges.
381 |
382 |
383 | The result is a simple UL containing between 5 and 10 list items:
384 |
385 |
386 |
387 | while (dumb_luck("5-10")): ?>
388 | - dummy("text@headline") ?>
389 | endwhile ?>
390 |
391 |
392 |
393 |
394 |
395 | Putting It All Together
396 |
397 | Taking the same list used in the previous example, imagine we needed to see how it would look with some of the items linked some of the time. To achieve this we'll nest some probability logic inside of our loop range.
398 |
399 |
400 |
401 |
402 | <? while (dumb_luck("5-10")): ?>
403 | <? if (dumb_luck("50%")): ?>
404 | - <? dummy("text@headline") ?>
405 | <? else: ?>
406 | - <? dummy("text@headline") ?>
407 | <? endif ?>
408 | <? endwhile ?>
409 |
410 |
411 |
412 |
413 | Though the exact number will change every time you reload the page, roughly half of the items in the following list will be wrapped in a link. It's a very basic example, but one that uses all the core features of Dummy.
414 |
415 |
416 |
417 |
while (dumb_luck("5-10")): ?> if (dumb_luck("50%")): ?>- dummy("text@headline") ?>
else: ?>- dummy("text@headline") ?>
endif ?> endwhile ?>
418 |
419 |
420 | When used together, asset generation, probability, and loop range logic can create highly variable layouts with very little effort in code. This makes it possible to quickly test how the change of an item, attribute or parameter in one place propagates on a range of different scales. It can provide new insights on the performance or design efficacy of your work at the earliest stages of a project, and every time you reload the page.
421 |
422 |
423 |
424 | <? dummy("text@headline") ?>
425 | <? if (dumb_luck("25%")): ?>
426 | <? dummy("text@long-teaser") ?>
427 | <? endif ?>
428 | By <? dummy("text@author") ?> | Published <? dummy("text@date") ?>
429 | <? while (dumb_luck("3-8")): ?>
430 | <? dummy("text@paragraph") ?>
431 | <? endwhile ?>
432 | <? if (dumb_luck("75%")): ?>
433 | Related Story: <? dummy("text@headline") ?>
434 | <? endif ?>
435 |
436 |
An example of a simple article 3 to 8 paragraphs in length, with optionally appearing intro text and related story elements.
437 |
438 |
439 |
440 |
441 |
442 |
443 | More to come
444 | There are a few unfinished features in Dummy that remain too fluid to document, namely the dumb_question function for reading and reacting to loop position, URL variables, and URL segments. More info to come on those when they're done.
445 | In the meantime, follow the project on GitHub. Your ideas and contributions toward improving the code are welcome.
446 |
447 |
448 |
449 |
450 |