wco_models 3.1.0.328 → 3.4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/wco/api/newspartials_controller.rb +0 -9
  3. data/app/controllers/wco/newsvideos_controller.rb +6 -12
  4. data/app/models/iro/option.rb +1 -1
  5. data/app/models/wco/newspartial.rb +2 -12
  6. data/app/models/wco/setting.rb +1 -1
  7. data/app/views/wco/api/newsproducer/README_newsproducer.txt +12 -0
  8. data/app/views/wco/api/newsproducer/_studio_blue2.js +37 -16
  9. data/app/views/wco/api/newsproducer/_studio_fps.js +12 -12
  10. data/app/views/wco/api/newsproducer/studio_fps.html.erb +10 -8
  11. data/app/views/wco/api/newsvideos/show.jbuilder +1 -1
  12. data/app/views/wco/newsvideos/show.haml +2 -2
  13. data/config/routes.rb +10 -11
  14. data/lib/shortcuts.rb +1 -1
  15. metadata +22 -29
  16. data/app/models/wco/site.rb-trash +0 -65
  17. data/app/views/wco/api/newsproducer/trash/_scenes.js-bk +0 -20
  18. data/app/views/wco/api/newsproducer/trash/_scenes.js.erb +0 -15
  19. data/app/views/wco/api/newsproducer/trash/_studio_blue0.js +0 -326
  20. data/app/views/wco/api/newsproducer/trash/_studio_blue1.js +0 -733
  21. data/app/views/wco/api/newsproducer/trash/studio_blue0.html.erb +0 -27
  22. data/app/views/wco/api/newsproducer/trash/studio_blue1.html.erb +0 -108
  23. data/app/views/wco/sitemap_paths/check.haml-trash +0 -13
  24. /data/app/views/wco/api/newsproducer/{done/_scenes.js-bk → _scenes.js-bk} +0 -0
  25. /data/app/views/wco/api/newsproducer/{done/_scenes.js.erb → _scenes.js.erb} +0 -0
  26. /data/app/views/wco/api/newsproducer/{done/_studio_1.js → _studio_1.js} +0 -0
  27. /data/app/views/wco/api/newsproducer/{done/_studio_blue0.js → _studio_blue0.js} +0 -0
  28. /data/app/views/wco/api/newsproducer/{done/_studio_blue1.js → _studio_blue1.js} +0 -0
  29. /data/app/views/wco/api/newsproducer/{done/_studio_coc.js → _studio_coc.js} +0 -0
  30. /data/app/views/wco/api/newsproducer/{done/_studio_coc.js-bk → _studio_coc.js-bk} +0 -0
  31. /data/app/views/wco/api/newsproducer/{done/_studio_coc.js-cannon → _studio_coc.js-cannon} +0 -0
  32. /data/app/views/wco/api/newsproducer/{done/_studio_ra2.js → _studio_ra2.js} +0 -0
  33. /data/app/views/wco/api/newsproducer/{done/_touch_controls.js → _touch_controls.js} +0 -0
  34. /data/app/views/wco/api/newsproducer/{done/_touch_pad.css → _touch_pad.css} +0 -0
  35. /data/app/views/wco/api/newsproducer/{done/canvas.html.erb → canvas.html.erb} +0 -0
  36. /data/app/views/wco/api/newsproducer/{done/canvas_minimal.html.erb → canvas_minimal.html.erb} +0 -0
  37. /data/app/views/wco/api/newsproducer/{done/games_fps.html → games_fps.html} +0 -0
  38. /data/app/views/wco/api/newsproducer/{done/studio_1.html.erb → studio_1.html.erb} +0 -0
  39. /data/app/views/wco/api/newsproducer/{done/studio_blue0.html.erb → studio_blue0.html.erb} +0 -0
  40. /data/app/views/wco/api/newsproducer/{done/studio_blue1.html.erb → studio_blue1.html.erb} +0 -0
  41. /data/app/views/wco/api/newsproducer/{done/studio_coc.html.erb → studio_coc.html.erb} +0 -0
  42. /data/app/views/wco/api/newsproducer/{done/studio_ra2.html.erb → studio_ra2.html.erb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 444562d0cc1e908d037423d93692985663a3c6526e0e1115485663e9b2265706
4
- data.tar.gz: 06df0281616925fea7cb2227ad6d5c4347530f28a7e2959f5838da750c7161b5
3
+ metadata.gz: '0274939884ef534ba5826efd3adcbbd3fa0605a03b93d95333c2251432098f7c'
4
+ data.tar.gz: bc0e8ed07d318199cfb9c7fbaff36d35c42900bfb93377ce99ea32162751b2f8
5
5
  SHA512:
6
- metadata.gz: 53c749528b3c062c85ef301b38a363a1e1854ccb806ba3d6497c3ae1a31a5baa702fb14d829dac02e56bc2309dae4ea7ce7a0eb0014da389db69db8227d334b4
7
- data.tar.gz: 78d04a96dc5ab417b04d401cef595a4e6d998dc858a09223294084e8d57586c924c61decdadc3e6eebaefc1ed6d45a2d2fe10c257383cb1651ecdb7f1921780c
6
+ metadata.gz: 61f84d2f853ca2b8a8b88ae421045245770c2ce183da46ea19ab15212927cad4110ea2b6ecff6316c10482ff8f9b48c70e0f7a83c2d2e2ddf47d05babe2fb35f
7
+ data.tar.gz: 27f0896d5d76acfd21f00946f91ddd4b7c8bc95e073d75292ac1ed3601ab95d250c01d3d52773082f0cfc0b351b402763be0515a53c387ea2e6e749a26ef4204
@@ -51,15 +51,6 @@ class Wco::Api::NewspartialsController < Wco::ApiController
51
51
  render json: { status: :ok }
52
52
  end
53
53
 
54
- ## via puppeteer
55
- def generate_video
56
- @newspartial = Wco::Newspartial.unscoped.find params[:id]
57
- authorize! :create, @newspartial
58
- @newspartial.generate_video
59
-
60
- render json: { status: :ok }
61
- end
62
-
63
54
  def show_config
64
55
  @newspartial = Wco::Newspartial.find params[:id]
65
56
  config = JSON.parse @newspartial.speech_json
@@ -118,26 +118,20 @@ class Wco::NewsvideosController < Wco::ApplicationController
118
118
  @newsvideo = Wco::Newsvideo.unscoped.find params[:id]
119
119
  authorize! :edit, @newsvideo
120
120
 
121
- # cmd = "cd #{PUPPETEER_ROOT} ; yarn run newsvideo_generate_all_audio #{@newsvideo.id}"
122
- # puts "+++ puppeteer cmd:"
123
- # puts cmd
124
- # out = `#{cmd}`
125
- # puts! out, 'out'
126
-
127
- @newsvideo.newspartials.each do |newspartial|
128
- newspartial.generate_speech
129
- print '.'
130
- end
121
+ cmd = "cd #{PUPPETEER_ROOT} ; yarn run newsvideo_generate_all_audio #{@newsvideo.id}"
122
+ puts "+++ puppeteer cmd:"
123
+ puts cmd
124
+ out = `#{cmd}`
125
+ puts! out, 'out'
131
126
 
132
127
  render json: { status: :ok }
133
128
  end
134
129
 
135
- ## via puppeteer
136
130
  def generate_all_video
137
131
  @newsvideo = Wco::Newsvideo.unscoped.find params[:id]
138
132
  authorize! :edit, @newsvideo
139
133
 
140
- cmd = "cd #{Wco::Setting.get('PUPPETEER_ROOT')} ; NEWSVIDEO_URL=#{api_newsvideo_url(@newsvideo)} yarn run run_newsvideo_1"
134
+ cmd = "cd #{PUPPETEER_ROOT} ; yarn run newsvideo_generate_all_video #{@newsvideo.id}"
141
135
  puts "+++ puppeteer cmd:"
142
136
  puts cmd
143
137
  out = `#{cmd}`
@@ -92,7 +92,7 @@ class Iro::Option
92
92
  expires_on: expires_on,
93
93
  }
94
94
  end
95
- def symbol_to_h
95
+ def to_h
96
96
  self.class.symbol_to_h symbol
97
97
  end
98
98
 
@@ -16,7 +16,7 @@ class Wco::Newspartial
16
16
  field :config_json, type: :string, default: '{}'
17
17
  field :speech_json, type: :string, default: '{}' # the smaller config, excludes audio wav
18
18
 
19
- field :voice, type: :string, default: 'af_jessica' ## 'af_jessica', 'am_fenrir'
19
+ field :voice, type: :string ## 'af_jessica', 'am_fenrir'
20
20
 
21
21
  belongs_to :newsvideo
22
22
 
@@ -112,7 +112,7 @@ class Wco::Newspartial
112
112
  ## uses ishlib3js v0.0.2, not 0.1.0!!!
113
113
  ## @deprecated, this is being brought into wco_models
114
114
  ##
115
- def generate_video_bk
115
+ def generate_video
116
116
  cmd = "cd #{Wco::Setting.get('ISHLIB3JS_ROOT')} ;
117
117
  node ./src/talking_head/example_puppeteer_wired.js \
118
118
  --api_key=#{Wco::Setting.get('WASYACO_SIMPLE_API_KEY')} \
@@ -132,16 +132,6 @@ class Wco::Newspartial
132
132
  puts! out, 'out'
133
133
  return out
134
134
  end
135
- def generate_video
136
- out = `#{generate_video_cmd}`
137
- puts! out, 'out'
138
- end
139
- def generate_video_cmd
140
- cmd = "cd #{Wco::Setting.get('PUPPETEER_ROOT')} ; NEWSPARTIAL_URL=#{api_newspartial_url(@newsvideo)} yarn run run_newspartial_1"
141
- puts "+++ puppeteer cmd:"
142
- puts cmd
143
- cmd
144
- end
145
135
 
146
136
  def video
147
137
  Wco::Video.where( newspartial_id: self[:id] ).first
@@ -5,7 +5,7 @@ class Wco::Setting
5
5
  store_in collection: 'wco_settings'
6
6
 
7
7
  KEYS = [ 'HEAD_TTS_ORIGIN', 'ISHLIB3JS_ROOT',
8
- 'OPENAI_API_KEY', 'PEXELS_API_KEY', 'PUPPETEER_ROOT',
8
+ 'OPENAI_API_KEY', 'PEXELS_API_KEY',
9
9
  'WASYACO_ORIGIN', 'WASYACO_SIMPLE_API_KEY', 'WASYACO_SIMPLE_API_SECRET',
10
10
  ];
11
11
 
@@ -0,0 +1,12 @@
1
+
2
+
3
+ const scene_url = 'https://cdn.jsdelivr.net/gh/wasya-co/ishlib3js@0.3.0/public/vendor/models/scenes/000mb%20collision-world/collision-world.glb'
4
+
5
+ const vehicle_url = 'https://cdn.jsdelivr.net/gh/wasya-co/ishlib3js@0.3.0/public/vendor/models/vehicles/000mb car-mazda-miata/model.glb'
6
+ const vehicle_config = {
7
+ height: 1.235,
8
+ length: 3.970,
9
+ width: 1.675,
10
+ }
11
+
12
+ // const vehicle_url = 'https://cdn.jsdelivr.net/gh/wasya-co/ishlib3js@0.3.0/public/vendor/models/vehicles/001mb truck-drifter-lowpoly/model.glb'
@@ -10,8 +10,9 @@ const logg = (a, b="", c=null) => {
10
10
  console.log(`+++ ${b}:`, a) // eslint-disable-line no-console
11
11
  }
12
12
 
13
- const MODELS_ROOT = 'https://cdn.jsdelivr.net/gh/wasya-co/ishlib3js@v0.4.14/public/vendor/models'
14
- const AVATARS_ROOT = `${MODELS_ROOT}/avatars`
13
+ const MODELS_ROOT = 'https://localhost/vendor/models';
14
+ // const AVATARS_ROOT = 'https://cdn.jsdelivr.net/gh/wasya-co/ishlib3js@0.3.0/public/vendor/models/avatars';
15
+ const AVATARS_ROOT = 'https://localhost/vendor/models/avatars';
15
16
  const avatars = {
16
17
  brunette: { type: 'F', url: `${AVATARS_ROOT}/brunette/model.glb` },
17
18
  cara: { type: 'F', url: `${AVATARS_ROOT}/cara/model.glb` }, // short hair
@@ -37,7 +38,36 @@ $('select.avatar').each((_idx, el) => {
37
38
  }
38
39
  })
39
40
 
40
- let scenes = await fetch(`${MODELS_ROOT}/scenes/index.json`).then(r => r.json())
41
+ let scenes = {
42
+ skybox_1: {
43
+ url: `${MODELS_ROOT}/scenes/000mb skybox_1/scene.glb`,
44
+ height: 30,
45
+ },
46
+ studio_tron: {
47
+ height: 10,
48
+ url: `${MODELS_ROOT}/scenes/003mb studio_tron/scene.glb`,
49
+ },
50
+ room_1: {
51
+ height: 6,
52
+ url: `${MODELS_ROOT}/scenes/000mb room-1/scene.glb`,
53
+ },
54
+ studio_blue: {
55
+ height: 4.3,
56
+ url: `${MODELS_ROOT}/scenes/000mb studio_blue/scene.glb`,
57
+ },
58
+ purple_stage: {
59
+ height: 10,
60
+ url: `${MODELS_ROOT}/scenes/000mb purple_stage/scene.glb`,
61
+ },
62
+ red_stage: {
63
+ height: 10,
64
+ url: `${MODELS_ROOT}/scenes/000mb red_stage/scene.glb`,
65
+ },
66
+ // skybox_1: `${MODELS_ROOT}/scenes//scene.glb`,
67
+
68
+ newsroom_green: `${MODELS_ROOT}/scenes/001mb newsroom_green/scene.glb`,
69
+ rick_and_morty_garage: `${MODELS_ROOT}/scenes/003mb rick-and-morty-garage/scene.glb`,
70
+ }
41
71
  const SCENE_STOR = 'studio'
42
72
  $.each(scenes, (name) => {
43
73
  $('<option>', { value: name, text: name }).appendTo($('select.studio'))
@@ -409,8 +439,6 @@ function tickEvents(elapsedMs) {
409
439
  /*
410
440
  **/
411
441
  async function init() {
412
- logg(null, 'init()')
413
-
414
442
  if (newspartial_id) {
415
443
  try {
416
444
  const url = wco_origin + '/wco/api/newspartials/' + newspartial_id + '/config.json?api_key=' + api_key + '&api_secret=' + api_secret
@@ -468,10 +496,10 @@ async function init() {
468
496
 
469
497
 
470
498
  let studio
471
- async function load_studio(cfg) {
472
- logg(cfg, 'load_studio()')
499
+ async function load_studio(s) {
500
+ const cfg = scene_cfg(s)
473
501
  if (studio && studio.parent) studio.parent.remove(studio)
474
- studio = (await gltfLoader.loadAsync(`${cfg.path}/scene.glb`)).scene
502
+ studio = (await gltfLoader.loadAsync(cfg.url)).scene
475
503
  rescale(studio, { height: cfg.height })
476
504
  set_shadows(studio, false, true)
477
505
  scene.add(studio)
@@ -631,7 +659,6 @@ async function init() {
631
659
  renderer.setAnimationLoop(animate)
632
660
  }
633
661
 
634
- /*
635
662
  let semafore = false
636
663
  document.addEventListener('DOMContentLoaded', async function(e) {
637
664
  if (!semafore) {
@@ -639,12 +666,6 @@ document.addEventListener('DOMContentLoaded', async function(e) {
639
666
  await init()
640
667
  }
641
668
  })
642
- */
643
- if (document.readyState === 'loading') {
644
- document.addEventListener('DOMContentLoaded', init)
645
- } else {
646
- init()
647
- }
648
669
 
649
670
  function cameras_fn(which) {
650
671
  switch (which) {
@@ -888,4 +909,4 @@ $('#jesture').on('click', async () => {
888
909
  }
889
910
  })
890
911
 
891
- console.log('+++ loaded wco_models :: newsproducer :: studio_blue2.js')
912
+ console.log('+++ loaded wco_models :: newsproducer :: studio_blue.js')
@@ -14,12 +14,10 @@ document.addEventListener("keydown", e => {
14
14
  }
15
15
  })
16
16
 
17
- const ISH_VERSION = 'v0.4.14'
18
- const MODELS_ROOT = `https://cdn.jsdelivr.net/gh/wasya-co/ishlib3js@${ISH_VERSION}/public/vendor/models`
19
-
17
+ // const MODELS_ROOT = '/vendor/models'
18
+ // const MODELS_ROOT = "https://cdn.jsdelivr.net/gh/wasya-co/ishlib3js@0.4.0/public/vendor/models"
20
19
  const SCENE_STOR = 'studio'
21
- const scenes = await fetch(`${MODELS_ROOT}/scenes/index.json`).then(r => r.json())
22
- logg(scenes, 'scenes13')
20
+ const scenes = await fetch('https://cdn.jsdelivr.net/gh/wasya-co/ishlib3js@0.4.3/public/vendor/models/scenes/index.json').then(r => r.json())
23
21
  $.each(scenes, (name) => {
24
22
  $('<option>', { value: name, text: name }).appendTo($('select.studio'))
25
23
  })
@@ -762,7 +760,7 @@ function scene_cfg(s) {
762
760
  if (typeof s.url === 'string') {
763
761
  return { ...s, url: s.url }
764
762
  }
765
- logg(s, 'scene_cfg() out')
763
+ logg(s, 'out')
766
764
  return s
767
765
  }
768
766
 
@@ -794,10 +792,14 @@ function reset_player() {
794
792
 
795
793
  const loader = new GLTFLoader()
796
794
 
797
- async function load_specsheet(cfg) {
795
+ function specsheet_url(glb_url) {
796
+ return glb_url.replace(/[^/]+$/, 'specsheet.json')
797
+ }
798
+
799
+ async function load_specsheet(glb_url) {
798
800
  specsheet = null
799
801
  try {
800
- const res = await fetch(`${cfg.path}/specsheet.json`)
802
+ const res = await fetch(specsheet_url(glb_url))
801
803
  if (!res.ok) return
802
804
  specsheet = await res.json()
803
805
  logg(specsheet, 'specsheet')
@@ -807,13 +809,11 @@ async function load_specsheet(cfg) {
807
809
  }
808
810
 
809
811
  async function load_studio(s) {
810
- logg(s, 'load_studio')
811
-
812
812
  const cfg = scene_cfg(s)
813
813
  if (studio && studio.parent) studio.parent.remove(studio)
814
814
  if (octree_helper && octree_helper.parent) octree_helper.parent.remove(octree_helper)
815
- const gltf = await loader.loadAsync(`${cfg.path}/scene.glb`)
816
- await load_specsheet(cfg)
815
+ const gltf = await loader.loadAsync(cfg.url)
816
+ await load_specsheet(cfg.url)
817
817
  studio = gltf.scene
818
818
  if (cfg.height) rescale(studio, { height: cfg.height })
819
819
  apply_studio_mesh(studio)
@@ -14,14 +14,17 @@
14
14
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
15
15
 
16
16
  <%= stylesheet_link_tag "wco/application", media: "all" %>
17
- <%= stylesheet_link_tag "wco/studio", media: "all" %>
17
+ <%= stylesheet_link_tag "wco/studio", media: "all" %>
18
18
 
19
19
  </head>
20
20
  <body>
21
21
 
22
- <style><%= render 'wco/api/newsproducer/done/touch_pad.css' %></style>
22
+ <style><%= render 'touch_pad.css' %></style>
23
23
 
24
- <script src="https://unpkg.com/es-module-shims@1.3.6/dist/es-module-shims.js" async></script>
24
+ <script><%= render 'scenes.js' %></script>
25
+
26
+
27
+ <script async src="https://unpkg.com/es-module-shims@1.3.6/dist/es-module-shims.js"></script>
25
28
  <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
26
29
  <script src="/vendor/javascript/CCapture.all.min.js"></script>
27
30
 
@@ -30,8 +33,7 @@
30
33
  {
31
34
  "three": "https://cdn.jsdelivr.net/npm/three@0.180.0/build/three.module.js/+esm",
32
35
  "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.180.0/examples/jsm/",
33
- "talkinghead": "https://cdn.jsdelivr.net/gh/wasya-co/TalkingHead@1.7.1/modules/talkinghead.mjs",
34
- "TouchControls": "https://cdn.jsdelivr.net/gh/wasya-co/ishlib3js@v0.4.13/public/2026/js/touch_controls.js"
36
+ "talkinghead": "https://cdn.jsdelivr.net/gh/wasya-co/TalkingHead@1.7.1/modules/talkinghead.mjs"
35
37
  }
36
38
  }
37
39
  </script>
@@ -45,7 +47,7 @@
45
47
  <select class='studio'></select>
46
48
  <em>Status:</em><span id='status'>pending</span>
47
49
  </div>
48
- <button id='fullScreen'>fullScrn</button>
50
+ <button id='fullScreen' />fullScrn</button>
49
51
 
50
52
  <div class='item'>
51
53
  <label>
@@ -191,7 +193,7 @@
191
193
  </div>
192
194
  </div>
193
195
 
194
- <script type="module"><%= render 'wco/api/newsproducer/done/touch_controls.js' %></script>
196
+ <script type="module"><%= render 'touch_controls.js' %></script>
195
197
  <script type="module"><%= render 'studio_fps.js' %></script>
196
198
 
197
- </body></html>
199
+ </body></html>
@@ -6,7 +6,7 @@ json.newspartials @newsvideo.newspartials.each do |newspartial|
6
6
  json.generate_speech_url api_newspartial_generate_speech_url({ id: newspartial.id.to_s,
7
7
  api_key: Wco::Setting.get('WASYACO_SIMPLE_API_KEY'),
8
8
  api_secret: Wco::Setting.get('WASYACO_SIMPLE_API_SECRET'), })
9
- json.generate_video_url api_newsproducer_studio_blue_url({ newspartial_id: newspartial.id.to_s,
9
+ json.generate_video_url api_newsproducer_studio_1_url({ newspartial_id: newspartial.id.to_s,
10
10
  wco_origin: request.base_url,
11
11
  api_key: Wco::Setting.get('WASYACO_SIMPLE_API_KEY'),
12
12
  api_secret: Wco::Setting.get('WASYACO_SIMPLE_API_SECRET'), })
@@ -18,10 +18,10 @@
18
18
  Uses sentences_to_phrases to reasonably create Wco::Newspartial's
19
19
  %li
20
20
  .d-inline-block= button_to 'generate all audio', newsvideo_generate_all_audio_path(@newsvideo), :data => { :confirm => 'Are you sure?' }
21
- %li
22
- .d-inline-block= button_to 'generate all video', newsvideo_generate_all_video_path(@newsvideo), :data => { :confirm => 'Are you sure?' }
23
21
  %li
24
22
  .d-inline-block= button_to 'generate - only combine', generate_newsvideo_path(@newsvideo), :data => { :confirm => 'Are you sure?' }
23
+ %li
24
+ .d-inline-block= button_to 'generate video & output', newsvideo_generate_all_video_path(@newsvideo), :data => { :confirm => 'Are you sure?' }
25
25
 
26
26
 
27
27
  - if @newsvideo.generated_video.present?
data/config/routes.rb CHANGED
@@ -17,21 +17,20 @@ Wco::Engine.routes.draw do
17
17
  patch 'reports/:id/add-config', to: 'reports#add_config'
18
18
  get 'newspartials/:id/config', to: 'newspartials#show_config', as: :newspartial_config
19
19
  match 'newspartials/:id/generate-speech', to: 'newspartials#generate_speech', as: :newspartial_generate_speech, via: [ :get, :post ]
20
- match 'newspartials/:id/generate-video', to: 'newspartials#generate_video', as: :newspartial_generate_speech, via: [ :get, :post ]
21
20
 
22
21
  get 'newsproducer/canvas', to: 'newsproducer#canvas'
23
22
  get 'newsproducer/canvas_minimal', to: 'newsproducer#canvas_minimal'
24
- # get 'newsproducer/studio_1', to: 'newsproducer#studio_1'
25
- # get 'newsproducer/studio_green', to: 'newsproducer#studio_green'
26
- get 'newsproducer/studio_blue', to: 'newsproducer#studio_blue'
27
- get 'newsproducer/studio_fps', to: 'newsproducer#studio_fps'
28
- # get 'newsproducer/studio_coc', to: 'newsproducer#studio_coc'
29
- # get 'newsproducer/studio_ra2', to: 'newsproducer#studio_ra2'
23
+ get 'newsproducer/studio_1', to: 'newsproducer#studio_1'
24
+ get 'newsproducer/studio_green', to: 'newsproducer#studio_green'
25
+ get 'newsproducer/studio_blue', to: 'newsproducer#studio_blue'
26
+ get 'newsproducer/studio_fps', to: 'newsproducer#studio_fps'
27
+ get 'newsproducer/studio_coc', to: 'newsproducer#studio_coc'
28
+ get 'newsproducer/studio_ra2', to: 'newsproducer#studio_ra2'
30
29
 
31
30
 
32
31
  match 'newsvideos/:id/generate-illustration', to: 'newsvideos#generate_illustration', as: :newsvideo_generate_illustration, via: [ :get, :post ]
33
- match 'newsvideos/:id/generate-video', to: 'newsvideos#generate', as: :newsvideo_generate, via: [ :get, :post ]
34
- get 'newsvideos/:id', to: 'newsvideos#show', as: :newsvideo, defaults: { format: :json }
32
+ match 'newsvideos/:id/generate-video', to: 'newsvideos#generate', as: :newsvideo_generate, via: [ :get, :post ]
33
+ get 'newsvideos/:id', to: 'newsvideos#show', as: :newsvideo, defaults: { format: :json }
35
34
 
36
35
  get 'tags', to: 'tags#index'
37
36
 
@@ -96,8 +95,8 @@ Wco::Engine.routes.draw do
96
95
 
97
96
  resources :obfuscated_redirects
98
97
 
99
- post 'office_action_templates', to: 'office_action_templates#update'
100
- post 'office_action_templates/perform', to: 'office_action_templates#perform', as: :oat_perform_with_conversations ## from the mailbox, the oat_id is passed as a body param.
98
+ post 'office_action_templates', to: 'office_action_templates#update'
99
+ post 'office_action_templates/perform', to: 'office_action_templates#perform', as: :oat_perform_with_conversations ## from the mailbox, the oat_id is passed as a body param.
101
100
  post 'office_action_templates/:id/perform', to: 'office_action_templates#perform', as: :oat_perform
102
101
  get 'office_action_templates/:id/perform', to: 'office_action_templates#perform'
103
102
  resources :office_action_templates
data/lib/shortcuts.rb CHANGED
@@ -7,6 +7,6 @@ EMS ||= WcoEmail::MessageStub
7
7
  OA ||= Wco::OfficeAction
8
8
  OAT ||= Wco::OfficeActionTemplate
9
9
  OATT ||= Wco::OfficeActionTemplateTie
10
- # Sch ||= WcoEmail::EmailAction
10
+ # EAT ||= WcoEmail::EmailActionTemplate
11
11
  # EA ||= WcoEmail::EmailAction
12
12
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.328
4
+ version: 3.4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-17 00:00:00.000000000 Z
11
+ date: 2026-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -544,7 +544,6 @@ files:
544
544
  - app/models/wco/report.rb
545
545
  - app/models/wco/setting.rb
546
546
  - app/models/wco/site.rb
547
- - app/models/wco/site.rb-trash
548
547
  - app/models/wco/sitemap_path.rb
549
548
  - app/models/wco/subscription.rb
550
549
  - app/models/wco/tag.rb
@@ -585,35 +584,30 @@ files:
585
584
  - app/views/wco/api/leads/by_email.jbuilder
586
585
  - app/views/wco/api/leads/index.jbuilder
587
586
  - app/views/wco/api/leads/index_hash.jbuilder
587
+ - app/views/wco/api/newsproducer/README_newsproducer.txt
588
+ - app/views/wco/api/newsproducer/_scenes.js-bk
589
+ - app/views/wco/api/newsproducer/_scenes.js.erb
590
+ - app/views/wco/api/newsproducer/_studio_1.js
591
+ - app/views/wco/api/newsproducer/_studio_blue0.js
592
+ - app/views/wco/api/newsproducer/_studio_blue1.js
588
593
  - app/views/wco/api/newsproducer/_studio_blue2.js
594
+ - app/views/wco/api/newsproducer/_studio_coc.js
595
+ - app/views/wco/api/newsproducer/_studio_coc.js-bk
596
+ - app/views/wco/api/newsproducer/_studio_coc.js-cannon
589
597
  - app/views/wco/api/newsproducer/_studio_fps.js
590
- - app/views/wco/api/newsproducer/done/_scenes.js-bk
591
- - app/views/wco/api/newsproducer/done/_scenes.js.erb
592
- - app/views/wco/api/newsproducer/done/_studio_1.js
593
- - app/views/wco/api/newsproducer/done/_studio_blue0.js
594
- - app/views/wco/api/newsproducer/done/_studio_blue1.js
595
- - app/views/wco/api/newsproducer/done/_studio_coc.js
596
- - app/views/wco/api/newsproducer/done/_studio_coc.js-bk
597
- - app/views/wco/api/newsproducer/done/_studio_coc.js-cannon
598
- - app/views/wco/api/newsproducer/done/_studio_ra2.js
599
- - app/views/wco/api/newsproducer/done/_touch_controls.js
600
- - app/views/wco/api/newsproducer/done/_touch_pad.css
601
- - app/views/wco/api/newsproducer/done/canvas.html.erb
602
- - app/views/wco/api/newsproducer/done/canvas_minimal.html.erb
603
- - app/views/wco/api/newsproducer/done/games_fps.html
604
- - app/views/wco/api/newsproducer/done/studio_1.html.erb
605
- - app/views/wco/api/newsproducer/done/studio_blue0.html.erb
606
- - app/views/wco/api/newsproducer/done/studio_blue1.html.erb
607
- - app/views/wco/api/newsproducer/done/studio_coc.html.erb
608
- - app/views/wco/api/newsproducer/done/studio_ra2.html.erb
598
+ - app/views/wco/api/newsproducer/_studio_ra2.js
599
+ - app/views/wco/api/newsproducer/_touch_controls.js
600
+ - app/views/wco/api/newsproducer/_touch_pad.css
601
+ - app/views/wco/api/newsproducer/canvas.html.erb
602
+ - app/views/wco/api/newsproducer/canvas_minimal.html.erb
603
+ - app/views/wco/api/newsproducer/games_fps.html
604
+ - app/views/wco/api/newsproducer/studio_1.html.erb
605
+ - app/views/wco/api/newsproducer/studio_blue0.html.erb
606
+ - app/views/wco/api/newsproducer/studio_blue1.html.erb
609
607
  - app/views/wco/api/newsproducer/studio_blue2.html.erb
608
+ - app/views/wco/api/newsproducer/studio_coc.html.erb
610
609
  - app/views/wco/api/newsproducer/studio_fps.html.erb
611
- - app/views/wco/api/newsproducer/trash/_scenes.js-bk
612
- - app/views/wco/api/newsproducer/trash/_scenes.js.erb
613
- - app/views/wco/api/newsproducer/trash/_studio_blue0.js
614
- - app/views/wco/api/newsproducer/trash/_studio_blue1.js
615
- - app/views/wco/api/newsproducer/trash/studio_blue0.html.erb
616
- - app/views/wco/api/newsproducer/trash/studio_blue1.html.erb
610
+ - app/views/wco/api/newsproducer/studio_ra2.html.erb
617
611
  - app/views/wco/api/newsvideos/show.jbuilder
618
612
  - app/views/wco/api/tags/index.json.jbuilder
619
613
  - app/views/wco/application/_alerts_notices.haml
@@ -768,7 +762,6 @@ files:
768
762
  - app/views/wco/sitemap_paths/_form.haml
769
763
  - app/views/wco/sitemap_paths/_index.haml
770
764
  - app/views/wco/sitemap_paths/check.haml
771
- - app/views/wco/sitemap_paths/check.haml-trash
772
765
  - app/views/wco/sitemap_paths/edit.haml
773
766
  - app/views/wco/sitemap_paths/new.haml
774
767
  - app/views/wco/sites/_form.haml
@@ -1,65 +0,0 @@
1
-
2
- def body
3
- {
4
- "_links": {
5
- "type":{"href":"http://pi.local/rest/type/node/article"}
6
- },
7
- "title":[{"value":"Node +++ 123 bac +++" }],
8
- "body":[{"value": "<b>hello, wor</b>ld!", "format": "full_html" }],
9
- "type":[{"target_id":"article"}],
10
- "status": [{"value": 1}],
11
- "_embedded": {
12
- "http://pi.local/rest/relation/node/article/field_issue": [
13
- { "uuid": [{ "value": "56229a95-d675-43e1-99b1-f9e11b5579c5" }] }
14
- ],
15
- "http://pi.local/rest/relation/node/article/field_tags": [
16
- { "uuid": [{ "value": "45646a7d-1a16-42e8-b758-f6e1c8d976f7" }] },
17
- { "uuid": [{ "value": "834e34e2-05ae-498d-b876-453798872ce1" }] }
18
- ]
19
- }
20
-
21
- }
22
- end
23
-
24
- def do_post
25
- HTTParty.post( post_url,
26
- body: JSON.generate( body ),
27
- headers: { 'Content-Type' => 'application/hal+json' },
28
- basic_auth: { username: username, password: password },
29
- )
30
- end
31
-
32
- def wp_import
33
- site = self
34
-
35
- root_tag = Wco::Tag.find_or_create_by slug: "#{site.slug}_wp-import", site_id: site.id
36
- url = "#{site.origin}/wp-json/wp/v2/posts"
37
- pi_admin = Wco::Profile.find_or_create_by email: 'admin@piousbox.com'
38
- n_pages = 12
39
- per_page = 100
40
-
41
- (1..n_pages).each do |page|
42
- print "Page #{page}"
43
-
44
- posts = HTTParty.get url, query: { per_page: per_page, page: page }
45
- posts.each do |post|
46
- report = Wco::Report.new({
47
- legacy_id: post['id'],
48
- created_at: post['date'],
49
- slug: post['link'].sub(site.origin, ''),
50
- title: post['title']['rendered'],
51
- subtitle: post['excerpt']['rendered'],
52
- body: post['content']['rendered'],
53
- author: pi_admin,
54
- tag_ids: ( [ root_tag ] + site.tags.where( :legacy_id.in => post['categories'] ) ).map(&:id),
55
- })
56
-
57
- if report.save
58
- print '^'
59
- else
60
- puts report.errors.messages
61
- end
62
- end
63
- end
64
- puts "ok"
65
- end
@@ -1,20 +0,0 @@
1
-
2
- const MODELS_ROOT = '/vendor/models'
3
- let scenes = {
4
- collision_world: `${MODELS_ROOT}/scenes/000mb collision-world/collision-world.glb`,
5
- skybox_1: { height: 30, url: `${MODELS_ROOT}/scenes/000mb skybox_1/scene.glb` },
6
- room_1: { height: 6, url: `${MODELS_ROOT}/scenes/000mb room-1/scene.glb` },
7
- mountain_1: { height: 30, url: `${MODELS_ROOT}/scenes/000mb lowpoly-mountain/scene.glb` },
8
- meshy_3: { height: 30, url: `${MODELS_ROOT}/scenes/004mb meshy-scene-3/scene.glb` },
9
- newsroom_green: { height: 3.3, url: `${MODELS_ROOT}/scenes/001mb newsroom_green/scene.glb` },
10
- rick_and_morty_garage: `${MODELS_ROOT}/scenes/003mb rick-and-morty-garage/scene.glb`,
11
- white_park: { height: 10, name: '003mb h100cm white_park' },
12
- }
13
-
14
- <% Dir.glob(Rails.root.join('public/vendor/models/scenes/00*')).each do |file| %>
15
- <%- basename = File.basename(file) -%>
16
- <%= basename.split.last -%>: {
17
- <%= "height: #{$1.to_i / 10.0}," if basename =~ /h(\d{3})cm/ -%>
18
- name: "<%= File.basename(file) -%>",
19
- },
20
- <% end %>
@@ -1,15 +0,0 @@
1
-
2
- let MODELS_ROOT = '/vendor/models'
3
- let scenes = {
4
-
5
- <% Dir.glob(Rails.root.join('public/vendor/models/scenes/00*')).each do |file| %>
6
- <%- basename = File.basename(file) -%>
7
- "<%= basename.split.last -%>": {
8
- <%= "height: #{$1.to_i / 10.0}," if basename =~ / h(\d+)cm / -%>
9
- <%= "height: #{$1}," if basename =~ / h(\d+) / -%>
10
- name: "<%= basename -%>",
11
- },
12
- <% end %>
13
-
14
- }
15
- window.scenes = scenes